File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in build jar files

 
Kalaiselvan Selvamani
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii All,
I'm new for using Weblogic. Now i am tried to deploy examples Given in Weblogic. Where i get some trouble to build the jar..
D:\bea\wlserver6.0sp1\samples\examples\ejb\basic\statelessSession>java -classpath /lib/weblogic_sp.jar;/lib/weblogic.jar weblogic.ejbc -compiler javac build\std_ejb_basic_statelessSession.jar \ejb_basic_stateless
Session.jar
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/ejbc

I'm using Weblogic 6 where i couldnt found ejbc.exe file..
What i can do create the jar file..
Need for a good suggestion..
Thanx in Advance..
Kalaiselvan.S
 
chetna vp
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think to build a jar file for examples given in weblogic server dont need to set classpath . What you can do is , just go to directory as C:\bea\wlserver6.1\samples\examples\ejb20\basic\statelesssession>ant all
This command will create a jar file for you and you can run the client. I have gone thru this. If you still get problem, let me know.
Regards
Chetna
 
Kalaiselvan Selvamani
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii Chetrab
I found same error in D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession directory too. I have doubt that i havent ejbc.exe in my directory. This is possible??? Y havent ejbc.exe in my directory. Is there any installation problem.. Plz help.

The Following Errors i found
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession>build
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession>mkdir build build\META-INF build\image
s
A subdirectory or file build already exists.
Error occurred while processing: build.
A subdirectory or file build\META-INF already exists.
Error occurred while processing: build\META-INF.
A subdirectory or file build\images already exists.
Error occurred while processing: build\images.
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession>copy *.xml build\META-INF
ejb-jar.xml
weblogic-ejb-jar.xml
2 file(s) copied.
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession>copy *.gif build\images
green-cube.gif
orange-cube.gif
2 file(s) copied.
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession>javac -d build Trader.java TraderHome.
java TradeResult.java TraderBean.java
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession>cd build
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession\build>jar cv0f std_ejb20_basic_statele
ssSession.jar META-INF examples images
added manifest
ignoring entry META-INF/
adding: META-INF/ejb-jar.xml(in = 1524) (out= 1524)(stored 0%)
adding: META-INF/weblogic-ejb-jar.xml(in = 553) (out= 553)(stored 0%)
adding: examples/(in = 0) (out= 0)(stored 0%)
adding: examples/ejb20/(in = 0) (out= 0)(stored 0%)
adding: examples/ejb20/basic/(in = 0) (out= 0)(stored 0%)
adding: examples/ejb20/basic/statelessSession/(in = 0) (out= 0)(stored 0%)
adding: examples/ejb20/basic/statelessSession/Trader.class(in = 325) (out= 325)(stored 0%)
adding: examples/ejb20/basic/statelessSession/TraderBean.class(in = 2301) (out= 2301)(stored 0%)
adding: examples/ejb20/basic/statelessSession/TradeResult.class(in = 549) (out= 549)(stored 0%)
adding: examples/ejb20/basic/statelessSession/TraderHome.class(in = 318) (out= 318)(stored 0%)
adding: images/(in = 0) (out= 0)(stored 0%)
adding: images/green-cube.gif(in = 901) (out= 901)(stored 0%)
adding: images/orange-cube.gif(in = 901) (out= 901)(stored 0%)
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession\build>cd ..
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession>java -classpath /lib/weblogic_sp.jar;/
lib/weblogic.jar weblogic.ejbc -compiler javac build\std_ejb20_basic_statelessSession.jar \ejb20_basic_sta
telessSession.jar
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/ejbc
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession>javac -d Trader.java TraderHome.java
TradeResult.java
TraderHome.java:32: cannot resolve symbol
symbol : class Trader
location: interface examples.ejb20.basic.statelessSession.TraderHome
Trader create() throws CreateException, RemoteException;
^
1 error
D:\bea\wlserver6.0sp1\samples\examples\ejb20\basic\statelessSession>javac -d Trader.java TraderHome.java
TradeResult.java Client.java
TraderHome.java:32: cannot resolve symbol
symbol : class Trader
location: interface examples.ejb20.basic.statelessSession.TraderHome
Trader create() throws CreateException, RemoteException;
^
Client.java:93: cannot resolve symbol
symbol : class Trader
location: class examples.ejb20.basic.statelessSession.Client
Trader trader = (Trader) narrow(home.create(), Trader.class);
^
Client.java:93: cannot resolve symbol
symbol : class Trader
location: class examples.ejb20.basic.statelessSession.Client
Trader trader = (Trader) narrow(home.create(), Trader.class);
^
Client.java:93: cannot resolve symbol
symbol : class Trader
location: class examples.ejb20.basic.statelessSession.Client
Trader trader = (Trader) narrow(home.create(), Trader.class);
^
Regards,
Kalaiselvan.S
 
Kalaiselvan Selvamani
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii,
Sorry, It's my mistake.
I didnt set the path for
EX_WEBAPP_CLASSES,CLIENT_CLASSES..
Now i set the path for them..Now i get the jar file..
Thanx for helping
Bye Bye
Kalaiselvan.S

 
Marcos Maia
Ranch Hand
Posts: 977
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
just navigate to %wl_home%\config\examples and run the script setExamplesEnv before trying to run the examples this will set all the environment necessary to sucessfully run the examples.
regards
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic