1 Reply Latest reply on Nov 29, 2012 10:44 AM by John Franey

    disabling jpa bean validation in arquillian test

    John Franey Novice

      I plan to check with jboss as7 and hibernate forums, but thought I'd stop off here first.


      I want to disable jpa bean validation while running an integration test.  I set the property in the persistence.xml but the test still encounters a validation failure.


      I am using jboss as 7.1.1.Final and its bundled hibernate libraries (entity-manager 4.0.1, validator 4.2.0).  The log output confirms these versions are used.


      My persistence.xml has the following property.

        <property name="javax.persistence.validation.mode" value="none"/>


      And the log output confirms:

      17:41:11,901 DEBUG [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-4) Processing PersistenceUnitInfo [

              name: sdp-model

              persistence provider classname: org.hibernate.ejb.HibernatePersistence

              classloader: ModuleClassLoader for Module "deployment.test.ear.test.jar:main" from Service Module Loader

              Temporary classloader: org.jboss.as.jpa.classloader.TempClassLoader@502a2963

              excludeUnlistedClasses: false

              JTA datasource: org.jboss.jca.adapters.jdbc.WrapperDataSource@4d1c0e9b

              Non JTA datasource: null

              Transaction type: JTA

              PU root URL: vfs:/content/test.ear/test.jar/

              Shared Cache Mode: UNSPECIFIED

              Validation Mode: AUTO

              Jar files URLs []

              Managed classes names []

              Mapping files names []

              Properties [

                      javax.persistence.validation.mode: none

                      hibernate.dialect: org.hibernate.dialect.MySQLDialect

                      hibernate.id.new_generator_mappings: true]



      Anything else to check at arquillian level before I move onto jboss forum?