users@glassfish.java.net

Re: java.lang.ClassNotFoundException: javax.validation.groups.Default: java.net.MalformedURLException: Unknown protocol: osgi

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Thu, 12 May 2011 19:14:47 +0530

File a bug against corba or a similar module in glassfish jira.

Thanks,
Sahoo
On Thursday 12 May 2011 05:14 PM, Vetle Roeim wrote:
> Hi,
>
> When propagating a javax.validation.ConstraintViolationException from
> a remote EJB to a front-end server, that is triggered from a custom
> constraint validation (using a custom validation annotation), I get
> the following stack trace:
>
> Caused by: java.lang.ClassNotFoundException:
> javax.validation.groups.Default: java.net.MalformedURLException:
> Unknown protocol: osgi
> at com.sun.corba.ee.impl.util.JDKBridge.loadClassM(JDKBridge.java:325)
> at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:228)
> at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:640)
> at com.sun.corba.ee.impl.util.RepositoryId.getClassFromType(RepositoryId.java:628)
> at com.sun.corba.ee.impl.orbutil.RepIdDelegator.getClassFromType(RepIdDelegator.java:169)
> at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readClass(CDRInputStream_1_0.java:1439)
> ... 174 more
>
> On the remote server, the stack trace is:
>
> Caused by: javax.validation.ConstraintViolationException: validation
> failed for classes [org.example.model.TextId] during update time for
> groups [javax.validation.groups.Default, ]
> at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:132)
> at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreUpdate(BeanValidationEventListener.java:79)
> at org.hibernate.action.EntityUpdateAction.preUpdate(EntityUpdateAction.java:236)
> at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:87)
> at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:268)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:260)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:180)
> at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
> at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
> at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:791)
> at com.sun.enterprise.container.common.impl.EntityManagerWrapper.flush(EntityManagerWrapper.java:418)
> ...
>
> As far as I can tell, there should be no reason it should fail to find
> the javax.validation.groups.Default class, so the error seems to be
> triggered by something else.
> Can anyone shed any light on this?
>
> Using Glassfish 3.1.
>
> Regards,
> Vetle