[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.8

J2EE application is not working due to a java.lang.NoClassDefFoundError

Asked by bisonfur37 in Java Programming Language, Enterprise Java Beans (EJB), New to Java Programming

Tags: bookstoreservlet, servlet, available

OS: Windows XP
Programs: Netbeans 4.1

I am following the course schedule at http://www.javapassion.com/j2ee/HW3New.html and I've hit a roadblock that just is not going away.  Basically, I have the J2EE 1.4 tutorial code and inside \examples\web\bookstore1 there is a bookstore application that uses the App Server along with a Pointbase database.  I followed the class instructions carefully and was able to create the project and deploy the project.  All worked fine.  No need to touch anything.  Now, I am going back to that application and it is not working.  The log files tell me the following in chronological order:

-----1
Message ID:
      
WebModule[/bookstore1]Exception sending context initialized event to listener instance of class listeners.ContextListener java.lang.NoClassDefFoundError
Complete Message

exception/OrderException
      at listeners.ContextListener.contextInitialized(Unknown Source)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4010)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4525)
      at com.sun.enterprise.web.WebModule.start(WebModule.java:241)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:833)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:483)
      at org.apache.catalina.startup.Embedded.start(Embedded.java:894)
      at com.sun.enterprise.web.WebContainer.start(WebContainer.java:688)
      at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:507)
      at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:54)
      at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:300)
      at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
      at com.sun.enterprise.server.PEMain.main(PEMain.java:220)

-----2
Message ID:
      
Complete Message

Error listenerStart

Diagnostic Causes

----3
Message ID:
      
Complete Message

Context startup failed due to previous errors

Diagnostic Causes


I know that I probably did something wrong but I do not remember what.  So, I just re-deployed the app according to the instructions and I get the same message.  To reiterate I just did the following:
1. downloaded and unzipped j2ee-1_4-doc-tutorial_5.zip
2. restarted the app server through netbeans
3. restarted the PointBase server through netbeans
4. the application deployment instructions for examples\web\bookstore
-asant build
-asant package-bookstore
-asant create-db_common
-asant create-jdbc-resource_common (this step failed with the following error: JdbcResource already exists: cannot add duplicate. This is OK, it just illustrates that the resource is already available)
5. the application deployment instructions for examples\web\bookstore1
-asant build
-asant create-bookstore-war
-asant deploy-war

When I visit http://localhost:8080/bookstore1/bookstore I get the error page 'HTTP Status 404 - Servlet BookStoreServlet is not available'
At this point, the log file tells me that 'Servlet CatalogServlet is currently unavailable.'  The message that I posted above occurs only once right before I see in the log files that the server started up successfully.  For reference, this is part of the log file:

62       INFO       Application server startup complete. (details)       javax.enterprise.system.core       Jul 19, 2005 11:29:20.947       _ThreadID=10;
61       INFO       Status of System JMX Connector: Active = [true] (details)       javax.enterprise.system.tools.admin       Jul 19, 2005 11:29:20.869       _ThreadID=10;
60       INFO       Here is the JMXServiceURL for the JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://ITS-2016.net.la...
(details)       javax.enterprise.system.tools.admin       Jul 19, 2005 11:29:20.869       _ThreadID=10;
59       INFO       Starting Sun-Java-System/Application-Server-PE HTTP/1.1 on 4848 (details)       javax.enter....system.container.web       Jul 19, 2005 11:29:20.416       _ThreadID=10;
58       INFO       Initializing Sun-Java-System/Application-Server-PE HTTP/1.1 on 4848 (details)       javax.enter....system.container.web       Jul 19, 2005 11:29:20.416       _ThreadID=10;
57       INFO       Starting Sun-Java-System/Application-Server-PE HTTP/1.1 on 8181 (details)       javax.enter....system.container.web       Jul 19, 2005 11:29:20.307       _ThreadID=10;
56       INFO       Initializing Sun-Java-System/Application-Server-PE HTTP/1.1 on 8181 (details)       javax.enter....system.container.web       Jul 19, 2005 11:29:20.307       _ThreadID=10;
55       INFO       Starting Sun-Java-System/Application-Server-PE HTTP/1.1 on 8080 (details)       javax.enter....system.container.web       Jul 19, 2005 11:29:20.166       _ThreadID=10;
54       INFO       Initializing Sun-Java-System/Application-Server-PE HTTP/1.1 on 8080 (details)       javax.enter....system.container.web       Jul 19, 2005 11:29:20.151       _ThreadID=10;
53       INFO       contextInitialized() (details)       javax.enter....system.container.web       Jul 19, 2005 11:29:19.260       _ThreadID=10;
52       INFO       contextInitialized() (details)       javax.enter....system.container.web       Jul 19, 2005 11:29:19.260       _ThreadID=10;
51       SEVERE       Context startup failed due to previous errors (details)       tomcat.server./bookstore1.Context       Jul 19, 2005 11:29:17.728       _ThreadID=10;
50       SEVERE       Error listenerStart (details)       tomcat.server./bookstore1.Context       Jul 19, 2005 11:29:17.728       _ThreadID=10;
49       SEVERE       exception/OrderException
at listeners.ContextListener.contextInitialized(Unknown Source)
at org.ap...
(details)

Can anyone provide a solution to this or another method of troubleshooting because I've run out of suggestions?
Related Solutions: J2EE tutorial installation
[+][-]07/19/05 09:34 AM, ID: 14476861Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/19/05 09:36 AM, ID: 14476876Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/19/05 10:45 AM, ID: 14477564Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/19/05 12:31 PM, ID: 14478667Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/19/05 12:40 PM, ID: 14478743Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Java Programming Language, Enterprise Java Beans (EJB), New to Java Programming
Tags: bookstoreservlet, servlet, available
Sign Up Now!
Solution Provided By: kupra1
Participating Experts: 1
Solution Grade: C
 
 
Loading Advertisement...
20091021-EE-VQP-81