Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326118

Summary: BIRT/OSGi corrupts contextclassloaders in WebSphere 6.1 : SSL doesn't work anymore
Product: z_Archived Reporter: Robert Aust <robert.aust>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: RESOLVED NOT_ECLIPSE QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, robert.aust
Version: 2.5.2   
Target Milestone: 3.7.0   
Hardware: Sun   
OS: Linux   
Whiteboard: Obsolete

Description Robert Aust CLA 2010-09-24 02:46:18 EDT
Build Identifier: BIRT Runtime 2.5.2



Reproducible: Always

Steps to Reproduce:
1. BIRT-Runtime 2.5.2 integrated in WebSphere 6.1. WebbApp
2. InitServlet or ContextListener in WebApp starts BIRT-Engine
   [Runtime is residing/referenced somewhere outside in the filesystem]
3. Background-Threads in WebApp for LongOps [also:Quartz-Jobs] can't 
  find the WebSphere SSL-Implementation anymore, since the Thread ContextClassloaders have been modified by BIRT/OSGi.
  This leads to "MalformedURLExceptions" when opening a https-address, since 
  SSL is not handled anymore.
4. Normal [User-] Threads CAN use SSL - It's only the background threads
  can fail.
Comment 1 Robert Aust CLA 2010-09-24 02:54:22 EDT
Original Mail to Birt-Forums :
--------------------------------------------------------------------------------

Hi,

I've been working on this problems since a couple of days..
The scenario is this:

BIRT 2.5.2 integrated in a WebApp i.e. a InitServerlt starting up the Engine [referencing the runtime somewhere in the filesystem].
So BIRT [all necessary classes/libraries] is included with the WEB-APP in the ear-File.

This is then deployed to WebSphere 6.1
First I head PARENT_LAST - but after I fixed some classpath-issues concerning XML und logging etc. PARENT_FIRST [standard] worked also,
meaning BIRT starts up produces a test-report.

BUT - in my application I also use a background-thread for some long-ops
and in this operations HTTPS-access to a WebService fails with
"MalformedURLException" in "java.net.URL", since it abviously cannot find the SSL-Implementation [of WebSphere] anymore and thererfor cannot
handle "https"..

I've tried several variations of Thread.setContextClassloader in the code, where the background-Thread is started, but no success.
The same problem appears with the scheduler quartz, although I use a config-property to use the TheadContextClassloader.

Does anyboy has an idea, what happens to the [Context-] Clasloaders when BIRT ist started inside a WebSphere WebApp?
And how I possibly could get SSL to work?

The SSL-implementation is com.ibm.websphere.ssl.protocol.SSLSocketFactory
and the CodeSource is a OSGi-Plugin of WebSphere itself :

ProtectionDomain (file:/opt/WebSphere/AppServer-6.1/plugins/com.ibm.ws.security.crypto_6.1.0.jar <no signer certificates>)
 null
 <no principals>
org.eclipse.osgi.framework.internal.core.BundleCombinedPermissions@70007000 (
)

Is there a way to use this plugin/library also in the BIRT-OSGi, so that it will be availibe to the application AFTER BIRT ist started?

Thanks a lot!
Robert

-------------------------------------------------------------------------------
Comment 2 Robert Aust CLA 2010-09-24 02:57:20 EDT
In the forum, I was asked to open this buzilla-entry for it.
So that's done.

In the meantime, I have found this:
IY99957: CONNECTIONEXCEPTION EXCEPTIONS OCCUR WHEN THE WEBSPHERE SERVICE REGISTRY PLUG-IN ATTEMPTS TO MAKE SECURE CONNECTION TO WSRR SERV
=> http://www-01.ibm.com/support/docview.wss?uid=swg1IY99957

That pretty much looks like my problem - and there seems to be a workaround, 
I will give that a try.
Comment 3 Xiaoying Gu CLA 2010-11-01 23:03:39 EDT
Set as NOT_ECLIPSE based on comment #2.