File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Products » Websphere
Bookmark "RAD6 :- Web Project referencing utility project" Watch "RAD6 :- Web Project referencing utility project" New topic

RAD6 :- Web Project referencing utility project

shahed moolji

Joined: Sep 18, 2007
Posts: 1

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.

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

    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:
    subject: RAD6 :- Web Project referencing utility project
    It's not a secret anymore!