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 232703 - IllegalArgumentException: No parser for mime type: text/x-java
Summary: IllegalArgumentException: No parser for mime type: text/x-java
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 234057 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-15 11:42 UTC by Exceptions Reporter
Modified: 2019-03-16 06:22 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 202146


Attachments
stacktrace (1.09 KB, text/plain)
2013-07-15 11:42 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-07-15 11:42:48 UTC
This bug was originally marked as duplicate of bug 210236, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b15
OS: Linux

User Comments:
GUEST: Netbeans started up after importing settings




Stacktrace: 
java.lang.IllegalArgumentException: No parser for mime type: text/x-java
   at org.netbeans.modules.parsing.api.ParserManager.findParser(ParserManager.java:402)
   at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:335)
   at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:417)
   at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:409)
   at org.netbeans.modules.j2ee.metadata.model.api.support.annotation.AnnotationModelHelper.runJavaSourceTask(AnnotationModelHelper.java:181)
   at org.netbeans.modules.j2ee.metadata.model.api.support.annotation.AnnotationModelHelper.runJavaSourceTask(AnnotationModelHelper.java:149)
Comment 1 Exceptions Reporter 2013-07-15 11:42:49 UTC
Created attachment 137120 [details]
stacktrace
Comment 2 Milan Kuchtiak 2013-08-16 07:21:59 UTC
Reassigning to editor/parsing and indexing category to evaluate.

Would it help if (in RestServicesMetadataModelImpl) we called:

model.runReadActionWhenReady (equivalent JavaSource.runWhenScanFinished) ?
rather than
model.runReadAction (equivalent to JavaSource.runUserActionTask)
Comment 3 David Konecny 2013-08-18 21:05:29 UTC
Adding bits of offline discussion for the record:
        
3 exceptions logged are all from different areas:

-org.netbeans.modules.maven.j2ee.web.WebAppMetadataHelper.getServlets(WebAppMetadataHelper.java:65)

-org.netbeans.modules.web.jsf.api.editor.JsfFacesComponentsProvider.getLibraries(JsfFacesComponentsProvider.java:91)

-org.netbeans.modules.websvc.rest.model.impl.RestServicesMetadataModelImpl.runReadAction(RestServicesMetadataModelImpl.java:77)

Exception http://statistics.netbeans.org/exceptions/exception.do?id=681109 is from "NetBeans IDE 7.3 (Build 201302132200)"  and long before my change 0c0246bd3359 (runReadActionWhenReady changed to runReadAction). On the other hand TomasZ year ago changed runReadAction to runReadActionWhenReady:

changeset:   212137:048c99083423
parent:      212004:e8877bf19ddc
user:        Tomas Zezula <tzezula@netbeans.org>
date:        Thu Jan 26 19:28:29 2012 +0100
summary:     Postpone metamodel operations to point when metadata are ready.

But why 7.3 year later still calls runReadAction is a mystery to me or perhaps I overlooked something.
Comment 4 Tomas Zezula 2013-08-19 08:54:39 UTC
The Parser for text/x-java is registered in the java.source module. As the stack trace contains JavaSource.runUserActionTask(...) the java.source module had to be enabled but the Parser was not returned by the mime lookup.
Comment 5 Milutin Kristofic 2013-08-19 14:46:36 UTC
*** Bug 234057 has been marked as a duplicate of this bug. ***
Comment 6 Tomas Zezula 2013-08-19 15:15:46 UTC
It may be caused by lazy initialisation of lookup.
I've changed the JavacParserFactory registration to contain the instanceof.
We will see if it helps.
Comment 7 Tomas Zezula 2013-08-19 15:16:34 UTC
Fixed jet-main f03be142e681
Comment 8 Thanos1234 2019-03-16 06:22:43 UTC
I really like to visit here this amazing post need to follow here http://mahjongfreegames.online and get the update to play here mahjong free games online forever.