Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-13159

Datasource resolution fails for application layer alias when using Hibernate bytecode enhancement

XMLWordPrintable

    • Hide
      1. Create an alias for a deployed datasource in application.xml
                ...
        	<resource-ref>
        		<res-ref-name>testDS</res-ref-name>
        		<lookup-name>java:jboss/datasources/ExampleDS</lookup-name>
        	</resource-ref>
                ...
            
      2. Enable bytecode enhancement in persistence.xml (e.g. set hibernate.enhancer.enableLazyInitialization and hibernate.enhancer.enableAssociationManagement to true).
      Show
      Create an alias for a deployed datasource in application.xml ... <resource-ref> <res-ref-name>testDS</res-ref-name> <lookup-name>java:jboss/datasources/ExampleDS</lookup-name> </resource-ref> ... Enable bytecode enhancement in persistence.xml (e.g. set hibernate.enhancer.enableLazyInitialization and hibernate.enhancer.enableAssociationManagement to true ).

      ... ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "jboss.eap-1.0-SNAPSHOT.ear")]) - failure description: {
          "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.app.ejb-application.env.testDS"],
          "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"jboss.eap-1.0-SNAPSHOT.ear/ejb.jar#jboss-eap-hibernate\".__FIRST_PHASE__ is missing [jboss.naming.context.java.app.ejb-application.env.testDS]"]
      }
      

              smarlow1@redhat.com Scott Marlow
              rhn-support-sfikes Stephen Fikes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: