[JBoss Seam] - import.sql executed twice (I know why but...)
by nmartignole
Hi guys
As you know, you can define an SQL file "import.sql" that gets imported by Hibernate at each application deploy. I add an issue this morning: all my sample entries were imported twice at each deploy...
I found that the reason was due to a duplicate definition of property hibernate.hbm2ddl.auto in both my hibernate.cfg.xml and persistence.xml file.
If you set the value to create-drop in both files, the import.sql file is imported twice. To make it work properly I updated the value to "update" in the hibernate.cfg.xml.
my question is :
- is this a bug to let the user in Seam do this ? or couldn't we drop a little WARN message just in case of ?
I also found that persistence.xml is the first one that gets called. hibernate.cfg.xml for my jBPM stuffs is called after all the jbpm init stuffs.
So maybe the order could be also important if I want to create defaults users in the jbpm part...
I just want a feed back and your opinion on this.
Thanks
Nicolas
--------------------------------------------------------
>From hibernate doc:
anonymous wrote :
| hibernate.hbm2ddl.auto Automatically validate or export schema DDL to the database when the SessionFactory is created. With create-drop, the database schema will be dropped when the SessionFactory is closed explicitly.
|
| eg. validate | update | create | create-drop
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072042#4072042
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072042
18Â years, 9Â months
[Messaging, JMS & JBossMQ] - DefaultJMSProvider not bound
by raickman
Hi,
I am using JBoss v 4.0.4 GA, on Solaris platform and don't understand this:
I get the following error when starting JBoss:
-------------------------------------------------------------------------------------
13:26:43,391 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:ear=app-3.5.3.ear,jar=workflow-1.0.0.jar,name=BusinessProcessMessageBean,service=EJB3
State: FAILED
Reason: javax.naming.NameNotFoundException: DefaultJMSProvider not bound
I Depend On:
persistence.units:ear=app-3.5.3.ear,jar=workflow-1.0.0.jar,unitName=manager1
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:ear=app-3.5.3.ear,jar=workflow-1.0.0.jar,name=BusinessProcessMessageBean,service=EJB3
State: FAILED
Reason: javax.naming.NameNotFoundException: DefaultJMSProvider not bound
I Depend On:
persistence.units:ear=app-3.5.3.ear,jar=workflow-1.0.0.jar,unitName=manager1
-------------------------------------------------------------------------------------
In the deploy directory, I put in infoqueue-destinations-service.xml:
| <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=myNotificationQueue">
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
| <attribute name="SecurityConf">
| <security>
| <role name="administrator" read="true" write="true" create="true"/>
| <role name="user" read="true" write="true" create="true"/>
| </security>
| </attribute>
| </mbean>
|
In jboss-service.xml:
| <attribute name="RecursiveSearch">True</attribute>
|
If I drop my ear file when JBoss is already started, everthing works!
Om my Windows localhost JBoss with same config, everything works too.
Could you please tell me what I m doing wrong ?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072041#4072041
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072041
18Â years, 9Â months