2 Replies Latest reply on Jan 26, 2006 11:58 AM by Deborah Redley

    Failed to Deploy Dukes Bank????

    Matt Galloway Newbie

      I'm new to both J2EE and JBoss. I'm using:

      JBoss 4.0
      Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode
      RedHat Fedora RC2 Linux

      I'm trying to get Duke's Bank to work.

      There are no compilation errors or warnings. The database stuff seems to have worked fine. Everything works exactly as documented until I try to deploy at which point I get the following:

      00:26:08,806 INFO [EARDeployer] Init J2EE application: file:/opt/jboss-4.0.0/server/default/deploy/DukesBankApp.ear
      00:26:10,621 INFO [EjbModule] Deploying CustomerBean
      00:26:11,020 INFO [EjbModule] Deploying AccountBean
      00:26:11,127 INFO [EjbModule] Deploying TxBean
      00:26:11,257 INFO [EjbModule] Deploying AccountControllerBean
      00:26:11,472 INFO [EjbModule] Deploying CustomerControllerBean
      00:26:11,571 INFO [EjbModule] Deploying TxControllerBean
      00:26:12,403 WARN [NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
      00:26:12,407 ERROR [MainDeployer] could not start deployment: file:/opt/jboss-4.0.0/server/default/tmp/deploy/tmp43459DukesBankApp.ear-contents/DukesBankACJAR.jar
      org.jboss.deployment.DeploymentException: Failed to setup client ENC; - nested throwable: (org.jboss.deployment.DeploymentException: ejb-ref ejb/accountController, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml)
       at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:150)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
       at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy8.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
      Caused by: org.jboss.deployment.DeploymentException: ejb-ref ejb/accountController, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml
       at org.jboss.deployment.ClientDeployer.setupEnvironment(ClientDeployer.java:236)
       at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:146)
       ... 22 more

      I have tried with both Sun's J2EE 1.4 Tutorial Update 2 and 3 with the same results.

      As I said I'm very new to this so please use small words.

      Thanks in advance,

      Matt Galloway
      Tulsa, OK

        • 1. Re: Failed to Deploy Dukes Bank????
          Matt Galloway Newbie

          After much trial and error I figured it out. Due to a misinterpretation of the Getting Started document, I commented out the following section in hsqldb-ds.xml:

          <!-- This mbean can be used when using in process persistent db
           <mbean code="org.jboss.jdbc.HypersonicDatabase"
           <attribute name="Database">localDB</attribute>
           <attribute name="InProcessMode">true</attribute>
           </mbean> -->

          This apparently had a severly negative affect on JNDI which prevented the app from deploying.

          While I'm completely at fault here, I thought the authors might be interested in how I misinterpreted the information...

          In section the guide states...

          Since we are going to be running the SQL scripts using a tool that connects to the database, we want to make sure the data base is running in client-server mode...

          it then goes on to tell you how to enable the client-service connection-url and then states...

          ...and [make sure] that any other examples are commented out.

          where "other examples" means other examples of the <connetction-url> tags. In the current JBoss 4.0 distribution, this means that you comment out the connection-url needed for "in-process persistent db".

          The reaed is then immediately instructed to scroll to the bottom of the file and to uncomment the MBean declaration for client-server mode, which unfortunately, is immediately above the MBean declaration for the in-process method. Being conciencious, I commented out this definition since I only needed the client-server mode and I was told to "make sure other examples are commented out".

          Yes, I'm stupid but, I assert, so are a lot of other people. I suggest the folllowing change to the last sentence of the first paragraph of

          ...and that any other <connection-url> examples are commented out.

          Everything's working great now! Thanks for a great product and a well written and informative tutorial.



          • 2. Re: Failed to Deploy Dukes Bank????
            Deborah Redley Newbie

            Exactly my problem!!

            I'm not sure I was clear on what I need to comment/uncomment in the hsqldb-ds.xml file.

            Can you clarify?