It seems the reason for this is because we have the xercesImpl.jar in the
CARBON_HOME/lib/endorsed directory. The endorsed JARs are placed here. So,
you could simply use that, without including the saxon.jar in the the AAR
file, or you could try deleting the xercesImpl.jar from that endorsed
directory and placing your saxon.jar there.

Azeez

On Thu, Dec 23, 2010 at 6:40 PM, Brad Cox <[email protected]> wrote:

> I've got a class loading problem I hope someone here can help with.
>
> The symptom is that Saxon 8.9 (which I compile from sources so I know
> its in my .aar) was unable to find an extension function (LdapQuery)
> in the same .aar. I hacked around this by setting Saxon's classloader
> manually (to LdapQuery.class.getClassLoader()). That worked for
> awhile, then another problem mysteriously turned up where
> javax.xml.parsers.SAXParserFactory is unable to reference some method
> in its implementation class. Sorry; can't provide the exact name. This
> problem only turned up on WindowsXP (at work) and can't be reproduced
> under MacOSX (where I am now), so I can't provide the exact path.
>
> Possibly involved here.... the Saxon set-up occurs during the service
> init() which builds compiled instances that are used during method
> execution. Does init() and exec() use the same class loaders or what?
>
> My understanding is still very poor. But as an experiment I just tried
> putting this in services.xml
> <parameter name="EnableChildFirstClassLoading">true</parameter>
>
> That failed as shown below. PdpSamlServiceMessageReceiverInOut is
> generated by the WSO2 wsdl to java tool as  public class
> PdpSamlServiceMessageReceiverInOut extends
> org.apache.axis2.receivers.AbstractInOutMessageReceiver, which I
> assume (don't have source handy) implements
> org.apache.axis2.engine.MessageReceiver. So I'm assuming this is
> another class loader issue.
>
> Error: org.apache.axis2.deployment.DeploymentException:
> com.technica.www.PdpSamlServiceMessageReceiverInOut cannot be cast to
> org.apache.axis2.engine.MessageReceiver at
>
> org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:150)
> at
> org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81)
> at
> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:810)
> at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:390)
> at
> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
> at
> org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:384)
> at
> org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64)
> at
> org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71)
> at
> org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:90)
> at java.util.TimerThread.mainLoop(Timer.java:512) at
> java.util.TimerThread.run(Timer.java:462) Caused by:
> java.lang.ClassCastException:
> com.technica.www.PdpSamlServiceMessageReceiverInOut cannot be cast to
> org.apache.axis2.engine.MessageReceiver at
>
> org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:192)
> at
> org.apache.axis2.deployment.DescriptionBuilder.processMessageReceivers(DescriptionBuilder.java:171)
> at
> org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:278)
> at
> org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101)
> at
> org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109)
> at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:143)
> ... 12 more
>
> Can someone explain what's happening here? What tools do you use to
> resolve such problems? Should I stick with childFirst?
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>



-- 
*Afkham Azeez*
Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
*
*
*Member; Apache Software Foundation;
**http://www.apache.org/*<http://www.apache.org/>
*
email: **[email protected]* <[email protected]>* cell: +94 77 3320919
blog: **http://blog.afkham.org* <http://blog.afkham.org>*
twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
_______________________________________________
Carbon-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to