3 Replies Latest reply on Jun 18, 2012 11:45 PM by bravefox

    UndeclaredThrowableException?

    bravefox

      Hello, guys. I am developing a standalone-application and try handle optimistic lock exception. I generate this exception and on the client side catch java.lang.reflect.UndeclaredThrowableException (java.lang.ClassNotFoundException: org.hibernate.OptimisticLockException) instead OptimisticLockException. jboss-client.jar is connected to the client. Do I still need to connect hibernate-core.jar?

      Sorry for my English

        • 1. Re: UndeclaredThrowableException?
          jaikiran

          You'll need the hiberate jar files in your client classpath since the jboss-client.jar doesn't include hibernate classes.

          1 of 1 people found this helpful
          • 2. Re: UndeclaredThrowableException?
            bravefox

            It's a pity that the client will be so ugly. At worst, I was expecting to catch an exception from the package javax. Thank you for answer, jaikiran pai.

            • 3. Re: UndeclaredThrowableException?
              bravefox

              Again there was a problem with UndeclaredThrowableException. I put hiberate jar files in client classpath. But now I catch an exception for a different reason. Now the client needs a domain model. Apparently the domain model objects needed for OptimisticLockException. Tell me, please, where to dig to solve the problem. Maybe I should not catch OptimisticLockException on the client side?