[JBoss Seam] - Re: using import.sql with multiple datasources
by pmengelt
Hi
when I set the property hibernate.hbm2ddl.auto to create in one datasource and not in the other - it works. My problem is that I have tables that should bei created each time and some are not! here it seems I need one datasource special for the tables that I want to create each time - or is there another possilbility?
regards Pascal
<persistence-unit name="pms-msgbrowser">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/pms-msgbrowserDatasource</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="create"/>
| <property name="hibernate.cache.use_query_cache" value="true"/>
| <property name="hibernate.show_sql" value="true"/>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/pms-msgbrowserEntityManagerFactory"/>
| </properties>
| </persistence-unit>
|
| <persistence-unit name="pms-msgbrowser-LUZ">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/pms-msgbrowser-LUZDatasource</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="validate"/>
| <property name="hibernate.cache.use_query_cache" value="true"/>
| <property name="hibernate.show_sql" value="true"/>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/pms-msgbrowser-LUZEntityManagerFactory"/>
|
| </properties>
| </persistence-unit>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071027#4071027
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071027
18Â years, 8Â months
startup/shutdown script problem.
by Nayyar Ahmad
Hi All,
We have a Jboss server that is running session cache cluster, when i
start/restart them via .run.sh script, i get these lines at the end of
command output,
-------------------------------------------------
myuser@jboss-server$ ./run.sh
.....
.....
INFO [Server] Jboss SHUTDOWN: undeploying all packages
INFO [Server] Shutdown complete
shutdown complete
Halting VM
---------------------------------------------------
in clue?
TIA
--
Nayyar Ahmad
18Â years, 8Â months
[JBoss Seam] - JBoss 4.2.1GA and Hibernate validator - broken
by wschwendt
The following is not a Seam issue, even though it may be important to Seam users.
Bug description:
==========
JBoss AS 4.2.1GA is shipped with
Hibernate Core 3.2.4.sp1
Hibernate Annotations 3.2.1.GA
Hibernate EntityManager 3.2.1.GA
The problem is that instantiation of a Hibernate Validator specified with the org.hibernate.validator.Min annotation fails with an exception (see below).
How to reproduce the bug:
===================
Use JBossAS4.2.1GA and the Seam hotel booking example and annotate method getPrice() of org.jboss.seam.example.booking.Hotel with @Min(0). Then deployment of the hotel booking application fails.
| 2007-08-06 06:13:45,540 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=bookingDatabase
| java.lang.IllegalArgumentException: could not instantiate ClassValidator
| at org.hibernate.validator.ClassValidator.createValidator(ClassValidator.java:294)
| at org.hibernate.validator.ClassValidator.createMemberValidator(ClassValidator.java:262)
| at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:215)
| at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:134)
| at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:318)
| at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
| at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1233)
|
| ...
|
Question:
=======
What needs to be done in order to successfully use the org.hibernate.validator.Min validator? Could a solution be the replacement of the Hibernate packages shipped with JBoss AS 4.2.1GA with more recent versions? I tried to replace those Hibernate jars with Hibernate core 3.3.0GA, Hibernate EntityManager 3.3.1.GA, Hibernate Annotations 3.3.0GA and Hibernate Validator 3.0.0GA, but this produces a a classloading error when Hibernate is started up.
Are there any instructions out there how JBossAS needs to be configured when using the latest Hibernate versions?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071023#4071023
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071023
18Â years, 8Â months
[Beginners Corner] - Issue with JBoss 4.2.1
by j_lalith
Hi,
I download the JBoss 4.2.1 zip and extracted it to a local folder,
Plat form - Fedora Core 5
Java - Java 5
As instructed I executed the run.sh (JAVA_HOME set).
but it gives the following exeception, then I thought it is something to do with the existing log4j libraries in my system, then I removed all the log4j references and executed the run.sh but still It gives the following error.
I see lot of questions like this with no answer, can some one let me know how to solve the following
13:11:37,798 WARN [BasicMBeanRegistry] preRegister() failed for JMImplementation:type=MBeanServerDelegate:
java.lang.NoSuchFieldError: TRACE
at org.jboss.logging.Log4jLoggerPlugin.isTraceEnabled(Log4jLoggerPlugin.java:85)
at org.jboss.logging.Logger.isTraceEnabled(Logger.java:122)
at org.jboss.mx.server.AbstractMBeanInvoker.initAttributeContexts(AbstractMBeanInvoker.java:1009)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.initAttributeContexts(ModelMBeanInvoker.java:597)
at org.jboss.mx.server.AbstractMBeanInvoker.preRegister(AbstractMBeanInvoker.java:647)
at org.jboss.mx.server.registry.BasicMBeanRegistry.invokePreRegister(BasicMBeanRegistry.java:697)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:211)
at org.jboss.mx.server.MBeanServerImpl.(MBeanServerImpl.java:215)
at org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer(MBeanServerBuilderImpl.java:71)
at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:316)
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:219)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:420)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:595)
Failed to boot JBoss:
java.lang.RuntimeException: Cannot create MBeanServer
at org.jboss.mx.server.MBeanServerImpl.(MBeanServerImpl.java:239)
at org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer(MBeanServerBuilderImpl.java:71)
at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:316)
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:219)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:420)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.management.NotCompliantMBeanException: Cannot register MBean: JMImplementation:type=MBeanS erverDelegate
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:314)
at org.jboss.mx.server.MBeanServerImpl.(MBeanServerImpl.java:215)
... 8 more
Caused by: javax.management.RuntimeErrorException
at org.jboss.mx.server.registry.BasicMBeanRegistry.invokePreRegister(BasicMBeanRegistry.java:725)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:211)
... 9 more
Caused by: java.lang.NoSuchFieldError: TRACE
at org.jboss.logging.Log4jLoggerPlugin.isTraceEnabled(Log4jLoggerPlugin.java:85)
at org.jboss.logging.Logger.isTraceEnabled(Logger.java:122)
at org.jboss.mx.server.AbstractMBeanInvoker.initAttributeContexts(AbstractMBeanInvoker.java:1009)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.initAttributeContexts(ModelMBeanInvoker.java:597)
at org.jboss.mx.server.AbstractMBeanInvoker.preRegister(AbstractMBeanInvoker.java:647)
at org.jboss.mx.server.registry.BasicMBeanRegistry.invokePreRegister(BasicMBeanRegistry.java:697)
... 10 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071019#4071019
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071019
18Â years, 8Â months
[EJB 3.0] - Equals and hashCode on Entities fails due to javassist
by ejb3workshop
On a recent project we thought it would be a good idea to inherit a generic implementation of equals and hashCode, as well as the primariy key from an abstract entity. In the equals method we evaluate the class as well as the primary key. In most cases this worked really well for us, but in certain cases equality was not evaluated correctly. After looking further into the problem we found that in the cases it did not evaluate correctly the problem was caused by the classes not matching. It tried to compare one class (Test for example) against another (Test_$$_javassist_), which didn't equate and produces a false response.
I am guessing that the javassist originates from entities being loaded LAZY.
Is there a better way of achieving what we are trying to do ?
We are using JBoss 4.0.5 with EJB3 RC9.
Any suggestions welcome
Alex
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071016#4071016
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071016
18Â years, 8Â months