• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

JPA project classes are not found in Web module in runtime - RAD 7.5

Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basically, I want to create JPA project for my Web application. JPA project classes are NOT FOUND in run time when those are accessed from web application. I followed the below steps to create Web/JPA project in RAD 7.5.

1. Created a EAR project called SolutionEAR
2. Created a dynamic web project
- project name: SolutionWeb
- Target Runtime: Websphere Application Server 7.0
- Dynamic Web module version 2.5
- Configuration : Default configuration for WAS 7.0
- Selected "Add project to EAR" and selected the EAR - SolutionEAR
- Finished it

3. Created JPA Project
- Project name : SolutionJPA
- Target Runtime : WAS7
- Configuration : Utility JPA Project with 5.0
- Selected Add project to an EAR : SolutionEAR
- In the next screen, Platform: RAD JPA platform
- Use implementation provided by runtime
- Left rest as default options

4. Created a very basic class in JPA project under src dir

5. Added SolutionJPA project into web project's (SolutionWeb) build path.

6. Created a simple Servlet in the web project and mapping the web.xml file is created by RAD. When I import com.solution.entity.EntitySample, no compilation error and able to refer SampleEntity object.

7. Now, run/deploy the ear file into WAS 7, I verifyed JPA and Web projects have been deployed into WAS.
8. Accessing the servlet in the browser: http://localhost:9081/SolutionWeb/SolutionServlet/
9. Getting the below error in the console

[8/25/10 13:19:19:718 EDT] 0000002e servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet SolutionServlet in application SolutionEAR. Exception created : java.lang.NoClassDefFoundError: com.solution.entity.EntitySample
at com.solution.SolutionServlet.doGet(SolutionServlet.java:18)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
Caused by: java.lang.ClassNotFoundException: com.solution.entity.EntitySample
at java.net.URLClassLoader.findClass(URLClassLoader.java:419)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:150)
at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:90)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:508)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:508)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
... 23 more

[8/25/10 13:19:19:765 EDT] 0000002e FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_7a6f7a6f_10.08.25_13.19.19.71811479.txt com.ibm.ws.webcontainer.servlet.ServletInstance.service 290
[8/25/10 13:19:19:812 EDT] 0000002e FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_7a6f7a6f_10.08.25_13.19.19.76511480.txt com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch 428

Pasted the application.xml file below:

Could you please tell me what is wrong in this >
Viji San
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still couldn't find out the solution to fix the exception. Did anyone face the similar problem, any suggestion?
Space pants. Tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic