I am using:
- JBoss AS 4.2.3.GA
- JBoss Cache 3.2.0
in the configuration, I am setting the loader as:
| <loaders passivation="false" shared="false">
| <loader class="org.jboss.cache.loader.JDBCCacheLoader"
async="true" fetchPersistentState="true"
ignoreModifications="false" purgeOnStartup="false">
|
| <properties>
| cache.jdbc.datasource=java:/DefaultDS
| cache.jdbc.table.name=jbosscache
| cache.jdbc.table.create=true
| cache.jdbc.table.drop=false
| </properties>
| </loader>
| </loaders>
|
But this throws exception during startup due to not able to grab a connection using the
datasource specified above, and when I inspect the JNDI tree, the DefaultDS does exist.
So I traced into it, it seems that, when retrieving the datasource using the JNDI name, it
can not find the the factory class org.jboss.naming.NonSerializableFactory class, which
included in the jboss-common-core.jar file and deployed with my EAR file, and therefore,
returns a null. The original ClassNotFound exception is ignored in the
javax.naming.spi.NamingManager class when it tries to instantiate the factory class.
I don't understand why this class is not found, as it is already included in the
EAR/lib folder. The class that tries to lookup the JNDI datasource is
org.jboss.cache.loader.ManagedConnectionFactory, which is in the jbosscache-core.jar file,
and is in the same EAR/lib folder. So it should be able to see the NonSerializableFactory
class just fine.
I wonder if I am the only one having this problem using the JDBCCacheLoader with JNDI
name. Any help is appreciated.
Thanks,
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257486#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...