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 158429 - LinkageError: loader constraint violation: loader (instance of org/netbeans/modules/websvc/registry/netbeans/ExtensionClassLoader) previously initiated loading for a different type with name "com/sun/
Summary: LinkageError: loader constraint violation: loader (instance of org/netbeans/m...
Status: RESOLVED WORKSFORME
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-RPC (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milan Kuchtiak
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 01:08 UTC by emiddio
Modified: 2009-07-30 11:06 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 144368


Attachments
stacktrace (2.32 KB, text/plain)
2009-02-12 01:09 UTC, emiddio
Details
wsdl file that results in the problem (8.21 KB, text/xml)
2009-02-12 06:35 UTC, emiddio
Details
another wsdl file (7.96 KB, text/xml)
2009-02-13 21:23 UTC, emiddio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description emiddio 2009-02-12 01:08:59 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86

User Comments:
GUEST: Creating web service client from wsdl.



Stacktrace: 
java.lang.LinkageError: loader constraint violation: loader (instance of org/netbeans/modules/websvc/registry/netbeans/ExtensionClassLoader) previously initiated loading for a different type with name "com/sun/xml/rpc/processor/generator/Names"
        at java.lang.ClassLoader.defineClass1(ClassLoader.java:0)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
Comment 1 emiddio 2009-02-12 01:09:05 UTC
Created attachment 76891 [details]
stacktrace
Comment 2 emiddio 2009-02-12 06:34:05 UTC
will attach wsdl file that resulted in this problem; its a java app where try to
create web service client;
Comment 3 emiddio 2009-02-12 06:35:25 UTC
Created attachment 76895 [details]
wsdl file that results in the problem
Comment 4 rmichalsky 2009-02-12 07:33:38 UTC
Passing to web services.
Comment 5 emiddio 2009-02-13 21:20:30 UTC
i am adding 1 more wsdl file. i have conducted a number of experiments -- with
nb4.1, nb5.0, nb6.1, nb6.5, and nb7dev; i have not tested nb5.5,5.5.5.1,6.0.1 at this time.

in all cases except nb4.1(because it does not support java clients of webservices) i
have built 3 projects for each .wsdl for each version of netbeans tested. for nb4.1 only
2 projects built for each wsdl.

they are:
java client of websvc from the wsdl - jaxrpc
j2ee1.4 web svc from the wsdl - jaxrpc
j2ee1.4 web client from the wsdl, jaxrpc,
any places netbeans asks for type of client -- ide generated static stub vs
java ee generated stub -- i have chosen ide generated.

this 'linkage error' or inablilty to build web svc/client only occurs on nb6.5 and
nb7dev -- of the versions  tested.

usually i can build the web svc without errors

-- but i will get another type of
error if i try to modify any project properties - like deploy-on-save or jdk version or
library version before initially creating the web svc service or client.
also i have to uncheck the checkbox for 'set j2ee source level to 1.4' or i get errors
trying to open the dialog for create web service, create web service client, or create
web service from wsdl.

so the rule seems to be -- until the web svc has been created -- ie. client or service -
dont modify any project properties -- and project will not build with defult checkbox
set to 'set source to jdk1.4/j2ee1.4' when my default jdk is 1.6 -- since it only changes
the library level to 1.4 but leaves the source versions at something above 1.4;


also --
i understand that a web service built from a wsdl and not a java interface -- is using
the wsdl as the master -- so that it makes sense that you should not/cannot edit the web svc
and use 'add operation' -- it should be done in the wsdl, not the java code.

but - nb4.1, and nb5.0 will let you see the operations present in the web service via the
web services tab; but nb6.1, 6.5, 7dev -- dont show any operations in the web services tab.
they only show the web service name.



Comment 6 emiddio 2009-02-13 21:23:41 UTC
Created attachment 76985 [details]
another wsdl file
Comment 7 emiddio 2009-02-15 00:32:53 UTC
these bugs exist in both 6.5 and 7.0dev -- i am currently using netbeans 6.1 for older wsdl jax-rpc
web services stuff at the moment to avoid these issues; the Version field for this Issue says 7.0
-- but the issue was initially found in 6.5 -- that is why i went to 7.0 dev release.

after trial n error -- i discovered netbeans 6.1 is ok with whatever is causing these problems.

Comment 8 Exceptions Reporter 2009-06-23 12:00:37 UTC
This issue already has 22 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=144368
Comment 9 Milan Kuchtiak 2009-06-23 14:56:02 UTC
I can reproduce the issue with Netbeans 6.5 and jdk1.6.0_14.
Comment 10 Milan Kuchtiak 2009-06-23 15:23:41 UTC
I tried Netbeans 6.7 RC and given wsdl:
http://www.netbeans.org/nonav/issues/showattachment.cgi/76895/ContextBookQuery.wsdl

Works fine with my machine (Linux Ubuntu + jdk1.6.0_14).
Comment 11 Jaroslav Pospisil 2009-06-23 16:08:12 UTC
I've unsuccesfully tried to reproduce issue with all mentioned use cases. I can see the cause in quite old version of
your Java - could you please upgrade to JDK 1.6.0_14, which is the last,so far? There's score of fixes and updates
included since 1.6.0_05 and some of them could be cause.that it works fine for me.  
Comment 12 Milan Kuchtiak 2009-07-30 11:06:58 UTC
The issue is not reproducible with Netbeans 6.7, though it was in 6.5.
Likely fixed by changes in class loader mechanism.