Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

java.lang.NoClassDefFoundError in ejb?

Thread view: 
Dave V - 16 Mar 2007 11:03 GMT
Hi,

   I'm fairly new to ejb's so this might have an obvious solution
that I'm not aware of.  The following snippet of code compiles and
runs just fine (with all necessary packages included) if not run as
part of an ejb.  However, if I make this an ejb, deploy it, and then
try to call it, I get a java.lang.NoClassDefFoundError on line 164.
The code and stack trace are listed below.  Any ideas?
   By the way, I'm using Weblogic 8.1.

Thanks,
Dave

///////////////////////////////////////////////////////////////////////////­///

           if (aoInput.getClass() == AttorneySummaryInput.class)
{   // This is line 164 (see call stack)

               loLAISummaryOutput = new AttorneySummaryOutput();

               try {

                   GetAttorneysCmd loCmd = new GetAttorneysCmd();

                   loLAISummaryOutput = (AttorneySummaryOutput)
loCmd.execute((

                           LAISummaryInput) aoInput);

               } catch (Exception ex) {

                   loLAISummaryOutput.setError(ex.getMessage());

                   loLAISummaryOutput.setCount( -1);

               }

           }

///////////////////////////////////////////////////////////////////////////­////

java.lang.NoClassDefFoundError

           at com.lordabbett.LAI.LAISearch.ejb.LAISearchBean.class$
(LAISearchBean.java:85)

           at
com.lordabbett.LAI.LAISearch.ejb.LAISearchBean.getSummary(LAISearchBean.jav­
a:
164)

           at
com.lordabbett.LAI.LAISearch.ejb.LAISearch_wktsuo_EOImpl.getSummary(LAISear­
ch_wktsuo_EOImpl.java:
98)

           at
com.lordabbett.LAI.LAISearch.ejb.LAISearch_wktsuo_EOImpl_WLSkel.invoke(Unkn­
own
Source)

           at
weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:
166)

           at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.jav­
a:
290)

           at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.jav­
a:
248)

           at
com.lordabbett.LAI.LAISearch.ejb.LAISearch_wktsuo_EOImpl_816_WLStub.getSumm­
ary(Unknown
Source)

           at
com.lordabbett.LAI.LAIWeb.SearchMain.doPost(SearchMain.java:236)

           at
javax.servlet.http.HttpServlet.service(HttpServlet.java:
760)

           at
javax.servlet.http.HttpServlet.service(HttpServlet.java:
853)

           at weblogic.servlet.internal.ServletStubImpl
$ServletInvocationAction.run(ServletStubImpl.java:1077)

           at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav­
a:
465)

           at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav­
a:
348)

           at weblogic.servlet.internal.WebAppServletContext
$ServletInvocationAction.run(WebAppServletContext.java:7047)

           at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubje­
ct.java:
321)

           at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
121)

           at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletC­
ontext.java:
3902)

           at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.jav­
a:
2773)

           at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)

           at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:
183)

Caused by: java.lang.ClassNotFoundException:
com.lordabbett.LAI.LAISearch.input.summary.AttorneySummaryInput

           at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader­.java:
199)

           at java.lang.ClassLoader.loadClass(ClassLoader.java:289)

           at java.lang.ClassLoader.loadClass(ClassLoader.java:235)

           at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader­.java:
224)

           at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

           at java.lang.Class.forName0(Native Method)

           at java.lang.Class.forName(Class.java:141)
Thomas Fritsch - 16 Mar 2007 18:27 GMT
>     I'm fairly new to ejb's so this might have an obvious solution
> that I'm not aware of.  The following snippet of code compiles and
[quoted text clipped - 7 lines]
> if (aoInput.getClass() == AttorneySummaryInput.class) {
>   // This is line 164 (see call stack)
Looking at the "Caused by: ..." line of your stack trace below
it seems that the class "AttorneySummaryInput" (i.e. file
"com/lordabbett/LAI/LAISearch/input/summary/AttorneySummaryInput.class"
in your deployed application) is missing.

>     loLAISummaryOutput = new AttorneySummaryOutput();
>     try {
[quoted text clipped - 10 lines]
>   at com.lordabbett.LAI.LAISearch.ejb.LAISearchBean.class$(LAISearchBean.java:85)
>   at com.lordabbett.LAI.LAISearch.ejb.LAISearchBean.getSummary(LAISearchBean.java:164)
[...]
>   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
> Caused by: java.lang.ClassNotFoundException: com.lordabbett.LAI.LAISearch.input.summary.AttorneySummaryInput
>   at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader­.java:199)
[...]
>   at java.lang.Class.forName(Class.java:141)

Signature

Thomas



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.