xml| solve the problem in the program there is a need to manipulate XML where I personally prefer to use Xmlbean. For this reason, I have a xmlbean project in my Eclipse project list for a long time to generate Schema.jar (Xmlbean). But today, after I deployed my locally tested Xmlbean to a weblogic on a server, I hung up the JVM when I called the Xmlbean ... Log:
An unexpected exception has been detected in native code outside the VM.unexpected signal:exception_access_violation (0xc0000005) occurred at pc=0x0Function=[unknown.]library= (n/a)Note:we are unable to locate the function name symbol for the errorjust occurred. Please refer to release documentation for possiblereason and solutions.Current Java Thread:At Java.lang.Class.getClassLoader0 (Native method)At Java.lang.Class.getClassLoader (class.java:516)At com.xx.xx.xx.xx.xx.configitemsdocument.<clinit> (Unknown Source) //... omit several lines hereDynamic Libraries:0x00400000-0x0040b000 C:\bea\jdk142~1\bin\java.exe0x7c930000-0x7ca00000 C:\WINDOWS\system32\ntdll.dll0x7c800000-0x7c92b000 C:\WINDOWS\system32\kernel32.dll //... There are a few more lines here, all about DLLs .Heap at VM Abort:Heapdef New Generation total 36352K, used 2274K [0x10010000, 0x12780000, 0x14ed0000)Eden Space 32320K, 7% used [0x10010000, 0x10248b08, 0x11fa0000)from Space 4032K, 0% used [0x12390000, 0x12390000, 0x12780000)to Space 4032K, 0% used [0x11fa0000, 0x11fa0000, 0x12390000)tenured generation total 483968K, used 88225K [0x14ed0000, 0x32770000, 0x50010000]the space 483968K, 18% used [0x14ed0000, 0x1a4f8468, 0x1a4f8600, 0x32770000)Compacting Perm Gen Total 45312K, used 45258K [0x50010000, 0x52c50000, 0x60010000]the space 45312K, 99% used [0x50010000, 0x52c42a60, 0X52C42C00, 0x52c50000)local time = Tue 14:10:28 2007Elapsed time =## The exception above is detected in native code outside the VM## Java Vm:java HotSpot (TM) Client VM (1.4.2_05-b04 mixed mode)# |
after deliberation, the discovery might be that the JDK(I used jdk1.5) When compiling the Xmlbean and the Weblogic version I deployed to are different. Modify my Xmlbean project configuration items immediately : 1 Modify the version of the reference JDK to match the target environment. As shown in figure: 2 Modify the ant script that generates Xmlbean :
<?xml version= "1.0" encoding= "UTF-8"?><project name= "Xmlbean" default= "Build_all_schemas" basedir= "." ><taskdef name= "Xmlbean" classname= "Org.apache.xmlbeans.impl.tool.XMLBean"/><target name= "Build_all_schemas" ><xmlbean schema= "schemas" destfile= "Dist/schemaswapcfg.jar" classgendir= "Build" srcgendir= "src" J Avasource= "1.4" /></target></project> |
Note:javasource= "1.4", consistent with the reference JDK version. Recompile , and then redeploy the test. ok! -end-