0 Replies Latest reply on Dec 23, 2013 5:40 PM by zatopek

    error jboss 7.1 when deply initial context with spring

    zatopek

      Hello

       

      i am migrating one of my app from jboss 5 to bjoss EAP 6 or jboss 7.

      i using into my app spring for loading the context this xml definition:

      <?xml version="1.0" encoding="UTF-8" ?>

      <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

      <beans>

        <bean id="jndiTmpl" class="org.springframework.jndi.JndiTemplate">

           <property name="environment">

              <props>

                  <prop key="java.naming.factory.initial">

                  </prop>

                  <prop key="java.naming.provider.url">remote://localhost:4447</prop>

                  <prop key="java.naming.factory.url.pkgs">

                      org.jboss.naming.remote:org.jboss.naming.remote.client.InitialContextFactory

                  </prop>

                  <prop key="java.naming.security.principal">

                      admin

                  </prop>

                  <prop key="java.naming.security.credentials">

                      mypasswd

                  </prop>

              </props>

          </property>

      </bean>

      <bean id="myDSe" class="org.springframework.jndi.JndiObjectFactoryBean">

          <property name="jndiTemplate">

            <ref bean="jndiTmpl"/>

          </property>

          <property name="jndiName" value="MYDS">

          </property>

      </bean>

      </beans>

       

       

      but always i return this error (bellow) when i deploy my app

      Can you help me for initializate the context into jboss EAP 6 or jboss 7.1?

       

       

      thanks

       

       

      23:30:08,782 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 599) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myDSe' defined in ServletContext resource [/WEB-INF/classes/spring/my-jdbc.xml]: Initialization of bean failed; nested exception is javax.naming.NamingException: JBAS011843: No logró instanciar InitialContextFactory  del cargador de clase ModuleClassLoader for Module "deployment.my.war:main" from Service Module Loader

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:370) [spring-1.2.5.jar:1.2.5]

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) [spring-1.2.5.jar:1.2.5]

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) [spring-1.2.5.jar:1.2.5]

        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269) [spring-1.2.5.jar:1.2.5]

        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318) [spring-1.2.5.jar:1.2.5]

        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134) [spring-1.2.5.jar:1.2.5]

        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230) [spring-1.2.5.jar:1.2.5]

        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156) [spring-1.2.5.jar:1.2.5]

        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48) [spring-1.2.5.jar:1.2.5]

        ..............................

      Caused by: javax.naming.NamingException: JBAS011843: No logró instanciar InitialContextFactory  del cargador de clase ModuleClassLoader for Module "deployment.my.war:main" from Service Module Loader

        at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681) [rt.jar:1.7.0_45]

        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307) [rt.jar:1.7.0_45]

        at javax.naming.InitialContext.init(InitialContext.java:242) [rt.jar:1.7.0_45]

        at javax.naming.InitialContext.<init>(InitialContext.java:216) [rt.jar:1.7.0_45]

        at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:105) [spring-1.2.5.jar:1.2.5]

        at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:83) [spring-1.2.5.jar:1.2.5]

        at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121) [spring-1.2.5.jar:1.2.5]

        at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:74) [spring-1.2.5.jar:1.2.5]

        at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:104) [spring-1.2.5.jar:1.2.5]

        at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:125) [spring-1.2.5.jar:1.2.5]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058) [spring-1.2.5.jar:1.2.5]

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363) [spring-1.2.5.jar:1.2.5]

        ... 20 more