Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 51565 invoked from network); 7 Apr 2005 08:19:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Apr 2005 08:19:55 -0000 Received: (qmail 91947 invoked by uid 500); 7 Apr 2005 08:19:39 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 91911 invoked by uid 500); 7 Apr 2005 08:19:38 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 91887 invoked by uid 99); 7 Apr 2005 08:19:38 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from 129.Red-81-47-236.pooles.rima-tde.net (HELO tb-solutions.com) (81.47.236.129) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 07 Apr 2005 01:19:37 -0700 Received: from zazjimeneja [10.50.2.102] by tb-solutions.com with ESMTP (SMTPD32-8.05) id AD05BC50026; Thu, 07 Apr 2005 10:19:17 +0200 From: "Javier Jimenez" To: Subject: REPOST: Possible bug in Axis, Tomcat or JVM Date: Thu, 7 Apr 2005 10:19:14 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AcU1/zxnK6eiRW1gSkGVd9H+FKH6lQFSw7AQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-Id: <200504071019637.SM01672@zazjimeneja> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Anyone could help me? Thanks in advance -----Mensaje original----- De: Javier Jimenez [mailto:jimeneja@tb-solutions.com] Enviado el: jueves, 31 de marzo de 2005 16:38 Para: 'axis-dev@ws.apache.org' 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.(SOAPPart.java:151) at org.apache.axis.Message.setup(Message.java:366) at org.apache.axis.Message.(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.