users@glassfish.java.net

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

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Thu, 12 May 2011 08:23:47 -0400

perhaps your OSGI port was not configured in domain.xml?

<domain>
...............
<configs>
   <config name="server-config">
    <java-config ...>
     <jvm-options>-Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT}</jvm-options>
  </java-config>
  <system-property name="OSGI_SHELL_TELNET_PORT" value="26666"/>
 </config>
</configs>
..........
</domain>

?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Thu, 12 May 2011 13:44:50 +0200
> Subject: java.lang.ClassNotFoundException: javax.validation.groups.Default: java.net.MalformedURLException: Unknown protocol: osgi
> From: vetler_at_gmail.com
> To: users_at_glassfish.java.net
>
> 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