11 Replies Latest reply on Jun 25, 2008 12:36 AM by Denis Golovin

    Unable to create a Seam 2.0 Project as EAR

    Guillaume Gingras Newbie

      I have tried multiple ways to create a Seam 2.0 Project as EAR but it fails everytime.

      I have reinstalled a clean install of eclipse-jee-europa-winter and used the JBoss Tools update site to get the latest version of JBoss Tools. I'm using jboss-4.2.2.GA runtime, jboss-seam-2.0.3.CR1 and a MySQL 5.1 datasource.

      I have tried with jdk1.5.0_08 and jdk1.6.0_02 jdk runtime.

      I'm getting this error mesage when creating the Seam Project as an EAR.
      Failed while installing Seam 2.0
      String index out of range: -2

      Is there a way to fix it? Or what am I doing wrong?

        • 1. Re: Unable to create a Seam 2.0 Project as EAR
          Guillaume Gingras Newbie

          When creating a Seam 2.0 Project as WAR, it works. Two folder are created ABC and ABC-test.

          When creating a Seam 2.0 Project as EAR, it fails and I can only see ABC in Eclipse but in the Workspace there is ABC, ABC-test, ABC-ear and ABC-ejb.
          The ABC-ear and ABC-ejb are empty

          • 2. Re: Unable to create a Seam 2.0 Project as EAR
            Denis Golovin Master

            What version of JBoss Tools are you using? I suppose it is 2.1.1.
            Could you post stack trace here?
            Could you try it with jdk1.5.0_08 and jboss-seam-2.0.1.GA?

            Thanks

            • 3. Re: Unable to create a Seam 2.0 Project as EAR
              Guillaume Gingras Newbie

               

              "dgolovin" wrote:
              What version of JBoss Tools are you using? I suppose it is 2.1.1.

              It's JBoss Tools 2.1.0.GA

              "dgolovin" wrote:
              Could you post stack trace here?

              How can I get that?

              "dgolovin" wrote:
              Could you try it with jdk1.5.0_08 and jboss-seam-2.0.1.GA?

              Get the same error: Failed while installing Seam 2.0
              But the details are: String index out of range -1

              • 4. Re: Unable to create a Seam 2.0 Project as EAR
                Denis Golovin Master

                Open "Error Log" view:
                1. Select bar menu: Window->Show View->Other
                2, Type 'Error' in filter field on top
                3. Select 'Error Log' and hit 'Ok'
                4. Find 'String index out of range -1' in error log view

                or just press Shift+Alt+Q then select Error Log in list or press L.

                • 5. Re: Unable to create a Seam 2.0 Project as EAR
                  Guillaume Gingras Newbie

                  With Seam 2.0.1GA

                  java.lang.StringIndexOutOfBoundsException: String index out of range: -1
                  at java.lang.String.substring(Unknown Source)
                  at java.lang.String.substring(Unknown Source)
                  at org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils$FileSet.isIncluded(AntCopyUtils.java:90)
                  at org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils$FileSetFileFilter.accept(AntCopyUtils.java:130)
                  at java.io.File.listFiles(Unknown Source)
                  at org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils.copyFilesAndFolders(AntCopyUtils.java:144)
                  at org.jboss.tools.seam.internal.core.project.facet.Seam2FacetInstallDelegate.doExecute(Seam2FacetInstallDelegate.java:377)
                  at org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate.execute(SeamFacetAbstractInstallDelegate.java:57)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1230)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:398)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:290)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$1.run(FacetedProject.java:272)
                  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modify(FacetedProject.java:282)
                  at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard.performFinish(ModifyFacetedProjectWizard.java:373)
                  at org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard.performFinish(NewProjectDataModelFacetWizard.java:292)
                  at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard$2.run(ModifyFacetedProjectWizard.java:261)
                  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
                  at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard$3.run(ModifyFacetedProjectWizard.java:275)
                  at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
                  


                  With Seam 2.0.3CR1
                  java.lang.StringIndexOutOfBoundsException: String index out of range: -2
                  at java.lang.String.substring(Unknown Source)
                  at java.lang.String.substring(Unknown Source)
                  at org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils$FileSet.isIncluded(AntCopyUtils.java:90)
                  at org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils$FileSetFileFilter.accept(AntCopyUtils.java:130)
                  at java.io.File.listFiles(Unknown Source)
                  at org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils.copyFilesAndFolders(AntCopyUtils.java:144)
                  at org.jboss.tools.seam.internal.core.project.facet.Seam2FacetInstallDelegate.doExecute(Seam2FacetInstallDelegate.java:377)
                  at org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate.execute(SeamFacetAbstractInstallDelegate.java:57)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1230)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:398)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:290)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$1.run(FacetedProject.java:272)
                  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
                  at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modify(FacetedProject.java:282)
                  at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard.performFinish(ModifyFacetedProjectWizard.java:373)
                  at org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard.performFinish(NewProjectDataModelFacetWizard.java:292)
                  at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard$2.run(ModifyFacetedProjectWizard.java:261)
                  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
                  at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard$3.run(ModifyFacetedProjectWizard.java:275)
                  at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
                  


                  • 6. Re: Unable to create a Seam 2.0 Project as EAR
                    Denis Golovin Master

                    Do you have Windows or linux?
                    How does path to Seam 2.0.1.GA look like?


                    • 7. Re: Unable to create a Seam 2.0 Project as EAR
                      Guillaume Gingras Newbie

                      I'm using Windows

                      D:\Development\Tools\Repository\JBoss\jboss-seam-2.0.1.GA

                      • 8. Re: Unable to create a Seam 2.0 Project as EAR
                        Denis Golovin Master

                        thanks for your info. I am able to reproduce it. It has to be fixed in 2.1.2. I'll post issue number here in several minutes.

                        • 10. Re: Unable to create a Seam 2.0 Project as EAR
                          Guillaume Gingras Newbie

                          I tried moving Seam there:
                          D:\\jboss-seam-2.0.1.GA

                          It seems to work now, is it normal? What is the problem?

                          • 11. Re: Unable to create a Seam 2.0 Project as EAR
                            Denis Golovin Master

                            This is weird but problem is in path size. If path to Seam home shorter then path to ear template folder it happens. That's how i have reproduced it.