Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RAD6 :- Web Project referencing utility project

 
shahed moolji
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  •  
    careprad zhou
    Greenhorn
    Posts: 2
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic