Posted by
Olivier Thery on
Apr 22, 2011; 3:12pm
URL: https://discuss.orbeon.com/Orbeon-3-9-NullPointerException-with-websphere-6-1-tp3445071p3468139.html
Hi Erik,
I have investigated this problem and I have solved the NPE due to Deflater.
I attache a TestDeflater web application to explain the solution (see TestDeflater.zip and TestDeflater-Source.zip)
IBM JVM doesn't work like SUN JVM, especially about Deflater which has native functions.
The exception was throwned only with IBM JVM during the call of Deflater.reset() because strm ==0
***********************************
private void ensureOpen() {
if (strm == 0)
throw new NullPointerException ();
}
***********************************
The solution was to modify XFormsCompressor.scala by moving the call of Deflater.reset() in activateObject or passivateObject which reinitialize or unitialize the Deflater Object to be returned to or by the pool.
I don't know why but it works like that !
This solution implemented in TestDeflater works fine with Websphere 6.1 + IBM JVM and Tomcat 6 + Sun JVM.
I have also tested this solution with orbeon 3.9. There is no more NPE due to Deflater.reset(). The application is launched and I can display each form.
BUT, I have got now an "org.orbeon.oxf.common.OXFException: Session has expired. Unable to process incoming request." each time I click in a form (see orbeon.log)
Do you think that my "solution" is the cause of this new problem ?
Thanks.
TestDeflater-Source.ziporbeon.logTestDeflater.zipNB : TestDeflater file was to big, so I have deleted scala-library-2.8.1.jar and saxon-9-1-0-8_orbeon_20110215.jar from the lib directory, but you can add them from an orbeon distribution.