JRebel: how to disable hbm2dll schema export in JRebel? - eclipse

The question says it all. i'm using jrebel (5.5)
for hibernate plugin it says: "Enables automatic schema updating if hibernate.hbm2ddl.auto=update or schemaUpdate=true on org.springframework.orm.hibernate3.LocalSessionFactoryBean."
how can i disable it (or change)? it deletes and recreates (incorrect) my database schema on every start/stop and clean...
thx

Pardon,
i've found out that my full text search failed badly.
there was another setting for this in the persistence.xml. feeling dumb right now.
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
change it to:
<property name="hibernate.hbm2ddl.auto" value="none" />
did it for me

Related

AllowUserPasswordChange not working in jasperserver 6.0.1

I have changed the jasperserver-servlet.xml file in jasperserver 6.0.1 to enable the user password change link on the login screen as below.
From:
<property name="allowUserPasswordChange" value="false" />
To:
<property name="allowUserPasswordChange" value="true" />
This enabled the change password link on the login screen but when i am clicking on the link nothing is happening. Do i am missed some settings.

How do I prevent Ebuild from updating my project dependences

Whenever I run workspace.xml it updates the revisions stated in my project's module.revisions file. How can I stop this?
You need to set the EBuild property update-upstream to false.
To do this, edit workspace.xml and find it, making it look like the following:
<property name="update-upstream" value="false"/>

Problems with GWT app when deploying in Apache Tomcat 7

I'm using
GWT Framework
GXT 4.2
MySQL
Gilead
c3p0
Hibernate
When I run my application from eclipse works perfectly each remote procedures, then generated the compiler war with google and I'm success all 6 reviews finally copy the generated war (which is a folder and not a. War) in webapps apache-tomcat 7 and deploy my application apparently works but fails in the following:
Does not perform well validations logic to insert data into the database, sometimes it works and sometimes not.
When I make a data operation such as recovering "registered assists a teacher" sometimes the data recovering well and sometimes not (it should be noted that the tuples retrieved before passing through a logic that puts them a state "delay" by according to the time recorded example), it seems that failure is part of the java code, but when I run it from eclipse works perfectly the same example.
Every so long (8 hours average) to open the web page with the server path I get "Connection error with bd" or "error retrieving fields to the combo box" (I do this before showing)
If you could help me I'll be a thousand grateful, I think the google compiler does not compile the code in java good or not can be wrong.
Part of my hibernate.cfg files is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration
DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-
3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.bytecode.use_reflection_optimizer">false</property>
<property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="hibernate.connection.password">password</property>
<property name="hibernate.connection.url">jdbc:mysql://domain/bd</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.current_session_context_class">thread</property>
<property
name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="hibernate.search.autoregister_listeners">false</property>
<property
name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvide
1
5
20
300
0
100
SELECT 1;
I think it is the default 8h connection reset of mysql and hibernate.
It is impossible, that the hibernate (pure java, not gwt compiled to JS) can influence the database connection.
But your hibernate configuration seems to be correct.

How to ignore creating tables if existing in Postgresql database with eclipselink?

I'm using a Postgresql database with eclipselink2.3 provider in JOnAS (Java environment). My configuration is :
persistence.xml:
...
<property name="eclipselink.ddl-generation" value="create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="database"/>
<property name="eclipselink.target-database" value="POSTGRESQL"/>
...
Postgresql version is
VersionĀ : 8.4.11-0squeeze1
JDBC driver version is
postgresql-8.4-703.jdbc3.jar
When database is empty, there is no problem.
My problem is when eclipselink.ddl-generation is set to create-tables and tables are already existing in data base, an error is occured and process doesn't not continue with the next statement as explained here.
Does anyone see a solution for that?
I don't see any property that would prevent throwin error in your case. So i would suggest the following. You should have 3 persistence.xml files for 3 different environoments: development, testing and production.
In development environoment you want to work with clean database, so
<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
The same with testing environoment, but in this case I would use DBUnit to fill database with test data.
In production you don't want to mess with database structure so
<property name="eclipselink.ddl-generation" value="none"/>
is the right choice.
If you use ant or maven such configuration is fairly easy to accomplish (you might find examples in the net, since this is pretty standard approach).
I guess you will not like this answer ;), since this looks like quite a lot of additional work, but in the long run clean configuration and separation would pay off.
The "create-tables" option does not fail if the table already exists. It will log the error, but continue.
If you don't want to see the error, you can turn off logging.
What error do you get?

Persisting app.config variables in updates via Click once deployment

Every time a new update is released for an application with click once, the variables in the app.config file are destroyed
<userSettings>
<app.My.MySettings>
<setting name="Email" serializeAs="String">
<value />
</setting>
<setting name="UserName" serializeAs="String">
<value />
</setting>
</app.My.MySettings>
</userSettings>
How can i prevent that?
Is there any way of feching the variables from the previous application version?
Do you have the "Applications should check for updates" option checked?
Have a look at Exploring Secrets of Persistent Application Settings (the section titled "Maintaining Settings Between Program Versions"):
For any settings from the current
version that match settings in the
prior version, this routine will
import them into the current version's
user.config file:
At the entry point to your program, place the following code.
if (Properties.Settings.Default.UpgradeSettings)
{
Properties.Settings.Default.Upgrade();
Properties.Settings.Default.UpgradeSettings = false;
}
Note that UpgradeSettings is a boolean user setting (not application) that you need to add yourself, and you want the default value to be True.
If you use user-level settings instead of application-level settings, it will copy them forward when a new version is retrieved.
The safest thing to do, though, is to separate this data from the ClickOnce update, uh, "experience". See if this helps:
http://robindotnet.wordpress.com/2009/08/19/where-do-i-put-my-data-to-keep-it-safe-from-clickonce-updates/