5 Replies Latest reply on Nov 30, 2013 3:44 AM by loo maggic

    EAR on jBoss6.1.Final not work

    loo maggic Newbie

      hi:

           i am try to port my application to jBoss EAP6.1.Final ,in my application has two ejb 2.0 module is not work.

      i saw the discuss where url is EAR on jBoss EAP 6.1.Final not able to find res-ref

      and i follow the solution to use configuration files as  ejb-jar.xml and jboss-ejb3.xml,but i am got following errors:

       

      14:04:18,948 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 25) JBAS018559: 已部署的 "tsm-5topdesk.ear"(runtime-name: "tsm-5topdesk.ear")

      14:04:18,952 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: 服务状态报告

      JBAS014775: 新的缺失的/未满足的依赖关系:

      service jboss.deployment.subunit."tsm-5topdesk.ear"."TopdeskEJB.jar".deploymentCompleteService (缺失的)依赖关系: [service jboss.deployment.unit."tsm-5topdesk.ear".deploymentCompleteService]

      service jboss.deployment.subunit."tsm-5topdesk.ear"."TopdeskWEB.war".deploymentCompleteService (缺失的)依赖关系: [service jboss.deployment.unit."tsm-5topdesk.ear".deploymentCompleteService]

      service jboss.jndi-view.extension.registry (缺失的)依赖关系: [service jboss.jndi-view.extension.ee]

      service jboss.naming (缺失的)依赖关系: [service jboss.data-source.java:jboss/datasources/ExampleDS]

      service jboss.naming.context.java (缺失的)依赖关系: [service jboss.naming.context.java.TransactionManager]

      service jboss.naming.context.java.comp.tsm-5topdesk.TopdeskEJB.ServiceInovker (缺失的)依赖关系: [service jboss.naming.context.java.comp.tsm-5topdesk.TopdeskEJB.ServiceInovker.Validator, service jboss.naming.context.java.comp.tsm-5topdesk.TopdeskEJB.ServiceInovker.ValidatorFactory]

      service jboss.naming.context.java.comp.tsm-5topdesk.TopdeskEJB.UsbEjb (缺失的)依赖关系: [service jboss.naming.context.java.comp.tsm-5topdesk.TopdeskEJB.UsbEjb.ValidatorFactory, service jboss.naming.context.java.comp.tsm-5topdesk.TopdeskEJB.UsbEjb.Validator]

      service jboss.naming.context.java.global (缺失的)依赖关系: [service jboss.deployment.subunit."tsm-5topdesk.ear"."TopdeskWEB.war".INSTALL, service jboss.deployment.subunit."tsm-5topdesk.ear"."TopdeskEJB.jar".INSTALL]

      service jboss.naming.context.java.jboss (缺失的)依赖关系: [service jboss.naming.context.java.jboss.mail.Default, service jboss.naming.context.java.jboss.TransactionManager, service jboss.naming.context.java.jboss.UserTransaction, service jboss.deployment.subunit."tsm-5topdesk.ear"."TopdeskWEB.war".INSTALL, JBAS014799: 以及 5 ]

      service jboss.naming.context.java.jboss.exported (缺失的)依赖关系: [service jboss.deployment.subunit."tsm-5topdesk.ear"."TopdeskWEB.war".INSTALL, service jboss.deployment.subunit."tsm-5topdesk.ear"."TopdeskEJB.jar".INSTALL]

       

      PS:I know this has been discussed many times but i still  has problem,i need you help .

      Thanks.

        • 1. Re: EAR on jBoss6.1.Final not work
          loo maggic Newbie

          Please give me some advice

          • 2. Re: EAR on jBoss6.1.Final not work
            loo maggic Newbie

            i changed my config file like this:

            in file standalone.xml i add the follow config,

                    <subsystem xmlns="urn:jboss:domain:naming:1.3">

                        <bindings>

                            <lookup lookup="java:/ServiceInovker" name="java:/ServiceInovker"/>

                            <lookup lookup="java:/UsbEjb" name="java:/UsbEjb"/>

                        </bindings>

                    </subsystem>

             

            the ejb-jar.xml content is the follow,

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

            <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

            <ejb-jar >

               <description><![CDATA[No Description.]]></description>

               <display-name>Generated by XDoclet</display-name>

               <enterprise-beans>

              <session>

              <ejb-name>ServiceInovker</ejb-name>

              <home>com.topsec.topdesk.ejb.interfaces.ServiceInovkerHome</home>

              <remote>com.topsec.topdesk.ejb.interfaces.ServiceInovker</remote>

              <local-home>com.topsec.topdesk.ejb.interfaces.ServiceInovkerLocalHome

              </local-home>

              <local>com.topsec.topdesk.ejb.interfaces.ServiceInovkerLocal

              </local>

              <ejb-class>

              com.topsec.topdesk.ejb.ServiceInovkerSession

              </ejb-class>

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

              <transaction-type>Container</transaction-type>

              </session>

              <session>

              <description>

              UsbEjb

              </description>

              <display-name>UsbEjb</display-name>

              <ejb-name>UsbEjb</ejb-name>

              <home>com.topsec.topdesk.ejb.usb.UsbEjbHome</home>

              <remote>com.topsec.topdesk.ejb.usb.UsbEjb</remote>

              <local-home>com.topsec.topdesk.ejb.usb.UsbEjbLocalHome

              </local-home>

              <local>com.topsec.topdesk.ejb.usb.UsbEjbLocal

              </local>

              <ejb-class>com.topsec.topdesk.ejb.usb.UsbEjbSession

              </ejb-class>

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

              <transaction-type>Container</transaction-type>

              </session>

               </enterprise-beans>

            </ejb-jar>

             

            the jboss-ejb3.xml content is the follow ,

             

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

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

                    xmlns="http://java.sun.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-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"

                    version="3.1" impl-version="2.0">

                    <jboss:enterprise-beans>

                            <session>

                                    <ejb-name>ServiceInovker</ejb-name>

                                    <resource-ref>

                                            <res-ref-name>ServiceInovker</res-ref-name>

                                            <lookup-name>java:/ServiceInovker</lookup-name>

                                    </resource-ref>  

                            </session>          

              <session>

              <ejb-name>UsbEjb</ejb-name>

               <resource-ref>

                                            <res-ref-name>UsbEjb</res-ref-name>

                                            <lookup-name>java:/UsbEjb</lookup-name>

                                    </resource-ref>  

              </session>

                    </jboss:enterprise-beans>

            </jboss:ejb-jar>

             

            now the server.log is this,

            19:08:00,375 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named ServiceInovker in deployment unit subdeployment "TopdeskEJB.jar" of deployment "tsm-5topdesk.ear" are as follows:

             

              java:global/tsm-5topdesk/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerLocal

              java:app/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerLocal

              java:module/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerLocal

              java:global/tsm-5topdesk/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerHome

              java:app/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerHome

              java:module/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerHome

              java:jboss/exported/tsm-5topdesk/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerHome

              java:global/tsm-5topdesk/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerLocalHome

              java:app/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerLocalHome

              java:module/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovkerLocalHome

              java:global/tsm-5topdesk/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovker

              java:app/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovker

              java:module/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovker

              java:jboss/exported/tsm-5topdesk/TopdeskEJB/ServiceInovker!com.topsec.topdesk.ejb.interfaces.ServiceInovker

             

            19:08:00,376 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named UsbEjb in deployment unit subdeployment "TopdeskEJB.jar" of deployment "tsm-5topdesk.ear" are as follows:

             

              java:global/tsm-5topdesk/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbLocal

              java:app/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbLocal

              java:module/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbLocal

              java:global/tsm-5topdesk/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbLocalHome

              java:app/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbLocalHome

              java:module/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbLocalHome

              java:global/tsm-5topdesk/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjb

              java:app/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjb

              java:module/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjb

              java:jboss/exported/tsm-5topdesk/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjb

              java:global/tsm-5topdesk/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbHome

              java:app/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbHome

              java:module/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbHome

              java:jboss/exported/tsm-5topdesk/TopdeskEJB/UsbEjb!com.topsec.topdesk.ejb.usb.UsbEjbHome

             

            now i invoke the ServiceInovker ejb the error message is follow,

            19:11:31,830 ERROR [stderr] (ServerService Thread Pool -- 73) javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]

            19:11:31,830 ERROR [stderr] (ServerService Thread Pool -- 73) at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1280)

            19:11:31,831 ERROR [stderr] (ServerService Thread Pool -- 73) at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1360)

            19:11:31,831 ERROR [stderr] (ServerService Thread Pool -- 73) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:575)

            19:11:31,831 ERROR [stderr] (ServerService Thread Pool -- 73) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568)

            19:11:31,849 ERROR [stderr] (ServerService Thread Pool -- 73) at javax.naming.InitialContext.lookup(InitialContext.java:392)

            19:11:31,849 ERROR [stderr] (ServerService Thread Pool -- 73) at com.topsec.topdesk.client.InvokerFactory.startManger(InvokerFactory.java:68)

            19:11:31,849 ERROR [stderr] (ServerService Thread Pool -- 73) at com.topsec.topdesk.client.ManagerLoader.init(ManagerLoader.java:43)

            19:11:31,850 ERROR [stderr] (ServerService Thread Pool -- 73) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194)

            19:11:31,853 ERROR [stderr] (ServerService Thread Pool -- 73) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1100)

            19:11:31,853 ERROR [stderr] (ServerService Thread Pool -- 73) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3591)

            19:11:31,853 ERROR [stderr] (ServerService Thread Pool -- 73) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3798)

            19:11:31,853 ERROR [stderr] (ServerService Thread Pool -- 73) at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156)

            19:11:31,854 ERROR [stderr] (ServerService Thread Pool -- 73) at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)

            19:11:31,854 ERROR [stderr] (ServerService Thread Pool -- 73) at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)

            19:11:31,854 ERROR [stderr] (ServerService Thread Pool -- 73) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

            19:11:31,854 ERROR [stderr] (ServerService Thread Pool -- 73) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

            19:11:31,854 ERROR [stderr] (ServerService Thread Pool -- 73) at java.util.concurrent.FutureTask.run(FutureTask.java:138)

            19:11:31,854 ERROR [stderr] (ServerService Thread Pool -- 73) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

            19:11:31,855 ERROR [stderr] (ServerService Thread Pool -- 73) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

            19:11:31,855 ERROR [stderr] (ServerService Thread Pool -- 73) at java.lang.Thread.run(Thread.java:619)

            19:11:31,855 ERROR [stderr] (ServerService Thread Pool -- 73) at org.jboss.threads.JBossThread.run(JBossThread.java:122)

            19:11:31,856 ERROR [stderr] (ServerService Thread Pool -- 73) Caused by: java.net.SocketTimeoutException: Receive timed out

            19:11:31,856 ERROR [stderr] (ServerService Thread Pool -- 73) at java.net.PlainDatagramSocketImpl.receive0(Native Method)

            19:11:31,856 ERROR [stderr] (ServerService Thread Pool -- 73) at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)

            19:11:31,856 ERROR [stderr] (ServerService Thread Pool -- 73) at java.net.DatagramSocket.receive(DatagramSocket.java:712)

            19:11:31,890 ERROR [stderr] (ServerService Thread Pool -- 73) at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1250)

            19:11:31,891 ERROR [stderr] (ServerService Thread Pool -- 73) ... 20 more

             

            my code is in the follow,

            Properties properties = new Properties();

                properties.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");

                    properties.setProperty("java.naming.provider.url", "jnp://127.0.0.1:1099");

                    properties.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");

               Context context = new InitialContext();

                        context = new InitialContext(properties);

                        ServiceInovkerHome home = (ServiceInovkerHome)context.lookup("ServiceInovker");

                        _isRun = home.create().startManager();

             

            Where the error occurred?

            • 3. Re: EAR on jBoss6.1.Final not work
              Wolf-Dieter Fink Master

              The properties are a bit confusing, you don't use it and for EAP6 they are wrong.

               

              If you have a resource-ref you should use "java:comp/env/...".

              You might have a look to the ejb-multi-server quickstart where you have a similar approach with EJB3.

              • 4. Re: EAR on jBoss6.1.Final not work
                loo maggic Newbie

                Thank you for your advice.

                • 5. Re: EAR on jBoss6.1.Final not work
                  loo maggic Newbie

                  i solved this problem with upgrade my ejb version from 2.0 to 3.1.