我在执行一些依赖于生成的xmlbeans类的代码时遇到了RuntimeException.我无法弄清楚这是不是:
xbean.jar版本在构建和执行环境中是相同的.有人见过这个或有任何想法吗?
谢谢.
...snip...
Caused by: java.lang.RuntimeException: Could not instantiate SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is the version of xbean.jar correct?
at schemaorg_apache_xmlbeans.system.s2B8331230CBD98F4933B0B025B6BF726.TypeSystemHolder.loadTypeSystem(Unknown Source)
at schemaorg_apache_xmlbeans.system.s2B8331230CBD98F4933B0B025B6BF726.TypeSystemHolder.(Unknown Source)
... 38 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
... 40 more
Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS compiled schema: Could not locate compiled schema resource schemaorg_apache_xmlbeans/system/s2B8331230CBD98F4933B0B025B6BF726/index.xsb (schemaorg_apache_xmlbeans.system.s2B8331230CBD98F4933B0B025B6BF726.index) - code 0
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.(SchemaTypeSystemImpl.java:1504)
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTypeSystemImpl.java:260)
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.(SchemaTypeSystemImpl.java:183)
... 44 more
...snip...
我以前从未使用过该库,但我可以猜测发生了什么。有了这个预选赛(即,我只是编造出来的,但已经过去了 7 个小时,没有其他人编造出任何东西)......
说明显而易见的事情:某些内容已在某处编译并且无法加载。我认为 jar 文件中没有这个东西;我猜这是您的资源之一,已被编译/缓存到某个位置。
我猜想:
您在编译和加载/运行之间是否更改了某些内容(例如架构版本?)?
您可以删除已编译的版本并重新编译然后尝试重新加载吗?
你能在文件系统中找到编译后的版本吗?
为此,您可以尝试
grep "s2B8331230CBD98F4933B0B025B6BF726" `查找。`
来自一些合适的目录。
您能否对导致编译和运行时环境出现问题的类/资源执行 md5?他们匹配吗?
希望其中有帮助或引发一个想法。
| 归档时间: |
|
| 查看次数: |
10911 次 |
| 最近记录: |