[Installation, Configuration & DEPLOYMENT] - Hibernate exception when Classloader scoping enabled
by smpub2000
Jboss 4.2, I have an EAR file with EJBS and WARs. I have a third part library (Gigaspaces) that uses hibernate. With Class loader scoping disabled, everything works fine. However when I enable scoping, I get the following exception, even though I have ojdbc14.jar in lib directory at root of EAR. Why would it find the EAR without scoping, but not find it when scoping is enabled, since scoping does not affect modules inside the EAR file.
scoping:<loader-repository>foobar:archive=foobar.ear
exception: java.sql.SQLException: No suitable driver
Detailed:
18:03:55,373 INFO [STDOUT] WARN [main] (Environment.java:503) - Property [hibernate.cglib.use_reflection_optimizer] has been renamed to [hibernate.bytecode.use_reflection_optimizer]; update your properties appropriately
18:03:56,168 INFO [STDOUT] WARN [main] (Environment.java:503) - Property [hibernate.cglib.use_reflection_optimizer] has been renamed to [hibernate.bytecode.use_reflection_optimizer]; update your properties appropriately
18:03:56,262 INFO [STDOUT] WARN [main] (SettingsFactory.java:117) - Could not obtain connection metadata
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at com.gigaspaces.datasource.hibernate.SessionFactoryBuilder.getFactory(SourceFile:66)
at com.gigaspaces.datasource.hibernate.HibernateDataSource.init(SourceFile:137)
at com.j_spaces.obf.de.init(SourceFile:457)
at com.j_spaces.sadapter.datasource.DataAdapter.init(SourceFile:295)
at com.j_spaces.obf.fr.a(SourceFile:346)
at com.j_spaces.obf.ko.a(SourceFile:699)
at com.j_spaces.core.JSpaceImpl.u(SourceFile:3385)
at com.j_spaces.core.JSpaceImpl.r(SourceFile:3263)
at com.j_spaces.core.JSpaceImpl.start(SourceFile:3100)
at com.j_spaces.core.JSpaceImpl.(SourceFile:369)
at com.j_spaces.core.JSpaceContainerImpl.a(SourceFile:2997)
at com.j_spaces.core.JSpaceContainerImpl.a(SourceFile:2920)
at com.j_spaces.core.JSpaceContainerImpl.aU(SourceFile:1315)
at com.j_spaces.core.JSpaceContainerImpl.aN(SourceFile:715)
at com.j_spaces.core.JSpaceContainerImpl.(SourceFile:610)
at com.j_spaces.core.client.SpaceFinder.a(SourceFile:695)
at com.j_spaces.core.client.SpaceFinder.a(SourceFile:814)
at com.j_spaces.core.client.SpaceFinder._find(SourceFile:540)
at com.j_spaces.core.client.SpaceFinder.internalFind(SourceFile:345)
at com.j_spaces.core.client.SpaceFinder.internalFind(SourceFile:333)
at com.j_spaces.core.client.SpaceFinder.find(SourceFile:412)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146667#4146667
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146667
17 years, 12 months
[EJB/JBoss] - Re: jboss throws an exception when casting a proxy class
by jborra
Jaikiran,
First of all, thank you for your suggestion.
No, I do not have the bean interface in more than one jar (at least not in the files I have deployed). I have read the document for which you sent a link and also followed the suggested jmx-console steps to verify if the bean interface appears in multiple places. This is what I found:
j2eetest.ejb.ConfigurationBean Information
Repository cache version:
j2eetest.ejb.ConfigurationBean(77b794).ClassLoader=org.jboss.mx.loading.UnifiedClassLoader3@1186cf9{ url=file:/C:/apps/jboss-4.2.2.GA/server/default/tmp/deploy/tmp1179J2EETest-ejb.jar ,addedOrder=47}
..org.jboss.mx.loading.UnifiedClassLoader3@1186cf9{ url=file:/C:/apps/jboss-4.2.2.GA/server/default/tmp/deploy/tmp1179J2EETest-ejb.jar ,addedOrder=47}
....file:/C:/apps/jboss-4.2.2.GA/server/default/tmp/deploy/tmp1179J2EETest-ejb.jar
....file:/C:/apps/jboss-4.2.2.GA/server/default/tmp/deploy/tmp1179J2EETest-ejb.jar-contents/TKUSA.jar
..org.jboss.system.server.NoAnnotationURLClassLoader@8a0d5d
..sun.misc.Launcher$AppClassLoader@df6ccd
....file:/C:/apps/jboss-4.2.2.GA/bin/run.jar
....file:/C:/Program%20Files/Java/jdk1.6.0/lib/tools.jar
..sun.misc.Launcher$ExtClassLoader@601bb1
....file:/C:/Program%20Files/Java/jdk1.6.0/jre/lib/ext/dnsns.jar
....file:/C:/Program%20Files/Java/jdk1.6.0/jre/lib/ext/localedata.jar
....file:/C:/Program%20Files/Java/jdk1.6.0/jre/lib/ext/sunjce_provider.jar
....file:/C:/Program%20Files/Java/jdk1.6.0/jre/lib/ext/sunmscapi.jar
....file:/C:/Program%20Files/Java/jdk1.6.0/jre/lib/ext/sunpkcs11.jar
++++CodeSource: (file:/C:/apps/jboss-4.2.2.GA/server/default/tmp/deploy/tmp1179J2EETest-ejb.jar )
Implemented Interfaces:
++interface javax.ejb.SessionBean(1b57dcb)
++++ClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@11e0c13{ url=null ,addedOrder=2}
++++CodeSource: (file:/C:/apps/jboss-4.2.2.GA/server/default/lib/jboss-j2ee.jar )
### Instance0 found in UCL: org.jboss.mx.loading.UnifiedClassLoader3@1186cf9{ url=file:/C:/apps/jboss-4.2.2.GA/server/default/tmp/deploy/tmp1179J2EETest-ejb.jar ,addedOrder=47}
>From the documentation and jmx's output I would say that I only have one instance of my test bean (ConfigurationBean).
I have more information but still do not know how to correct the problem. :(
Regards,
Jesus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146665#4146665
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146665
17 years, 12 months