Am I missing something here ?
Thank you,
Mahendra
> Hi,
> I am using WLS 6.0sp1.
> I have an entity bean that is accessing a stateful session bean.
Does the entity bean call the stateful session bean? That's an odd and probably
incorrect design. Can you tell us some more about what you are trying to do?
>
> To deploy that entity bean, I have to add home and remote interfaces of that
> session bean in my entity bean jar.
> First I created std_entity.jar that contains all these classes (entity bean
> clasess + home and remote interfaces of session bean).
> Then I passed that std_entity.jar to ejbc. In my ejbc classpath, I added
> necessary classes that I need compile std_entity.jar.
I would suggest that you package the entity and session bean together in a
single jar. It will save you a lot of headaches.
If you're still having problems, you'll need to show us the contents of your jar
file, and your classpath setting for ejbc.
-- Rob
>
> >
> > To deploy that entity bean, I have to add home and remote interfaces of
that
> > session bean in my entity bean jar.
> > First I created std_entity.jar that contains all these classes (entity
bean
> > clasess + home and remote interfaces of session bean).
> > Then I passed that std_entity.jar to ejbc. In my ejbc classpath, I added
> > necessary classes that I need compile std_entity.jar.
>
> I would suggest that you package the entity and session bean together in a
> single jar. It will save you a lot of headaches.
I can't do that as this SFSB is generic. It's a part of core framework.
You'll have to show me your classpath, the jar file contents, and the exception
if you want help with the ejbc problem.
-- Rob
Unfortunately I can't send all the code and jars as that is not my client's
policy. But here is my command to create ejb jar.
SET WL_HOME=c:\bea\wlserver6.0sp1
SET CODEBASE=c:\entitymanager\trial
set PATH=%PATH%;c:\bea\jdk130\bin
java -classpath
%WL_HOME%\lib\weblogic_sp.jar;%WL_HOME%\lib\weblogic.jar;%CODEBASE%\codejars
\dmtestapp_local.jar;%CODEBASE%\codejars\datamap_core.jar;%CODEBASE%\codejar
s\datamap_util.jar;%CODEBASE%\jars;%CODEBASE%\codejars
weblogic.ejbc -compiler javac build\std_ejb_Customer.jar
deployedejb\ejb_Customer.jar
If I run above command, It's giving me this exception
Exception in thread "main" java.lang.NoClassDefFoundError:
com/datamap/ejb/Entit
yCollection
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getMethods(Class.java:742)
at
weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.initializeMethodInfo
s(ClientDrivenBeanInfoImpl.java:513)
at
weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.<init>(ClientDrivenB
eanInfoImpl.java:148)
at
weblogic.ejb20.deployer.EntityBeanInfoImpl.<init>(EntityBeanInfoImpl.
java:79)
at
weblogic.ejb20.deployer.BeanInfoImpl.createBeanInfoImpl(BeanInfoImpl.
java:210)
at
weblogic.ejb20.deployer.DeploymentInfoImpl.initializeBeanInfos(Deploy
mentInfoImpl.java:157)
at
weblogic.ejb20.deployer.DeploymentInfoImpl.<init>(DeploymentInfoImpl.
java:86)
at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:106)
at weblogic.ejbc20.runBody(ejbc20.java:346)
at weblogic.utils.compiler.Tool.run(Tool.java:81)
at weblogic.ejbc.main(ejbc.java:20)
The class com/datamap/ejb/EntityCollection.class is present in
ejb_std_Customer.jar.
If I include ejb_std_Customer.jar in my classpath (which I suppose I don't
have to), I don't get any error and I can create ejb jar.
Do I need to include std.jar in my classpath ?
Thank you,
Mahendra
"Rob Woollen" <rob@trebor_nelloow.moc> wrote in message
news:3BFBEFC7.280E346F@trebor_nelloow.moc...
"Mahendra Dhamdhere" <nos...@hotmail.com> wrote in message
news:3bfc065b$1...@newsgroups.bea.com...
Mahendra
"Mahendra Dhamdhere" <nos...@hotmail.com> wrote in message
news:3bfc0ada$1...@newsgroups.bea.com...
Mahendra
"Rob Woollen" <rob@trebor_nelloow.moc> wrote in message
news:3BFC8AA4.F1703FE4@trebor_nelloow.moc...
> This makes more sense. A NoClassDefFoundError indicates that the
classloader
> was able to find a class but not resolve all of its dependent classes.
The
> usual cause is when something is loaded in a parent classloader but
depends on a
> class only found in a child classloader.
>
> I suspect that you have a class in the $CLASSPATH that references the
> EntityCollection (directly or indirectly), and the EntityCollection is
only
> found in the jar file.
A ClassNotFoundException is thrown when a class loader and its parent class
loaders could not find/load the requested class. i.e if you ask a class loader
for a class that does not exist, you will get a cnfe.
A NoClassDefFoundError occurs when the requested class was found, but a class on
which it depends could not be resolved. That's the case that you are running
into.