Announcement Announcement Module
Collapse
No announcement yet.
Unable to create JNDI template using spring 2.0 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to create JNDI template using spring 2.0

    I am trying to upgrade to spring 2.0 M2. Spring is unable to create a jndi template an d throws up the javax.naming.CommunicationException exception.

    Please note that this exact same piece of code works fine using spring-1.2.5 release. Am I missing something in the configuration required for spring 2.0.

    Here's my configuration code.
    Code:
    <bean id="JndiTemplate" class="org.springframework.jndi.JndiTemplate">
        <property name="environment">
            <props>
                <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                <prop key="java.naming.provider.url">t3://myurl:7001</prop>
            </props>
       </property>
    </bean>
    Here's the complete error log.
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.io.StreamCorruptedException]
    at weblogic.jndi.internal.ExceptionTranslator.toNamin gException(ExceptionTranslator.java:83)
    at weblogic.jndi.internal.WLContextImpl.translateExce ption(WLContextImpl.java:418)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLCont extImpl.java:374)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLCont extImpl.java:359)
    at javax.naming.InitialContext.lookup(InitialContext. java:347)
    at org.springframework.jndi.JndiTemplate$1.doInContex t(JndiTemplate.java:123)
    at org.springframework.jndi.JndiTemplate.execute(Jndi Template.java:85)
    at org.springframework.jndi.JndiTemplate.lookup(JndiT emplate.java:121)
    at org.springframework.jndi.JndiTemplate.lookup(JndiT emplate.java:146)
    at org.springframework.jndi.JndiLocatorSupport.lookup (JndiLocatorSupport.java:86)
    at org.springframework.jndi.JndiObjectLocator.lookup( JndiObjectLocator.java:104)
    at org.springframework.jndi.JndiObjectFactoryBean.aft erPropertiesSet(JndiObjectFactoryBean.java:125)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:860)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:829)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:409)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:238)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:148)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:186)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:106)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:764)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:575)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:405)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:238)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:148)
    at com.aol.cbi.broker.CbiStandaloneServer.main(CbiSta ndaloneServer.java:67)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.io.StreamCorruptedException
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke( ReplicaAwareRemoteRef.java:290)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke( ReplicaAwareRemoteRef.java:247)
    at weblogic.jndi.internal.ServerNamingNode_814_WLStub .lookup(Unknown Source)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLCont extImpl.java:371)
    ... 22 more
    Caused by: java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1506)
    at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1435)
    at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1626)
    at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1274)
    at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:324)
    at weblogic.common.internal.ChunkedObjectInputStream. readObject(ChunkedObjectInputStream.java:114)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgA bbrevInputStream.java:111)
    at weblogic.jndi.internal.RootNamingNode_WLSkel.invok e(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicS erverRef.java:466)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke( ReplicaAwareServerRef.java:108)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:409)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:353)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:144)
    at weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:404)
    at weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:170)

    Thanks in advance for all your help.
Working...
X