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 121977 - Cannot build Java SE project with JAX-WS 2.1 client on JDK 6
Summary: Cannot build Java SE project with JAX-WS 2.1 client on JDK 6
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Client (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-11-15 11:36 UTC by Lukas Jungmann
Modified: 2008-02-17 05:02 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (22.91 KB, application/x-compressed)
2007-11-15 11:39 UTC, Lukas Jungmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2007-11-15 11:36:12 UTC
-have attached project
-run build on it (use JDK 6)

=> fails because it cannot find JAX-WS 2.1 "specific" javax.xml.ws.Service class

problem is that -Djava.edorsed.dir property is not being propagated to javac task correctly

Workaround: Either build project on JDK 5 (set up JDK 5 platform in project properties) or set
"-Djava.endorsed.dirs='$IDE_HOME/java1/modules/ext/jaxws21/api'" as additional compiler property in project properties
-> Build -> Compiling
Comment 1 Lukas Jungmann 2007-11-15 11:39:30 UTC
Created attachment 53033 [details]
sample project
Comment 2 Milan Kuchtiak 2007-11-15 13:23:15 UTC
The source of the issue is following:

Though we set up the compiler JVM arg "java.endorsed.dirs" for jax-ws artifacts, we don't do that for "normal" sources
(like Main class). 
Comment 3 Lukas Jungmann 2007-11-15 13:30:13 UTC
Must be fixed for 6.0 (this used to work in 5.5.1)...
Comment 4 Milan Kuchtiak 2007-11-15 15:36:55 UTC
Fixed.

The JVM option: "java.endorsed.dirs" for javac is set (in "-init-macrodef-javac" target) 
when these conditions are true :

jaxws.endorsed.dir property is set in private.properties
nbproject/jaxws-build.xml file exists

Diffs:
Checking in
usr/local/home/mkuchtiak/cvs/nb_60/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/resources/jaxws-web.xsl;
/cvs/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/resources/jaxws-web.xsl,v  <--  jaxws-web.xsl
new revision: 1.12; previous revision: 1.11
done
Checking in
usr/local/home/mkuchtiak/cvs/nb_60/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/resources/jaxws-app-client.xsl;
/cvs/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/resources/jaxws-app-client.xsl,v  <-- 
jaxws-app-client.xsl
new revision: 1.4; previous revision: 1.3
done
Checking in
usr/local/home/mkuchtiak/cvs/nb_60/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/resources/jaxws-ejb.xsl;
/cvs/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/resources/jaxws-ejb.xsl,v  <--  jaxws-ejb.xsl
new revision: 1.9; previous revision: 1.8
done
Checking in
usr/local/home/mkuchtiak/cvs/nb_60/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/resources/jaxws-j2se.xsl;
/cvs/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/resources/jaxws-j2se.xsl,v  <--  jaxws-j2se.xsl
new revision: 1.6; previous revision: 1.5
done
Checking in
usr/local/home/mkuchtiak/cvs/nb_60/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v  <--  build-impl.xsl
new revision: 1.108; previous revision: 1.107
done
Checking in
space/home/mkuchtiak/cvs/nb_60/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/resources/build-impl.xsl;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/resources/build-impl.xsl,v  <--  build-impl.xsl
new revision: 1.26; previous revision: 1.25
done
Checking in
space/home/mkuchtiak/cvs/nb_60/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl,v  <--  build-impl.xsl
new revision: 1.81; previous revision: 1.80
done
Checking in usr/local/home/mkuchtiak/cvs/nb_60/web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl;
/cvs/web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl,v  <--  build-impl.xsl
new revision: 1.168; previous revision: 1.167
done
Comment 5 Srividhya Narayanan 2007-11-15 17:28:33 UTC
can we pls ensure that we have this test case added to te master list and see if this can be automated somewhere so we
can catch these regressions across versions?
Comment 6 Petr Blaha 2007-11-16 09:50:39 UTC
Lukasi, please verify the issue in trunk today and Milan should merge the fix in branch. Thanks
Comment 7 Lukas Jungmann 2007-11-16 10:39:58 UTC
done => v., go ahead and merge the fix to release60 branch, please.
Comment 8 Roderico Cruz 2007-11-16 18:38:34 UTC
The changes look good. Kindly go ahead and commit in the release60 branch.
Comment 9 Milan Kuchtiak 2007-11-16 19:58:35 UTC
Merged to release60.
Code Reviewer : Roderico Cruz.
Comment 10 gcmcnutt 2007-11-27 22:58:58 UTC
There might be another trigger for this symptom.  e.g. in my case, I've had a working project [app was JDK5, 
apparently was JAXWS2.1] with a web client.  all was fine, plenty of extensions to the app, modifications to the 
service [and it's WSDL] -- all incremental building worked fine.

[NB6 RC2 platform in use].

Today, however, I deleted the web service from the application [using the NB user interface] and created it fresh 
[same service, different location].  And now, I cannot get past the case where the 2.1 code is in the 
generated ...Service.java file.  even going back to the original service, etc. 

Also, I can't seem to get the workaround to work.

So, what state might be changed/stuck in the private build xml files?
Comment 11 Milan Kuchtiak 2007-11-28 10:12:43 UTC
Please, report a new bug for your problem.
Frankly, I don't understand what is the problem.

Were jax-ws artifacts generated incorrectly ?
Was implementation class generated, and was it generated correctly ?
Is the project compilable ?
Comment 12 Lukas Jungmann 2008-02-17 05:02:41 UTC
v.