Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370839

Summary: Project Reference not working with J2EE Preview Server
Product: [WebTools] WTP ServerTools Reporter: Bruno Eberhard <bruno.eberhard>
Component: jst.serverAssignee: Larry Isaacs <larryisaacs>
Status: NEW --- QA Contact: Elson Yuen <eyuen7>
Severity: normal    
Priority: P3 CC: mpol
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Two projects in the not working configuration
none
Two projects in the a working configuration
none
Java EE Module Dependencies in eclipse 3.5.0 none

Description Bruno Eberhard CLA 2012-02-07 10:23:14 EST
Build Identifier: 201112091000

Dependency doesnt work with J2EE Preview Server but does work with VMware vFabric tc Server.

My quick solution is to export the project as .jar to to WEB-INF/lib directory. Does the trick as long as you have not too many changes in other projects.


Reproducible: Always

Steps to Reproduce:
1. Create a Dynamic Web Project and a normal Java Project
2. In Web Project Properties / Deployment Assembly add the Java Project
3. Create a .jsp Page in the Web Project referencing the Java Project 
4. Run as / Run on Server on the Web Project, select J2EE Server
Comment 1 Bruno Eberhard CLA 2012-02-07 10:24:19 EST
Created attachment 210654 [details]
Two projects in the not working configuration
Comment 2 Bruno Eberhard CLA 2012-02-07 10:25:44 EST
Created attachment 210655 [details]
Two projects in the a working configuration

The java project exported as .jar, the index.jsp is displayed
Comment 3 Larry Isaacs CLA 2012-02-07 11:20:39 EST
Thanks.  I'll give these a try and see what I can find.
Comment 4 Larry Isaacs CLA 2012-02-08 20:44:34 EST
I'm not at all familiar with the J2EE Preview server code, but from a brief scan of the source, I'm not seeing code to handle utility projects.  It is up to the server publishing to assemble the utility project into a jar when publishing the web project. It would appear that the J2EE Preview server doesn't support this.  I'll try to make sure about this when I have more time, but in the mean time, you should try a different server.  I can promise that the Tomcat server supports utility projects.
Comment 5 Bruno Eberhard CLA 2012-02-09 04:13:56 EST
It really seems that the J2EE Preview server simply doesn't support this. It works with Tomcat 7.0.24 (very fast), with Spring vFabric Server.

I've tried it with eclipse 3.5.0, where there was a different Preference Page (Java EE Module Dependencies). The description there (see attachment) would suggest it should work but it doesnt either.

At least, I have now a circumvention, I use Tomcat.
Comment 6 Bruno Eberhard CLA 2012-02-09 04:14:40 EST
Created attachment 210783 [details]
Java EE Module Dependencies in eclipse 3.5.0

See the information lines.
Comment 7 Roberto Sanchez Herrera CLA 2015-05-14 14:48:01 EDT
*** Bug 366563 has been marked as a duplicate of this bug. ***