File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes How to deploy ejb in weblogic6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to deploy ejb in weblogic6.1" Watch "How to deploy ejb in weblogic6.1" New topic

How to deploy ejb in weblogic6.1

Thanigaivel Vinayagam

Joined: Dec 03, 2002
Posts: 2
Hello , i am new to EJB , i have no expericene in ejb, tell me how to deploy ejb in weblogic6.1
Balaji Natarajan

Joined: Dec 05, 2002
Posts: 28
i am also new to EJB..i will just tell u how i deployed my first bean..Actually the Bean i used was a state less session bean..hope u r familiar with the Home and Remote Interfaces..make urself available with the Following files...
1. Home Interface.
2. Remote Interface.
3. Actual Bean.
The Above three files r Java Files...
Then u need the Following two descriptor Files.
1. ejb-jar.xml
2 weblogic-ejb-jar.xml
Then the Last file is ur File...
Now I tell u how to Organise these files..
Create a directory say, demo...
then Create two Subdirectories inside demo..
say, ejb and META-INF
put the home,remote,bean java files inside the ejb directory...
put the XML files inside META-INF directory...
Now u put the in the demo directory. i.e. at the same level of ejb and META-INF.

Now u need the Following installed in ur Comp.
1. JDK 1.2
2. Weblogic 6.1

Compile the Java files inside the ejb directory using "javac *.java"
now u hav to create the jar file....for that u go to the Command Prompt..and stay inside the demo give the Follwing command...
"jar -cvf x.jar ejb\*.class META-INF"
Now u should see the x.jar file in the demo directory...

Now it's time to deploy....
give the following command.
"java weblogic.ejbc x.jar y.jar"
u should see the y.jar in the demo directory....
then compile the file....

Now u hav to specify the y.jar file in the file in the weblogic directory....
open that file in notepad...
Search for the Pattern
i think for first time this line will be marked as comment with a leading # symbol. remove that # and in the next line add ur y.jar d:/demo/y.jar note the Forward slash.. don't give any backward slash in the path..if u give a backward slash u hav it twice...better stick to single forward the file...
now open a new command Window and go to the weblogic run the startweblogic batch will start the weblogic server...
now go to ur previously opened command window...and run the Client.class file.....

u should get the Bean running properly......
if u hav any ur doubts....
parag Chatterjee

Joined: Aug 02, 2002
Posts: 28
All the steps mentioned by you are OK.But you should deploy the y.jar using Weblogic Admin Console instead of using
Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
also to deploy u can use

before doing this make sure that u weblogic.jar file is in ur classpath
for more information visit

Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
I agree. Here's the link:
subject: How to deploy ejb in weblogic6.1
It's not a secret anymore!