java.rmi.RemoteException: Erreur de transport HTTP : java.lang.NullPointerException; nested exception is: Erreur de transport HTTP : java.lang.NullPointerException cnrps.TestCNRPSIF_Stub.exist(TestCNRPSIF_Stub.java:87) org.apache.jsp.invoqueWS_jsp._jspService(invoqueWS_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:268) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:258) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:205) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
the method exist get the identier of a pesron, connect to a database and verify if he exists.
but i think th problem is not there, cause i tried the exempl on a dos prompt with a client class having the same code and it worked fine.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32767
posted
0
I think the problem is there, because that's where the exception is thrown Check that none of the objects used or referenced in that line are null. If any are, let us know which ones those are, and how they are created; that might help discover the problem. [ September 06, 2005: Message edited by: Ulf Dittmer ]
[ September 06, 2005: Message edited by: mohamed sellami ] [ September 07, 2005: Message edited by: mohamed sellami ]
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32767
posted
0
That's not the class that's throwing the exception - TestCNRPSIF_Stub throws it. You need to analyze what's happening with null objects in line 87 of that class.
mohamed sellami
Greenhorn
Joined: Jul 22, 2005
Posts: 9
posted
0
yes the exception is thrown by the TestCNRPSIF_Stub class!!!
it was a typing error, i edited the message, thx
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32767
posted
0
In that case you need to figure out where the JAXRPCException is thrown, which is caught by the catch clause.
mohamed sellami
Greenhorn
Joined: Jul 22, 2005
Posts: 9
posted
0
yeah that's right but the code inside the "TestCNRPSIF_Stub" class is very complex
but what makes me crazy is that it works using a simple class but not with a jsp page??
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32767
posted
0
If the JSP page is on a different machine it could be a network issue. If it's on the same machine as your other client class, maybe it's missing libraries in the classpath. But why speculate? The exception has a stack trace which will tell you which line causes the problem. That should be your first line of inquiry.
mohamed sellami
Greenhorn
Joined: Jul 22, 2005
Posts: 9
posted
0
Hi Ulf i found the fault it was in line 12 of the jsp:
i replaced System.getProperty("endpoint") with "http://localhost:8080/jaxrpc-TestCNRPS/TestCNRPS"
System.getProperty("endpoint") returned null but in the java class i maked for the test it returned "http://localhost:8080/jaxrpc-TestCNRPS/TestCNRPS"
anyway it's working fine now
thank you Ulf [ September 07, 2005: Message edited by: mohamed sellami ]