5 Replies Latest reply on Sep 5, 2010 4:18 PM by jstoner99

    Trying to get Duke's Bank to start

    jstoner99

      I am working with the Getting Started JBoss tutorial, and I've run into a few problems. I've resolved some, but there seem to be a lot of them and it's taking a while to get a simple tutorial to work.

       

      I am running JBoss 5.1.0 GA, and I have downloaded the j2eetutorial14 from Oracle, and I got the JBoss code from

       

      http://www.iomule.com/JBoss/v5/jbossj2ee-src.zip

       

      as indicated on

       

      http://www.iomule.com/JBoss/

       

      I am trying to deploy the application to the server, and seeing

       

      Deployment "vfszip:/Users/jstoner/Documents/jboss-5.1.0.GA/server/default/deploy/JBossDukesBank.ear/" is in error due to the following reason(s): org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'description'. One of '{"http://java.sun.com/xml/ns/j2ee":display-name, "http://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":module}' is expected. @ vfszip:/Users/jstoner/Documents/jboss-5.1.0.GA/server/default/deploy/JBossDukesBank.ear/META-INF/application.xml[6,18]

       

          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:637)

       

      It looks like an XML problem with application.xml. This is the file that came with jbossj2ee-src.zip:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
          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/application_1_4.xsd">
          <display-name>JBossDukesBank</display-name>
          <description>application description</description>
          <module>
              <ejb>bank-ejb.jar</ejb>
          </module>
          <module>
              <java>app-client.jar</java>
          </module>
          <module>
              <web>
                  <web-uri>web-client.war</web-uri>
                  <context-root>bank</context-root>
              </web>
          </module>
          <security-role>
              <role-name>BankAdmin</role-name>
          </security-role>
          <security-role>
              <role-name>BankCustomer</role-name>
          </security-role>
      </application>

       

      I've monkeyed with this file a fair amount and produced different errors on deploy. Two questions come to mind:

       

      1. how should this be formatted?

      2. Is there a more up-to-date getting started tutorial for 5.1.0 that 'just works?' This one has been kind of ridiculous to work with. Compile errors, bad classpaths, and this bad XML...

      3. If the answer to 2 is 'no,' I guess I'm making one. When it works who should I give it to?

        • 1. Re: Trying to get Duke's Bank to start
          jstoner99

          Ok, fixed that. Just deleted the <description> element and now it seems to get farther. Now I get:

           

          19:14:18,686 WARN  [HDScanner] Failed to process changes
          org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

           

          DEPLOYMENTS MISSING DEPENDENCIES:
            Deployment "jboss.j2ee:module="bank-ejb.jar",service=EjbModule" is missing the following dependencies:
              Dependency "jboss.ejb:service=EJBTimerService" (should be in state "Create", but is actually in state "Configured")

           

          DEPLOYMENTS IN ERROR:
            Deployment "jboss.ejb:service=EJBTimerService" is in error due to the following reason(s): Configured

           

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:637)

           

          I'll keep chugging on this, but if anyone has any ideas let me know (I haven't dealt with EJBs at all).

          • 2. Re: Trying to get Duke's Bank to start
            jaikiran

            If you are interested in getting started with EJBs, then these tutorials will be a better place http://www.jboss.org/ejb3/docs

            • 3. Re: Trying to get Duke's Bank to start
              jstoner99

              Thanks. I'm actually not, I'm much more interested in Hibernate. I'm just following the tutorial step-by-step. If you have any recommendations for Hibernate instead, I'd appreciate it.

              • 4. Re: Trying to get Duke's Bank to start
                jaikiran

                John Stoner wrote:

                 

                Thanks. I'm actually not, I'm much more interested in Hibernate. I'm just following the tutorial step-by-step. If you have any recommendations for Hibernate instead, I'd appreciate it.

                I have seen many users running into problems with the Duke bank example with AS-5. So that's why I don't really recommend it. As for Hibernate tutorials, see if this helps http://docs.jboss.org/hibernate/core/3.5/reference/en/html/

                 

                The rest of the docs on Hibernate are here http://docs.jboss.org/hibernate/

                1 of 1 people found this helpful
                • 5. Re: Trying to get Duke's Bank to start
                  jstoner99

                  Thanks much!

                   

                  I feel like I blundered into trying the Duke Bank example. I suppose there are  a number of paths into the JBoss website, and it's a little confusing. I'm not exactly a JBoss newb--I worked for years at a company that used JBoss but wrapped everything in its own corporate APIs. Is anyone looking at the newb path into JBoss and maybe smoothing the developer experience a bit? If so I can certainly help.