Diana #9821, JPA QL and Seam.

Hi.

I have a rather large Seam based project, where we sometimes embed jpa ql in our seam components (EJB and POJO), however, when the code inspector runs in idea i a lot of internal errors looking like this:

DummyHolder; com.intellij.psi.DummyHolderViewProvider@1b8f59: DummyHolder; com.intellij.psi.DummyHolderViewProvider@1b8f59
java.lang.AssertionError: DummyHolder; com.intellij.psi.DummyHolderViewProvider@1b8f59
    at com.intellij.psi.impl.source.tree.injected.MultiHostRegistrarImpl.startInjecting(MultiHostRegistrarImpl.java:74)
    at org.intellij.plugins.intelliLang.inject.CustomLanguageInjector.registerInjection(CustomLanguageInjector.java:343)
    at org.intellij.plugins.intelliLang.inject.ConcatenationInjector$1.process(ConcatenationInjector.java:52)
    at org.intellij.plugins.intelliLang.inject.ConcatenationInjector$1.process(ConcatenationInjector.java:50)
    at org.intellij.plugins.intelliLang.inject.ConcatenationInjector.processInjectionWithContext(ConcatenationInjector.java:191)
    at org.intellij.plugins.intelliLang.inject.ConcatenationInjector.processLiteralExpressionInjections(ConcatenationInjector.java:125)
    at org.intellij.plugins.intelliLang.inject.ConcatenationInjector.getLanguagesToInject(ConcatenationInjector.java:50)
    at com.intellij.psi.impl.source.tree.injected.JavaConcatenationInjectorManager$ConcatenationPsiCachedValueProvider.compute(JavaConcatenationInjectorManager.java:30)
    at com.intellij.psi.impl.source.tree.injected.JavaConcatenationInjectorManager$Concatenation2InjectorAdapter.getLanguagesToInject(JavaConcatenationInjectorManager.java:10)
    at com.intellij.psi.impl.source.tree.injected.InjectedPsiCachedValueProvider$MyInjProcessor.process(InjectedPsiCachedValueProvider.java:3)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:124)
    at com.intellij.psi.impl.source.tree.injected.InjectedPsiCachedValueProvider.doCompute(InjectedPsiCachedValueProvider.java:17)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.a(InjectedLanguageUtil.java:54)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.enumerate(InjectedLanguageUtil.java:33)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.enumerate(InjectedLanguageUtil.java:143)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.forceInjectionOnElement(InjectedLanguageUtil.java:51)
    at com.intellij.jpa.QueryReferencesUtil.addParamMapsByQueryElement(QueryReferencesUtil.java:257)
    at com.intellij.jpa.QueryReferencesUtil.addParamMapsByQueryElement(QueryReferencesUtil.java:284)
    at com.intellij.jpa.QueryReferencesUtil.getParamMapsByQueryHoldingElement(QueryReferencesUtil.java:248)
    at com.intellij.jpa.QueryReferencesUtil.access$200(QueryReferencesUtil.java:57)
    at com.intellij.jpa.QueryReferencesUtil$QueryParameterReference.initMapList(QueryReferencesUtil.java:473)
    at com.intellij.jpa.QueryReferencesUtil$QueryParameterReference.resolve(QueryReferencesUtil.java:482)
    at com.intellij.jpa.highlighting.JpaQueryApiInspection.checkFile(JpaQueryApiInspection.java:62)
    at com.intellij.codeInspection.BaseJavaLocalInspectionTool$1.visitFile(BaseJavaLocalInspectionTool.java:105)
    at com.intellij.psi.JavaElementVisitor.visitJavaFile(JavaElementVisitor.java:319)
    at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:58)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$1$1.run(LocalInspectionsPass.java:7)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$1.process(LocalInspectionsPass.java:2)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$1.process(LocalInspectionsPass.java:5)
    at com.intellij.concurrency.JobUtil$1.run(JobUtil.java:44)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at com.intellij.concurrency.JobImpl.scheduleAndWaitForResults(JobImpl.java:32)
    at com.intellij.concurrency.JobUtil.invokeConcurrentlyForAll(JobUtil.java:51)
    at com.intellij.concurrency.JobUtil.invokeConcurrentlyForAll(JobUtil.java:27)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:194)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:167)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:118)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:15)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:13)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:2)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:343)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:2)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:21)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

Sometimes, this makes makes the code analyzer (blinky eye in the upper right) hang and nothing more happens.

Does anyone know if I've done something wrong or it is an issue in Idea? I've been getting these exceptions for along time, however it seems reporting these exceptions does not make them go away on the next build :-( I guess there isn't a lot of people reporting them.

Hope someone has a clue

Regards
./Daniel

12 comments
Comment actions Permalink

This has happened to me in every 8x build and frankly I'm sick of it and Jetbrains doesn't seem to want to fix it.

http://www.jetbrains.net/jira/browse/IDEADEV-31201 was marked "obsolete" just recently and yet the problem still exists in the latest EAPs.  Extremely frustrating.

0
Comment actions Permalink

Hi.

I'm glad I'm not alone

Here's hoping talking about it in public makes Jetbrains aware of the issue!

Regards,
./Daniel

0
Comment actions Permalink

Still not fixed in 9825

0
Comment actions Permalink

I can confirm that it still fails in build 9825.

0
Comment actions Permalink

Not fixed in 8.1.1 either even though the bug was re-opened and subsequently marked resolved.


Well - at closer inspection the error is the same but this stack trace is different than what is in IDEADEV-31201.  It's still incredibly annoying and still occurring.

Message was edited by: Russ

0
Comment actions Permalink

Can we get sample project & steps to reproduce the problem for sure?

Russ wrote:

Not fixed in 8.1.1 either even though the bug was re-opened and
subsequently marked resolved.

--- Original message URL:
http://www.jetbrains.net/devnet/message/5237465#5237465

0
Comment actions Permalink

Hi.

I can confirm it still happens in #9843,

I've been spending most of the day trying to create a sample project reproducing this error. I've recreated most of the structure from our development project, but unfortunately I've had no success. To me, it seems related to the size of the project and the time it takes to analyze the file when opening it in the editor for the first time. I'll investigate further when time permits.

0
Comment actions Permalink

I spoke to soon! 15 more minutes at the project (and some copy&paste) and I have now created a project which triggers this error in #9843.

The project does not compile nor does it do anything useful.

How do I share it with you guys at jetbrains? A zip of the directory takes up about 6mb

0
Comment actions Permalink

Please, upload it to our ftp server:
anonymous@ftp.intellij.net/.uploads


Daniel Nielsen wrote:

I spoke to soon! 15 more minutes at the project (and some copy&paste) and I have now created a project which triggers this error in #9843.

The project does not compile nor does it do anything useful.

How do I share it with you guys at jetbrains? A zip of the directory takes up about 6mb

---
Original message URL: http://www.jetbrains.net/devnet/message/5237910#5237910

0
Comment actions Permalink

The project is now uploaded as idea-seam-jpa.zip

The file BootStrapper.java triggers the error.

If you look in ASeamComponent.java another issue is illustrated with components defined in components.xml and Idea's scope of these. I dont know whether it is a known issue.

0
Comment actions Permalink

Thanks a lot, the fix will be available in 8.1.2 starting from the next EAP.

Daniel Nielsen wrote:

The project is now uploaded as idea-seam-jpa.zip

The file BootStrapper.java triggers the error.

If you look in ASeamComponent.java another issue is illustrated with
components defined in components.xml and Idea's scope of these. I
dont know whether it is a known issue.

--- Original message URL:
http://www.jetbrains.net/devnet/message/5238011#5238011

0
Comment actions Permalink

I can confirm that this is fixed in 9848 for me.  Thanks!

Guest wrote:

Thanks a lot, the fix will be available in 8.1.2 starting from the next EAP.


Daniel Nielsen wrote:

The project is now uploaded as idea-seam-jpa.zip


The file BootStrapper.java triggers the error.


If you look in ASeamComponent.java another issue is illustrated with
components defined in components.xml and Idea's scope of these. I
dont know whether it is a known issue.


--- Original message URL:
http://www.jetbrains.net/devnet/message/5238011#5238011

0

Please sign in to leave a comment.