6 Replies Latest reply on Dec 7, 2016 12:21 AM by Alexey Kazakov

    Facing issue while creating a seam project

    Mark Ma Newbie

      Hi there,

       

      I'm a newbie on jboss developer studio. I'd like to start with my first seam web project.

       

      Here is my configuration on project settings.

      Screenshot from 2016-12-06 20:02:04.png

      Screenshot from 2016-12-06 20:02:35.png

      When I try to click finish button. I got below error.

      Screenshot from 2016-12-06 20:03:07.png

      Could you please provide some idea on this error? Thanks a lot.

        • 2. Re: Facing issue while creating a seam project
          Mark Ma Newbie

          Here is the log:

          https://developer.jboss.org/servlet/JiveServlet/downloadBody/55845-102-1-176038/jboss_studio.log.zip

           

           

          !ENTRY org.jboss.tools.jst.web.kb 4 0 2016-12-07 09:28:16.867

          !MESSAGE Plug-in "org.jboss.tools.seam.core" was unable to instantiate class "org.jboss.tools.seam.internal.core.SeamProject".

          !STACK 1

          org.eclipse.core.runtime.CoreException: Plug-in "org.jboss.tools.seam.core" was unable to instantiate class "org.jboss.tools.seam.internal.core.SeamProject".

            at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)

            at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)

            at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)

            at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)

            at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)

            at org.eclipse.core.internal.resources.NatureManager.createNature(NatureManager.java:237)

            at org.eclipse.core.internal.resources.Project.getNature(Project.java:407)

            at org.jboss.tools.jst.web.kb.internal.KbProject.getKBBuilderRequiredNatureDescriptions(KbProject.java:1012)

            at org.jboss.tools.jst.web.kb.internal.KbProject.checkKBBuilderInstalled(KbProject.java:1035)

            at org.jboss.tools.jsf.web.validation.JSFELValidationDelegate.shouldValidate(JSFELValidationDelegate.java:36)

            at org.jboss.tools.jst.web.kb.internal.validation.ELValidator.shouldValidate(ELValidator.java:668)

            at org.jboss.tools.jst.web.kb.internal.validation.ELValidator.shouldValidate(ELValidator.java:655)

            at org.jboss.tools.common.validation.ValidationContext.shouldValidate(ValidationContext.java:137)

            at org.jboss.tools.common.validation.ValidationContext.init(ValidationContext.java:126)

            at org.jboss.tools.common.validation.ValidationContext.<init>(ValidationContext.java:43)

            at org.jboss.tools.common.validation.ContextValidationHelper.getValidationContextManager(ContextValidationHelper.java:197)

            at org.jboss.tools.common.validation.ContextValidationHelper.getValidationContextManager(ContextValidationHelper.java:189)

            at org.jboss.tools.common.validation.ValidatorManager.validateInJob(ValidatorManager.java:65)

            at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:78)

            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

          Caused by: java.lang.NoClassDefFoundError: org/jboss/tools/jst/web/kb/validation/IProjectValidationContext

            at java.lang.Class.getDeclaredConstructors0(Native Method)

            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)

            at java.lang.Class.getConstructor0(Class.java:3075)

            at java.lang.Class.newInstance(Class.java:412)

            at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)

            ... 18 more

          Caused by: java.lang.ClassNotFoundException: org.jboss.tools.jst.web.kb.validation.IProjectValidationContext cannot be found by org.jboss.tools.seam.core_3.2.1.v20111027-1359-H303-Final

            at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:448)

            at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:361)

            at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:353)

            at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)

            at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

            ... 23 more

           

          Are there any dependencies need to be added?

          Here is my plugin installation

          Screenshot from 2016-12-07 09:50:21.png

          • 3. Re: Facing issue while creating a seam project
            Alexey Kazakov Master

            I can't download the log file from https://developer.jboss.org/servlet/JiveServlet/downloadBody/55845-102-1-176038/jboss_studio.log.zip  (don't have permissions) but I see what the problem is. You installed some pretty old Seam Tools (3.2.1 version which was released 5 years ago) which is not compatible with Devstudio 10.1 / Eclipse Neon. How did you install Seam Tools?

            To fix the problem you need to uninstall this old Seam Tools and re-install Seam Tools using Red Hat Central. Window -> Show View... -> Other -> Red Hat Central. Go to Software/Update tab and install JBoss Seam Tools. It will install the latest 3.8.1.

            1 of 1 people found this helpful
            • 4. Re: Facing issue while creating a seam project
              Mark Ma Newbie

              It works, thanks a lot.

              • 5. Re: Facing issue while creating a seam project
                Mark Ma Newbie

                additional question if you can help.

                 

                I try to run my first seam app on jboss-eap-7.0 with postgres database, but got below error:

                 

                12:50:22,445 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 59) Method org.postgresql.jdbc4.Jdbc4DatabaseMetaData.getSchemas(String, String) is not yet implemented.

                12:50:22,446 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 59) MSC000001: Failed to start service jboss.persistenceunit."first.war#first": org.jboss.msc.service.StartException in service jboss.persistenceunit."first.war#first": javax.persistence.PersistenceException: [PersistenceUnit: first] Unable to build Hibernate SessionFactory

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172)

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117)

                  at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:667)

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                  at java.lang.Thread.run(Thread.java:745)

                  at org.jboss.threads.JBossThread.run(JBossThread.java:320)

                Caused by: javax.persistence.PersistenceException: [PersistenceUnit: first] Unable to build Hibernate SessionFactory

                  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:954)

                  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:882)

                  at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154)

                  ... 7 more

                Caused by: org.hibernate.exception.GenericJDBCException: Unable to query DatabaseMetaData for existing schemas

                  at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)

                  at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)

                  at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95)

                  at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.convertSQLException(InformationExtractorJdbcDatabaseMetaDataImpl.java:99)

                  at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.schemaExists(InformationExtractorJdbcDatabaseMetaDataImpl.java:175)

                  at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.schemaExists(DatabaseInformationImpl.java:81)

                  at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:144)

                  at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60)

                  at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:134)

                  at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101)

                  at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:470)

                  at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)

                  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879)

                  ... 9 more

                Caused by: org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4DatabaseMetaData.getSchemas(String, String) is not yet implemented.

                  at org.postgresql.Driver.notImplemented(Driver.java:753)

                  at org.postgresql.jdbc4.AbstractJdbc4DatabaseMetaData.getSchemas(AbstractJdbc4DatabaseMetaData.java:32)

                  at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.schemaExists(InformationExtractorJdbcDatabaseMetaDataImpl.java:144)

                  ... 17 more

                 

                 

                12:50:22,450 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "first.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"first.war#first\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"first.war#first\": javax.persistence.PersistenceException: [PersistenceUnit: first] Unable to build Hibernate SessionFactory

                    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: first] Unable to build Hibernate SessionFactory

                    Caused by: org.hibernate.exception.GenericJDBCException: Unable to query DatabaseMetaData for existing schemas

                    Caused by: org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4DatabaseMetaData.getSchemas(String, String) is not yet implemented."}}

                12:50:22,470 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "postgresql-8.4-702.jdbc4.jar" (runtime-name : "postgresql-8.4-702.jdbc4.jar")

                12:50:22,470 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "first.war" (runtime-name : "first.war")

                12:50:22,470 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "first-ds.xml" (runtime-name : "first-ds.xml")

                 

                Really appreciate if you have any idea on it.

                • 6. Re: Facing issue while creating a seam project
                  Alexey Kazakov Master

                  It looks like you are using some old Postgresql JDBS driver that doesn't implement getSchemas().