This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 224978 - GlassFish 4 does not expose classpath for Java EE 7
Summary: GlassFish 4 does not expose classpath for Java EE 7
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.3.1
Hardware: All All
: P1 normal with 1 vote (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-16 16:03 UTC by Petr Jiricka
Modified: 2013-03-15 15:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2013-01-16 16:03:13 UTC
1. Use the latest build from http://bertram2.netbeans.org:8080/job/web-main-javaee7/
2. Register a GlassFish 4 promoted build in the IDE
3. Create a Java EE 7 web project with this target
4. Create a websocket endpoint using New File -> Web -> WebSocket Endpoint
5. The generated code contains reference to javax.websocket.*, but the IDE displays error in the editor saying "package javax.websocket does not exist"

=> GlassFish plugin should expose all Java EE 7 APIs (incliding websocket) on its classpath, so it is visible to the project.

I believe this is a part of task EE.4 from http://wiki.netbeans.org/JavaEE7#Java_EE_7
Comment 1 Martin Janicek 2013-01-17 09:23:28 UTC
Most probably not for NB7.3, right?
Comment 2 TomasKraus 2013-01-17 10:34:39 UTC
Yes, I have to reconfigure Libraries for GlassFish 7. It's just one XML file update. :)
Comment 3 TomasKraus 2013-01-22 16:01:31 UTC
Well, I checked MANIFEST.MF in glassfish/lib/javaee.jar from last GF 4 build:

../modules/bean-validator.jar
../modules/endorsed/javax.annotation.jar
../modules/endorsed/jaxb-api-osgi.jar
../modules/endorsed/webservices-api-osgi.jar
../modules/javax.ejb.jar
../modules/javax.el.jar
../modules/javax.enterprise.deploy.jar
../modules/javax.faces.jar
../modules/javax.jms-api.jar
../modules/javax.json.jar
../modules/javax.mail.jar
../modules/javax.management.j2ee.jar
../modules/javax.persistence.jar
../modules/javax.resource.jar
../modules/javax.security.auth.message.jar
../modules/javax.security.jacc.jar
../modules/javax.servlet-api.jar
../modules/javax.servlet.jsp-api.jar
../modules/javax.servlet.jsp.jstl-api.jar
../modules/javax.transaction.jar
../modules/javax.ws.rs-api.jar
../modules/jaxb-osgi.jar
../modules/jaxr-api-osgi.jar
../modules/jaxrpc-api-osgi.jar
../modules/jsr250-api.jar
../modules/webservices-osgi.jar
../modules/weld-osgi-bundle.jar
../mq/lib/jaxm-api.jar
Comment 4 TomasKraus 2013-01-22 17:04:59 UTC
jsr250-api.jar is no more in the modules and javax.websocket API jar was missing.
GlassFish team made changes to fix this in javaee.jar today, I'll copy them to plugin Java EE library setup tomorrow.
Comment 5 TomasKraus 2013-01-24 13:41:20 UTC
Unfortunately changes were larger than I was expecting. I found that JavaEE library was hard coded in Hk2PluginProperties.java and our new framework from Tooling SDK was not fully integrated yet.

Pushing into hg.netbeans.org/web-main/:
---------------------------------------
changeset:   243806:fd99b3cf6bb3
branch:      javaee7
summary:     GlassFish 4 does not expose classpath for Java EE 7

This change set switches library content to new LibraryBuilder framework. Also GF4 library patterns were changed to match current lib/javaee.jar manifest.

We may still do some additional check before release because jar file names may change in the future.
Comment 6 TomasKraus 2013-01-24 14:49:07 UTC
Prepared in internal repository for trunk:
------------------------------------------
changeset:   242372:ebc8119e1f63
tag:         tip
summary:     #224978 - GlassFish 4 does not expose classpath for Java EE

Closing now, please test next javaee7 branch build.
Comment 7 guanche 2013-03-14 21:40:28 UTC
package javax.websocket.annotations does not exist l

This Bug is still in force on March 14 - is there at least a workaround that will give us outsiders a chance to put into practice what Arun Gupta has been preaching so eloquently and cogently in totd183 and elsewhere?   

Config:


glassfish-4.0-b80-unix-ml

NetBeans 7.3 and also NetBeans IDE Dev (Build web-main-javaee7-157-on-20130314)

Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
System: Linux version 2.6.32-45-generic running on amd64; UTF-8; en_GB
Comment 8 Petr Jiricka 2013-03-14 21:56:05 UTC
I think that's a different issue - you may be hitting bug 227320. I suspect TOTD 183 is out of date, see https://blogs.oracle.com/arungupta/entry/updating_to_latest_websocket_api
Comment 9 Petr Jiricka 2013-03-15 15:54:21 UTC
Back to fixed.