2 Replies Latest reply on Jul 5, 2011 10:25 AM by Prasad Deshpande

    AS7 JPA ValidatorFactory

    Prasad Deshpande Expert

      Hi Guys,

       

      My application is EE5 compliant, I'm using following persistence.xml :

       

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence xmlns="http://java.sun.com/xml/ns/persistence">

          <persistence-unit name="efp" transaction-type="JTA">

              <jta-data-source>java:jboss/datasources/eFpDataSource</jta-data-source>

              <properties>

                  <property name="hibernate.show_sql" value="false"/>

                  <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

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

              </properties>

          </persistence-unit>

      </persistence>

       

      This is JPA 1.0 so doesn't have validation-mode node to it, I've set property to disable Validations. Still while deploying my entities, I get error like :

       

       

      "jboss.naming.context.java.comp.efp.efprocess.TypeLink.ValidatorFactory missing [ jboss.naming.context.java.comp.efp.efprocess.TypeLink ]",

      "jboss.naming.context.java.comp.efp.efprocess.DeadlineConf.ValidatorFactory missing [ jboss.naming.context.java.comp.efp.efprocess.DeadlineConf ]",

      "jboss.naming.context.java.comp.efp.efprocess.MapEntity.ValidatorFactory missing [ jboss.naming.context.java.comp.efp.efprocess.MapEntity ]",

      "jboss.naming.context.java.comp.efp.efprocess.Form.Validator missing [ jboss.naming.context.java.comp.efp.efprocess.Form ]",

      "jboss.naming.context.java.comp.efp.efprocess.NestedRule.Validator missing [ jboss.naming.context.java.comp.efp.efprocess.NestedRule ]",

      "jboss.naming.context.java.comp.efp.efprocess.OperationalContext.Validator missing [ jboss.naming.context.java.comp.efp.efprocess.OperationalContext ]",

       

       

      My question is why is deployment even looking for ValidationFactory/Validator when I set the property to "none".  I know with JPA2 (AS7 default) validation always kicks-in, but with my persistence.xml, it should still work (JPA1 backword compatibility).

       

      Any suggestions?

       

      Thanks,

      Prasad

        • 1. Re: AS7 JPA ValidatorFactory
          Scott Marlow Master

          Prasad,

           

          I'm not sure "what" is causing this bug (perhaps a deployment unit processor but not sure).  The best I can came up with is debugging or possibly sifting through "trace logging" output for what is causing the references.  If you feel like attaching your app or testcase, I could try to explore why this is happening.

           

          If you want to try sifting through "trace logging" output, I would try searching for keyword "ValidatorFactory" from the top of the log, to look for hints as to what caused the reference.  That would be a good place to start.

           

          Scott

          • 2. Re: AS7 JPA ValidatorFactory
            Prasad Deshpande Expert

            Thanks for your reply scott, I tried to deploy entity beans one by one & figured out deployment was missing one of the bean needed.

             

            I'm not sure what was the reason for complaining about ValidatorFactory missing. Error did confused me.