After upgrading to the version in the title, i get the following exception and can't find out what's the problem. It seems like an annotation and parsing error inside of intellij.
To run the application i am using OpenJ9. Intellij itself runs with 11.0.6 like mentioned in the exception below.
2020-04-09 08:49:53,688 [1843359] ERROR - ubs.impl.PsiAnnotationStubImpl - Bad annotation in jar:///home/.m2/repository/org/checkerframework/jdk8/2.8.1/jdk8-2.8.1.jar!/java/util/List.class
com.intellij.util.IncorrectOperationException: Incorrect annotation '#jdk.Profile+Annotation(value=1)'
at com.intellij.psi.impl.PsiJavaParserFacadeImpl.newException(PsiJavaParserFacadeImpl.java:389)
at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createAnnotationFromText(PsiJavaParserFacadeImpl.java:103)
at com.intellij.psi.impl.PsiElementFactoryImpl.createAnnotationFromText(PsiElementFactoryImpl.java:661)
at com.intellij.psi.impl.java.stubs.impl.PsiAnnotationStubImpl.getPsiElement(PsiAnnotationStubImpl.java:56)
at com.intellij.psi.impl.compiled.ClsAnnotationImpl$2.compute(ClsAnnotationImpl.java:55)
at com.intellij.psi.impl.compiled.ClsAnnotationImpl$2.compute(ClsAnnotationImpl.java:50)
at com.intellij.openapi.util.AtomicNotNullLazyValue.getValue(AtomicNotNullLazyValue.java:37)
at com.intellij.psi.impl.compiled.ClsAnnotationImpl.getParameterList(ClsAnnotationImpl.java:94)
at com.intellij.psi.impl.compiled.ClsAnnotationImpl.appendMirrorText(ClsAnnotationImpl.java:65)
at com.intellij.psi.impl.compiled.ClsElementImpl.appendText(ClsElementImpl.java:232)
at com.intellij.psi.impl.compiled.ClsModifierListImpl.appendMirrorText(ClsModifierListImpl.java:88)
at com.intellij.psi.impl.compiled.ClsElementImpl.appendText(ClsElementImpl.java:224)
at com.intellij.psi.impl.compiled.ClsClassImpl.appendMirrorText(ClsClassImpl.java:333)
at com.intellij.psi.impl.compiled.ClsElementImpl.appendText(ClsElementImpl.java:224)
at com.intellij.psi.impl.compiled.ClsFileImpl.appendMirrorText(ClsFileImpl.java:275)
at com.intellij.psi.impl.compiled.ClsFileImpl.lambda$decompile$2(ClsFileImpl.java:545)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:864)
at com.intellij.psi.impl.compiled.ClsFileImpl.decompile(ClsFileImpl.java:545)
at jd.ide.intellij.JavaDecompilerService.decompile(JavaDecompilerService.java:58)
at jd.ide.intellij.CachingJavaDecompilerService$2.load(CachingJavaDecompilerService.java:81)
at jd.ide.intellij.CachingJavaDecompilerService$2.load(CachingJavaDecompilerService.java:77)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193)
at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3936)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4806)
at jd.ide.intellij.CachingJavaDecompilerService.accessToDecompiledText(CachingJavaDecompilerService.java:62)
at jd.ide.intellij.CachingJavaDecompilerService.decompile(CachingJavaDecompilerService.java:53)
at jd.ide.intellij.JavaLightClassDecompiler.getText(JavaLightClassDecompiler.java:22)
at com.intellij.psi.impl.compiled.ClassFileDecompiler.decompile(ClassFileDecompiler.java:26)
at com.intellij.openapi.fileEditor.impl.LoadTextUtil.loadText(LoadTextUtil.java:470)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.getDocument(FileDocumentManagerImpl.java:202)
at com.intellij.psi.impl.compiled.ClsFileImpl.getMirror(ClsFileImpl.java:337)
at com.intellij.psi.impl.compiled.ClsElementImpl.getMirror(ClsElementImpl.java:144)
at com.intellij.debugger.impl.DebuggerUtilsImpl.getPsiClassAndType(DebuggerUtilsImpl.java:145)
at com.intellij.debugger.ui.tree.render.CachedEvaluator.initEvaluatorAndChildrenExpression(CachedEvaluator.java:50)
at com.intellij.debugger.ui.tree.render.CachedEvaluator.lambda$getEvaluator$1(CachedEvaluator.java:89)
at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$commitAndRunReadAction$6(PsiDocumentManagerBase.java:524)
at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$commitAndRunReadAction$7(PsiDocumentManagerBase.java:549)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:898)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
at com.intellij.psi.impl.PsiDocumentManagerBase.commitAndRunReadAction(PsiDocumentManagerBase.java:547)
at com.intellij.psi.impl.PsiDocumentManagerBase.commitAndRunReadAction(PsiDocumentManagerBase.java:524)
at com.intellij.debugger.ui.tree.render.CachedEvaluator.getEvaluator(CachedEvaluator.java:89)
at com.intellij.debugger.ui.tree.render.ExpressionChildrenRenderer.isExpandable(ExpressionChildrenRenderer.java:156)
at com.intellij.debugger.ui.tree.render.CompoundNodeRenderer.isExpandable(CompoundNodeRenderer.java:74)
at com.intellij.debugger.ui.impl.watch.ValueDescriptorImpl.calcRepresentation(ValueDescriptorImpl.java:293)
at com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl.updateRepresentationNoNotify(NodeDescriptorImpl.java:69)
at com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl.updateRepresentation(NodeDescriptorImpl.java:61)
at com.intellij.debugger.engine.JavaValue$1.contextAction(JavaValue.java:178)
at com.intellij.debugger.engine.events.SuspendContextCommandImpl.action(SuspendContextCommandImpl.java:57)
at com.intellij.debugger.engine.events.DebuggerCommandImpl.run(DebuggerCommandImpl.java:43)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:151)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:29)
at com.intellij.debugger.impl.InvokeThread.lambda$run$0(InvokeThread.java:138)
at com.intellij.openapi.project.DumbService.runWithAlternativeResolveEnabled(DumbService.java:376)
at com.intellij.debugger.impl.InvokeThread.run(InvokeThread.java:125)
at com.intellij.debugger.impl.InvokeThread.access$100(InvokeThread.java:19)
at com.intellij.debugger.impl.InvokeThread$WorkerThreadRequest.lambda$run$0(InvokeThread.java:49)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:210)
at com.intellij.debugger.impl.InvokeThread$WorkerThreadRequest.run(InvokeThread.java:48)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.AssertionError: Unexpected token: '+'
at com.intellij.lang.java.parser.JavaParserUtil.parseFragment(JavaParserUtil.java:193)
at com.intellij.psi.impl.source.tree.JavaElementType$JavaDummyElementType.parseContents(JavaElementType.java:263)
at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:192)
at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:565)
at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:191)
at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:242)
at com.intellij.psi.impl.source.JavaDummyElement.getFirstChildNode(JavaDummyElement.java:69)
at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createAnnotationFromText(PsiJavaParserFacadeImpl.java:101)
2020-04-09 08:49:53,690 [1843361] ERROR - ubs.impl.PsiAnnotationStubImpl - IntelliJ IDEA 2020.1 Build #IU-201.6668.121
2020-04-09 08:49:53,690 [1843361] ERROR - ubs.impl.PsiAnnotationStubImpl - JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2020-04-09 08:49:53,690 [1843361] ERROR - ubs.impl.PsiAnnotationStubImpl - OS: Linux
2020-04-09 08:49:53,690 [1843361] ERROR - ubs.impl.PsiAnnotationStubImpl - Last Action: ChooseRunConfiguration
This happens when i try to debug my application and some fields have an error value like:
Does anyone have an idea how to fix this?
Edit:
Installed over snap. Maybe i should install it manually to prevent the snap-auto-update.
After disabling
Settings -> Build, Execution, Deployment -> Debugger -> Data Views -> Java -> Enable alternative view for Collections classes
i am able to debug the nested collections. I think this is still a workaround and should be fixed by JetBrains.
Edit:
The approach above works, but at this point it looks like a Java Decompiler plugin does not work correctly. Thus no intellij bug.
I'm a new Java WebEnt student, and I'm having issues deploying some basic Entity Classes and JSF Pages.
I loaded up some things without any edit to the files, and when trying to deploy. I get the "\nbproject\build-imp.xml:1045 The module has not been deployed" message. I checked the GlassFish server and here is the beginning log:
java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 10;
columnNumber: 18; Deployment descriptor file META-INF/persistence.xml in
archive [classes]. cvc-complex-type.2.4.d: Invalid content was found
starting with element 'properties'. No child element is expected at this point.
The rest of the log is pasted below
https://pastebin.com/7rXsyRit
EDIT
Pastebin to include the XML files in WEB-INF and persistence.xml
https://pastebin.com/6kRJyA54
Thanks for the help/advice
Yes the issue was <properties/> after I had removed that and tried to deploy, I had gotten that error which following the instructions in this link had resolved.
I am in the process of updating the JSF implementation of our project from JSF 1.1 to JSF 2.2. I mainly use Migrating from JSF 1.2 to JSF 2.0 as a guide.
When updating the root element of the faces-config.xml according to JSF 2.2 faces-config: Unknown Schema version: 2.2 to
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
my IDE - IntelliJ - marks the default XML namespace xmlns="http://xmlns.jcp.org/xml/ns/javaee" red and when hovering over it gives me the error message:
URI is not registered
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd also gets marked as erroneous, showing the following error message when hovering over it:
Cannot resolve symbol 'http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd'
I use MyFaces 2.2.12 as JSF implementation and IntelliJ IDEA Community 2017.1 as IDE. (I am aware that the CE of IntelliJ does not feature the same level of JSF support as the Ultimate Edition, but this is not really a JSF problem, but rather a XML problem, isn't it?)
Can anyone tell me what I need to change to make IntelliJ recognize the xmlns-URI?
Edit:
I tried to "Manually setup external resource" like described in JSF xmlns URI not registered in IntelliJ IDEA, but if I do this for web-facesconfig_2_2.xsd, every element in faces-config.xml gets marked with an error. When I hover over the marked elements I get the following error message:
When I use eclipse xsl development tools to run xsl transformation, it reports the following error. But using saxon there is no problem. SIt would be appreciated if some expert can provide possible solution.
12:44:14,714 INFO [main] Main - javax.xml.transform.TransformerFactory=null
12:44:14,725 INFO [main] Main - java.endorsed.dirs=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/endorsed
12:44:14,744 INFO [main] Main - launchFile: /gpfs/work01/work/scratch/users/feifan_liu/.metadata/.plugins/org.eclipse.wst.xsl.jaxp.launching/launch/launch.xml
12:44:14,945 ERROR [main] JAXPSAXProcessorInvoker - Error checking type of the expression 'funcall(tokenize, [variable-ref(rColNames/result-tree), literal-expr(\|)])'.
12:44:14,953 ERROR [main] JAXPSAXProcessorInvoker - Could not compile stylesheet
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:843)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:632)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformerHandler(TransformerFactoryImpl.java:918)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:136)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.addStylesheet(JAXPSAXProcessorInvoker.java:127)
at org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:161)
at org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)
12:44:14,954 FATAL [main] Main - Error with stylesheet: file:/gpfs/work01/work/scratch/users/feifan_liu/com.nuance.xslt.ahfs/files/acp2detagged.xsl
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.ConfigurationException: Error with stylesheet: file:/gpfs/work01/work/scratch/users/feifan_liu/com.nuance.xslt.ahfs/files/acp2detagged.xsl
at org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.addStyleSheet(PipelineDefinition.java:163)
at org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition.configure(PipelineDefinition.java:152)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:72)
Eclipse seems to use Xalan Java which is an XSLT 1.0 processor and it simply complains about code in your stylesheet using the tokenize function which is new in XSLT/XPath 2.0 and that way not supported by Xalan. If you want to use XSLT 2.0 with Java then try Saxon 9. I don't know details however as to set up Eclipse to use Saxon.
When I make an Intellij project, I keep getting the following out of memory error.
I already increased my heap size in idea.vmoptions:
-Xms128m
-Xmx2048m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=64m
-ea
But I still get this error:
Information:The system is out of resources.
Information:Consult the following stack trace for details.
Information:java.lang.OutOfMemoryError: Java heap space
Information: at com.sun.tools.javac.util.Position$LineMapImpl.build(Position.java:139)
Information: at com.sun.tools.javac.util.Position.makeLineMap(Position.java:63)
Information: at com.sun.tools.javac.parser.Scanner.getLineMap(Scanner.java:1105)
Information: at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:512)
Information: at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:550)
Information: at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:804)
Information: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:353)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:279)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:270)
Information: at com.sun.tools.javac.Main.compile(Main.java:69)
Information: at com.sun.tools.javac.Main.main(Main.java:54)
Information: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Information: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Information: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Information: at java.lang.reflect.Method.invoke(Method.java:597)
Information: at com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:71)
Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Compiler internal error. Process terminated with exit code 3
What am I missing?
Current version:
Settings (Preferences on Mac) | Build, Execution, Deployment | Compiler |
Build process heap size.
Older versions:
Settings (Preferences on Mac) | Compiler | Java Compiler | Maximum heap size.
Compiler runs in a separate JVM by default so IDEA heap settings that you set in idea.vmoptions have no effect on the compiler.
Since IntelliJ 2016, the location is File | Settings | Build, Execution, Deployment | Compiler | Build process heap size.
I had a similar problem with Ant build (started by hand from IDEA GUI). In my case there was the right solution to right click on the Ant task, choose properties and set a higher value to "Maximum heap space (Mb):" and "Maximum stack space (Mb):" input fields.
To resolve this issue follow the below given steps-
1). In inteli Go to File> Setting Option and Search for Vm Option In the field of Vm Option for Importer give value -Xmx512m.
Intelij Setting Options
2). Go to Control Pannel Select View by :Large icons then Go to Java one promp window will appear with name java control pannel then go to java
Java VM Options
select view option.
java view options
In Java Run time Environment Setting pass Run time Parameters as -Xmx1024m.
3). If above given options does not work then change the size of pom.xml
GWT in Intellij 12
FWIW, I was getting a similar error with my GWT application during 'Build | Rebuild Project'.
This was caused by Intellij doing a full GWT compile which I didn't like because it is also a very lengthy process.
I disabled GWT compile by turning off the module check boxes under 'Project Structure | Facets | GWT'.
Alternatively there is a 'Compiler maximum heap size' setting in that location as well.
I was facing "java.lang.OutOfMemoryError: Java heap space" error while building my project using maven install command.
I was able to get rid of it by changing maven runner settings.
Settings | Build, Execution, Deployment | Build Tools | Maven | Runner | VM options to -Xmx512m
In my case the error was caused by the insufficient memory allocated to the "test" lifecycle of maven. It was fixed by adding <argLine>-Xms3512m -Xmx3512m</argLine> to:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<argLine>-Xms3512m -Xmx3512m</argLine>
Thanks #crazycoder for pointing this out (and also that it is not related to IntelliJ; in this case).
If your tests are forked, they run in a new JVM that doesn't inherit Maven JVM options. Custom memory options must be provided via the test runner in pom.xml, refer to Maven documentation for details, it has very little to do with the IDE.
I like to share a revelation that I had. When you build a project, Intellij Idea runs a java process that resides in its core(ex: C:\Program Files\JetBrains\IntelliJ IDEA 2020.3\jbr\bin). The "build process heap size", as mentioned by many others, changes the heap size of this java process. However, the main java process is triggered later by the Idea's java process, hence have different VM arguments. I noticed that the max heap size of this process is 1/3 of the Idea's java process, while min heap is the half of max(1/6). To round up:
When you set 9g heap on "build process heap size" the actual heap size for the compiler is max 3g and min 1,5g. And no need for restart is neccessary.
PS: tested on version 2020.3
On android studio 4.2 or newer Arctic fox version you will option under appearance & behavior
Windows: file > settings > appearance & behavior > system settings > memory settings
Mac: file > preferences > appearance & behavior > system settings > memory settings
https://i.stack.imgur.com/PEqBK.png
There is a
idea64.exe
starter in
IntelliJ IDEA 13.1.5\bin
so you can address more space.