Inspection on Directory with JSP's results in error

Hi,

I was running the analyse->inspection tool on a directory with lots of jsp pages. After a while the inspection tool got stuck and an error was shown in a popup. Had to kill the IDE to stop the inspection. Not sure if it's the bad quality of our jsp's though ;-)

I'm running on Ubuntu 11.10 (64 bit) with java 7 (open jdk as runner, JAVA_HOME to oracle java).

2011-11-30 16:19:46,986 [1898023]  ERROR - .impl.SharedPsiElementImplUtil - Cannot find element among its parent' children. element: 'Jspx import java.util.ArrayList'; parent: 'JspxImportList'; children: [Jspx import com.ravago.ohm.pl.backingBeans.CRMDiaryListSearch, Jspx import com.resinex.be.factories.PersonFactory, Jspx import com.ibm.be.dbaccess.JDBCServiceException, Jspx import com.resinex.be.beans.PersonBean, Jspx import com.ibm.be.actionmodel.ActionProcessWarning, Jspx import com.ibm.be.codes.CodeBean, Jspx import com.ibm.be.codes.Codes, Jspx import com.ibm.be.communication.CommunicationConstants, Jspx import com.ibm.be.debug.Trace, Jspx import com.ibm.be.nls.NLSUser, Jspx import com.ibm.be.security.SecurityChecker, Jspx import com.ibm.be.tools.Clipboard, Jspx import com.resinex.be.constants.ClipboardConstants, Jspx import com.resinex.be.constants.CodesConstants, Jspx import com.resinex.be.factories.CodesFactory, Jspx import com.resinex.be.factories.CountriesFactory, Jspx import com.resinex.be.factories.PaymentConditionFactory, Jspx import com.resinex.be.utilities.ResinexStringManipulator, Jspx import java.io.StringWriter, Jspx import java.util.List, Jspx import com.ibm.be.actionmodel.ActionControllerConstants, Jspx import com.ibm.be.exception.ErrorMessage, Jspx import com.ibm.be.exception.ErrorMessagesSet, Jspx import com.resinex.be.beans.MenuItem, Jspx import com.resinex.be.constants.GeneralConstants, Jspx import com.resinex.be.customtags.DetailWriteTag, Jspx import com.resinex.be.utilities.HtmlAssistent, Jspx import java.io.PrintWriter, Jspx import java.util.ArrayList, Jspx import java.util.Iterator];  file:Jspx DummyHolder
java.lang.Throwable
 at com.intellij.openapi.diagnostic.Logger.error(Logger.java:54)
 at com.intellij.psi.impl.SharedPsiElementImplUtil.a(SharedPsiElementImplUtil.java:125)
 at com.intellij.psi.impl.SharedPsiElementImplUtil.getNextSibling(SharedPsiElementImplUtil.java:98)
 at com.intellij.psi.impl.PsiElementBase.getNextSibling(PsiElementBase.java:58)
 at com.intellij.psi.impl.PsiElementBase.acceptChildren(PsiElementBase.java:71)
 at com.intellij.psi.JavaRecursiveElementVisitor.visitElement(JavaRecursiveElementVisitor.java:55)
 at com.intellij.psi.JavaElementVisitor.visitImportList(JavaElementVisitor.java:140)
 at com.intellij.psi.impl.source.jsp.jspJava.JspxImportListImpl.accept(JspxImportListImpl.java:247)
 at com.intellij.psi.impl.source.tree.SharedImplUtil.acceptChildren(SharedImplUtil.java:175)
 at com.intellij.psi.impl.source.PsiFileImpl.acceptChildren(PsiFileImpl.java:757)
 at com.intellij.psi.JavaRecursiveElementVisitor.visitElement(JavaRecursiveElementVisitor.java:55)
 at com.intellij.psi.PsiElementVisitor.visitFile(PsiElementVisitor.java:32)
 at com.intellij.psi.JavaElementVisitor.visitJavaFile(JavaElementVisitor.java:324)
 at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:393)
 at com.intellij.codeInspection.jsp.ReferencesToClassesFromDefaultPackageInJSPFileInspection.checkFile(ReferencesToClassesFromDefaultPackageInJSPFileInspection.java:63)
 at com.intellij.codeInspection.BaseJavaLocalInspectionTool$1.visitFile(BaseJavaLocalInspectionTool.java:105)
 at com.intellij.psi.JavaElementVisitor.visitJavaFile(JavaElementVisitor.java:324)
 at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:393)
 at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:390)
 at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$300(LocalInspectionsPass.java:76)
 at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:364)
 at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:354)
 at com.intellij.concurrency.JobUtil$2$1.run(JobUtil.java:117)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:206)
 at com.intellij.concurrency.JobUtil$2.process(JobUtil.java:115)
 at com.intellij.concurrency.JobUtil$1.run(JobUtil.java:57)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
 at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
 at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:105)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
 at java.lang.Thread.run(Thread.java:722)
2011-11-30 16:19:46,992 [1898029]  ERROR - .impl.SharedPsiElementImplUtil - IntelliJ IDEA (Nika) IU-111.24  Build #IU-111.24
2011-11-30 16:19:46,995 [1898032]  ERROR - .impl.SharedPsiElementImplUtil - JDK: 1.7.0
2011-11-30 16:19:46,995 [1898032]  ERROR - .impl.SharedPsiElementImplUtil - VM: Java HotSpot(TM) 64-Bit Server VM
2011-11-30 16:19:46,995 [1898032]  ERROR - .impl.SharedPsiElementImplUtil - Vendor: Oracle Corporation
2011-11-30 16:19:46,995 [1898032]  ERROR - .impl.SharedPsiElementImplUtil - OS: Linux
2011-11-30 16:19:46,996 [1898033]  ERROR - .impl.SharedPsiElementImplUtil - Last Action: InspectCode



Kind Regards.
3 comments

Hi Jan,

Which inspection tool did you run? Can you attach (or email) a sample JSP on which the error can be reproduced?

0

I tried it again with a newer version (RC2) and it didn't result in the previous error anymore. The analysis I ran was just the default code inspection on a directory. I did switch the default Java on my linux from OpenJDK to the Oracle one... maybe this was the cause?

0

I don't think JDK change is the cause.
I've seen this exception before but never succeeded in reproducing it.

0

Please sign in to leave a comment.