Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 177644

Summary: Tens of useless classes loaded by JaxWS & co.
Product: webservices Reporter: Jaroslav Tulach <jtulach>
Component: CodeAssignee: Milan Kuchtiak <mkuchtiak>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: issues, ovk, pjiricka
Version: 6.xKeywords: PERFORMANCE
Target Milestone: 6.x   
Hardware: Other   
OS: Linux   
Whiteboard: perf-whitelist
Issue Type: DEFECT Exception Report:

Description Jaroslav Tulach 2009-11-25 21:04:55 UTC
I am processing the whitelist of classes loaded when one opens lime6.zip Java SE project. More info at
http://wiki.netbeans.org/FitnessViaWhiteAndBlackList
There seems to be a lot classes related to webservices. This is quite strange given the fact that the lime6.zip 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:
http://hg.netbeans.org/ergonomics/rev/de3ebd84625e

However I can also see that the grep for "jax" in lime6.zip project is not empty. Maybe Oleg can a look at it and explain why the lime6.zip file contains nbproject/private/private.properties? 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/private.properties:jaxws.endorsed.dir=C:\\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="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" 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 private.properties now:
http://hg.netbeans.org/main/rev/3c7035d6d025

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 http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/de3ebd84625e
User: Jaroslav Tulach <jtulach@netbeans.org>
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):

org.netbeans.modules.schema2beans
org.netbeans.modules.websvc.api.jaxws.project.config
org.netbeans.modules.websvc.jaxwsmodel.project_config1_0

See:
http://hg.netbeans.org/main/rev/b6257bb98ec5

Still, some other improvements are achievable.
Working on that.
Comment 7 Milan Kuchtiak 2010-03-31 15:35:03 UTC
Another improvements:
org.netbeans.modules.websvc.core.jaxws.projects.J2SEProjectJAXWSClientSupport
org.netbeans.modules.websvc.core.jaxws.projects.J2SEProjectJaxRpcClientSupport

See:
http://hg.netbeans.org/main/rev/9afb97b16a76
Comment 8 Quality Engineering 2010-04-02 05:09:09 UTC
Integrated into 'main-golden', will be available in build *201004020200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b6257bb98ec5
User: mkuchtiak@netbeans.org
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:
http://hg.netbeans.org/main/rev/d5b9baea1b1f
Comment 10 Milan Kuchtiak 2010-04-08 08:53:16 UTC
Fixing EJB project:
http://hg.netbeans.org/main/rev/07961bb88bc9
Comment 11 Milan Kuchtiak 2010-04-08 12:33:04 UTC
Fixing Web project:
http://hg.netbeans.org/main/rev/5563e092d5d8

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 http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/07961bb88bc9
User: mkuchtiak@netbeans.org
Log: #177644: dropping down number of classes loaded during project open (Ejb Project)
Comment 13 Jaroslav Pospisil 2010-05-20 12:24:06 UTC
v.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo