0 Replies Latest reply on Sep 5, 2007 4:03 PM by Yiping Zhao

    org.jboss.deployment.DeploymentException: Failed to setup cl

    Yiping Zhao Newbie

      Hi,

      I have an ejb3 application which includes POJO and ejb2.0 sessionbean, I got following exception when I deployed the application on JBOSS 4.2.1GA, does anyone have some ideas about this?

      [java] org.jboss.deployment.DeploymentException: Failed to setup client ENC; - nested throwable: (org.jboss.deployment.DeploymentException: ejb-ref ejb/TestRunner, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml)
      [java] at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:176)
      [java] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      [java] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
      [java] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      [java] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      [java] at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      [java] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      [java] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      [java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      [java] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      [java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      [java] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      [java] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      [java] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      [java] at $Proxy9.deploy(Unknown Source)
      [java] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      [java] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      [java] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      [java] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      [java] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      [java] Caused by: org.jboss.deployment.DeploymentException: ejb-ref ejb/TestRunner, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml
      [java] at org.jboss.deployment.ClientDeployer.setupEnvironment(ClientDeployer.java:266)
      [java] at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:172)
      [java] ... 22 more

      The jboss.xml I put in app_ejb.jar looks like:

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

      <!DOCTYPE jboss PUBLIC
      "-//JBoss//DTD JBOSS 4.0//EN"
      "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">


      <enterprise-beans>

      <ejb-name>TestRunnerBean</ejb-name>
      <jndi-name>ejb/TestRunner</jndi-name>

      </enterprise-beans>


      The ejb-jar.xml looks like:

      <?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">
      <enterprise-beans>

      <ejb-name>TestRunnerBean</ejb-name>
      oracle.toplink.testing.tests.internal.ejb.TestRunnerHome
      oracle.toplink.testing.tests.internal.ejb.TestRunner
      <ejb-class>oracle.toplink.testing.tests.internal.ejb.TestRunnerBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>
      <persistence-context-ref>
      <persistence-context-ref-name>persistence/myPersistenceContext</persistence-context-ref-name>
      <persistence-unit-name>toplinkentities</persistence-unit-name>
      </persistence-context-ref>
      <persistence-unit-ref>
      <persistence-unit-ref-name>persistence/myPersistenceUnit</persistence-unit-ref-name>
      <persistence-unit-name>toplinkentities</persistence-unit-name>
      </persistence-unit-ref>
      <!--
      any ejb or resource refs that are accessed in the test case
      -->


      <!--
      any other ejbs in the jar
      -->
      </enterprise-beans>
      </ejb-jar>