-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Hibernate 2.1.6 JBoss Deployment Issue
PostPosted: Tue Aug 10, 2004 5:23 pm 
Newbie

Joined: Tue Nov 11, 2003 5:25 pm
Posts: 17
Location: Milwaukee, Wi
Hibernate version: 2.1.6

JBoss version: 3.2.3

Issue Description: The Hibernate service mapping shown below has served us well through several versions of Hibernate. When attempting to deploy the 2.1.6 JAR file we get the stack trace shown further below. It seems that UseOuterJoin is no longer applicable. Is there any new documentation as to deploying 2.1.6 with JBoss?

Mapping documents:
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory,
name=HibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<!-- Make it deploy ONLY after DataSource had been started -->
<depends>jboss.jca:service=LocalTxCM,name=OracleDS</depends>

<attribute name="MapResources">
mappings/com/teramedica/domain/hibernate/TMDBAuditActivity.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBAuditLogRepository.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBBag.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBBagLock.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBBodyPart.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBExternalNotification.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBFileEntry.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBLocation.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBFileInstanceTypeSequence.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBImagingServiceRequest.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBInternalValidationIssue.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBJob.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBJobFileInstance.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBModality.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBPatient.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBPatientId.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBPatientVisit.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBPerformanceMetric.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBQaIssue.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBRequestedProcedure.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBScheduledProcedureStep.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBStudy.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBSeries.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBSopInstance.hbm.xml,
mappings/com/teramedica/domain/hibernate/TMDBStudySession.hbm.xml
</attribute>
<attribute name="JndiName">java:/hibernate/HibernateSessionFactory</attribute>
<attribute name="Datasource">java:/OracleDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.Oracle</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="UseOuterJoin">true</attribute>
<attribute name="ShowSql">false</attribute>
<attribute name="JdbcBatchSize">0</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute>
<attribute name="UseOuterJoin">true</attribute>
<attribute name="DefaultSchema">sa</attribute>
<!--<attribute name="FetchSize">1</attribute>-->
</mbean>
</server>

Full stack trace of any exception that occurs:
10 Aug 2004 15:51:09,553 INFO [ServiceConfigurator main] Problem configuring service jboss.jca:service=HibernateFactory, name=HibernateFactory
org.jboss.deployment.DeploymentException: No Attribute found with name: UseOuterJoin
at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:334)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:172)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
at org.jboss.system.ServiceController.install(ServiceController.java:225)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:183)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
at org.jboss.Main.boot(Main.java:150)
at org.jboss.Main$1.run(Main.java:395)
at java.lang.Thread.run(Thread.java:534)

Name and version of the database you are using: Oracle 9.2.0.3


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 5:53 pm 
Newbie

Joined: Tue Nov 11, 2003 5:25 pm
Posts: 17
Location: Milwaukee, Wi
I realize that I have "UseOuterJoin" in that XML snippet twice. It's a typo.

If I remove UseOuterJoin from the JBoss service-xml file the service deploys fine. However, I am still wondering if there is any documentation as to the deployment of 2.1.6 with JBoss. It seems that there were some significant changes.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 6:03 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Check the API of the MBean, its pretty trivial, just setters and getters. Some new where added, some dropped.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 10:08 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Oh, and read the changelog next time before upgrading.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 12:11 am 
Newbie

Joined: Tue Nov 11, 2003 5:25 pm
Posts: 17
Location: Milwaukee, Wi
Thanks for the response.

I actually did look at the changelog, which states "added several new configuration settings to JMX HibernateService". I also read the code and saw the differences. I was mainly trying to get some insight into the changes. No big deal though.

Thank you again.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 8:30 am 
Newbie

Joined: Tue Jul 06, 2004 9:56 am
Posts: 14
Hm, I got the same problem, it deploys ok without the UseOuterJoin attribute. The only trouble with this is that I generate the xml file using xDoclet (hibernatedoclet & <jbossservice>) in an ant-task. As far as I can see, I can append new, unsupported attributes through an additional XML file, but there is no way I can prevent this tag from creating this attribute, so Hibernate should display warning (deprecated attribute ignored or something), not an error preventing deployment. Am I missing something?

Thank you in advance,
Best regards,
Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 10:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
And how could Hibernate do that? The MBean *server* is complaining that you are trying to set an unknown attribute on the MBean. Hence that fact is never even known to the MBean itself.

As far as the generation of the xml, I don't know about that as I have never used it. But I can't imagine it would add any attribute without the user specifying something.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 10:18 am 
Newbie

Joined: Tue Jul 06, 2004 9:56 am
Posts: 14
steve wrote:
Hence that fact is never even known to the MBean itself.

You are right, of course :-) As to <jbossservice>: it really seems that I cannot prevent it from defining the attribute UseOuterJoints. If I omit this setting, it defaults to false and appears in the jboss-service.xml nevertheless :-(. I reverted to overwrite the generated jboss-service.xml with a predefined (correct) one until xdoclet catches up with the newest release of Hibernate. Thanks for the answer.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 10:27 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Patching the xdoclet templates for that case should not be difficult, too - submit it to xdoclet jira if you do.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.