4 Replies Latest reply on Apr 29, 2009 5:00 PM by Ross Johnson

    Components in EJB project come and go from Seam Components v

    Ross Johnson Newbie

      Hello,

      I have created a new Seam project (EAR) using the new Seam Web Project wizard. I then added several entity classes which I had created previously in another project (copy/paste/refresh) to the new EJB project (the ejbModule directory). The entity beans are annotated with @Name.

      The problem is that the Seam Components view doesn't show the new components. Code completion doesn't work for them either. In both cases I can see other components (e.g. authenticator).

      The strange thing is that if I edit an entity bean class file and resave it, the component appears in the Seam Components view and code completion works. I can do this for each bean. However, if I do a Project > Clean to have all projects rebuilt, I lose the components again.

      Any thoughts?

      /Thanks, Ross.

        • 1. Re: Components in EJB project come and go from Seam Componen
          Alexey Kazakov Master

          Which version of JBossTools do you use?
          Are there any errors in Eclipse log?

          • 2. Re: Components in EJB project come and go from Seam Componen
            Ross Johnson Newbie

            Okay, I should have looked at the log... (see below)

            JBoss Tools: 3.0.0.GA-R200903141626-H5
            Seam: 2.1.1.GA
            Eclipse 3.4.2
            JDK 6 update 13

            The following exception appeared in the eclipse log after performing a clean of all projects.

            !ENTRY org.eclipse.core.resources 4 566 2009-04-30 01:58:52.552
            !MESSAGE An error occurred while traversing resources.
            !STACK 0
            java.lang.NullPointerException
             at org.jboss.tools.seam.internal.core.scanner.java.ASTVisitorImpl.visit(ASTVisitorImpl.java:90)
             at org.eclipse.jdt.core.dom.SingleMemberAnnotation.accept0(SingleMemberAnnotation.java:161)
             at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
             at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
             at org.eclipse.jdt.core.dom.AnnotationTypeDeclaration.accept0(AnnotationTypeDeclaration.java:239)
             at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
             at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
             at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:214)
             at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
             at org.jboss.tools.seam.internal.core.scanner.java.JavaScanner$ASTRequestorImpl.acceptAST(JavaScanner.java:167)
             at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:721)
             at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:474)
             at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:736)
             at org.jboss.tools.seam.internal.core.scanner.java.JavaScanner.parse(JavaScanner.java:105)
             at org.jboss.tools.seam.internal.core.SeamResourceVisitor.visit(SeamResourceVisitor.java:94)
             at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:106)
             at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:58)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:81)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:126)
             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:68)
             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:104)
             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:88)
             at org.jboss.tools.seam.core.SeamCoreBuilder.fullBuild(SeamCoreBuilder.java:129)
             at org.jboss.tools.seam.core.SeamCoreBuilder.build(SeamCoreBuilder.java:100)
             at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
             at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
             at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
             at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
             at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
             at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
             at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
             at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
             at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
             at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
             at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
             at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
            
            !ENTRY org.jboss.tools.seam.core 4 0 2009-04-30 01:58:52.552
            !MESSAGE An error occurred while traversing resources.
            !STACK 1
            org.eclipse.core.internal.resources.ResourceException(/temptrack-ejb)[566]: java.lang.NullPointerException
             at org.jboss.tools.seam.internal.core.scanner.java.ASTVisitorImpl.visit(ASTVisitorImpl.java:90)
             at org.eclipse.jdt.core.dom.SingleMemberAnnotation.accept0(SingleMemberAnnotation.java:161)
             at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
             at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
             at org.eclipse.jdt.core.dom.AnnotationTypeDeclaration.accept0(AnnotationTypeDeclaration.java:239)
             at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
             at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
             at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:214)
             at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
             at org.jboss.tools.seam.internal.core.scanner.java.JavaScanner$ASTRequestorImpl.acceptAST(JavaScanner.java:167)
             at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:721)
             at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:474)
             at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:736)
             at org.jboss.tools.seam.internal.core.scanner.java.JavaScanner.parse(JavaScanner.java:105)
             at org.jboss.tools.seam.internal.core.SeamResourceVisitor.visit(SeamResourceVisitor.java:94)
             at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:106)
             at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:58)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:81)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:126)
             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:68)
             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:104)
             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:88)
             at org.jboss.tools.seam.core.SeamCoreBuilder.fullBuild(SeamCoreBuilder.java:129)
             at org.jboss.tools.seam.core.SeamCoreBuilder.build(SeamCoreBuilder.java:100)
             at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
             at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
             at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
             at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
             at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
             at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
             at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
             at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
             at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
             at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
             at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
             at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
            !SUBENTRY 1 org.eclipse.core.resources 4 566 2009-04-30 01:58:52.552
            !MESSAGE An error occurred while traversing resources.
            !STACK 0
            java.lang.NullPointerException
             at org.jboss.tools.seam.internal.core.scanner.java.ASTVisitorImpl.visit(ASTVisitorImpl.java:90)
             at org.eclipse.jdt.core.dom.SingleMemberAnnotation.accept0(SingleMemberAnnotation.java:161)
             at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
             at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
             at org.eclipse.jdt.core.dom.AnnotationTypeDeclaration.accept0(AnnotationTypeDeclaration.java:239)
             at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
             at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
             at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:214)
             at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
             at org.jboss.tools.seam.internal.core.scanner.java.JavaScanner$ASTRequestorImpl.acceptAST(JavaScanner.java:167)
             at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:721)
             at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:474)
             at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:736)
             at org.jboss.tools.seam.internal.core.scanner.java.JavaScanner.parse(JavaScanner.java:105)
             at org.jboss.tools.seam.internal.core.SeamResourceVisitor.visit(SeamResourceVisitor.java:94)
             at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:106)
             at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:58)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:81)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
             at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:126)
             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:68)
             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:104)
             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:88)
             at org.jboss.tools.seam.core.SeamCoreBuilder.fullBuild(SeamCoreBuilder.java:129)
             at org.jboss.tools.seam.core.SeamCoreBuilder.build(SeamCoreBuilder.java:100)
             at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
             at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
             at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
             at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
             at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
             at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
             at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
             at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
             at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
             at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
             at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
             at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
            


            • 3. Re: Components in EJB project come and go from Seam Componen
              Alexey Kazakov Master

              Do you have any annotation types in your sources?
              Seems to be the issue which we have fixed in 3.0.1
              See http://www.jboss.org/index.html?module=bb&op=viewtopic&t=153483
              and https://jira.jboss.org/jira/browse/JBIDE-4144
              We are going to release 3.0.1 soon but you could try 3.0.1 nightly build or use the workaround described in http://www.jboss.org/index.html?module=bb&op=viewtopic&t=153483.

              • 4. Re: Components in EJB project come and go from Seam Componen
                Ross Johnson Newbie

                That's it! I have 3 @RoleCheck annotations defined for seam security. However, I have not yet begun using them. I commented them out and the problem (and exception) has gone away.

                Looking at the JIRA issue it appears to be the same problem. I haven't tried the nightly build since I don't really need the annotations at the moment. I'm happy to wait for the fix to be released. If you want me to verify this against the nightly build, please let me know.

                Thanks akazakov for your quick and accurate analysis. Much appreciated.

                /Ross.