2 Replies Latest reply on May 18, 2006 3:04 AM by Lance Drake

    The requested resource not available, please help!

    Tom Y Newbie

      Hi,
      I followed the Duke's Bank example in the Getting Started 4.0 guide in Chapter 4 and have compiled and deployed the .ear application with no error messages. I can even run the standalone client application using the run-client target and I can see the data in the database and can store new data in it. But when I run the web client by pointing my web browser to the following URL:

      http://localhost:8080/bank/main

      I got the following error:

      HTTP Status 404 - /bank/main

      type Status report

      message /bank/main

      description The requested resource (/bank/main) is not available.
      Apache Tomcat/5.5.9

      I am running jboss application server 4.0.2 with JDK 1.5. By the way, I can manage the jboss server with the URL http://localhost:8080. It works fine. It seems the web context /bank/main is not configured correctly, but I can't find any error anywhere. Could someone please help? Thank you very much in advance.

      Tom

        • 1. Re: The requested resource not available, please help!
          kumar muthu Newbie

          Hi,

          I have the same exact problem. Were you able to fix the problem ? Can somebody post reply with some solution for this ? Thanks in advance.

          Kumar

          • 2. Re: The requested resource not available, please help!
            Lance Drake Newbie

            You can see if your J2EE app got deployed when accessing that URL by looking for a file at ..../JBOSS/server/default/work/jboss.web/localhost/bank/org/apache/jsp/logon_jsp.class

            If that file ( and logon_jsp.java ) are not there - then your app did not get built with all the needed pieces and cannot be successfully deployed. Look at your terminal when you deploy - you should see entries that look like this: (Notice they are all INFO messages - no warnings or errors)

            00:34:07,468 INFO [EARDeployer] Init J2EE application: file:/Developer/JBOSS/server/default/deploy/JBossDukesBank.ear
            00:34:08,038 INFO [EjbModule] Deploying CustomerBean
            00:34:08,291 INFO [EjbModule] Deploying AccountBean
            00:34:08,315 INFO [EjbModule] Deploying TxBean
            00:34:08,333 INFO [EjbModule] Deploying AccountControllerBean
            00:34:08,400 INFO [EjbModule] Deploying CustomerControllerBean
            00:34:08,421 INFO [EjbModule] Deploying TxControllerBean
            00:34:08,812 INFO [ClientDeployer] Client ENC bound under: bank-client
            00:34:08,866 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'CustomerBean' to jndi 'local/CustomerBean@14639906'
            00:34:08,900 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'AccountBean' to jndi 'local/AccountBean@4528719'
            00:34:08,922 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'TxBean' to jndi 'local/TxBean@8613170'
            00:34:08,959 INFO [ProxyFactory] Bound EJB Home 'AccountControllerBean' to jndi 'MyAccountController'
            00:34:08,983 INFO [ProxyFactory] Bound EJB Home 'CustomerControllerBean' to jndi 'MyCustomerController'
            00:34:09,008 INFO [ProxyFactory] Bound EJB Home 'TxControllerBean' to jndi 'MyTxController'
            00:34:09,011 INFO [EJBDeployer] Deployed: file:/Developer/JBOSS/server/default/tmp/deploy/tmp23042JBossDukesBank.ear-contents/bank-ejb.jar
            00:34:09,149 INFO [TomcatDeployer] deploy, ctxPath=/bank, warUrl=.../tmp/deploy/tmp23042JBossDukesBank.ear-contents/web-client-exp.war/
            00:34:09,426 INFO [EARDeployer] Started J2EE application: file:/Developer/JBOSS/server/default/deploy/JBossDukesBank.ear



            As has been mentioned in several other postings to these forums - there is INCORRECT CODE in that latest version of the DUKE'S BANK, etc J2EE Tutorial Demos from Sun. You want to hunt down the package on the Sun site named 'j2ee-1_4-doc-tutorial_2.zip' (from June 2004) as the base materials into which you add the JBoss materials. It took me ALL DAY to finally get the mix corrrect - now it works perfectly. Search the Archives here for more specific info on which package to get - I apologize but I didn't save the kind at the time.

            Also, when you are doing your ANT builds - ypou might want to add the VERBOSE flag to the commands, as in "ant -f jboss-build.xml -v compile" - You may see some more errors or clues as to where the ball is getting dropped.

            G'Luck!