Hello Pierre,
I just wonder if the "rb.gui" package is correctly exposed in the
manifest.mf file.
Could you confirm that point?
best regards,
Thierry Boileau
Hello,
> I am currently using Restlet 2.0.6 with Felix 1.8.0 (in OSGi) and I have a
> problem with the wrap.
> I am doing this :
>
> public void envoiRequeteGet() {
> System.out.println("Tentative de connexion au serveur (cote
> client)");
> //Creation du client
> Component c = new Component();
> cl = c.getClients().add(Protocol.HTTP);
> cl.getContext().getParameters().add("useForwardedForHeader",
> "false");
> try {
> cl.start();
> ClientResource cr = new ClientResource(urlServer);
> cr.setNext(cl);
> ServerAlgoResource sar =
> cr.wrap(ServerAlgoResource.class);
> sar.affichage();
> //envoie une requete GET
> //cr.get().write(System.out);
>
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
>
> And when I launch my application in Felix, I have this error :
>
> java.lang.IllegalArgumentException: interface rb.gui.ServerAlgoResource is
> not visible from class loader
> at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
> at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
> at
> org.restlet.resource.ClientResource.wrap(ClientResource.java:1672)
> at rb.gui.ClientAlgo.envoiRequeteGet(ClientAlgo.java:34)
> at rb.gui.Affichage.<init>(Affichage.java:86)
> at rb.gui.Activator.start(Activator.java:11)
> at
>
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1458)
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)
> at
>
> org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:105)
> at
>
> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:291)
> at
>
> org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:177)
> at java.lang.Thread.run(Thread.java:680)
>
> However, my interface ServerAlgoResource is in my package.
>
> Do you know why I have this problem, and how to solve it?
>
> I need to do a wrap because in my GET request, I return a Form object and I
> can't parse it with just a Representation.
>
> Thank you for the help.
>
> --
> View this message in context:
> http://restlet-discuss.1400322.n2.nabble.com/Problem-with-wrap-tp6290637p6290637.html
> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2721796
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2722403