wood burning stoves 2.0*
The moose likes Websphere and the fly likes RAD6 :- Web Project referencing utility project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "RAD6 :- Web Project referencing utility project" Watch "RAD6 :- Web Project referencing utility project" New topic
Author

RAD6 :- Web Project referencing utility project

shahed moolji
Greenhorn

Joined: Sep 18, 2007
Posts: 1
Hi,

I have a WAR/ EAR project, that needs to refer to classes in another project in the same workspace.

During compile I dont have a problem, but when I deploy the app in the IDE on the builtin WAS6 server , it does not find the classess from the other project at runtime.

Even adding them as utility jars in the WAR project, does not help.
In the directory structure of the war, under WEB-INF\lib, it creates a dir called Proj.jar that contains the classes of the proj that I am referencing, but it cannot load them.

The ONLY way I can get around this is to create a Shared Library using the WAS console. But even then, the settings disappear the next time around, but it still works !!!

In WSAD, I believe it was much easier to reference projects in the Workspace as dependent jars.

What am I doing wrong in RAD6 ???


Any help would be appriciated.

Thanks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The "correct" way to do this is to make the project a utility jar in either the web project or the Enterprise project (EAR). I see that you tried to do this. One step you may have missed, though: In addition to declaring the project as a utility project in the deployment descriptor GUI, you must also declare the dependency between your WAR file and the utility jar. To do this:
  • Right-click the web project
  • Select properties from the context menu
  • select J2EE Module Dependencies
  • click the check box next to the utility jar file on which you're declaring a dependency


  • Merrill
    Consultant, Sima Solutions
    careprad zhou
    Greenhorn

    Joined: Jun 23, 2008
    Posts: 2
    wsad also has the same problem,but you don't come across.
    I got them both in wsad and rad,wsad may work in times,but rad,never,I must say:IBM is a fool.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: RAD6 :- Web Project referencing utility project
     
    Similar Threads
    Struts 2 Jars when put in EAR/lib gives error
    classloading with prefer-web-inf-classes
    RAD6 - Web Library Projects
    Error deploying enterprise application in RAD7
    question regarding packaging utility jars