开发者

JRockit vs HotSpot classloading issue - META-INF/services

According to the javadoc of javax.xml.validation.SchemaFactory#newInstance, I can specify which implementation of SchemaFactory I want, by placing a file in META-INF/services called javax.xml.validation.SchemaFactory with the required class (in my case org.apache.xerces.jaxp.validation.XMLSchemaFactory).

This works fine when I run Weblogic using the HotSpot JVM, but when using the JRockit JVM, it doesn't find anything in the META-INF/services directory (I've stepped through the code on the server and i开发者_JAVA技巧n javax.xml.validation.SchemaFactoryFinder#createServiceFileIterator, the Enumeration returns empty for JRockit but the correct resouce for HotSpot). I think it might be because it is using a different classloader.

Any suggestions?


In the end I worked around this problem by setting -Djavax.xml.validation.SchemaFactory=org.apache.xerces.jaxp.validation.XMLSchemaFactory in the weblogic startup script

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜