Anyone could help me? Thanks in advance
-----Mensaje original----- De: Javier Jimenez [mailto:[EMAIL PROTECTED] Enviado el: jueves, 31 de marzo de 2005 16:38 Para: '[email protected]' Asunto: Possible bug in Axis, Tomcat or JVM Hello, An incidence using axis is happening. We have 4 web applications. 3 of them (Appl1 on http, Appl2 on https, Appl3 on https) share the same Tomcat 5.0.28 and the last one (Appl4) is in other Tomcat 5.0.28 on http. All of then have Axis1.2RC1. The JVM version is 1.4.2_06-b03 (the same result with 1.4.2_05-b04). The same error happens with AxisRC2 and AxisRC3. The OS is SuSE8.1 (the same error in Windows). - Appl1 is calling a web-service located in Appl2 using Axis. - Appl2 receives petitions from Appl1, and are calling a web-service located in Appl4 - Appl3 is calling a web-service located in Appl4 Then, there are differents web-service request: a) Appl1 to Appl2 b) Appl2 to Appl4 c) Appl3 to Appl4 Every request runs properly when this request is executed in first place. So a), b) or c) runs properly when the request is the first instance of axis after start up Tomcat. Nevertheless, an exception is thrown with different execution sequences: - First b) y second a). In Appl1 we can see the next exception: java.lang.NullPointerException at java.security.SecureRandom.nextBytes(SecureRandom.java:381) at org.apache.axis.utils.SessionUtils.generateSessionId(SessionUtils.java:62) at org.apache.axis.SOAPPart.<init>(SOAPPart.java:151) at org.apache.axis.Message.setup(Message.java:366) at org.apache.axis.Message.<init>(Message.java:243) at org.apache.axis.client.Call.invoke(Call.java:2378) at org.apache.axis.client.Call.invoke(Call.java:2319) at org.apache.axis.client.Call.invoke(Call.java:2344) at es.red.spt.sim.org.AccesoWS.invoke(AccesoWS.java:574) at es.red.spt.sim.org.AccesoWS.pago60_1_2(AccesoWS.java:238) at es.red.spt.sim.org.SimuladorOrgServlet.execute(SimuladorOrgServlet.java:133) at es.red.spt.sim.org.SimuladorOrgServlet.doPost(SimuladorOrgServlet.java:59) 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(Application FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:536) After this exception, in the applications that had not got an instance of sessionID, get the same exception when axis is invoked. - 1st b) y 2nd a), both run properly, 3rd c) fails, getting the related exception. - 1st c) run properly, 2nd a) fails and 3rd b) runs properly We can avoid the exception by modifying the class org.apache.axis.utils.SessionUtils in axis.jar in the method where session is generated: private static synchronized Random getRandom() { if (random == null) { try { Class clazz = Class.forName(randomClass); random = (Random) clazz.newInstance(); } catch (Exception e) { random = new java.util.Random(); } return (random); } , is changed by private static synchronized Random getRandom() { if (random == null) { try { random = java.security.SecureRandom.getInstance("SHA1PRNG", "SUN"); } catch (Exception e) { random = new java.util.Random(); } return (random); } In this case the exception does not happen, but then happen another kind of exception, than I can explain if is necessary. The cause of exception could be a bug in Axis, Tomcat or JVM. Could you help me? If more information is required, please, ask me for more data. Thanks in advance your help is much appreciated.
