Strange behaviour after update to 2017.3 when editing primefaces xhtml files

Answered

Hi!

I updated IntelliJ to 2017.3 and worked on an existing Project. After starting Intellij everything works as expected. But after a short running time the validation of a part of the xhtml fails with "Cannot resolve symbol 'ui:define'". Also no suggestions are made when typing a Primefaces Tag <p:. It is also interesting that selection of a word with double-klick ist'n do anything. Selection of a whole line with 3 clicks is still working.

After this happens a lot exceptions are logged in idea.log:

2017-12-05 14:55:57,669 [ 498182]  ERROR - aemon.impl.PassExecutorService - IntelliJ IDEA 2017.3  Build #IU-173.3727.127
2017-12-05 14:55:57,669 [ 498182]  ERROR - aemon.impl.PassExecutorService - JDK: 1.8.0_151
2017-12-05 14:55:57,669 [ 498182]  ERROR - aemon.impl.PassExecutorService - VM: Java HotSpot(TM) 64-Bit Server VM
2017-12-05 14:55:57,669 [ 498182]  ERROR - aemon.impl.PassExecutorService - Vendor: Oracle Corporation
2017-12-05 14:55:57,669 [ 498182]  ERROR - aemon.impl.PassExecutorService - OS: Linux
2017-12-05 14:55:57,669 [ 498182]  ERROR - aemon.impl.PassExecutorService - Last Action: BuildArtifact
2017-12-05 14:55:57,669 [ 498182]  ERROR - aemon.impl.PassExecutorService - Element: class com.intellij.psi.impl.source.xml.XmlTagImpl because: different providers: SingleRootFileViewPro
vider{myVirtualFile=jar:///home/ms/development/Project/lib/primefaces-6.1.jar!/META-INF/primefaces-p.taglib.xml, content=VirtualFileContent{size=754387}}(4e2e76f); SingleRootFileViewPro
vider{myVirtualFile=jar:///home/ms/development/Project/lib/primefaces-6.1.jar!/META-INF/primefaces-p.taglib.xml, content=VirtualFileContent{size=754387}}(dd732b)
invalidated at: see attachment
com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.xml.XmlTagImpl because: different providers: SingleRootFileViewProvider{myVirtualFile=jar:/
//home/ms/development/Project/lib/primefaces-6.1.jar!/META-INF/primefaces-p.taglib.xml, content=VirtualFileContent{size=754387}}(4e2e76f); SingleRootFileViewProvider{myVirtualFile=jar:/
//home/ms/development/Project/lib/primefaces-6.1.jar!/META-INF/primefaces-p.taglib.xml, content=VirtualFileContent{size=754387}}(dd732b)
invalidated at: see attachment
        at com.intellij.psi.util.PsiUtilCore.ensureValid(PsiUtilCore.java:502)
        at com.intellij.psi.impl.source.xml.XmlTagImpl$5.execute(XmlTagImpl.java:699)
        at com.intellij.xml.util.XmlPsiUtil$XmlElementProcessor.b(XmlPsiUtil.java:136)
        at com.intellij.xml.util.XmlPsiUtil$XmlElementProcessor.a(XmlPsiUtil.java:114)
        at com.intellij.xml.util.XmlPsiUtil$XmlElementProcessor.access$000(XmlPsiUtil.java:75)
        at com.intellij.xml.util.XmlPsiUtil.processXmlElements(XmlPsiUtil.java:61)
        at com.intellij.xml.util.XmlPsiUtil.processXmlElements(XmlPsiUtil.java:52)
        at com.intellij.xml.util.XmlPsiUtil.processXmlElements(XmlPsiUtil.java:44)
        at com.intellij.xml.util.XmlPsiUtil.processXmlElements(XmlPsiUtil.java:38)
        at com.intellij.psi.impl.source.xml.XmlElementImpl.processElements(XmlElementImpl.java:48)
        at com.intellij.psi.impl.source.xml.XmlTagImpl.fillSubTags(XmlTagImpl.java:695)
        at com.intellij.psi.impl.source.xml.XmlTagImpl$1.compute(XmlTagImpl.java:91)
        at com.intellij.psi.impl.source.xml.XmlTagImpl$1.compute(XmlTagImpl.java:86)
        at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:45)
        at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
        at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
        at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:35)
        at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:96)
        at com.intellij.psi.impl.source.xml.XmlTagImpl.getSubTags(XmlTagImpl.java:691)
        at com.intellij.psi.impl.source.xml.XmlTagImpl.findSubTags(XmlTagImpl.java:716)
        at com.intellij.jsp.impl.TldDescriptorImpl.doBuildDeclarationsMap(TldDescriptorImpl.java:203)
        at com.intellij.jsp.impl.FaceletsTldDescriptor.doBuildDeclarationsMap(FaceletsTldDescriptor.java:43)
        at com.intellij.jsp.impl.TldDescriptorImpl.lambda$doCreateCachedMethods$2(TldDescriptorImpl.java:195)
        at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
        at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
        at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
        at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
        at com.intellij.jsp.impl.TldDescriptorImpl.buildDeclarationMap(TldDescriptorImpl.java:187)
        at com.intellij.jsp.impl.TldDescriptorImpl.getElementDescriptor(TldDescriptorImpl.java:106)
        at com.intellij.jsp.impl.TldDescriptorImpl.getElementDescriptor(TldDescriptorImpl.java:102)
        at com.intellij.psi.impl.source.xml.XmlTagImpl.computeElementDescriptor(XmlTagImpl.java:528)
        at com.intellij.psi.impl.source.xml.XmlTagImpl.lambda$getDescriptor$5(XmlTagImpl.java:485)
        at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:140)
        at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
        at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)

Editing the same file before the update was no problem. The header of the xhtml file didn't change:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xml:lang="en" lang="en">

<body>

<ui:composition template="/template/template.xhtml">
<ui:define name="content">


Invalidate Caches / Restart didn't change anything. I am using Linux as OS, a college of mine is using Windows and has the same behaviour with his installation after the update.

Someone the same issue?

best regards,
Michael Swoboda
1
13 comments

Please report at https://youtrack.jetbrains.com/issues/IDEA with the complete idea.log and a sample file attached. Thank you.

0

was an issue logged on youtrack for this? I am seeing something similar.

0

Where did this fix go to? I am seeing similar stacktrace in our custom plugin for xml files. I cant find the commit in intellij community. Could you please point to the fix in git? thanks

0

The fix is in JSP support subsystem which is not present in the Community Edition and is not open source.

0

Will you be able to tell the root cause of the problem and where should i look into..

 

 

Here is the stacktrace..

Error:(0, 0) An exception occurred during verification of ExpressionFragCell
com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.xml.XmlTagImpl because: different providers: SingleRootFileViewProvider{myVirtualFile=file://C:/tools/stash/cc/app-cc/cc-pl-bizrules-content/config/web/pcf/bizrules/ExpressionFragCell.formula.pcf, content=VirtualFileContent{size=1017}}(7aaaca58); SingleRootFileViewProvider{myVirtualFile=file://C:/tools/stash/cc/app-cc/cc-pl-bizrules-content/config/web/pcf/bizrules/ExpressionFragCell.formula.pcf, content=VirtualFileContent{size=1017}}(31682a62)
invalidated at: see attachment
at com.intellij.psi.util.PsiUtilCore.ensureValid(PsiUtilCore.java:502)
at com.intellij.psi.impl.source.xml.XmlTagImpl$5.execute(XmlTagImpl.java:699)
at com.intellij.xml.util.XmlPsiUtil$XmlElementProcessor.processElement(XmlPsiUtil.java:136)
at com.intellij.xml.util.XmlPsiUtil$XmlElementProcessor.processXmlElements(XmlPsiUtil.java:114)
at com.intellij.xml.util.XmlPsiUtil$XmlElementProcessor.access$000(XmlPsiUtil.java:75)
at com.intellij.xml.util.XmlPsiUtil.processXmlElements(XmlPsiUtil.java:61)
at com.intellij.xml.util.XmlPsiUtil.processXmlElements(XmlPsiUtil.java:52)
at com.intellij.xml.util.XmlPsiUtil.processXmlElements(XmlPsiUtil.java:44)
at com.intellij.xml.util.XmlPsiUtil.processXmlElements(XmlPsiUtil.java:38)
at com.intellij.psi.impl.source.xml.XmlElementImpl.processElements(XmlElementImpl.java:48)
at com.intellij.psi.impl.source.xml.XmlTagImpl.fillSubTags(XmlTagImpl.java:695)
at com.intellij.psi.impl.source.xml.XmlTagImpl$1.compute(XmlTagImpl.java:91)
at com.intellij.psi.impl.source.xml.XmlTagImpl$1.compute(XmlTagImpl.java:86)
at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:45)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:35)
at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:96)
at com.intellij.psi.impl.source.xml.XmlTagImpl.getSubTags(XmlTagImpl.java:691)
at com.guidewire.studio.pcf.PsiXmlElementWrapper.wrapChildren(PsiXmlElementWrapper.java:139)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:941)
at com.guidewire.studio.pcf.PsiXmlElementWrapper.getChildren(PsiXmlElementWrapper.java:131)
at com.guidewire.studio.pcf.PsiXmlElementWrapper.getNumChildren(PsiXmlElementWrapper.java:157)
at com.guidewire.pcfgen.verifier.elements.PCFNodeVerifier.verifyPCFFileHasSingleTopLevelElement(PCFNodeVerifier.java:119)
at com.guidewire.pcfgen.verifier.elements.PCFNodeVerifier.verifySelf(PCFNodeVerifier.java:43)
at com.guidewire.pcfgen.verifier.elements.WidgetVerifier.verifySelf(WidgetVerifier.java:28)
at com.guidewire.pcfgen.verifier.elements.SectionVerifier.verifySelf(SectionVerifier.java:35)
at com.guidewire.pcfgen.verifier.ElementVerifier.verify(ElementVerifier.java:32)
at com.guidewire.pcfgen.verifier.PCFVerifier.verify(PCFVerifier.java:24)
at com.guidewire.pcfgen.api.PCFCombinedCodegen.verifyNode(PCFCombinedCodegen.java:220)
at com.guidewire.pcfgen.api.PCFCombinedCodegen.generate(PCFCombinedCodegen.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.guidewire.studio.codegen.CodegenRunner.run(CodegenRunner.java:283)
at com.guidewire.studio.codegen.pcf.PCFIJCodeGenerator.generate(PCFIJCodeGenerator.java:120)
at com.guidewire.studio.codegen.CodegenProjectComponent.generateAndProcessExceptions(CodegenProjectComponent.java:332)
at com.guidewire.studio.codegen.CodegenProjectComponent.runFullGeneration(CodegenProjectComponent.java:264)
at com.guidewire.studio.codegen.CodegenProjectComponent.access$200(CodegenProjectComponent.java:50)
at com.guidewire.studio.codegen.CodegenProjectComponent$3.doRun(CodegenProjectComponent.java:209)
at com.guidewire.studio.codegen.CodegenTask.run(CodegenTask.java:35)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:165)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

0

What IDE version/build do you use?

0

The problem started coming when upgraded from 2017.2 to 2017.3.1 Intellij Idea

0

I am upgrading to 2017.3.3 now. I doubt it would solve the problem as the fix went in only for JSP.

I ll let you know how it goes though

0

Able to reproduce in 2017.3.3 as well 

  • Build: 173.4301.25
0

Please file a new bug at https://youtrack.jetbrains.com/issues/IDEA. Attach the full logs. Share your plug-in code if possible.

0

Please sign in to leave a comment.