2013-10-03 36 views
5

在Weblogic中部署應用程序時出現此錯誤。在WLS中部署應用程序時發生java.lang.ArrayIndexOutOfBoundsException 12

<Oct 3, 2013 12:18:00 PM IST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application "MyApp" due to error java.lang.ArrayIndexOutOfBoundsException: 4818 
8 
java.lang.ArrayIndexOutOfBoundsException: 48188 
     at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source) 
     at com.bea.objectweb.asm.ClassReader.accept(Unknown Source) 
     at com.bea.objectweb.asm.ClassReader.accept(Unknown Source) 
     at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45) 
     at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145) 
     Truncated. see log file for complete stacktrace 
Caused By: java.lang.ArrayIndexOutOfBoundsException: 48188 
     at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source) 
     at com.bea.objectweb.asm.ClassReader.accept(Unknown Source) 
     at com.bea.objectweb.asm.ClassReader.accept(Unknown Source) 
     at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45) 
     at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145) 
     Truncated. see log file for complete stacktrace 
> 

據我所知,這是因爲一個類沒有正確加載,但我怎麼找到它? 我正在使用熱點1.7,並使用-verbose:類我無法弄清楚錯誤加載的類。

以下是啓用詳細類加載的列表。

[Loaded com.bea.objectweb.asm.FieldVisitor from file:/C:/Oracle/Middleware/modules/com.bea.core.repackaged.asm_1.2.0.0_3-2-0.jar] 
[Loaded com.bea.objectweb.asm.MethodVisitor from file:/C:/Oracle/Middleware/modules/com.bea.core.repackaged.asm_1.2.0.0_3-2-0.jar] 
[Loaded com.bea.objectweb.asm.AnnotationVisitor from file:/C:/Oracle/Middleware/modules/com.bea.core.repackaged.asm_1.2.0.0_3-2-0.jar] 
[Loaded com.bea.objectweb.asm.commons.EmptyVisitor from file:/C:/Oracle/Middleware/modules/com.bea.core.repackaged.asm.commons_1.2.0.0_3-2-0.jar] 
[Loaded com.bea.objectweb.asm.ClassReader from file:/C:/Oracle/Middleware/modules/com.bea.core.repackaged.asm_1.2.0.0_3-2-0.jar] 
[Loaded com.bea.objectweb.asm.Attribute from file:/C:/Oracle/Middleware/modules/com.bea.core.repackaged.asm_1.2.0.0_3-2-0.jar] 
[Loaded com.bea.objectweb.asm.MethodWriter from file:/C:/Oracle/Middleware/modules/com.bea.core.repackaged.asm_1.2.0.0_3-2-0.jar] 
[Loaded weblogic.servlet.internal.WebAppInternalModuleExtension$PersistenceExtension from file:/C:/Oracle/Middleware/wlserver_12.1/server/lib/weblogic.jar] 
[Loaded weblogic.servlet.internal.WebAppInternalModuleExtension$SpringInstrumentationExtension from file:/C:/Oracle/Middleware/wlserver_12.1/server/lib/weblogic.jar] 
[Loaded weblogic.cacheprovider.coherence.CoherenceClusterContainer from file:/C:/Oracle/Middleware/wlserver_12.1/server/lib/weblogic.jar] 
[Loaded weblogic.servlet.internal.WebAppInternalModuleExtension$CoherenceCacheExtension from file:/C:/Oracle/Middleware/wlserver_12.1/server/lib/weblogic.jar] 
[Loaded weblogic.utils.enumerations.FileEnumeration from file:/C:/Oracle/Middleware/modules/com.bea.core.utils_2.0.0.0.jar] 
[Loaded weblogic.utils.classloaders.DirectoryClassFinder$1 from file:/C:/Oracle/Middleware/modules/com.bea.core.utils.classloaders_3.0.0.0.jar] 
[Loaded weblogic.utils.enumerations.EmptyFileContainerException from file:/C:/Oracle/Middleware/modules/com.bea.core.utils_2.0.0.0.jar] 
[Loaded weblogic.utils.enumerations.FileEnumeration$NullDirectoryListException from file:/C:/Oracle/Middleware/modules/com.bea.core.utils_2.0.0.0.jar] 
[Loaded weblogic.utils.enumerations.FileContainer from file:/C:/Oracle/Middleware/modules/com.bea.core.utils_2.0.0.0.jar] 
[Loaded weblogic.utils.enumerations.LIFO_FileContainer from file:/C:/Oracle/Middleware/modules/com.bea.core.utils_2.0.0.0.jar] 
[Loaded com.bea.objectweb.asm.Type from file:/C:/Oracle/Middleware/modules/com.bea.core.repackaged.asm_1.2.0.0_3-2-0.jar] 
[Loaded weblogic.application.internal.flow.ModuleStateDriver$DestroyStateChange from file:/C:/Oracle/Middleware/wlserver_12.1/server/lib/weblogic.jar] 
[Loaded weblogic.application.utils.ExceptionUtils from file:/C:/Oracle/Middleware/wlserver_12.1/server/lib/weblogic.jar] 
[Loaded javax.management.RuntimeErrorException from C:\Java\JDK\JDK17~1.0_1\jre\lib\rt.jar] 
[Loaded com.bea.logging.ThrowableWrapper from file:/C:/Oracle/Middleware/modules/com.bea.core.logging_2.0.0.0.jar] 
<Oct 3, 2013 11:51:20 AM IST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application "MyApp" due to error java.lang.ArrayIndexOutOfBoundsException: 48188 
java.lang.ArrayIndexOutOfBoundsException: 48188 
    at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source) 
    at com.bea.objectweb.asm.ClassReader.accept(Unknown Source) 
    at com.bea.objectweb.asm.ClassReader.accept(Unknown Source) 
    at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45) 
    at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145) 
    Truncated. see log file for complete stacktrace 
Caused By: java.lang.ArrayIndexOutOfBoundsException: 48188 
    at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source) 
    at com.bea.objectweb.asm.ClassReader.accept(Unknown Source) 
    at com.bea.objectweb.asm.ClassReader.accept(Unknown Source) 
    at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45) 
    at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145) 
    Truncated. see log file for complete stacktrace 

任何提示如何進行furthur?

謝謝!

回答

7

基本上,這是你的部署中的一個糟糕的類文件。有些庫有這些。

有什麼問題,weblogic 12c沒有捕捉異常並記錄罪魁禍首,以便找出它是哪一個。我會向Oracle提出這個問題,以便他們這樣做。

請參閱similar issue in Geronimo其中他們更改了要警告的消息並且未阻止部署。

哪個文件可能是有問題的一個提示是in 12c they are loading resource classes as well which they did not do in previous versions,因此,如果應用程序在以前版本的工作,它可能是由於這一點。

至於如何找出它是哪個類,可以將調試連接到您的weblogic實例,並在java.lang.ArrayIndexOutOfBoundsException上添加異常斷點,然後嘗試檢查上下文以查找參數。

+0

將試用它併發布回來..感謝您的提示! –

+1

有同樣的問題。我使用eclipse中的調試器。這很簡單,只是;在Eclipse中搜索ArrayIndexOutofBoundException,然後在所有構造函數中放置一個斷點,將eclipse附加到您的服務器/進程中,然後等待命中該行,然後查看堆棧跟蹤,導致問題的URL有一個方法(jarfile !班級名稱)。感謝小費,拯救了我的一天。 –

+0

懶惰我剛剛爲weblogic.application.utils.annotation.ClassfinderClassInfos添加了一個System.out.println語句來打印正在處理的類(請參閱http://www.javamonamour.org/2016/01/weblogic-deployment- fails.html) – PierluigiVernetto

相關問題