Frank ---

It sounds like WSAD might be loading some of the classes itself while
the EAR classloader is loading other classes.  Can you please include
the line:

  boolean environmentOK = (new
EnvironmentCheck()).checkEnvironment(yourPrintWriter);

in com.eFunds.portal.api.XSL.newTransformer right before the

  return tf.newTransformer(...)

call and let us know what the checkEnvironment call shows.

Gary

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 19, 2002 7:30 AM
> To: [EMAIL PROTECTED]
> Subject: RE: clues about classLoader problems
> 
> 
> 
> 
> IBM WebSphere Application Server, Release 4.0.1
> Advanced Single Server Edition for Multiplatforms
> 
> I want to use the 'application' classLoader mode, so that the 
> webModule and the EJB module can share class instances.
> 
> However, I my quest for a solution, I have tried the 'server' 
> and 'module' modes too, to no avail.
> 
> I have even got rid of my utility jar file, and moved all the 
> utility classes to my EJB module. Didn't fix anything.
> 
> It might be relevant to know that I have 2 EJB modules, who 
> both call the same utility code, but only one of them is failing.
> 
> However, the one that runs OK is using
> 
> javax.xml.transform.TransformerFactory
> tf=javax.xml.transform.TransformerFactory.newInstance();
> return tf.newTransformer();
> 
> instead of
> 
> javax.xml.transform.TransformerFactory
> tf=javax.xml.transform.TransformerFactory.newInstance();
> return tf.newTransformer(new
> javax.xml.transform.stream.StreamSource(iSource) );
> 
> // where iSource is a java.lang.String
> 
> (I use empty transformers to serialize my DOM Documents)
> 
> Hope this help you help me :-)
> 
> Thanks
> 
> 
> 
> 
> 
> 
> 
> 
> "Gary L Peskin" <[EMAIL PROTECTED]> on 19/02/2002 15:15:35
> 
> To:   <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> cc:
> 
> Subject:  RE: clues about classLoader problems
> 
> 
> Frank --
> 
> When you say that you're running this inside WSAD, I presume 
> you mean that you're using the WebSphere 4.0 Test Environment 
> (WTE) within WSAD. Is this correct?
> 
> If so, what is the version of WAS that you are using for the 
> WTE?  It should appear on the console view right after 
> starting your WTE and it should look like:
> 
> *** Starting the server ***
> IBM WebSphere Application Server, Release 4.0.2
> Advanced Single Server Edition for Multiplatforms
> 
> Assuming that is the case, what classloader mode are you 
> using?  To determine that, open your Server Configuration and 
> look at the "Module Visibility" combo box.  It should read 
> "APPLICATION".
> 
> Please let us know about these settings.
> 
> Gary
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 19, 2002 2:11 AM
> > To: [EMAIL PROTECTED]
> > Subject: clues about classLoader problems
> >
> >
> > Hello there.
> >
> > I am in the process of moving an application developped on
> > the beta version of Websphere Studio Application Developper
> > to the new release version.
> >
> > My application makes heavy use of Xalan 2.1.0  and xerces
> > 1.4.3, used to work fine in the beta version of WSAD, but
> > doesn't in the release version.
> >
> > The failure occurs when I use the TransformerFactory to get a
> > Transformer. Depending on the tweaking I perform on WSAD
> > myriad of settings, I get either :
> >
> > java.lang.ClassCastException:
> > org.apache.xalan.processor.TransformerFactoryImpl
> >      at
> > javax.xml.transform.TransformerFactory.newInstance(Transformer
> > Factory.java:148)
> >      at com.eFunds.portal.api.XSL.newTransformer(XSL.java:106)
> >      at com.eFunds.portal.logic.Style.<init>(Style.java:25)
> >      at
> > com.eFunds.portal.logic.ServiceImpl.getResultAsNode(ServiceImp
> > l.java:261)
> >      at
> > com.eFunds.portal.logic.SubscriberImpl.pollServices(Subscriber
> > Impl.java:190)
> >      at
> > com.eFunds.portal.logic.HomePage.generateNewDOM(HomePage.java:195)
> >      at
> > com.eFunds.portal.web.AdvancedPortalServlet.doGet(AdvancedPort
> > alServlet.java:46)
> >
> > or
> >
> > java.lang.LinkageError :
> > org/apache/xalan/processor/TransformerFactoryImpl violates
> > loader constraints
> >     at
> > org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
> > Handler(TransformerFactoryImpl.java:451)
> >     at
> > org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
> > (TransformerFactoryImpl.java:762)
> >     at
> > org.apache.xalan.processor.TransformerFactoryImpl.newTransform
> > er(TransformerFactoryImpl.java:687)
> >     at com.eFunds.portal.api.XSL.newTransformer(XSL.java:108)
> >     at com.eFunds.portal.logic.Style.<init>(Style.java:25)
> >     at
> > com.eFunds.portal.logic.ServiceImpl.getResultAsNode(ServiceImp
> > l.java:261)
> >     at
> > com.eFunds.portal.logic.SubscriberImpl.pollServices(Subscriber
> > Impl.java:190)
> >     at
> > com.eFunds.portal.logic.HomePage.generateNewDOM(HomePage.java:195)
> >     at com.eFunds.portal.web.AdvancedPortalServlet.doGet
> >
> > Now the second one points to a ClassLoader problem of some
> > sort, probably due because WSAD uses XML code to load J2EE modules.
> >
> > Guys on the WSAD user list also said that
> > java.lang.LinkageError could be due to Xalan/xerces using
> > JINI, but I really don't think that's the case.
> >
> > Unless there is a genius among you, I doubt you can give me a
> > straight answer to my problem, but I would really appreciate
> > any ideas/clues you could provide me on how to investigate
> > this problem.
> >
> > Thanks.
> >
> > PS : Here is a bit more data.
> >
> > 1) read
> > http://www7b.boulder.ibm.com/wsdd/library/techarticles/0112_de
> boer/deboer.html to know about J2EE and websphere classLoaders.
> 2) both my WEB module and my EJB module access Xalan/Xerces through
> utility classes (com.eFunds.portal.api.XSL) that are contained in a
>     jar file that is in the root of the EAR.  xalan.jar and xerces.jar
> are also in the root of the EAR.
> 
> 
> 
> 
> 
> 
> 

Reply via email to