奇怪的Weblogic10错误

我的神,weblogic10竟然有这个问题,碰上了非得懵一阵,花费好些时间解决:
部署的时候有下面的错误
java.lang.StringIndexOutOfBoundsException: String index out of range: 51968
 at java.lang.String.checkBounds(String.java:372)
 at java.lang.String.<init>(String.java:404)
 at serp.bytecode.lowlevel.ConstantPoolTable.readString(ConstantPoolTable.java:112)
 at serp.bytecode.lowlevel.ConstantPoolTable.readString(ConstantPoolTable.java:174)
 at org.apache.openjpa.lib.meta.ClassAnnotationMetaDataFilter.matchAnnotations(ClassAnnotationMetaDataFilter.java:108)
 at org.apache.openjpa.lib.meta.ClassAnnotationMetaDataFilter.matches(ClassAnnotationMetaDataFilter.java:85)
 at org.apache.openjpa.lib.meta.ZipFileMetaDataIterator.hasNext(ZipFileMetaDataIterator.java:79)
 at org.apache.openjpa.lib.meta.ClassArgParser.mapTypeNames(ClassArgParser.java:277)
 at org.apache.openjpa.meta.AbstractCFMetaDataFactory.scan(AbstractCFMetaDataFactory.java:725)
 
找到一个相似问题的帖子
http://anydoby.com/jblog/article.htm?id=41
 
后面有这样一段
 
After I left for a 2-week vacation and returned back to the office the guys told me they have spent another 4 days investigating the problem and found workarounds: the jar file can be repacked using 7-zip and maximum compression. As an alternative you can compile the class without debug info. BEA has accepted this is a bug and adviced to declare the bean class explicitly in the JNDI descriptors.
 
We had a similar issue and it appears to be a Weblogic 10 issue in that it limits the size of the EJB bean classes. Annotations doesn't really have anything to do with it, according to what we found.
2 possibles ways forward. 1) first prize is to move to 10.3, we are in the process of doing that.
2) check for compiled classes of beans that are around the 30kb mark... create a second bean to hold half the functionality and that should solve the issue...
The exception thrown is rather NON helpful. :-) But it basically boils down to the complied size of the beans on WL 10.
Hope this helps some out there.
 
问题竟然是一个类太大(大概30Kb),我的不到20K也出现这个问题,删了些代码,果然好了。
开发的时候需要处理这种问题,也是个郁闷而无奈的事情。

你可能感兴趣的:(weblogic,error,deploy,休闲)