7 Replies Latest reply on Dec 18, 2009 10:57 AM by get boa

    Auditing in a Seam Project

    get boa Newbie

      Has anybody ever used Envers to audit entities of a Seam project?
      I'm trying to do it but seems to be a bug when i use either Hibernate Validator 4.0.2 and Seam 2.2.0 together.
      "The type org.hibernate.validator.InvalidValue cannot be resolved. It is indirectly referenced from required .class files"
      The Envers's version i'm running is hibernate-envers 3.5-Beta-2
      Any idea about it ?

      thanks in advance

        • 1. Re: Auditing in a Seam Project
          Sharath Komarla Newbie

          I would try with a GA version of hibernate and envers first.  You could be facing beta issues.  Also, make sure that you don't have multiple versions of the jar in the classpath at the same time.  The java class loader many times will error out when it sees multiple jars in the classpath that contain a class with the same name and package

          • 2. Re: Auditing in a Seam Project
            get boa Newbie

            I really would like to use Envers for auditing my entities and not using triggers instead... it's an interesting project...  I can't see any other faster solution... and the time is running out =/

             

            Well, about multiple jars, it would be a good reason but i didn't notice any class whith the same name though...
            This is how my pom.xml looks like:

             

             

                     <dependency>
                        <groupId>org.jboss.seam</groupId>
                        <artifactId>jboss-seam-ui</artifactId>
                        <version>2.2.0.GA</version>
                        <exclusions>
                            <exclusion>
                                <artifactId>el-api</artifactId>
                                <groupId>javax.el</groupId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>javax.faces</groupId>
                        <artifactId>jsf-api</artifactId>
                        <version>1.2_13</version>
                    </dependency>
                    <dependency>
                      <groupId>org.hibernate</groupId>
                      <artifactId>hibernate-validator</artifactId>
                      <version>4.0.2.GA</version>
                    </dependency>
                    <dependency>
                      <groupId>org.hibernate</groupId>
                      <artifactId>hibernate-entitymanager</artifactId>
                      <version>3.5.0-Beta-2</version>
                    </dependency>
                    <dependency>
                      <groupId>org.hibernate</groupId>
                      <artifactId>hibernate-envers</artifactId>
                      <version>3.5.0-Beta-2</version>
                    </dependency>
                    <dependency>
                        <groupId>org.richfaces.ui</groupId>
                        <artifactId>richfaces-ui</artifactId>
                        <version>3.3.2.GA</version>
                    </dependency>
                    <dependency>
                        <groupId>javax.faces</groupId>
                        <artifactId>jsf-impl</artifactId>
                        <version>1.2_13</version>
                    </dependency>
                    <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>servlet-api</artifactId>
                        <version>2.5</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>com.sun.facelets</groupId>
                        <artifactId>jsf-facelets</artifactId>
                        <version>1.1.14</version>
                    </dependency>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-simple</artifactId>
                        <version>1.5.0</version>
                    </dependency>
                    <dependency>
                        <groupId>javassist</groupId>
                        <artifactId>javassist</artifactId>
                        <version>3.11.0.GA</version>
                    </dependency>
                    <dependency>
                        <groupId>jasperreports</groupId>
                        <artifactId>jasperreports</artifactId>
                        <version>3.5.1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.jboss.seam</groupId>
                        <artifactId>jboss-seam-pdf</artifactId>
                        <version>2.2.0.GA</version>
                    </dependency>
                    <dependency>
                        <groupId>commons-collections</groupId>
                        <artifactId>commons-collections</artifactId>
                        <version>3.2.1</version>
                    </dependency>

             

            Any other sugestion?

            • 3. Re: Auditing in a Seam Project
              Adam Warski Master

              Are you using hibernate-core 3.5-beta2 also?

               

              Also, do you have classloader isolation for your war/ear? Because if not, the new Hibernate jars may interfere with the jars bundeled with jboss.

               

              Adam

              • 4. Re: Auditing in a Seam Project
                Sharath Komarla Newbie
                shot in the dark, but try running mvn site. That always helps me with classpath issues
                • 5. Re: Auditing in a Seam Project
                  get boa Newbie

                  Hey Adam,

                  thanks for the reply... but yeah I'm using hibernate-core-3.5-beta-2 aswell i forgot to copy from my pom.xml file and paste it on last post...
                  I ain't using Jboss but Tomcat instead...

                  Ohhh my gosh i really need it to work lol

                  • 6. Re: Auditing in a Seam Project
                    Adam Warski Master

                    Hmm, the error mentiones Hibernate Validator, so why do you think it's an Envers problem?

                     

                    Adam

                    • 7. Re: Auditing in a Seam Project
                      get boa Newbie

                      It was my first thought, maybe some incopatibility of versions with orders hibernate versions, or someone who has had the same problem before.
                      Anyway, i'll see... thanks to you all