Announcement Announcement Module
Collapse
No announcement yet.
unable to export rmi service to weblogic jndi Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • unable to export rmi service to weblogic jndi

    Hello,

    I try to export a very simple rmi service with JndiRmiServiceExporter to weblogic8.1 SP6. (jdk1.4.2_16)

    public class MyService implements IMyService, java.io.Serializable {

    private static final long serialVersionUID = -3461745279396211657L;

    public String getService() {
    return "Hello Service";
    }

    }

    <bean id="myService" class="de.xxx.MyService">
    </bean>

    <bean class="org.springframework.remoting.rmi.JndiRmiSer viceExporter">
    <property name="service" ref="myService" />
    <property name="jndiName" value="XXXService" />
    <property name="serviceInterface" value="de.xxx.IMyService"/>
    <property name="jndiEnvironment">
    <props>
    <prop key="java.naming.factory.initial">weblogic.jndi.WL InitialContextFactory</prop>
    <prop key="java.naming.provider.url">t3://localhost:7001</prop>
    </props>
    </property>
    </bean>

    and I get the error:
    INFO - JndiRmiServiceExporter.rebind(132) | Binding RMI service to JNDI location [XXXService]
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.remoting.rmi.JndiRmiServiceEx porter#0' defined in class path resource [conf/test/spring/vamContext-rmi.xml]: Invocation of init method failed; nested exception is javax.naming.NamingException [Root exception is java.rmi.MarshalException: failed to marshal rebind(Ljava.lang.String;Ljava.lang.Object;Ljava.u til.Hashtable; nested exception is:
    java.rmi.server.ExportException: Failed to invoke contructor for server reference: 'weblogic.rmi.cluster.ClusterableServerRef'; nested exception is:
    java.lang.NullPointerException]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1337)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:221)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:729)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:381)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
    at de.arbeitsagentur.vam.schnittstellen.robaso.RMISer ver.main(RMIServer.java:10)
    Caused by: javax.naming.NamingException [Root exception is java.rmi.MarshalException: failed to marshal rebind(Ljava.lang.String;Ljava.lang.Object;Ljava.u til.Hashtable; nested exception is:
    java.rmi.server.ExportException: Failed to invoke contructor for server reference: 'weblogic.rmi.cluster.ClusterableServerRef'; nested exception is:
    java.lang.NullPointerException]
    at weblogic.jndi.internal.ExceptionTranslator.toNamin gException(ExceptionTranslator.java:91)
    at weblogic.jndi.internal.ExceptionTranslator.toNamin gException(ExceptionTranslator.java:39)
    at weblogic.jndi.internal.ExceptionTranslator.toNamin gException(ExceptionTranslator.java:77)
    at weblogic.jndi.internal.WLContextImpl.translateExce ption(WLContextImpl.java:418)
    at weblogic.jndi.internal.WLContextImpl.rebind(WLCont extImpl.java:143)
    at javax.naming.InitialContext.rebind(InitialContext. java:363)
    at org.springframework.jndi.JndiTemplate$3.doInContex t(JndiTemplate.java:217)
    at org.springframework.jndi.JndiTemplate.execute(Jndi Template.java:88)
    at org.springframework.jndi.JndiTemplate.rebind(JndiT emplate.java:215)
    at org.springframework.remoting.rmi.JndiRmiServiceExp orter.rebind(JndiRmiServiceExporter.java:134)
    at org.springframework.remoting.rmi.JndiRmiServiceExp orter.prepare(JndiRmiServiceExporter.java:122)
    at org.springframework.remoting.rmi.JndiRmiServiceExp orter.afterPropertiesSet(JndiRmiServiceExporter.ja va:105)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1368)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1334)
    ... 15 more
    Caused by: java.rmi.MarshalException: failed to marshal rebind(Ljava.lang.String;Ljava.lang.Object;Ljava.u til.Hashtable; nested exception is:
    java.rmi.server.ExportException: Failed to invoke contructor for server reference: 'weblogic.rmi.cluster.ClusterableServerRef'; nested exception is:
    java.lang.NullPointerException
    at weblogic.rjvm.BasicOutboundRequest.marshalArgs(Bas icOutboundRequest.java:86)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke( ReplicaAwareRemoteRef.java:284)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke( ReplicaAwareRemoteRef.java:247)
    at weblogic.jndi.internal.ServerNamingNode_814_WLStub .rebind(Unknown Source)
    at weblogic.jndi.internal.WLContextImpl.rebind(WLCont extImpl.java:141)
    ... 24 more
    Caused by: java.rmi.server.ExportException: Failed to invoke contructor for server reference: 'weblogic.rmi.cluster.ClusterableServerRef'; nested exception is:
    java.lang.NullPointerException
    at weblogic.rmi.internal.OIDManager.makeServerReferen ce(OIDManager.java:220)
    at weblogic.rmi.internal.OIDManager.getReplacement(OI DManager.java:184)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.getRepl acement(RemoteObjectReplacer.java:269)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replace Object(RemoteObjectReplacer.java:93)
    at weblogic.rmi.utils.io.InteropObjectReplacer.replac eObject(InteropObjectReplacer.java:49)
    at weblogic.common.internal.ChunkedObjectOutputStream .replaceObject(ChunkedObjectOutputStream.java:54)
    at weblogic.common.internal.ChunkedObjectOutputStream $NestedObjectOutputStream.replaceObject(ChunkedObj ectOutputStream.java:249)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1025)
    at java.io.ObjectOutputStream.writeObject(ObjectOutpu tStream.java:278)
    at weblogic.common.internal.ChunkedObjectOutputStream .writeObject(ChunkedObjectOutputStream.java:120)
    at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(Ms gAbbrevOutputStream.java:93)
    at weblogic.rmi.internal.ObjectIO.writeObject(ObjectI O.java:36)
    at weblogic.rjvm.BasicOutboundRequest.marshalArgs(Bas icOutboundRequest.java:82)
    ... 28 more
    Caused by: java.lang.NullPointerException
    at weblogic.server.Server.getConfig(Server.java:58)
    at weblogic.rmi.cluster.ReplicaAwareInfo.getReplicaHa ndlerClass(ReplicaAwareInfo.java:100)
    at weblogic.rmi.cluster.ReplicaAwareInfo.getReplicaHa ndlerClass(ReplicaAwareInfo.java:89)
    at weblogic.rmi.cluster.ReplicaAwareInfo.<init>(Repli caAwareInfo.java:46)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.<init>( ReplicaAwareServerRef.java:37)
    at weblogic.rmi.cluster.ClusterableServerRef.<init>(C lusterableServerRef.java:14)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:274)
    at weblogic.rmi.internal.OIDManager.makeServerReferen ce(OIDManager.java:205)
    ... 40 more

    Have you an ideea what's wrong?

    Thanks?
    dragan-sassler
Working...
X