2 Replies Latest reply on Sep 3, 2012 9:52 AM by Jagan reddy

    Jboss 5.1 deployment issue

    Jagan reddy Newbie

      Hi,

       

      I have an ear file which is the combination of war and jar. In this having ejb-2.1 beans. Trying to deploy this ear in jboss-5.1, but getting below error:

       

      19:10:52,146 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=ee.ear,jar=ee.jar,name=EmagiaFacader,service=EJB3 state=Create

      java.lang.NullPointerException

              at javax.naming.NameImpl.<init>(NameImpl.java:264)

              at javax.naming.CompoundName.<init>(CompoundName.java:187)

              at org.jnp.interfaces.NamingParser.parse(NamingParser.java:62)

              at org.jboss.util.naming.Util.bind(Util.java:90)

              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bind(JndiSessionRegistrarBase.java:910)

              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bind(JndiSessionRegistrarBase.java:895)

              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bind(JndiSessionRegistrarBase.java:884)

              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bindEjb(JndiSessionRegistrarBase.java:151)

              at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:210)

              at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:577)

              at org.jboss.ejb3.stateless.StatelessContainer.lockedStart(StatelessContainer.java:192)

              at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:884)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)

              at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)

              at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)

              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)

              at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)

              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)

              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)

              at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)

              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)

              at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)

              at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)

              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

              at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

              at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

              at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

              at org.jboss.Main.boot(Main.java:221)

              at org.jboss.Main$1.run(Main.java:556)

       

      Here sending my ejb-jar.xml and jboss.xml files.

       

      Please help me to resolve this.

       

      Regards

      Jagan

      Thankyou.

        • 1. Re: Jboss 5.1 deployment issue
          Stephen Coy Master

          Try adding:

           

          {code:xml}<ejb-jar version="2.1"

              xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">

            ...

          </ejb-jar>{code}

          and

           

          {code:xml}

          <jboss xmlns="http://www.jboss.com/xml/ns/javaee"

             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

             xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee

                                      http://www.jboss.org/j2ee/schema/jboss_5_1.xsd"

                       version="5.1">

             ...

          </jboss>{code}

           

          to your respective deployment descriptors.

          • 2. Re: Jboss 5.1 deployment issue
            Jagan reddy Newbie

            Hi,

             

            Thanks for your reply.

            Added suggested changes in ejb-jar.xml, but with version = "2.1" getting error changed it to "3.0" then errors are not getting (In jboss.xml also not added given code because if adding that code giving error) after did this, in server.log file showing as below:

            18:59:36,230 INFO  [JBossASKernel] installing bean: jboss.j2ee:ear=ee.ear,jar=ee.jar,name=EmagiaFacader,service=EJB3

            18:59:36,246 INFO  [JBossASKernel]   with dependencies:

            18:59:36,246 INFO  [JBossASKernel]   and demands:

            18:59:36,246 INFO  [JBossASKernel]      jboss.ejb:service=EJBTimerService

            18:59:36,262 INFO  [JBossASKernel]   and supplies:

            18:59:36,262 INFO  [JBossASKernel]      jndi:emagia/ejb/FacaderHome

            18:59:36,277 INFO  [JBossASKernel]      Class:emagia.ejb.FacaderHome

            18:59:36,277 INFO  [JBossASKernel]      jndi:ee/EmagiaFacader/home

            18:59:36,293 INFO  [JBossASKernel] Added bean(jboss.j2ee:ear=ee.ear,jar=ee.jar,name=EmagiaFacader,service=EJB3) to KernelDeployment of: ee.jar

            18:59:38,480 INFO  [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@9e9f93{name=jboss.j2ee:ear=ee.ear,jar=ee.jar,name=EmagiaFacader,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}

            18:59:47,215 INFO  [SessionSpecContainer] Starting jboss.j2ee:ear=ee.ear,jar=ee.jar,name=EmagiaFacader,service=EJB3

            18:59:47,215 INFO  [EJBContainer] STARTED EJB: emagia.ejb.EmagiaFacader ejbName: EmagiaFacader

            18:59:47,261 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

             

             

                    ee/EmagiaFacader/home - EJB2.x Remote Home Interface

             

            And ejb-jar.xml code is:

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

            <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">

            <display-name>Emagia Enterprise</display-name>

            <enterprise-beans>

                      <session id="Session_1">

                      <description>Session Facade</description>

                      <display-name>Session Facade</display-name>

                      <ejb-name>EmagiaFacader</ejb-name>

                      <home>emagia.ejb.FacaderHome</home>

                      <remote>emagia.ejb.FacaderRemote</remote>

                      <ejb-class>emagia.ejb.EmagiaFacader</ejb-class>

                      <session-type>Stateless</session-type>

                      <transaction-type>Bean</transaction-type>

                      <resource-ref>

                                <res-ref-name>jdbc/EMAGIADS</res-ref-name>

                                <res-type>javax.sql.DataSource</res-type>

                                <res-auth>Container</res-auth>

                      </resource-ref>

                      </session>

            </enterprise-beans>

            </ejb-jar>

             

             

            And jboss.xml code :

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

            <jboss>

              <enterprise-beans>

                  <session>

                        <ejb-name>RollingForecastEngine</ejb-name>

                        <jndi-name>emagia/ejb/RollingWindowForecastsEngineHome</jndi-name>

                        <resource-ref>

                                <res-ref-name>jdbc/EMAGIADS</res-ref-name>

                                <jndi-name>EMAGIADS</jndi-name>

                        </resource-ref>

                </session>

              </enterprise-beans>

            </jboss>

             

            But when trying to access below code getting NullPointerException!

            Context ctx = new InitialContext();

            home          =          (EJBHome) PortableRemoteObject.narrow(ctx.lookup(homeClass.getName().replace('.','/')),homeClass);

             

             

            In the above code homeClass value is "interface emagia.ejb.FacaderHome" and homeClass.getName() value is "emagia.ejb.FacaderHome"

             

            Please help me to resolve this.

             

            Regards

            Jagan.