/ Forside / Teknologi / Udvikling / Java / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Java
#NavnPoint
molokyle 3688
Klaudi 855
strarup 740
Forvirret 660
gøgeungen 500
Teil 373
Stouenberg 360
vnc 360
pmbruun 341
10  mccracken 320
Servlet, RMI UnmarshallExeption
Fra : Thomas Valsted


Dato : 05-08-02 10:48

Hej

Jeg har et problem med en Servlet som via RMI kontakter en java applikation
kørende på en anden maskine. Hvis koden køres i en servlet opstår fejlen,
mens hvis den køres som almindelig applikation kan det fint køre. Servletten
køres i en Tomcat 4.1. Der benyttes JDK 1.3.1.

Udsnit af koden:

// FORBINDELSE TIL REMOTE OBJEKT remoteDiasNet1 oprettet
// get the file PeterPan.pdf from the user test:
PatientData patientData = remoteDiasNet1.loadPatientData("PeterPan.pdf",
"");
System.out.println("patientdata er hentet");

System.out.println("before guiData");
// insert patientdata in model
GuiData guiData = remoteDiasNet1.insertPatientData(new PatientData());

System.out.println("after guiData");

}
catch( Exception ex ) {
System.out.println("before getmsg");
System.out.println(ex.getMessage());
ex.printStackTrace();
}

Følgende fejl opstår under kørsel i servletten:

patientdata er hentet
before guiData
before getmsg
RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested
excep
tion is:
java.io.IOException: Malformed URL: file:C:/Programmer/Apache
Group/Tomc
at 4.1/webapps/examples/WEB-INF/classes
java.rmi.ServerException: RemoteException occurred in server thread; nested
exce
ption is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested
excep
tion is:
java.io.IOException: Malformed URL: file:C:/Programmer/Apache
Group/Tomc
at 4.1/webapps/examples/WEB-INF/classes
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.java:247)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at dias2000.server.ClientHandlerImpl_Stub.insertPatientData(Unknown
Sour
ce)
at MobileDiasServlet.controller(MobileDiasServlet.java:114)
at MobileDiasServlet.doPost(MobileDiasServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationF
ilterChain.java:197)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilt
erChain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:172)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationF
ilterChain.java:197)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilt
erChain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:172)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:471)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2350)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
3)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:508)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:533)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments;
nested ex
ception is:
java.io.IOException: Malformed URL: file:C:/Programmer/Apache
Group/Tomc
at 4.1/webapps/examples/WEB-INF/classes
Caused by: java.io.IOException: Malformed URL: file:C:/Programmer/Apache
Group/T
omcat 4.1/webapps/examples/WEB-INF/classes


På forhånd tak

Mvh Thomas








 
 
Morten (05-08-2002)
Kommentar
Fra : Morten


Dato : 05-08-02 14:28

Thomas Valsted wrote:

> Caused by: java.io.IOException: Malformed URL: file:C:/Programmer/Apache

Hvor kommer den URL fra? PatientData? Prøv file:///C:/Programmer/Apache
(tror jeg, ikke sikker på om det er /C:/ eller /C/).

Mvh Morten



Søg
Reklame
Statistik
Spørgsmål : 177559
Tips : 31968
Nyheder : 719565
Indlæg : 6408937
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste