3 Replies Latest reply on Jun 19, 2015 4:52 AM by manarh

    SeamGen in Wildfly

    jseanjensen

      In a previous job I worked with JBoss and used SeamGen to generate a quick database app.  I was asked to produce something similar and since they were using Wildfly I suggested that Seamgen would be an easy way to generate the skeleton of the app.  I loaded Wildfly in Eclipse and used the SeamGen option to create an app.  This worked fine and I was ready to show it off.  However when I tried to deploy it I got the following error in my console.

      14:47:26,081 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "TestGen.war")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"TestGen.war#TestGen\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.java:resources.TestGenDatasource]"]}

      14:47:26,107 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "TestGen.war" (runtime-name : "TestGen.war")

      14:47:26,107 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "mysql-connector-java-5.1.35-bin.jar" (runtime-name : "mysql-connector-java-5.1.35-bin.jar")

      14:47:26,117 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.naming.context.java.jboss.java:resources.TestGenDatasource (missing) dependents: [service jboss.persistenceunit."TestGen.war#TestGen".__FIRST_PHASE__]

       

      I've been tweaking the configuration all day and I'm baffled as to why I can't get the dependency working.  I thought since the data generation phase went ok that the datasource should be fine.

       

      So I need to wire these things together so I can evaluate whether this is worth pursuing.  Can anyone suggest a course I can take to 1) get this working so I can show it off 2) tell me which files I should be looking at and where the required files should be?

        • 1. Re: SeamGen in Wildfly
          jaikiran

          Sean, I don't know about seam-gen (haven't used it) and I don't know if it is compatible with WildFly. I think seam-gen has been superseded by the more active JBoss Forge project http://forge.jboss.org/

          • 2. Re: SeamGen in Wildfly
            vata2999

            AFAIK, Seam-gen works only on JBoss AS 4.2.x and is not compatible with Wildfly since it's based on Seam 2.2 but It's using ant for code generation and a little freemarker, it must not be hard to change it to work with Wildfly.

            • 3. Re: SeamGen in Wildfly
              manarh

              Sean,

              seam-gen is outdated even version 2.3.1.Final should work to some extent on EAP 6 versions and probably on WF too.

               

              Do you need a Seam based application or just CRUD editable web application? If you are not dependent on Seam use JBoss Forge it even works in your IDE of your choice.

               

              In case of still want to use Seam and seam-gen I think that your issue is related to deploymnet of datasource. Check whether it is deployed on WF console, you can bundle datasource definitions in .war/ear/META-INF directory to quickly enable it in your application deployment.