14 Replies Latest reply on Feb 16, 2004 2:39 AM by ahardy66

    Duke application error

    pgoes Newbie

      I've been followed the steps in Get started documentation accordingly, but when I try run the example typing http://localhost:8080/bank/main I have the following response


      HTTP Status 500 - No Context configured to process this request

      type Status report

      message No Context configured to process this request

      description The server encountered an internal error (No Context configured to process this request) that prevented it from fulfilling this request.
      Apache Tomcat/4.1.24-LE-jdk14

      Can you help me?
      Thanks in advance
      pgoes

        • 1. Re: Duke application error
          pgoes Newbie

          In addition to my last post I'd like to report that when trying the following

          ant -f jboss-build.xml run-client

          I've got the error message bellow

          [java] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/ebank/appclient/BankAdmin
          [java] Java Result: 1

          Thanks in advance
          pgoes

          • 2. Re: Duke application error
            ahardy66 Novice

            Hi there, I'm a jboss newby myself but it looks like your webapp isn't running because you haven't deployed it - or it failed to load on startup. Your client is probably in the same situation.

            Did you manage to compile, assemble & deploy everything without errors, before you got this far?

            • 3. Re: Duke application error
              pgoes Newbie

              Yes, I did it successfully. All steps until the deployment were performed according to jbossj2ee.pdf tutorial, but the situation remains the same. Do you have any sugestions how and what files shoud I checkup in order to find my mistake?

              Thanks in advance
              pgoes

              • 4. Re: Duke application error
                ahardy66 Novice

                The first thing I would check is that the jboss console is running, under

                http://localhost:8080/jmx-console/HtmlAdaptor?action=displayMBeans


                • 5. Re: Duke application error
                  pgoes Newbie

                  Yes, the server is running and under default configuration mode

                  • 6. Re: Duke application error
                    ahardy66 Novice

                    on the jmxconsole then, under the header jboss.web, do you see the following entries:

                    # context=/bank,name=Dispatcher,vhost=localhost
                    # context=/bank,name=default,vhost=localhost
                    # context=/bank,name=invoker,vhost=localhost
                    # context=/bank,name=jsp,vhost=localhost
                    


                    • 7. Re: Duke application error
                      pgoes Newbie

                      The entries you mentioned aren't there. The only existing entry is: service=WebServer. When I click on it the next page doesn't have any of those entries too.

                      • 8. Re: Duke application error
                        ahardy66 Novice

                        then jboss either hasn't found the ear file or it threw an exception loading it. Make sure you ran the 'ant -f jboss-build.xml deploy' and check the console for stacktraces.

                        • 9. Re: Duke application error
                          pgoes Newbie

                          I ran it and the output is this.

                          [root@design01 bank]# ant -f jboss-build.xml deploy
                          Buildfile: jboss-build.xml

                          assemble-app:
                          [delete] Deleting: /root/documents/javatutorials/j2eetutorial14/bank/jar/JBossDukesBank.ear
                          [ear] Building ear: /root/documents/javatutorials/j2eetutorial14/bank/jar/JBossDukesBank.ear

                          deploy:
                          [copy] Copying 1 file to /usr/local/jboss-3.2.1_tomcat-4.1.24/server/default/deploy

                          BUILD SUCCESSFUL
                          Total time: 3 seconds

                          The last record of /usr/local/jboss-3.2.1_tomcat-4.1.24/server/default/log/server.log file is:

                          2004-02-13 13:06:58,279 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@7dacf9d4{ url=file:/usr/local/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/JBossDukesBank.ear, deployedLastModified=1076437970000 }
                          org.jboss.deployment.DeploymentException: ejb-jar.xml must define a valid DOCTYPE!
                          at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:206)
                          at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:141)
                          at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:433)
                          at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
                          at org.jboss.deployment.MainDeployer.create(MainDeployer.java:776)
                          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
                          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
                          at sun.reflect.GeneratedMethodAccessor20.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:549)
                          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                          at $Proxy7.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:200)
                          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
                          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)

                          The entries you mentionde are still unshowed

                          • 10. Re: Duke application error
                            pgoes Newbie

                            Sorry, I forgot this

                            The ejb-jar.xml contained in account-ejb.jar is this:


                            <enterprise-beans>

                            <ejb-name>AccountEJB</ejb-name>
                            <jndi-name>MyAccount</jndi-name>
                            <resource-ref>
                            <res-ref-name>jdbc/BankDB</res-ref-name>
                            <jndi-name>java:/DefaultDS</jndi-name>
                            </resource-ref>


                            <ejb-name>AccountControllerEJB</ejb-name>
                            <jndi-name>MyAccountController</jndi-name>
                            <resource-ref>
                            <res-ref-name>jdbc/BankDB</res-ref-name>
                            <jndi-name>java:/DefaultDS</jndi-name>
                            </resource-ref>
                            <ejb-ref>
                            <ejb-ref-name>ejb/account</ejb-ref-name>
                            <jndi-name>MyAccount</jndi-name>
                            </ejb-ref>
                            <ejb-ref>
                            <ejb-ref-name>ejb/customer</ejb-ref-name>
                            <jndi-name>MyCustomer</jndi-name>
                            </ejb-ref>

                            </enterprise-beans>


                            The ejb-jar.xml contained in customer-ejb.jar is this:


                            <enterprise-beans>

                            <ejb-name>CustomerControllerEJB</ejb-name>
                            <jndi-name>MyCustomerController</jndi-name>
                            <resource-ref>
                            <res-ref-name>jdbc/BankDB</res-ref-name>
                            <jndi-name>java:/DefaultDS</jndi-name>
                            </resource-ref>
                            <ejb-ref>
                            <ejb-ref-name>ejb/customer</ejb-ref-name>
                            <jndi-name>MyCustomer</jndi-name>
                            </ejb-ref>


                            <ejb-name>CustomerEJB</ejb-name>
                            <jndi-name>MyCustomer</jndi-name>
                            <resource-ref>
                            <res-ref-name>jdbc/BankDB</res-ref-name>
                            <jndi-name>java:/DefaultDS</jndi-name>
                            </resource-ref>

                            </enterprise-beans>


                            The ejb-jar.xml contained in tx-ejb.jar is this:


                            <enterprise-beans>

                            <ejb-name>TxControllerEJB</ejb-name>
                            <jndi-name>MyTxController</jndi-name>
                            <resource-ref>
                            <res-ref-name>jdbc/BankDB</res-ref-name>
                            <jndi-name>java:/DefaultDS</jndi-name>
                            </resource-ref>
                            <ejb-ref>
                            <ejb-ref-name>ejb/tx</ejb-ref-name>
                            <jndi-name>MyTx</jndi-name>
                            </ejb-ref>
                            <ejb-ref>
                            <ejb-ref-name>ejb/account</ejb-ref-name>
                            <jndi-name>MyAccount</jndi-name>
                            </ejb-ref>


                            <ejb-name>TxEJB</ejb-name>
                            <jndi-name>MyTx</jndi-name>
                            <resource-ref>
                            <res-ref-name>jdbc/BankDB</res-ref-name>
                            <jndi-name>java:/DefaultDS</jndi-name>
                            </resource-ref>

                            </enterprise-beans>

                            • 11. Re: Duke application error
                              Luke Taylor Novice

                              A couple of things, from looking at your paths:

                              You're using the 1.4 tutorial instead of the 1.3 one. This has cropped up several times in other threads. Please use the link in the guide to download the tutorial.

                              You're using the wrong version of JBoss, please download 3.2.3 which is stated as being the minimum version some things in the guide will work with.

                              In a case like this where you are getting an obvious error "ejb-jar.xml must define a valid DOCTYPE!", the first thing you should do is examine the contents of your deployed application. In particular the contents of the ejb-jars and their descriptors.

                              Luke.

                              • 12. Re: Duke application error
                                pgoes Newbie

                                Yes, I agree. But

                                1 - where can I find the 1.3 tutorial?
                                2 - Are the META-INF/jboss.xml files contained in JBossDukeBank.ear that I should examine?

                                Thanks in advance
                                pgoes

                                • 13. Re: Duke application error
                                  pgoes Newbie

                                  I change the version to 3.2.3, performed the tasks contained in jbossj2ee.pdf successfully but the situation after deployment is this accordingly to the server.log

                                  004-02-13 19:21:40,429 ERROR [org.jboss.deployment.MainDeployer] Could not initialise deloyment: file:/usr/local/jboss-3.2.3/server/default/deploy/JBossDukesBa
                                  org.jboss.deployment.DeploymentException: Failed to find module file: app-client.jar
                                  at org.jboss.deployment.EARDeployer.init(EARDeployer.java:171)
                                  at org.jboss.deployment.MainDeployer.init(MainDeployer.java:696)
                                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:632)
                                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                                  at sun.reflect.GeneratedMethodAccessor18.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:476)
                                  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)
                                  2004-02-13 19:21:57,619 INFO [org.jboss.web.localhost.Engine] StandardHost[localhost]: MAPPING configuration error for request URI /bank/main
                                  2004-02-13 19:21:57,620 INFO [org.jboss.web.localhost.Engine] StandardHost[localhost]: MAPPING configuration error for request URI /bank/main

                                  • 14. Re: Duke application error
                                    ahardy66 Novice

                                    You can get the 1.3 tutorial from java.sun.com. Download the zip version and unpack it. All the stuff you need is there.