Announcement Announcement Module
Collapse
No announcement yet.
Context initialization failed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Context initialization failed

    Hi all,
    I get some trouble when I'm lauching my JONAS server, In fact something is wrong with my Spring config file but I don't understand why....

    The exception:

    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'partnerManager' defined in class path resource [com/francetelecom/odn/crosser/tests/applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
        java.lang.ClassNotFoundException: org.objectweb.jonas_gen.com.francetelecom.odn.crosser.services.partner.JOnASPartnerManagerEJB834421401Home_Stub]
    Caused by: javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
        java.lang.ClassNotFoundException: org.objectweb.jonas_gen.com.francetelecom.odn.crosser.services.partner.JOnASPartnerManagerEJB834421401Home_Stub]
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:103)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123)
        at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
        at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)
        at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:146)
        at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:93)
        at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
        at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.lookup(AbstractRemoteSlsbInvokerInterceptor.java:92)
        at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.refreshHome(AbstractSlsbInvokerInterceptor.java:104)
        at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.afterPropertiesSet(AbstractSlsbInvokerInterceptor.java:91)
        at org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean.afterPropertiesSet(SimpleRemoteStatelessSessionProxyFactoryBean.java:97)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
        at com.francetelecom.odn.crosser.tests.partner.PartnerManagerTest.setUp(PartnerManagerTest.java:27)
        at junit.framework.TestCase.runBare(TestCase.java:132)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
        java.lang.ClassNotFoundException: org.objectweb.jonas_gen.com.francetelecom.odn.crosser.services.partner.JOnASPartnerManagerEJB834421401Home_Stub
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:93)
        ... 40 more
    Caused by: java.lang.ClassNotFoundException: org.objectweb.jonas_gen.com.francetelecom.odn.crosser.services.partner.JOnASPartnerManagerEJB834421401Home_Stub
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:430)
        at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
        at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
        at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
        at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        ... 42 more
    And my action-servlet.xml file:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:aop="http://www.springframework.org/schema/aop"
    	xmlns:tx="http://www.springframework.org/schema/tx"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.0.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-2.0.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
    
    	<!-- annuaire JNDI du serveur d'application Jonas -->
    	<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    		<property name="environment">
    		  <props>
    			<prop key="java.naming.factory.initial">com.sun.jndi.rmi.registry.RegistryContextFactory</prop>
    			<prop key="java.naming.provider.url">rmi://10.15.168.18:1099</prop>
    			<prop key="java.naming.factory.url.pkgs">org.objectweb.jonas.naming</prop>
    		  </props>		
    		</property>
    	</bean>
    	
    	
    	<bean id="partnerManager"
    		class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
    		<property name="jndiName" value="Crosser.PartnerManager" />
    		<property name="businessInterface" value="com.francetelecom.odn.crosser.services.partner.PartnerManager" />
    		<property name="jndiTemplate" ref="jndiTemplate" />
    	</bean>
    	
    	<bean id="catalogueManager"
    		class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
    		<property name="jndiName" value="Crosser.CatalogueManager" />
    		<property name="businessInterface"
    			value="com.francetelecom.odn.crosser.services.catalogue.CatalogueManager" />
    		<property name="jndiTemplate" ref="jndiTemplate" />
    	</bean>	
    
    	<bean name="/ordering" class="orderingandprovisioning.ordering.actions.OrderingAction">
    		<property name="catalogueManager"><ref bean="catalogueManager"/></property>
    	</bean>
    	
    </beans>
    Any idea?

  • #2
    You've got a ClassNotFoundException on your EJB.

    If you're trying to access a remote EJB, you need some "client Jar" that will help you connect to that EJB, and that Jar is missing in your classpath.

    Comment


    • #3
      solved

      TY very much, i forgot the class

      Comment

      Working...
      X