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 189912 - LinkageError: loader constraint violation: loader (instance of org/netbeans/StandardModule$OneModuleClassLoader) previously initiated loading for a different type with name "com/sun/source/tree/Compil
Summary: LinkageError: loader constraint violation: loader (instance of org/netbeans/S...
Status: RESOLVED FIXED
Alias: None
Product: javacard
Classification: Unclassified
Component: Java Card (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 194200 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-26 13:14 UTC by Oleg Khokhlov
Modified: 2011-01-13 14:43 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 172177


Attachments
stacktrace (7.48 KB, text/plain)
2010-08-26 13:15 UTC, Oleg Khokhlov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Khokhlov 2010-08-26 13:14:56 UTC
Build: NetBeans IDE Dev (Build 201008260001)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Windows XP

User Comments:
ovk: also clicked on Applets tab in JavaCard project properties




Stacktrace: 
java.lang.LinkageError: loader constraint violation: loader (instance of org/netbeans/StandardModule$OneModuleClassLoader) previously initiated loading for a different type with name "com/sun/source/tree/CompilationUnitTree"
   at org.netbeans.modules.javacard.classdetector.TypeFinder.run(TypeFinder.java:135)
   at org.netbeans.modules.javacard.classdetector.TypeFinder.run(TypeFinder.java:71)
   at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:482)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:154)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:138)
   at org.netbeans.modules.parsing.impl.TaskProcessor$1.call(TaskProcessor.java:200)
Comment 1 Oleg Khokhlov 2010-08-26 13:15:01 UTC
Created attachment 101690 [details]
stacktrace
Comment 2 _ tboudreau 2011-01-05 22:14:05 UTC
*Looks* like some class in the Javac API was incompatibly changed (or perhaps some stale data from 6.9 imported in your userdir).

Benjamin:  Did you import settings from 6.9?  The NB team does guarantee that settings import works between released versions;  but it is not always guaranteed to work in development builds (making sure import works comes toward the end of the release cycle).

Try this:  Shut down NetBeans.  Go into your home dir in a shell (Command Prompt).
cd .netbeans
rename dev dev_old

Then restart NetBeans (you may need to set up your javacard platform again).  This will blow away the imported settings, so you'll be starting clean.

If that fixes it, then the problem was the imported settings.  If not, it is a real bug of some sort - but it probably belongs to the Java modules, not Javacard, as this problem happens when the Javacard module tries to load a class from javac, and loading that class is what is failing.
Comment 3 Benjamin_Gittins 2011-01-05 22:26:39 UTC
(In reply to comment #2)
> *Looks* like some class in the Javac API was incompatibly changed (or perhaps
> some stale data from 6.9 imported in your userdir).
> 
I note that this problem does not occur in 6.8.

> Benjamin:  Did you import settings from 6.9?  The NB team does guarantee that
> settings import works between released versions;  but it is not always
> guaranteed to work in development builds (making sure import works comes toward
> the end of the release cycle).
> 
> Try this:  Shut down NetBeans.  Go into your home dir in a shell (Command
> Prompt).
> cd .netbeans
> rename dev dev_old

I uninstalled all copies of the NetBeans IDE
I have deleted all .n* files, including the .netbeans folder
I re-installed NetBeans 7.0   
I repeated the steps, and crash.

> 
> Then restart NetBeans (you may need to set up your javacard platform again). 
> This will blow away the imported settings, so you'll be starting clean.
> 


> If that fixes it, then the problem was the imported settings.  If not, it is a
> real bug of some sort - but it probably belongs to the Java modules, not
> Javacard, as this problem happens when the Javacard module tries to load a
> class from javac, and loading that class is what is failing.

this problem does not occur in 6.8
It occurs in 6.9.1

Ben
Comment 4 Exceptions Reporter 2011-01-05 22:34:38 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=172177
Comment 5 _ tboudreau 2011-01-05 22:38:03 UTC
@Benjamin:  That's probably overkill - sorry you went to that extreme.  Just deleting $HOME/.netbeans/$VERSION is the equivalent of reinstalling.

Anyway, this clearly appears to be some kind of issue in javac.

Does this occur in 7.0 or current dev builds?
Comment 6 Benjamin_Gittins 2011-01-05 22:39:25 UTC
(In reply to comment #5)
> @Benjamin:  That's probably overkill - sorry you went to that extreme.  Just
> deleting $HOME/.netbeans/$VERSION is the equivalent of reinstalling.
> 
> Anyway, this clearly appears to be some kind of issue in javac.
> 
> Does this occur in 7.0 or current dev builds?

it occurs in 6.9.1
it occurs in 7.0
it does not occur in 6.8
Don't know about 6.9
Comment 7 Jan Lahoda 2011-01-06 06:16:10 UTC
Actually seems more like a javacard.project problem - it depends on java.source and tries to use it, but neglects to depend on Javac API wrapper.
Comment 8 _ tboudreau 2011-01-06 06:28:11 UTC
Bumping up the priority.  I would fix it, but it appears I no longer have permission to push to NetBeans Hg :-(
Comment 9 Benjamin_Gittins 2011-01-06 09:22:56 UTC
(In reply to comment #7)
> Actually seems more like a javacard.project problem - it depends on java.source
> and tries to use it, but neglects to depend on Javac API wrapper.

This is a problem that has been around since August. 

@Jan, do you know if there are any regular developers in the NetBeans community that can make the correction, or do you know who the current point-person is for the NetBeans flagship Java Card 3 development. I appreciate that @tboudreau is no longer employed by Sun/Oracle and no longer capable of committing the changes in person.

If tboudreau corrected the source code locally, would you be able to receive and commit the changes into the 7.0 development chain?

Cheers!

Benjamin
Comment 10 Jan Lahoda 2011-01-06 09:56:37 UTC
I have added the dependency:
http://hg.netbeans.org/jet-main/rev/c7122e43a12b
Comment 11 Quality Engineering 2011-01-09 06:19:05 UTC
Integrated into 'main-golden', will be available in build *201101090000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c7122e43a12b
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #189912: javacard is using the Java infrastructure (java.source) and so must have an explicit dependency on nb-javac API.
Comment 12 _ tboudreau 2011-01-13 14:43:27 UTC
*** Bug 194200 has been marked as a duplicate of this bug. ***