您的位置:首页 > 服装鞋帽 > 女装 > 主流web容器(jettytomcatjboss)的classloader机制对比和相关问题分析

主流web容器(jettytomcatjboss)的classloader机制对比和相关问题分析

luyued 发布于 2011-06-29 04:16   浏览 N 次  

问题1: (jar sealed问题)

Java代码
  1. Caused by: java.lang.SecurityException: sealing violation: package com.sun.media.jai.util is sealed
  2. at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
  3. at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
  4. at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
  5. at java.security.AccessController.doPrivileged(Native Method)
  6. at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
  7. at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:419)
  8. at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:381)
  9. at java.lang.ClassLoader.defineClass1(Native Method)
  10. at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)

说明: jboss容器运行正常 , jetty容器运行出错

问题2: (xml解析)

Java代码
  1. Caused by: java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/parsers/SAXParserFactory;

说明: jetty容器运行正常 , tomcat容器运行正常,jboss容器运行异常

问题3: (xml解析)

Java代码
  1. java.lang.reflect.InvocationTargetException
  2. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  3. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  4. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  5. at java.lang.reflect.Method.invoke(Method.java:597)
  6. at org.eclipse.jetty.start.Main.invokeMain(Main.java:490)
  7. at org.eclipse.jetty.start.Main.start(Main.java:634)
  8. at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:280)
  9. at org.eclipse.jetty.start.Main.main(Main.java:82)
  10. Caused by: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFa
图文资讯
广告赞助商