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 163878 - AssertionError: []
Summary: AssertionError: []
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL: http://statistics.netbeans.org/except...
Keywords:
: 196845 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-28 12:16 UTC by maxnitribitt
Modified: 2011-03-19 09:43 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 150209


Attachments
stacktrace (1.65 KB, text/plain)
2009-04-28 12:17 UTC, maxnitribitt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description maxnitribitt 2009-04-28 12:16:45 UTC
Build: NetBeans IDE Dev (Build 200904011705)
VM: Java HotSpot(TM) Client VM, 1.5.0_16-133, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b06-284
OS: Mac OS X, 10.5.6, i386

User Comments:
maxnitribitt: Created a Module, from the project Node launched New File Wizard ->Module Development -> Module Installer, kept defaults, clicked next, then finish. => this Exception



Stacktrace: 
java.lang.AssertionError: []
        at org.netbeans.modules.apisupport.project.CreatedModifiedFilesFactory.copyAndSubstituteTokens(CreatedModifiedFilesFactory.java:320)
        at org.netbeans.modules.apisupport.project.CreatedModifiedFilesFactory.access$200(CreatedModifiedFilesFactory.java:96)
        at org.netbeans.modules.apisupport.project.CreatedModifiedFilesFactory$CreateFile.run(CreatedModifiedFilesFactory.java:288)
        at org.netbeans.modules.apisupport.project.CreatedModifiedFiles.run(CreatedModifiedFiles.java:181)
        at org.netbeans.modules.apisupport.project.ui.wizard.moduleinstall.NewModuleInstallIterator.instantiate(NewModuleInstallIterator.java:67)
        at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1018)
Comment 1 maxnitribitt 2009-04-28 12:17:06 UTC
Created attachment 81061 [details]
stacktrace
Comment 2 rmichalsky 2009-05-06 16:11:41 UTC
Reproducible? Does your IDE installation contain ide11/modules/org-netbeans-libs-freemarker.jar? Could you attach IDE log?
Comment 3 tomwheeler 2009-05-13 19:47:49 UTC
I submitted this via automated exception report (http://statistics.netbeans.org/analytics/exception.do?id=202728) and it
was marked as a duplicate of the bug Toni reported.  Reading through his description, he did exactly the same thing as
me before encountering the bug.  Now we know that it is not specific to a given platform or JRE.

My IDE does contain the ide11/modules/org-netbeans-libs-freemarker.jar file.  My IDE log file appears to have been
uploaded with the exception report, here:

  http://statistics.netbeans.org/analytics/messageslog?id=202728
Comment 4 tomwheeler 2009-05-13 19:50:45 UTC
FWIW, the Installer wizard created an zero-length file named Installer, although it was in the correct package. The
dependency on the Module System API was not added to project.xml nor was the registration entry added to the manifest file.
Comment 5 rmichalsky 2009-05-14 09:33:03 UTC
Thanks for the log, there is another exception before the reported one, so it may be the culprit. Is this random in your
case or reproducible consistently?
Comment 6 tomwheeler 2009-05-14 16:42:09 UTC
I've shutdown the IDE since I experienced the problem, so I can't say for sure whether I had an exception earlier in the
process.  I don't recall one, but it's certainly possible.

It seems the problem is not 100% reproducible.  I just launched the same build, created a new platform app and added a
new module to it.  I used the wizard to create a ModuleInstall, but this time it worked.  
Comment 7 Marian Mirilovic 2009-07-17 10:39:31 UTC
requested information was provided by user
Comment 8 Jesse Glick 2010-02-16 14:18:27 UTC
Don't know how to reproduce. Improving diagnostics: core-main #31fdc90ce152
Comment 9 Quality Engineering 2010-02-17 21:57:59 UTC
Integrated into 'main-golden', will be available in build *201002180200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/31fdc90ce152
User: Jesse Glick <jglick@netbeans.org>
Log: Better assertion for #163878.
Comment 10 Jesse Glick 2011-03-18 21:25:38 UTC
*** Bug 196845 has been marked as a duplicate of this bug. ***
Comment 11 Jesse Glick 2011-03-18 21:38:59 UTC
Duplicate says:

java.lang.AssertionError: #163878: [] lacks freemarker using ModuleCL@637050f5[org.netbeans.modules.java.source] though lookup has [apple.applescript.AppleScriptEngineFactory@60173295, org.netbeans.libs.freemarker.FreemarkerFactory@12fa057c]

implying that someone is calling Thread.currentThread().setContextClassLoader(SomeClassInJavaSourceModule.class.getClassLoader()). In the java.source module itself I can see JavacParser and Reindenter doing this, but both take care to reset the CCL in a finally block (and the exception is not inside either of these methods).

Should be easy enough to work around, by specifying a ClassLoader explicitly, but I would like to know what the root cause is; other things could be broken too.
Comment 12 Jesse Glick 2011-03-18 21:44:49 UTC
core-main #f818806409b3
Comment 13 Quality Engineering 2011-03-19 09:43:30 UTC
Integrated into 'main-golden', will be available in build *201103190400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f818806409b3
User: Jesse Glick <jglick@netbeans.org>
Log: #163878: AssertionError: []