0 Replies Latest reply on May 17, 2004 12:18 AM by raehalme

    .ear deployment fails with: Failed to setup client ENC

    raehalme

      Hi!

      I'm trying to deploy an .ear file that contains several EJB modules, two web archives and a J2EE application client. The deployment, however, sometimes fails with an error message:

      07:53:03,933 DEBUG [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@8b403728{ url=file:/usr/java/jboss-3.2.3/server/default/deploy/xxxxx.ear, deployedLastModified=1083905425000 }
      org.jboss.deployment.DeploymentException: Failed to setup client ENC; - nested throwable: (org.jboss.deployment.DeploymentException: Failed to resolve ejb-link: xxxxx make by ejb-name: ejb/xxxxx)
       at org.jboss.deployment.ClientDeployer.create(ClientDeployer.java:120)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
       at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      Caused by: org.jboss.deployment.DeploymentException: Failed to resolve ejb-link: xxxxx make by ejb-name: ejb/xxxxx
       at org.jboss.deployment.ClientDeployer.setupEnvironment(ClientDeployer.java:207)
       at org.jboss.deployment.ClientDeployer.create(ClientDeployer.java:116)
       ... 16 more


      I have enabled PrefixDeploymentSorter in the jboss-service.xml and renamed the .jar files:

      100-aaaaaa.jar = EJB module
      200-aaaaaa.jar = EJB module
      200-bbbbb.jar = EJB module
      200-cccccc.jar = EJB module
      300-aaaaaa.jar = EJB module
      aaaaaa.war = WAR module
      bbbbb.war = WAR mobule
      400-aaaaaa.jar = J2EE application client

      The order is also maintained in the .ear's application.xml.

      According to the log files, I believe that the initial processing of .jar files happens in the above order (state: CONSTRUCTED). But the actual processing (create step?) of the .jar files seems to happen in more or less random order. Sometimes the deployment succeeds as the EJB modules are processed before the J2EE application client, but often it fails with the above error message.

      I have listed the ejb-links inside the J2EE application client's META-INF/application-client.xml. It shouldn't be the problem as the deployment sometimes is a success. The client also has a file META-INF/jboss-client.xml that specifies the client jndi-name. When the deployment succeeds, I can use all clients (stand-alone and web applications) normally.

      If the deployment fails, I can re-try by touching the .ear file again and again. Eventually after 1-10 retries the deployment will succeed. Unfortunately trying to re-deploy the application over and over again doesn't solve the problem in a production environment. You cannot rely on JBoss starting automatically if the deployment may fail at startup.

      JBoss version is 3.2.3 running on a Linux box.

      Any ideas what could be wrong? Please let me know if you need more information. Thanks in advance!

      Best regards,
      Thomas