dcsimg
error in compiling jar file in weblogic6.0
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Praveen_Lakshman
Posted On:   Tuesday, December 4, 2001 10:12 PM

When I tried to compile a jar file of session Bean I will get the following error as a class BaseWep.beans.session.city.CityBean which is in the classpath. This c lass should only be located in the ejb-jar file.> as a class BaseWep.beans.session.city.CityHome which is in the classpath. This c lass should only be located in the ejb-jar file.> as a class BaseWep.beans.session.city.City which is in the classpath. This class should only be located in the ejb-jar file.> I have checked my classpath and I can't find any evidence that these classes exist anywhere on it.    More>>


When I tried to compile a jar file of session Bean I will get the following error




as a class BaseWep.beans.session.city.CityBean which is in the classpath. This c
lass should only be located in the ejb-jar file.>




as a class BaseWep.beans.session.city.CityHome which is in the classpath. This c
lass should only be located in the ejb-jar file.>




as a class BaseWep.beans.session.city.City which is in the classpath. This class
should only be located in the ejb-jar file.>



I have checked my classpath and I can't find any evidence that these classes exist anywhere on it.

   <<Less

Re: error in compiling jar file in weblogic6.0

Posted By:   Muhammad_Shakeel  
Posted On:   Wednesday, December 5, 2001 06:25 PM

This shows that you have the package BaseWep.beans.session.city in your classpath. This normally happens when having this package in the directory/folder from where you are compiling the bean into this package, and because of having current directory (.) in CLASSPATH this error is produced.

Now the solution is simple, make a sub-folder (e.g build) in the folder where you have that package, and compile the bean giving -d build in javac command (e.g javac *.java -d build), you can now make the meta-inf folder in that build folder and produce the .jar file(s) within that folder.

For claraficaion here's the hierarchy :


BeanFolder
|---- all .java files
|
|---- all required packages (BaseWep in your case )
|
|---- build
|
|--- meta-inf (containing deployment descriptor)
|
|--- BaseWep (package containing compiled .class files)
|--- .jar file(s) will be created here




Hope this will help.


Regards,

Shakeel
About | Sitemap | Contact