aspose file tools*
The moose likes BEA/Weblogic and the fly likes getting weblogic to add jar to classpath (axis.jar) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "getting weblogic to add jar to classpath (axis.jar)" Watch "getting weblogic to add jar to classpath (axis.jar)" New topic
Author

getting weblogic to add jar to classpath (axis.jar)

Matt Zollinhofer
Ranch Hand

Joined: Jul 09, 2004
Posts: 33
I'm more accustomed to working with Tomcat but I'm starting to work with Weblogic (10.3) and I have a pretty basic question. I see that I need to look into using wldeploy for ant deployments to Weblogic, but how do I handle things that I would typically put in the common/lib or shared/lib?

Thanks,
Matt
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,

I'm not sure what is your concern, but if is about making libraries available to the server using weblogic, the easiest way of doing it is placing required jars under lib directory on your domain root folder. This will cause all servers created for this domain to load libraries in it's classpath.

[]s
Matt Zollinhofer
Ranch Hand

Joined: Jul 09, 2004
Posts: 33
Thanks for replying Marcos.

Unfortunately, I'm still having problems. To be more specific, I'm trying to deploy an EAR that contains an MDB. That deployment seems to work fine and the MDB receives calls and can output log messages. But when I try to add the next step which is to have the MDB make a call to an external web service (using axis) I get this stack trace:



which leads me to believe that weblogic hasn't picked up the axis.jar that I put in the domain's lib directory. When I pull out the logic to call the web service and just run it in the IDE it works as expected.

Any suggestions are appreciated,
Matt
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,

when starting your server you can see if this librarie is being load, look for the following line in the console standard output:



Than after this entry you'll find a list of libraries added to servers's classpath, like: .




Is your Axis lib being loaded there? Where exactly did you place the librarie?


regards,
Marcos Maia.
>
Matt Zollinhofer
Ranch Hand

Joined: Jul 09, 2004
Posts: 33
Wow, yeah...there it is. Thanks for the suggestion.


So it's there an on the classpath, any thoughts about why it would still throw a NoClassDefFoundError?

If it was conflicting with something else, I would get a different error wouldn't I?
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,


I can't exactly remember from top of my mind but as far as I can remember weblogic provides classes for Axis(In workshop environment).
Maybe it's a conflict, could happen. I'm sending you a link where you'll find good information on how weblogic deals with classloaders, this might help to solve your problem or at least throw some light to it.

http://edocs.bea.com/wls/docs103/programming/classloading.html

regards,
[]s
Matt Zollinhofer
Ranch Hand

Joined: Jul 09, 2004
Posts: 33
Well the stacktrace seems to have been a little misleading. I've at least moved the problem a little bit by dumping in a bunch more jar files that axis.jar seems to have been using. Now I'm trouble with something in the actual web service call, but I'm going to post a new thread about that.

Thanks for your help,
Matt
jani hai
Greenhorn

Joined: May 14, 2009
Posts: 1
Hi Matt,

I am having a similar issue while porting an axis web service from Weblogic 8.1 to Weblogic 10.3.

I sorted out the libraries issue but now having problem while invoking the service.

Unfortunately the log file are aslo not helping.

Did you find solution for your probelm, if so would you please let me know?

Thanks in advance.

haijani.
Matt Zollinhofer
Ranch Hand

Joined: Jul 09, 2004
Posts: 33
Unfortunately, I never really completely solved my problem. I ended up just creating the jar to connect to the external webservice with the ClientGen wizard. Now, it had to put the JAR into a webservice project, but I wanted it in my bean. So, I had to manually copy the JAR that it created over to my bean. I also may have had to add a few libraries as references, but I don't remember off the top of my head. If so, that will probably become obvious.

Good Luck.
sridhar addanki
Greenhorn

Joined: Mar 04, 2009
Posts: 22
Hi,
I am using Weblogic 10.3. We are having two applications to deploy in weblogic. Both are having some common jar files.
Including same jar files in both application workspaces is working ok. But i want to place these common jars in domain lib of my weblogic.I will remove those jars from my workspace. Will it work? Is this the correct way to proceed in weblogic?

Please guide me. Thanks in advance.
Sridhar.
Matt Zollinhofer
Ranch Hand

Joined: Jul 09, 2004
Posts: 33
Sounds about right to me, give it a shot.
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
sridhar addanki wrote:Hi,
I am using Weblogic 10.3. We are having two applications to deploy in weblogic. Both are having some common jar files.
Including same jar files in both application workspaces is working ok. But i want to place these common jars in domain lib of my weblogic.I will remove those jars from my workspace. Will it work? Is this the correct way to proceed in weblogic?

Please guide me. Thanks in advance.
Sridhar.



That's it. The directory under %DOMAIN_HOME%/lib is exactly for this. All libraries placed there will be available in all servers classpath that you create for this domain.

[]s
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting weblogic to add jar to classpath (axis.jar)