users@glassfish.java.net

JPA 2.0 Validaton Exceptions and unknown protocol: osgi

From: <glassfish_at_javadesktop.org>
Date: Thu, 12 Aug 2010 06:08:56 PDT

Sorry if I'm asking a newbie question and didn't find any obvious references to this when I searched around a bit.

I'm working on setting up an ExceptionMapper with JAX-RS/Jersey in Glassfish 3.1-b14. That part is working fine and as part of my testing, I tried setting up a JPA 2.0 Validation annotation (@Size specifically) so I could see how the validation exception would come back; using Hibernate 3.5 as my JPA implementation.

However the exception I got back from this was much different than I expected:

WARNING: "IOP00810213: (MARSHAL) Could not find class javax.validation.constraints.Size in CDRInputStream.readClass"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 213 completed: Maybe
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.cnfeReadClass(ORBUtilSystemException.java:8999)
.....
Caused by: java.lang.ClassNotFoundException: javax.validation.constraints.Size: java.net.MalformedURLException: Unknown protocol: osgi
        at com.sun.corba.ee.impl.util.JDKBridge.loadClassM(JDKBridge.java:320)
.....

The stack trace in the server.log does include my expected ConstraintViolationException but the exception I get back in my ExceptionMapper doesn't include or reference the expected exception.

Just trying to get some ideas or pointers on where in the various parts this is coming from and any thoughts on how to diagnose or resolve this.

Ed Reddy
[Message sent by forum member 'ed_reddy']

http://forums.java.net/jive/thread.jspa?messageID=480005