• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RAD6 :- Web Project referencing utility project

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  •  
    Greenhorn
    Posts: 2
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic