Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Xalan in repository/usr Causes Problems
Xalan in repository/usr Causes Problems [message #667604] Fri, 29 April 2011 21:20 Go to next message
Aaron  is currently offline Aaron Friend
Messages: 21
Registered: February 2011
Junior Member
I have a bundle that depends on Xalan 2.7.0 from the Springsource EBR. Once I add that jar to repository/usr to make it available to my bundle and restart Virgo, I get the following error when trying to load the virgo splash and admin apps in the web browser:

javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
	javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:108)
	org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter.<init>(AbstractXmlHttpMessageConverter.java:47)
	org.springframework.http.converter.xml.SourceHttpMessageConverter.<init>(SourceHttpMessageConverter.java:45)
	org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.<init>(AnnotationMethodHandlerAdapter.java:197)
	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
	org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:286)
	org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:682)
	org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:651)
	org.springframework.web.servlet.DispatcherServlet.initHandlerAdapters(DispatcherServlet.java:482)
	org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:340)
	org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:328)
	org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:523)
	org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:749)
	org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1)
	org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:51)
	org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97)
	org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68)
	org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
	org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
	org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
	javax.servlet.GenericServlet.init(GenericServlet.java:212)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	org.eclipse.virgo.web.tomcat.ApplicationNameTrackingValve.invoke(ApplicationNameTrackingValve.java:29)
	org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	java.lang.Thread.run(Thread.java:680)

I'm not sure where to go from here. Is there some other way to make Xalan available without adding the jar to repository/usr?

Thanks,
Aaron

[Updated on: Fri, 29 April 2011 21:20]

Report message to a moderator

Re: Xalan in repository/usr Causes Problems [message #667652 is a reply to message #667604] Sat, 30 April 2011 16:25 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
XML libraries are tricky. You might want to try adding xalan to the /lib and making sure that xalan packages are boot delegated.

What is the library that depends on xalan?
Re: Xalan in repository/usr Causes Problems [message #667878 is a reply to message #667652] Mon, 02 May 2011 15:03 Go to previous messageGo to next message
Aaron  is currently offline Aaron Friend
Messages: 21
Registered: February 2011
Junior Member
Hi Dmitry,

The dependencies look like this:

com.springsource.org.apache.ws.security : 1.5.8
|_com.springsource.org.apache.xml.security : 1.0.5.D2
|__ com.springsource.org.apache.xalan : 2.7.0
|_com.springsource.org.apache.xalan : 2.7.0

Thanks,
Aaron

[Updated on: Mon, 02 May 2011 15:05]

Report message to a moderator

Re: Xalan in repository/usr Causes Problems [message #667892 is a reply to message #667878] Mon, 02 May 2011 15:54 Go to previous messageGo to next message
Aaron  is currently offline Aaron Friend
Messages: 21
Registered: February 2011
Junior Member
I tried adding Xalan to Virgo's lib directory and adding Xalan's packages to the org.osgi.framework.bootdelegation property in lib/java6-server.profile. When I do that, Virgo starts up fine and I can use the admin web app, but I still can't install my bundle that uses Xalan. I get this error:

Caused by: org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'gov.noaa.nws.iris.OasisCapServiceImpl' at version '0.0.1': Cannot resolve: gov.noaa.nws.iris.OasisCapServiceImpl
    Resolver report:
        An Import-Package could not be resolved. Caused by missing constraint in bundle <gov.noaa.nws.iris.OasisCapServiceImpl_0.0.1>
             constraint: <Import-Package: org.springframework.ws.soap.security.wss4j; version="0.0.0">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.apache.axis_1.4.0>
             constraint: <Import-Package: com.ibm.wsdl.extensions.soap; version="[1.6.1,2.0.0)">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.opensaml_1.1.0>
             constraint: <Import-Package: org.apache.xml.security; version="[1.0.5.D2,2.0.0)">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.apache.ws.security_1.5.8>
             constraint: <Import-Package: org.apache.axis; version="[1.4.0,2.0.0)">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.springframework.ws.soap.security_2.0.0.RELEASE>
             constraint: <Import-Package: com.sun.xml.wss; version="0.0.0">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.apache.xml.security_1.0.5.D2>
             constraint: <Import-Package: org.apache.xml.dtm; version="[2.7.0,3.0.0)">


Don't put too much into that information, though, because there are a couple things I'm unsure about:

First, when I added Xalan's packages to org.osgi.framework.bootdelegation, I did it like this:

org.osgi.framework.bootdelegation = \
 org.apache.xalan.*,\
 org.apache.xml.*,\
 org.apache.xpath.*,\


Of course, there are many sub-packages inside the ones listed... I'm not sure if '.*' recursively includes these sub-packages or not. Do I need to list them explicitly?

Second, my understanding is that when you boot delegate packages, they shouldn't be imported by any bundels. As you can see in the error above, some Xalan packages are being imported by other third party bundles (com.springsource.org.apache.xml.security) that I have no control over.

I may be way off base with those last two thoughts. This is all new to me. Thanks a lot for the advice.

Aaron
Re: Xalan in repository/usr Causes Problems [message #668026 is a reply to message #667892] Tue, 03 May 2011 12:43 Go to previous message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
Yes this seems like a cluster....

only other option (without actually testing it personally) that I can think of is to use org.osgi.framework.system.packages vs. boot delegation.

The problem there is that ALL packages must be listed vs. using wild card (*).


Previous Topic:Can't import standard Java package
Next Topic:Virgo survey results
Goto Forum:
  


Current Time: Sat Dec 07 03:20:09 GMT 2024

Powered by FUDForum. Page generated in 0.04718 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top