WLS9.2 - EJB Call Failing with AssertionError Caused By StringIndexOutOfBoundsException (Doc ID 1283087.1)

Last updated on MAY 24, 2017

Applies to:

Oracle Weblogic Server - Version 9.2 and later
Information in this document applies to any platform.
***Checked for relevance on 12-Apr-2013***

Symptoms

When you try to call an EJB from client you may get the below error:

Exception in thread "main" java.lang.AssertionError: Failed to generate class for xxx.xxx.xx.XxxxxEJB_xxxx_EOImpl_923_WLStub
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)
.....
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
.....


Full stack trace:

C:\_SRs\3-2697239537\TestCase>java xxxxxxx.xxx.Xxxx
Exception in thread "main" java.lang.AssertionError: Failed to generate class for xxx.xxx.xx.XxxxxEJB_xxxx_EOImpl_923_WLStub
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:779)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
at weblogic.rmi.internal.StubInfo.resolveObject(StubInfo.java:214)
at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:191)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:221)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at gov.ginniemae.ejb.SimpleEJB_qm5g9s_HomeImpl_923_WLStub.create(UnknownSource)
at gov.ginniemae.web.scripts.utils.ScriptServiceLocator.getGmEJB(ScriptServiceLocator.java:26)
at gov.ginniemae.web.scripts.iakrefresh.IAK90DaysRefreshScript.main(IAK90DaysRefreshScript.java:24)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range:-1
at java.lang.String.substring(Unknown Source)
at java.lang.String.substring(Unknown Source)
at weblogic.rmi.internal.GenericMethodDescriptor.computeGenericMethodSignature(GenericMethodDescriptor.java:45)
at weblogic.rmi.internal.MethodDescriptor.computeSignature(MethodDescriptor.java:299)
at weblogic.rmi.utils.Utilities.getRemoteMethods(Utilities.java:384)
at weblogic.rmi.utils.Utilities.getRemoteRMIMethods(Utilities.java:352)
at weblogic.rmi.internal.StubGenerator.<init>(StubGenerator.java:117)
at weblogic.rmi.internal.StubGenerator.<init>(StubGenerator.java:87)
at weblogic.rmi.internal.StubGenerator.hotCodeGenClass(StubGenerator.java:775)
at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:759)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:786)
... 22 more

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms