1 2 3 Previous Next 34 Replies Latest reply on Mar 12, 2009 1:06 PM by maxandersen Go to original post
      • 15. Re: Seam components view problem with JBDS 1.1.0.GA
        akazakov

        Can you show your /.project file?

        • 16. Re: Seam components view problem with JBDS 1.1.0.GA
          asookazian

           

          "akazakov" wrote:
          Can you show your <Project>/.project file?


          <?xml version="1.0" encoding="UTF-8"?>
          <projectDescription>
           <name>BETS</name>
           <comment></comment>
           <projects>
           </projects>
           <buildSpec>
           <buildCommand>
           <name>org.eclipse.jdt.core.javabuilder</name>
           <arguments>
           </arguments>
           </buildCommand>
           <buildCommand>
           <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
           <triggers>full,</triggers>
           <arguments>
           <dictionary>
           <key>LaunchConfigHandle</key>
           <value>&lt;project&gt;/explode.launch</value>
           </dictionary>
           </arguments>
           </buildCommand>
           </buildSpec>
           <natures>
           <nature>org.eclipse.jdt.core.javanature</nature>
           <nature>org.hibernate.eclipse.console.hibernateNature</nature>
           <nature>org.jboss.tools.seam.core.seamnature</nature>
           </natures>
          </projectDescription>


          • 17. Re: Seam components view problem with JBDS 1.1.0.GA
            akazakov

            It's a bug of seam-gen 2.0.
            It's generate Eclipse project with Seam nature but without Seam builder. So the project is incorrect.

            Please add

            <buildCommand>
             <name>org.jboss.tools.seam.core.seambuilder</name>
             <arguments>
             </arguments>
            </buildCommand>
            

            to .project
            or just disable Seam support and enable it again (it removes the nature and re-add it with our builder)

            • 18. Re: Seam components view problem with JBDS 1.1.0.GA
              asookazian

               

              "max.andersen@jboss.com" wrote:
              im sorry but I have hard time following what you are trying to do.

              If I install any GA version of JBDS and do File > New > Seam Web Project and uses the bundled AS and Seam (either 1.2 or 2.0) then should work out of the box.

              What steps are you doing ?


              Ok so I reproduced your steps above and now proved what I'm talking about earlier: 4 folders for an Seam web (EAR) project.

              I have:

              maxTest
              maxTest-ear
              maxTest-ejb
              maxTest-test

              When I switch to Hibernate perspective, I am now able to see (for this maxTest project), the following:

              Configuration
              Session Factory
              Database

              under maxTest-ejb. I have no entities in this project yet so the HQL editor query did not work:

              exec: select e from Equipment e (this entity class does not exist yet in this project)

              error: org.hibernate.hql.ast.QuerySyntaxException: Equipment is not mapped [select e from Equipment e]

              This error *is expected*.

              So again, must we use the four folder WTP style or not to use the components view and hql editor in JBoss tools?

              • 19. Re: Seam components view problem with JBDS 1.1.0.GA
                asookazian

                 

                "akazakov" wrote:
                It's a bug of seam-gen 2.0.
                It's generate Eclipse project with Seam nature but without Seam builder. So the project is incorrect.

                Please add
                <buildCommand>
                 <name>org.jboss.tools.seam.core.seambuilder</name>
                 <arguments>
                 </arguments>
                </buildCommand>
                

                to .project
                or just disable Seam support and enable it again (it removes the nature and re-add it with our builder)


                thanks for the tip but I tried that and no effect (still has the same problem). I view the classpath tab in the hibernate config for the maxTest-ejb and there is only the default classpath for maxTest-ejb. So apparently it's not necessary to modify this classpath setting like I was doing.

                I don't like the fact that there are 4 .classpath files (one for each WTP style folder in my maxTest project).

                I'd really prefer to stay away from this more complicated 4 folder approach if possible unless there are significant advantages *OR* it's not possible to use seam components view or hibernate config/HQL editor with my one folder approach...

                So what's the verdict on this?

                • 20. Re: Seam components view problem with JBDS 1.1.0.GA
                  asookazian

                  Also, it seems strange to me that when you use seam-gen from cmd line, you end up with one high level project folder (in my case 'BETS'). But when you create a new Seam project using JBoss Tools (or Seam tools??), you end up with 4 high level folders *for the exact same project* (i.e. it's an EAR, etc.)

                  Why does this happen? Can you run seam-gen from the IDE? If so, does it create a one folder or 4 folder result?

                  • 21. Re: Seam components view problem with JBDS 1.1.0.GA
                    akazakov

                    The same problem with Hibernate console or/and with empty components view?
                    Adding Seam builder to .project should solve second problem.

                    • 22. Re: Seam components view problem with JBDS 1.1.0.GA
                      asookazian

                       

                      "akazakov" wrote:
                      The same problem with Hibernate console or/and with empty components view?
                      Adding Seam builder to .project should solve second problem.


                      This is my BETS\.project after the mod you suggested:
                      <?xml version="1.0" encoding="UTF-8"?>
                      <projectDescription>
                       <name>BETS</name>
                       <comment></comment>
                       <projects>
                       </projects>
                       <buildSpec>
                       <buildCommand>
                       <name>org.jboss.tools.seam.core.seambuilder</name>
                       <arguments>
                       </arguments>
                       </buildCommand>
                       <buildCommand>
                       <name>org.eclipse.jdt.core.javabuilder</name>
                       <arguments>
                       </arguments>
                       </buildCommand>
                       <buildCommand>
                       <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
                       <triggers>full,</triggers>
                       <arguments>
                       <dictionary>
                       <key>LaunchConfigHandle</key>
                       <value>&lt;project&gt;/explode.launch</value>
                       </dictionary>
                       </arguments>
                       </buildCommand>
                       </buildSpec>
                       <natures>
                       <nature>org.eclipse.jdt.core.javanature</nature>
                       <nature>org.hibernate.eclipse.console.hibernateNature</nature>
                       <nature>org.jboss.tools.seam.core.seamnature</nature>
                       </natures>
                      </projectDescription>


                      I refreshed my BETS project and closed and opened the Seam components view and when I click the plus (+) sign next to BETS in Seam components view, there's nothing.

                      Here's the error log message:

                      Contributor org.jboss.tools.seam.ui.views.SeamComponentsNavigator cannot be created.


                      • 23. Re: Seam components view problem with JBDS 1.1.0.GA
                        akazakov

                        Is there any stacktrace?

                        • 24. Re: Seam components view problem with JBDS 1.1.0.GA
                          asookazian

                           

                          "akazakov" wrote:
                          Is there any stacktrace?


                          exception stack trace:
                          
                          An exception stack trace is not available.


                          • 25. Re: Seam components view problem with JBDS 1.1.0.GA
                            akazakov

                             

                            "asookazian" wrote:
                            Also, it seems strange to me that when you use seam-gen from cmd line, you end up with one high level project folder (in my case 'BETS'). But when you create a new Seam project using JBoss Tools (or Seam tools??), you end up with 4 high level folders *for the exact same project* (i.e. it's an EAR, etc.)

                            Seam-gen projects use ant sript to build/deploy EAR/EJB/WAR. So you can use any project structure. It's metter of ant file to handle it. But JBoss Tools depends on Eclipse Web Tools. And you have to have WTP-strucrtured projects to have whole set of features.
                            For EAR deployment type it creates 4 projects: EAR,EJB,WAR,Test. And there are two projects in case of WAR deployment: WAR,Test.

                            • 26. Re: Seam components view problem with JBDS 1.1.0.GA
                              asookazian

                              Not sure if this is related or not...

                              eclipse.buildId=M20090107-0800
                              java.version=1.5.0_17
                              java.vendor=Sun Microsystems Inc.
                              BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
                              Command-line arguments: -os win32 -ws win32 -arch x86
                              
                              
                              Error
                              Tue Mar 10 14:49:59 PDT 2009
                              Problems occurred when invoking code from plug-in: "org.eclipse.jst.jee".
                              
                              java.lang.NullPointerException
                              at org.eclipse.wst.common.componentcore.ModuleCoreNature.primaryContributeToContext(ModuleCoreNature.java:552)
                              at org.eclipse.jem.internal.util.emf.workbench.EMFWorkbenchContextFactory.createEMFContext(EMFWorkbenchContextFactory.java:113)
                              at org.eclipse.wst.common.internal.emfworkbench.edit.EMFWorkbenchEditContextFactory.createEMFContext(EMFWorkbenchEditContextFactory.java:81)
                              at org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase.createEMFContext(WorkbenchResourceHelperBase.java:249)
                              at org.eclipse.jem.util.emf.workbench.nature.EMFNature.createEmfContext(EMFNature.java:105)
                              at org.eclipse.jem.util.emf.workbench.nature.EMFNature.getEmfContextBase(EMFNature.java:229)
                              at org.eclipse.wst.common.internal.emfworkbench.integration.EditModelNature.getEmfContext(EditModelNature.java:61)
                              at org.eclipse.wst.common.componentcore.ModuleCoreNature.getModuleStructuralModelForRead(ModuleCoreNature.java:269)
                              at org.eclipse.wst.common.componentcore.internal.StructureEdit.<init>(StructureEdit.java:320)
                              at org.eclipse.wst.common.componentcore.internal.StructureEdit.getStructureEditForRead(StructureEdit.java:119)
                              at org.eclipse.wst.common.componentcore.internal.resources.VirtualResource.getReadOnlyComponent(VirtualResource.java:326)
                              at org.eclipse.wst.common.componentcore.internal.resources.VirtualResource.getProjectRelativePath(VirtualResource.java:147)
                              at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelResource(JEE5ModelProvider.java:147)
                              at org.eclipse.jst.jee.model.internal.Web25ModelProvider.getModelObject(Web25ModelProvider.java:42)
                              at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelObject(JEE5ModelProvider.java:210)
                              at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.getXmlWebApp(Web25MergedModelProvider.java:51)
                              at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.internalModelChanged(Web25MergedModelProvider.java:137)
                              at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.xmlModelChanged(Web25MergedModelProvider.java:128)
                              at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider$XmlModelListener.modelsChanged(AbstractMergedModelProvider.java:95)
                              at org.eclipse.jst.jee.model.internal.JEE5ModelProvider$NotifyRunner.run(JEE5ModelProvider.java:446)
                              at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
                              at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.notifyListeners(JEE5ModelProvider.java:421)
                              at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.resourceChanged(JEE5ModelProvider.java:103)
                              at org.eclipse.jst.jee.model.internal.JEE5ModelProvider$ResourceAdapter.notifyChanged(JEE5ModelProvider.java:78)
                              at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:247)
                              at org.eclipse.emf.ecore.resource.impl.ResourceImpl.setModified(ResourceImpl.java:1748)
                              at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.modified(ResourceImpl.java:490)
                              at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.didRemove(ResourceImpl.java:451)
                              at org.eclipse.emf.common.util.BasicEList.didClear(BasicEList.java:260)
                              at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.didClear(ResourceImpl.java:470)
                              at org.eclipse.emf.common.util.BasicEList.clear(BasicEList.java:1000)
                              at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doClear(NotifyingListImpl.java:1155)
                              at org.eclipse.emf.common.notify.impl.NotifyingListImpl.clear(NotifyingListImpl.java:1082)
                              at org.eclipse.emf.ecore.resource.impl.ResourceImpl.doUnload(ResourceImpl.java:1563)
                              at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doUnload(XMLResourceImpl.java:505)
                              at org.eclipse.emf.ecore.resource.impl.ResourceImpl.unload(ResourceImpl.java:1585)
                              at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.removeAndUnloadAllResources(ProjectResourceSetImpl.java:226)
                              at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.release(ProjectResourceSetImpl.java:210)
                              at org.eclipse.wst.common.internal.emfworkbench.integration.ResourceSetWorkbenchEditSynchronizer.release(ResourceSetWorkbenchEditSynchronizer.java:258)
                              at org.eclipse.jem.util.emf.workbench.ResourceSetWorkbenchSynchronizer.resourceChanged(ResourceSetWorkbenchSynchronizer.java:83)
                              at org.eclipse.wst.common.internal.emfworkbench.integration.ResourceSetWorkbenchEditSynchronizer.resourceChanged(ResourceSetWorkbenchEditSynchronizer.java:145)
                              at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:288)
                              at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
                              at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:282)
                              at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:248)
                              at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:307)
                              at org.eclipse.core.internal.resources.Project.close(Project.java:165)
                              at org.eclipse.ui.actions.CloseResourceAction.invokeOperation(CloseResourceAction.java:218)
                              at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:162)
                              at org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace(WorkspaceAction.java:483)
                              at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
                              at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
                              




                              • 27. Re: Seam components view problem with JBDS 1.1.0.GA
                                asookazian

                                 

                                "akazakov" wrote:
                                "asookazian" wrote:
                                Also, it seems strange to me that when you use seam-gen from cmd line, you end up with one high level project folder (in my case 'BETS'). But when you create a new Seam project using JBoss Tools (or Seam tools??), you end up with 4 high level folders *for the exact same project* (i.e. it's an EAR, etc.)

                                Seam-gen projects use ant sript to build/deploy EAR/EJB/WAR. So you can use any project structure. It's metter of ant file to handle it. But JBoss Tools depends on Eclipse Web Tools. And you have to have WTP-strucrtured projects to have whole set of features.
                                For EAR deployment type it creates 4 projects: EAR,EJB,WAR,Test. And there are two projects in case of WAR deployment: WAR,Test.


                                I would expect that the JBoss Seam/Tools dev team would have seam-gen and JBoss Tools "seamlessly" and completely integrated by now. What I mean by that is to be able to seam-gen a new project from the IDE rather than cmd line.

                                I see here: http://docs.jboss.org/tools/3.0.0.CR2/en/seam/html_single/index.html that there is some integration with some of the seam command line commands (e.g. action, form, entity, conversation, generate-entities) but I'd love to see the setup and create-project in there as well (as well as the build.xml that we know and love!)

                                So basically what is the recommendation from your team and Pete Muir, for example? Use JBoss Tools and forget seam-gen from cmd line? Stick with 4 projects "per project" for an EAR?

                                • 28. Re: Seam components view problem with JBDS 1.1.0.GA
                                  asookazian

                                  Is it possible to get a complete list of all JBoss Tools features we'd miss out on if we continue using the one folder approach with seam-gen cmd line?

                                  I was really looking forward to using the Seam components view and the HQL editor and apparently can't b/c I seam-gen'd my project skeleton...

                                  • 29. Re: Seam components view problem with JBDS 1.1.0.GA
                                    asookazian

                                    I just created this class in maxTest-ejb project and I *still* don't see any components in the Seam components view after refreshing my project:

                                    package org.domain.maxtest.session;
                                    
                                    import org.jboss.seam.ScopeType;
                                    import org.jboss.seam.annotations.In;
                                    import org.jboss.seam.annotations.Logger;
                                    import org.jboss.seam.annotations.Name;
                                    import org.jboss.seam.annotations.Scope;
                                    import org.jboss.seam.log.Log;
                                    import org.jboss.seam.security.Identity;
                                    
                                    @Name("testBean")
                                    @Scope(ScopeType.CONVERSATION)
                                    public class TestBean {
                                    
                                     @Logger Log log;
                                    
                                     @In Identity identity;
                                    
                                     public void foo(){}
                                    }