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 252798 - UnsupportedOperationException: No JavaFileManager for location: CLASS_OUTPUT
Summary: UnsupportedOperationException: No JavaFileManager for location: CLASS_OUTPUT
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-04 12:23 UTC by Ralph Ruijs
Modified: 2015-07-28 13:46 UTC (History)
20 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 217400


Attachments
stacktrace (2.66 KB, text/plain)
2015-06-04 12:23 UTC, Ralph Ruijs
Details
stacktrace (2.76 KB, text/plain)
2015-06-07 13:17 UTC, Ralph Ruijs
Details
stacktrace (3.65 KB, text/plain)
2015-06-11 12:15 UTC, Jiri Kovalsky
Details
stacktrace (2.66 KB, text/plain)
2015-06-15 15:19 UTC, Jesse Glick
Details
stacktrace (2.66 KB, text/plain)
2015-06-16 14:52 UTC, Jiri Prox
Details
stacktrace (8.74 KB, text/plain)
2015-06-26 11:56 UTC, Michel Graciano
Details
stacktrace (2.66 KB, text/plain)
2015-07-09 09:32 UTC, Vladimir Voskresensky
Details
stacktrace (2.76 KB, text/plain)
2015-07-14 14:17 UTC, Martin Entlicher
Details
stacktrace (2.66 KB, text/plain)
2015-07-20 13:19 UTC, Alexander Simon
Details
stacktrace (2.66 KB, text/plain)
2015-07-20 13:58 UTC, Alexandr Scherbatiy
Details
stacktrace (2.66 KB, text/plain)
2015-07-20 14:10 UTC, Alexander Simon
Details
stacktrace (2.66 KB, text/plain)
2015-07-20 16:31 UTC, alied
Details
stacktrace (3.65 KB, text/plain)
2015-07-22 17:37 UTC, alied
Details
stacktrace (2.66 KB, text/plain)
2015-07-23 07:55 UTC, IrianR
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Ruijs 2015-06-04 12:23:40 UTC
Build: NetBeans IDE Dev (Build 20150525-1067109881d4)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.45-b02, Java(TM) SE Runtime Environment, 1.8.0_45-b14
OS: Linux

User Comments:
petrk: Pasted java code to a file

GUEST: Command-Shift-B to navigate to a method.

GUEST: Clicked on a compiled class

ralphbenjamin: Opened java source file from Find in Projects result




Stacktrace: 
java.lang.UnsupportedOperationException: No JavaFileManager for location: CLASS_OUTPUT
   at org.netbeans.modules.java.source.parsing.ProxyFileManager.getJavaFileForOutput(ProxyFileManager.java:376)
   at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1672)
   at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:772)
   at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1657)
   at com.sun.tools.javac.api.JavacTaskImpl$2.process(JavacTaskImpl.java:535)
   at com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:623)
Comment 1 Ralph Ruijs 2015-06-04 12:23:42 UTC
Created attachment 154051 [details]
stacktrace
Comment 2 Exceptions Reporter 2015-06-04 14:47:23 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=217400
Comment 3 Ralph Ruijs 2015-06-07 13:17:39 UTC
Created attachment 154091 [details]
stacktrace

Opened org.jdesktop.beansbinding.Binding.class
Comment 4 Jiri Kovalsky 2015-06-11 12:15:57 UTC
Created attachment 154161 [details]
stacktrace

I was going through code completion suggestions in my debugger.jpda.ui/test/qa-functional/src/org/netbeans/modules/debugger/jpda/ui/AntSanityTest.java file with caret here: expressionEditor.| in evaluateExpression() method.
Comment 5 Jesse Glick 2015-06-15 15:19:23 UTC
Created attachment 154233 [details]
stacktrace

Changing Maven dependency to a version initially without locally downloaded *-sources.jar.
Comment 6 Jiri Prox 2015-06-16 14:52:26 UTC
Created attachment 154251 [details]
stacktrace

UOE when adding sources to the ant library while one class from library is opened in editor (trying to reproduce issue 253009)
Comment 7 Exceptions Reporter 2015-06-18 09:10:35 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=217400
Comment 8 Michel Graciano 2015-06-26 11:56:45 UTC
Created attachment 154405 [details]
stacktrace

Opening a Java file from Favorites
Comment 9 Exceptions Reporter 2015-07-03 17:46:28 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=217400
Comment 10 cezariusz 2015-07-06 14:30:58 UTC
Steps to reproduce:
1. Download ArcGIS runtime for Java 10.2.4 [1]
2. Generate ZIP with decompiled sources using JD-GUI 1.0.0 [2]
3. Create a NetBeans platform project
4. Create a Library module, wrap ArcGIS_Runtime_Java.jar and ArcGIS_Runtime_Java_Toolkit.jar
5. Create a new module, add dependency to the above. Create a class creating a JMap instance.
6. On the "import com.esri.map.JMap" execute "Go To Declaration".
7. Attach sources created in step 2.
8. Close and perform the step 6 again.
9. The error will be thrown.


[1] https://developers.arcgis.com/java/
[2] http://jd.benow.ca/
Comment 11 err 2015-07-07 15:47:24 UTC
Including steps to reproduce here, might be simpler than other reports
(from http://statistics.netbeans.org/analytics/detail.do?id=217400 ID: 784627)

In a module project do
- GoTo Source ...
- Enter OpenAction, select the one in openide
- in performAction, with cursor over "getCookie"
- in context menu, select Navigate > Goto Source
Observe exception
Comment 12 cezariusz 2015-07-07 20:42:55 UTC
(In reply to err from comment #11)
> Including steps to reproduce here, might be simpler than other reports

Unable to reproduce.

> In a module project do
> - GoTo Source ...

What do you mean? Maybe Go to Symbol or Go to Type?

> - Enter OpenAction, select the one in openide
> - in performAction, with cursor over "getCookie"
> - in context menu, select Navigate > Goto Source
> Observe exception

When I have sources attached I don't get the exception. When I haven't I cannot navigate to getCookie on decompiled code.
Comment 13 err 2015-07-07 22:02:28 UTC
(In reply to cezariusz from comment #12)
> (In reply to err from comment #11)
> > Including steps to reproduce here, might be simpler than other reports
> 
> Unable to reproduce.
> 
> > In a module project do
> > - GoTo Source ...
> 
> What do you mean? Maybe Go to Symbol or Go to Type?

Oops. I did Menu > Navigate > GoToType.

I just tried clearing the cache and going through the steps again.
I tried clearing the cache first and going directly to the file that
is getting the exception.

All I need to do is
    - Menu > Navigate > GoToType
    - select "Node" from openide
    Observe exception

A few more notes

I am using a registered 8.0.2 platform for my app/suite, not "default".

If I do "Menu > Navigate > GoToType" and highlight the
    Node   (org.openide.nodes)
entry I see the "Location:"
    C:\b\j\NetBeans 8.0\platform\modules\org-openide-nodes.jar
and after OK I get the exception. The file does open read-only in the editor.
The file is .../netbeans-8.0.2-201411181905-src.zip.

I have a library defined, using "Ant Library Manager". called nb-lookup. The
library has two jar files. They are:
    F:\lib\org-openide-util-lookup.jar
    F:\lib\org-openide-util.jar
The jar files are copied from the 8.0.2 IDE; they are not referenced
by any of the suite modules. But I wonder...

I just noticed that there is an open javaSE project which uses this library.
I closed the Node.java file, closed the project, still got the exception.
I closed the IDE (javaSE project still closed), cleared the IDE cache,
restart IDE, GoToType node.java, still got the exception

I did not try deleting the nb-lookup lib.

> 
> > - Enter OpenAction, select the one in openide
> > - in performAction, with cursor over "getCookie"
> > - in context menu, select Navigate > Goto Source
> > Observe exception
> 
> When I have sources attached I don't get the exception. When I haven't I
> cannot navigate to getCookie on decompiled code.
Comment 14 Vladimir Voskresensky 2015-07-09 09:32:00 UTC
Created attachment 154536 [details]
stacktrace

step into HashSet.add
Comment 15 Martin Entlicher 2015-07-14 14:17:26 UTC
Created attachment 154617 [details]
stacktrace

Opened a Java file.
Comment 16 err 2015-07-19 01:58:44 UTC
I can reproduce this with the app I upload for Bug 253167 comment 2.

To set things up
-mkdir xxx
-cd xxx
-tar -xjf mwb.tar.bz
-download the guava jar file (as described in Bug 253167 comment 2)
- start with a clear cache

NOTE: this is using the default IDE


Note that the default platform has:
    Sources:    C:\f\docs\netbeans-8.0.2-201411181905-src.zip
    Javadoc:    ..../Roaming/NetBeans/dev/docs/NetBeansAPIs.zip
(the sources are wrong but ...)

With this setup, I open the project xxx/metawb (from the mwb.tar.bz)

Menu > Navigate > GoToType
Enter: node, select entry for org.openide.nodes
Click OK

Get the CLASS_OUTPUT exception (and a Node.java source file is opened)


Product Version: NetBeans IDE Dev (Build 201507150001)
Java: 1.8.0_40; Java HotSpot(TM) 64-Bit Server VM 25.40-b25
Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b26
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 17 Alexander Simon 2015-07-20 13:19:37 UTC
Created attachment 154728 [details]
stacktrace

hyper link to interface
Comment 18 Alexandr Scherbatiy 2015-07-20 13:58:37 UTC
Created attachment 154729 [details]
stacktrace

edit source file
Comment 19 Alexander Simon 2015-07-20 14:10:37 UTC
Created attachment 154730 [details]
stacktrace

go to type
Comment 20 alied 2015-07-20 16:31:37 UTC
Created attachment 154738 [details]
stacktrace

Just saw this notification
Comment 21 alied 2015-07-22 17:37:40 UTC
Created attachment 154799 [details]
stacktrace

Invoked code completion
Comment 22 IrianR 2015-07-23 07:55:49 UTC
Created attachment 154811 [details]
stacktrace

Just performed a Ctrl-click in an extremely old java project.
Comment 23 Dusan Balek 2015-07-23 12:18:06 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/c20df150ca1e
Comment 24 Quality Engineering 2015-07-24 01:18:20 UTC
Integrated into 'main-silver', will be available in build *201507240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c20df150ca1e
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #252798 - UnsupportedOperationException: No JavaFileManager for location: CLASS_OUTPUT - fixed.
Comment 25 cezariusz 2015-07-24 22:28:50 UTC
Verified with build 201507240001. But on a different file from the JAR described in comment #10 I have received another exception:

http://statistics.netbeans.org/analytics/detail.do?id=218755
Comment 26 err 2015-07-25 00:10:11 UTC
@cezariusz,

The latest build on dev download page is 201507150001, are the current builds
too unstable for download? I'd like to test this one on my reproducable case
as well. (and there's others I'd like to verify as well)
Comment 27 cezariusz 2015-07-25 06:14:54 UTC
(In reply to err from comment #26)
> @cezariusz,
> 
> The latest build on dev download page is 201507150001

Where? The current build at http://bits.netbeans.org/download/trunk/nightly/latest/ is 201507240001.
Comment 28 Jiri Kovalsky 2015-07-25 07:10:44 UTC
Dusane, please integrate the change to 8.1 Beta branch. Thanks Cezariusz for verification. Hopefully bug #253767 is not regression of this fix.
Comment 29 err 2015-07-25 15:47:39 UTC
(In reply to cezariusz from comment #27)
> http://bits.netbeans.org/download/trunk/nightly/latest/ is 201507240001.
My browser cache must be screwed up, I'll track it down.
Thanks.
Comment 30 Dusan Balek 2015-07-28 13:46:39 UTC
Integrated into 'release81_beta' branch.

http://hg.netbeans.org/releases/rev/a69227a33e20