[jboss-jira] [JBoss JIRA] Commented: (JBCOMMON-93) org.jboss.util.naming.NonSerializableFactory causes JNDI lookup failure
parmod mehta (JIRA)
jira-events at lists.jboss.org
Tue Feb 9 19:31:10 EST 2010
[ https://jira.jboss.org/jira/browse/JBCOMMON-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12511444#action_12511444 ]
parmod mehta commented on JBCOMMON-93:
--------------------------------------
My problem could also be related to this issue. I am configuring jboss-cache2 for hibernate 3.3.2. Adding pom dependency
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jbosscache2</artifactId>
<version>3.3.2.GA</version>
</dependency>
causes JNDI failures
Caused by: javax.naming.NameNotFoundException: JNDI object with [java:MYDS] not found: JNDI implementation returned null
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:157)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:200)
at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:186)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
Now adding jboss-common-core exclusion work fine but this need I can't use second level cache. I tried even the latest jboss-common-core-2.2.17.GA with no success.
Is there a work around for this problem? thanks
> org.jboss.util.naming.NonSerializableFactory causes JNDI lookup failure
> -----------------------------------------------------------------------
>
> Key: JBCOMMON-93
> URL: https://jira.jboss.org/jira/browse/JBCOMMON-93
> Project: JBoss Common
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: common-core (2.x)
> Affects Versions: 2.2.14.GA, 2.2.15.GA
> Reporter: Alan Feng
> Attachments: jboss-test.ear.zip
>
>
> The problem was discovered when using JBoss Cache. When including JBoss Cache in the custom application EAR/lib, jboss-common-core.jar is also included as a dependent JAR file. However, the org.jboss.util.naming.NonSerializableFactory class in the jboss-common-core.jar is causing JNDI lookup failures (returning NULL while the object exists in the JNDI tree).
> What happened, from tracing into the code, is:
> When invoking InitialContext.lookup() method, the org.jboss.util.naming.NonSerializableFactory class is automatically used as the factory class to lookup object from the JNDI tree with the "getObjectInstance" method. However, its internal "wrapperMap" property is empty, never filled with any JNDI objects. Therefore, the lookup always returns NULL even when the object exists.
> I consider the problem is with the org.jboss.util.naming.NonSerializableFactory class in the JBoss Common project because this problem will occur when:
> - The custom EAR uses scoped deployment
> - The org.jboss.util.naming.NonSerializableFactory is in the EAR's classpath (such as including the jboss-common-core.jar file in the EAR/lib folder)
> In other words, the jboss-common-core.jar can not be included in individual EAR file.
> Please note that there is another NonSerializableFactory class which is in a different package "org.jboss.naming", that class has nothing to do with this problem.
> I'll attach a sample EAR to demonstrate the problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list