-->
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.  [ 5 posts ] 
Author Message
 Post subject: Jboss + Hibernate (mbean) help
PostPosted: Wed Jul 28, 2004 3:04 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 2:41 pm
Posts: 40
I have followed the article at http://www.hibernate.org/66.html but I am still having problems.

I can deploy the MBean (hibernateStartup.sar) by itself and it appears to be fine.

However, if I put it in my ear then deployment of the ear will give me errors.

EAR structure...
Code:
  META-INF/
       application.xml
       jboss-app.xml

  cglib-full-2.0.1.jar
  commons-collections-2.1.jar
  commons-logging-1.0.3.jar
  dom4j-1.4.jar
  ehcache-0.7.jar
  hibernate2.jar
  odmg-3.0.jar
  hibernateStartup.sar


hibernateStartup.sar in EAR file is... Note that the class files will be in the ejb jar file.
Code:
  mappings/
       Division.hbm.xml

  META-INF/
       jboss-service.xml


The error in the jboss server.log is:
Quote:
2004-07-28 14:57:22,265 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/C:/dev/j2ee/jboss-4.0.0DR4/server/default/deploy/E3.ear
2004-07-28 14:57:23,265 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/C:/dev/j2ee/jboss-4.0.0DR4/server/default/tmp/deploy/tmp3906E3.ear-contents/hibernate2.jar-contents/net/sf/hibernate/jca/hibernate-service.xml
org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.resource.connectionmanager.LocalTxConnectionManager; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.resource.connectionmanager.LocalTxConnectionManager)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
at org.jboss.system.ServiceController.install(ServiceController.java:200)
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:232)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:207)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:817)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:673)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:637)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:232)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
at $Proxy7.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.resource.connectionmanager.LocalTxConnectionManager
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:258)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:466)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1181)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:270)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:328)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
... 32 more
2004-07-28 14:57:23,281 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/C:/dev/j2ee/jboss-4.0.0DR4/server/default/tmp/deploy/tmp3906E3.ear-contents/hibernate2.jar
org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.resource.connectionmanager.LocalTxConnectionManager; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.resource.connectionmanager.LocalTxConnectionManager)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
at org.jboss.system.ServiceController.install(ServiceController.java:200)
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:232)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:207)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:817)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:673)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:637)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:232)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
at $Proxy7.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.resource.connectionmanager.LocalTxConnectionManager
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:258)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:466)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1181)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:270)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:328)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
... 32 more


What have I done wrong? Note that right now the ejb.jar file is not included in the application.xml file nor in the ear file b/c I am trying to narrow down the error.

Thank you very very much.
-David Wilson


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 28, 2004 3:32 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2004 8:19 am
Posts: 49
Hey would you pls post your

jboss-service.xml


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 28, 2004 4:19 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 2:41 pm
Posts: 40
Code:
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory,
                            name=HibernateFactory">
    <depends>jboss.jca:service=RARDeployer</depends>
    <depends>jboss.jca:service=LocalTxCM,name=MSSQLDS</depends>
    <!-- Make it deploy ONLY after DataSource had been started -->
   
    <attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
   
    <attribute name="Datasource">java:/MSSQLDS</attribute>
    <attribute name="Dialect">net.sf.hibernate.dialect.SQLServerDialect</attribute>
   
    <attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
   <attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
   <attribute name="UseOuterJoin">false</attribute>

   <attribute name="ShowSql">true</attribute>
   
   <attribute name="UserTransactionName">UserTransaction</attribute>
   
   <attribute name="MapResources">mappings/Division.hbm.xml
                           
   </attribute>

</mbean>
</server>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 28, 2004 5:01 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 2:41 pm
Posts: 40
Problem found see...
http://forum.hibernate.org/viewtopic.php?t=931495

Basically in hibernate2.jar there is a hibernate-service.xml. Remove that from the hibernate2.jar file and it works.

Now for the
Code:
2004-07-28 16:52:27,109 WARN  [org.apache.coyote.tomcat5.MapperListener] Error registering Context jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/E3
ReflectionException: Cannot find method findMappingObject with this signature Cause: java.lang.NoSuchMethodException: org.apache.commons.modeler.BaseModelMBean.findMappingObject()

error that I have. But that is not for this posting. :)

Anyone know when Hibernate will release a patch for this? I'm guessing that this is fixed in CVS but I don't want to get CVS updates.

Cheers,
David


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 28, 2004 5:10 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
It will be fixed in 2.1.5, due next Monday.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.