Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-68

persistence setup creates incorrect persistence.xml for JBoss AS 7

    XMLWordPrintable

Details

    Description

      Executing "persistence setup --provider HIBERNATE --container JBOSS_AS7" creates persistence.xml with the following jata-datasource: "<jta-data-source>java:/H2DS</jta-data-source>"

      But AS7 default standalone configuration has "<datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">"

      This leads to the following exception during deployment:
      "[org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "forgetest.war" was rolled back with failure message

      {"Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"forgetest.war#forge-default\" missing [ jboss.naming.context.java.H2DS ]"]}

      "

      After changing persistence.xml to contain "<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>" instead the project successfully compiles.

      BTW: "<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>" also does not seem to be the "right" dialect for H2 database.

      Attachments

        Activity

          People

            lincolnthree Lincoln Baxter III (Inactive)
            heapifyman_jira heapifyman heapifyman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: