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 177644

Summary: Tens of useless classes loaded by JaxWS & co.
Product: webservices Reporter: Jaroslav Tulach <jtulach>
Component: CodeAssignee: Milan Kuchtiak <mkuchtiak>
Severity: normal CC: issues, ovk, pjiricka
Priority: P2 Keywords: PERFORMANCE
Version: 6.x   
Hardware: Other   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Jaroslav Tulach 2009-11-25 21:04:55 UTC
I am processing the whitelist of classes loaded when one opens Java SE project. More info at
There seems to be a lot classes related to webservices. This is quite strange given the fact that the does not seem to use any webservices related classes.

My expectation is that the JaxWS and co. would at most check if the project is using their technology and exit immediately if it does not.
Comment 1 Jaroslav Tulach 2009-11-25 21:20:36 UTC
I've added the jaxws classes into whitelist for now:

However I can also see that the grep for "jax" in project is not empty. Maybe Oleg can a look at it and explain why the file contains nbproject/private/ Project with such private references is not transferable without broken references.

Another question is why the build-impl.xml is extended with jaxws at all. The build-impl.xml does something with endorsed dirs and links to nbproject/jaxws-build.xml, but nbproject/jaxws-build.xml does not exists. What kind of trick is that?

Anyway it seems to me that there are no JaxWS in the lime6 project and thus it would be desirable for JaxWS support to remain almost deactivated. 

Btw. Here is the output of the grep:

$ ide.kit/test/whitelist/temp/lime6$ grep -r jax -i *
nbproject/private/\\Program Files\\NetBeans 6.7\\java2\\modules\\ext\\jaxws21\\api:C:\\Program Files\\NetBeans 6.7\\ide11\\modules\\ext\\jaxb\\api
nbproject/build-impl.xml:<project xmlns:j2seproject1="" xmlns:j2seproject3="" xmlns:jaxrpc="" basedir=".." default="default" name="lime6-impl">
nbproject/build-impl.xml:        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
nbproject/build-impl.xml:                <isset property="jaxws.endorsed.dir"/>
nbproject/build-impl.xml:                <available file="nbproject/jaxws-build.xml"/>
nbproject/build-impl.xml:                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
Comment 2 Milan Kuchtiak 2009-11-26 01:31:11 UTC
jaxws stuff was removed from build-impl.xml already, nothing from the output above is created in now:

I agree the number of items in "white list" is quite a long.
Is there any alternative to @ProjectServiceProvider to register classes in project lookup ?
Comment 3 Pavel Flaska 2009-11-26 05:44:02 UTC
Added Whiteboard.
Comment 4 Jaroslav Tulach 2009-11-26 08:15:15 UTC
@ProjectServiceProvider is good registration. @LookupRegistration (also used in other places of JaxWs is actually the bad one that needs to be eliminated).

If you need some special "conditional" @ProjectServicesProvider - one that would be activated only if some well-known relative file under the project exists, feel free to specify your needs. I can improve the @ProjectServicesProvider API to support such usecase.
Comment 5 Quality Engineering 2009-12-02 03:00:08 UTC
Integrated into 'main-golden', will be available in build *200912020200* on (upload may still be in progress)
User: Jaroslav Tulach <>
Log: Reporting #177644 to track the number of jaxws related classes being loaded in
Comment 6 Milan Kuchtiak 2010-03-31 12:55:34 UTC
Fixed partially :

Classes from the following packages are eliminated (J2SEProject):



Still, some other improvements are achievable.
Working on that.
Comment 7 Milan Kuchtiak 2010-03-31 15:35:03 UTC
Another improvements:

Comment 8 Quality Engineering 2010-04-02 05:09:09 UTC
Integrated into 'main-golden', will be available in build *201004020200* on (upload may still be in progress)
Log: #177644: dropping down number of classes loaded during project open (J2SE Project)
Comment 9 Milan Kuchtiak 2010-04-07 14:05:47 UTC
Improving Application Client:
Comment 10 Milan Kuchtiak 2010-04-08 08:53:16 UTC
Fixing EJB project:
Comment 11 Milan Kuchtiak 2010-04-08 12:33:04 UTC
Fixing Web project:

Dropping down number of classes loaded during project creation/project open, especially those related to schema2beans model.

Also I implemented @ProjectServiceProvider instead of @LookupProvider.Registration wherever it was possible.
Comment 12 Quality Engineering 2010-04-09 04:40:45 UTC
Integrated into 'main-golden', will be available in build *201004090201* on (upload may still be in progress)
Log: #177644: dropping down number of classes loaded during project open (Ejb Project)
Comment 13 Jaroslav Pospisil 2010-05-20 12:24:06 UTC