RMI doesn't work with GWT (Google Web Toolkit) application

View: New views
6 Messages — Rating Filter:   Alert me  

RMI doesn't work with GWT (Google Web Toolkit) application

by bartlomiej.jendyk@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


hello again,

yesterday I posted a solution using RMI for openwfe that works fine as
a standalone application. I've put it into a class and built it as a
class library project, in order to bind the compiled jar into other
project - my GWT-based application. the code I wish to use is launched
from the server-side of GWT app (which is a client for workflow
engine). after hooking up all necessary jars to my project, I get the
following exception:

java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments;
nested exception is:
        java.net.MalformedURLException: no protocol: and
        at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:336)
        at sun.rmi.transport.Transport$1.run(Transport.java:159)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
        at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:
535)
        at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run0(TCPTransport.java:790)
        at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run(TCPTransport.java:649)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:
255)
        at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
233)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
        at
openwfe.org.worklist.impl.RmiWorkSession_Stub.launch(Unknown Source)
        at desy.workflow.launcher.WFLauncher.launch(WFLauncher.java:
59)
        at
desy.jdesp.server.JDespServiceImpl.login(JDespServiceImpl.java:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
281)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
167)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
173)
        at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:
368)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
178)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
869)
        at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:
80)
        at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments;
nested exception is:
        java.net.MalformedURLException: no protocol: and

(...)

this is the piece of code that works fine as a standalone application
(all URLs are supplied correctly):

WorkSessionServer srv = (WorkSessionServer)Naming.lookup(worklistURL);
WorkSession workSession = (WorkSession)srv.login("admin", "admin");

LaunchItem li = new LaunchItem();
li.setWorkflowDefinitionUrl(engineURL + workflowName);

// launching the flow on the engine "mainEngine"
String wfid = workSession.launch("mainEngine", li); // this line
causes the exception

could anyone explain why I get this MalformedUrlException somewhere
from inside the launch() method?

again, a remark: the code is used from within class library (jar) that
is hooked up to my project's classpath.

thanks,
bart


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: RMI doesn't work with GWT (Google Web Toolkit) application

by jmettraux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


2007/5/18, bartlomiej.jendyk@... <bartlomiej.jendyk@...>:

>
> hello again,
>
> yesterday I posted a solution using RMI for openwfe that works fine as
> a standalone application. I've put it into a class and built it as a
> class library project, in order to bind the compiled jar into other
> project - my GWT-based application. the code I wish to use is launched
> from the server-side of GWT app (which is a client for workflow
> engine). after hooking up all necessary jars to my project, I get the
> following exception:
>
> java.rmi.ServerException: RemoteException occurred in server thread;
> nested exception is:
>         java.rmi.UnmarshalException: error unmarshalling arguments;
> nested exception is:
>         java.net.MalformedURLException: no protocol: and
>         at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:336)

Hi Bart,

"no protocol" : seems like "rmi:" is missing from your RMI URL, what
is it anyway ?


Best regards,

--
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: RMI doesn't work with GWT (Google Web Toolkit) application

by bartlomiej.jendyk@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi John,

everything is fine with the URL:
rmi://localhost:7099/workSessionServer. as I said, it works fine from
outside GWT app. what could it be then?

regards,
Bart

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: RMI doesn't work with GWT (Google Web Toolkit) application

by jmettraux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2007/5/18, Bartłomiej Jendyk <bartlomiej.jendyk@...>:
>
> Hi John,
>
> everything is fine with the URL:
> rmi://localhost:7099/workSessionServer. as I said, it works fine from
> outside GWT app. what could it be then?

so, your launch() call seems to trigger the exception. What is the
process definition URL that you pass via the LaunchItem ?


Best regards,

--
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: RMI doesn't work with GWT (Google Web Toolkit) application

by bartlomiej.jendyk@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


http://localhost:7090/nameofmyflow.xml

I log in as "admin" / "admin" and have no problems launching this flow
from the webclient.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: RMI doesn't work with GWT (Google Web Toolkit) application

by John Mettraux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2007/5/18, Bartłomiej Jendyk <bartlomiej.jendyk@...>:
>
> http://localhost:7090/nameofmyflow.xml
>
> I log in as "admin" / "admin" and have no problems launching this flow
> from the webclient.

Have you traced that until your "desy.workflow." code ?

I haven't written the GWT code and I haven't written the "desy" code,
could you make sure your code is passing the right URL ? It's not the
same thing as firing a workflow instance from the webclient.


Best regards,

--
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---

LightInTheBox - Buy quality products at wholesale price