I put a simple test class to lookup the "java:/DefaultDS" and it failed as well. It seems more of a JNDI naming issue, so I'll post a new thread in the JNDI forum.
So I created a test EAR that contains only one simple Servlet that looks up the DataSource using the JNDI name to verify that the problem is with JNDI lookup. This time it worked just fine. I am guessing that my problem is related to the EAR. I'll post my updates after I examine the EAR closely.
After some trial and error, I finally located the problem. It seems that the org.jboss.util.naming.NonSerializableFactory class in the required jboss-common-core.jar dependent library is causing any JNDI lookup to fail.
I've created a issue with the JBoss Common project:
I should have seen this before posting another similar issue. I have the same problem with jboss-common-core.jar with Jboss Portal 2.7.2(Base Jboss 4.2.3) , Spring 3.0.0.M3. When included, my other datasource, queue looks in Spring Context file are not recognized.
i been struggling for last two weeks to get around this problem.
However after removing the factory class from jar file as you have suggested in the JIRA issue, when I bind the cache to JNDI, I am getting the following exception
caused by: java.io.NotSerializableException: org.jboss.cache.invocation.CacheInvocationDelegate at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) at java.rmi.MarshalledObject.<init>(MarshalledObject.java:92) at org.jnp.interfaces.MarshalledValuePair.<init>(MarshalledValuePair.java:65) at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:508)
Can you tell me what is wrong with this ?
Appreciate any help in this regard.
thx & rgds,
i see the bug is not resolved. I have the same problem. I want to know if jboss cache can work with jboss AS 4.2?
thanks in advance