Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370839 - Project Reference not working with J2EE Preview Server
Summary: Project Reference not working with J2EE Preview Server
Status: NEW
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: jst.server (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Larry Isaacs CLA
QA Contact: Elson Yuen CLA
URL:
Whiteboard:
Keywords:
: 366563 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-07 10:23 EST by Bruno Eberhard CLA
Modified: 2015-05-14 14:48 EDT (History)
1 user (show)

See Also:


Attachments
Two projects in the not working configuration (8.46 KB, application/x-zip-compressed)
2012-02-07 10:24 EST, Bruno Eberhard CLA
no flags Details
Two projects in the a working configuration (9.67 KB, application/x-zip-compressed)
2012-02-07 10:25 EST, Bruno Eberhard CLA
no flags Details
Java EE Module Dependencies in eclipse 3.5.0 (58.65 KB, image/png)
2012-02-09 04:14 EST, Bruno Eberhard CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***