Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Dependencies in Java EE Module Dependencies not recognized when starting servers
Dependencies in Java EE Module Dependencies not recognized when starting servers [message #550779] Wed, 04 August 2010 06:20 Go to next message
Setya Mising name is currently offline Setya Mising name
Messages: 486
Registered: July 2009
Senior Member
Hi all,

Since some of my jars are shared by many other projects I include them
via Java EE Module Dependencies, which I assumed will be included in
WEB-INF/lib automatically when I start my servers. But it's not, I still
have to copy them to WEB-INF/lib.

Any help would be greatly appreciated.

Regards,

Setya
Re: Dependencies in Java EE Module Dependencies not recognized when starting servers [message #550823 is a reply to message #550779] Wed, 04 August 2010 08:57 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
On 8/4/2010 6:20 AM, Setya wrote:
> Hi all,
>
> Since some of my jars are shared by many other projects I include them
> via Java EE Module Dependencies, which I assumed will be included in
> WEB-INF/lib automatically when I start my servers. But it's not, I still
> have to copy them to WEB-INF/lib.
>
> Any help would be greatly appreciated.
>
> Regards,
>
> Setya

This feature consistently works for me. There isn't enough detail here
to guess what might be different about your situation or what you may
have tried already. More detail might help.

There has been an occasional post to this newsgroup of a similar "jars
won't publish" symptom, I think most often associated with User
Libraries. Unfortunately, all the threads so far have ended with the
symptom mysteriously going away or before a cause was determined.

Cheers,
Larry
Re: Dependencies in Java EE Module Dependencies not recognized when starting servers [message #551257 is a reply to message #550823] Thu, 05 August 2010 13:58 Go to previous messageGo to next message
Setya Mising name is currently offline Setya Mising name
Messages: 486
Registered: July 2009
Senior Member
Hi,

Thank you for responding.

I'll try to give you more detail :

1. I've tried both on Tomcat & Glassfish server with the same problem.
2. When I export to WAR, all neccessary jars are included automatically.

Regards,

Setya
Re: Dependencies in Java EE Module Dependencies not recognized when starting servers [message #551274 is a reply to message #551257] Thu, 05 August 2010 14:55 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
On 8/5/2010 1:58 PM, Setya wrote:
> Hi,
>
> Thank you for responding.
>
> I'll try to give you more detail :
>
> 1. I've tried both on Tomcat & Glassfish server with the same problem.
> 2. When I export to WAR, all neccessary jars are included automatically.
>
> Regards,
>
> Setya
>

I recommend you create a new Dynamic Web Project, and if necessary a new
utility project. Then add one of the jars that's not publishing to the
new project in the same manner as your problem project. Then see if the
jar doesn't publish for the new project too. If so, you can describe
what you did so I will have enough detail to attempt to duplicate what
you did and see if the jar doesn't publish for me too.

Cheers,
Larry
Re: Dependencies in Java EE Module Dependencies not recognized when starting servers [message #552655 is a reply to message #551274] Fri, 13 August 2010 01:04 Go to previous messageGo to next message
Setya Mising name is currently offline Setya Mising name
Messages: 486
Registered: July 2009
Senior Member
Hi,

I finally found the cause of the problem. I specified the 'Default output folder' in WebContent/WEB-INF/classes' and WTP wasn't happy about it, after I changed to 'build/classes', it finally recognizes all the dependency.

But now I'm having another problem which seems to be Glassfish specific, since it works OK in Tomcat.

The project depends on other project that uses 2 Spring context files & 1 properties file which is located in a folder named 'config'. I've added the 'config' folder to list of libraries then checked it in Java EE Module Dependencies. When I start Glassfish it says that it's unable to find those files hence the deployment fails. Those files does not seem to be automatically added to WEB-INF/classes.

But it works on Tomcat.

Is this a known problem on Glassfish ?

Best Regards,

Setya
Re: Dependencies in Java EE Module Dependencies not recognized when starting servers [message #552656 is a reply to message #552655] Fri, 13 August 2010 01:34 Go to previous messageGo to next message
Setya Mising name is currently offline Setya Mising name
Messages: 486
Registered: July 2009
Senior Member
Hi,

FYI, I can confirm that when I export to WAR, those files are not automatically included in WEB-INF/classes.

Regards,

Setya
Re: Dependencies in Java EE Module Dependencies not recognized when starting servers [message #552913 is a reply to message #552655] Sat, 14 August 2010 08:10 Go to previous messageGo to next message
Chris is currently offline Chris
Messages: 97
Registered: July 2009
Member
Try adding your 'config' folder as a source folder in the Java build
path dependencies.
Re: Dependencies in Java EE Module Dependencies not recognized when starting servers [message #552917 is a reply to message #552913] Sat, 14 August 2010 09:41 Go to previous messageGo to next message
Setya Mising name is currently offline Setya Mising name
Messages: 486
Registered: July 2009
Senior Member
Hi,

Thank you for your suggestion.

But, I've added the 'config' folder in the 'Libraries' tab of 'Java Build Path' via 'Add Class Folder...' button, because only through this way I can see the 'config' folder in 'Java EE Module Dependencies' list.

I hope I've explained the problem clearly.

Regards,

Setya
Re: Dependencies in Java EE Module Dependencies not recognized when starting servers [message #552941 is a reply to message #552917] Sat, 14 August 2010 17:31 Go to previous message
Chris is currently offline Chris
Messages: 97
Registered: July 2009
Member
The problem is that the Java Module Dependencies (which is represented
by the \META-INF\MANIFEST.MF) is ONLY for jar files. That's what the
J2EE spec states (unless it's been changed).

By adding the folder as a source folder in the Web project means that
the files within that folder will end up in the WEB-INF\classes folder.

The alternative would be to have a separate project containing the
config files, that you could added to the web projects Module
Dependencies, though that would be overkill and inflexible in my opinion.

Regards
Chris
Previous Topic:unable to use Clay Mark II plugin on Galineo
Next Topic:Web Template
Goto Forum:
  


Current Time: Wed Aug 27 15:06:29 EDT 2014

Powered by FUDForum. Page generated in 0.01900 seconds