users@jersey.java.net

[Jersey] Re: java.lang.StackOverflowError: null begin 2.20

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Mon, 21 Sep 2015 09:36:49 +0200

This issue is know and is tracked https://java.net/jira/browse/JERSEY-2946

(fixed in 2.21.1 (already released) and in future release 2.22).

Pavel

On 21/09/15 04:26, 张立鑫 wrote:
> ameba.container.ContainerException:
> java.lang.reflect.InvocationTargetException
> at ameba.container.Container.create(Container.java:66)
> ~[ameba-0.1.7-SNAPSHOT.jar:0.1.7-SNAPSHOT]
> at ameba.Ameba.bootstrap(Ameba.java:165)
> ~[ameba-0.1.7-SNAPSHOT.jar:0.1.7-SNAPSHOT]
> at ameba.Ameba.bootstrap(Ameba.java:150)
> ~[ameba-0.1.7-SNAPSHOT.jar:0.1.7-SNAPSHOT]
> at ameba.Ameba.main(Ameba.java:116)
> ~[ameba-0.1.7-SNAPSHOT.jar:0.1.7-SNAPSHOT]
> at com.sinitek.fiaame.Main.main(Main.java:10) [test-classes/:na]
> Caused by: java.lang.reflect.InvocationTargetException: null
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method) ~[na:1.7.0_80]
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> ~[na:1.7.0_80]
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> ~[na:1.7.0_80]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> ~[na:1.7.0_80]
> at ameba.container.Container.create(Container.java:64)
> ~[ameba-0.1.7-SNAPSHOT.jar:0.1.7-SNAPSHOT]
> ... 4 common frames omitted
> Caused by: java.lang.StackOverflowError: null
> at
> java.util.IdentityHashMap$IdentityHashMapIterator.<init>(IdentityHashMap.java:710)
> ~[na:1.7.0_80]
> at
> java.util.IdentityHashMap$IdentityHashMapIterator.<init>(IdentityHashMap.java:710)
> ~[na:1.7.0_80]
> at
> java.util.IdentityHashMap$KeyIterator.<init>(IdentityHashMap.java:820)
> ~[na:1.7.0_80]
> at
> java.util.IdentityHashMap$KeyIterator.<init>(IdentityHashMap.java:820)
> ~[na:1.7.0_80]
> at java.util.IdentityHashMap$KeySet.iterator(IdentityHashMap.java:968)
> ~[na:1.7.0_80]
> at java.util.AbstractCollection.toString(AbstractCollection.java:450)
> ~[na:1.7.0_80]
> at java.util.Collections$SetFromMap.toString(Collections.java:3907)
> ~[na:1.7.0_80]
> at java.lang.String.valueOf(String.java:2849) ~[na:1.7.0_80]
> at java.lang.StringBuilder.append(StringBuilder.java:128) ~[na:1.7.0_80]
> at
> org.glassfish.jersey.server.model.Resource$Builder.toString(Resource.java:676)
> ~[jersey-server-2.21.jar:na]
> at java.lang.String.valueOf(String.java:2849) ~[na:1.7.0_80]
> at java.lang.StringBuilder.append(StringBuilder.java:128) ~[na:1.7.0_80]
> at java.util.AbstractCollection.toString(AbstractCollection.java:458)
> ~[na:1.7.0_80]
> at java.lang.String.valueOf(String.java:2849) ~[na:1.7.0_80]
> at java.lang.StringBuilder.append(StringBuilder.java:128) ~[na:1.7.0_80]
> at
> org.glassfish.jersey.server.model.Resource$Builder.toString(Resource.java:676)
> ~[jersey-server-2.21.jar:na]
> at java.lang.String.valueOf(String.java:2849) ~[na:1.7.0_80]
> at java.lang.StringBuilder.append(StringBuilder.java:128) ~[na:1.7.0_80]
> at
> org.glassfish.jersey.server.model.Resource$Builder.toString(Resource.java:676)
> ~[jersey-server-2.21.jar:na]
> at java.lang.String.valueOf(String.java:2849) ~[na:1.7.0_80]
> at java.lang.StringBuilder.append(StringBuilder.java:128) ~[na:1.7.0_80]
> at java.util.AbstractCollection.toString(AbstractCollection.java:458)
> ~[na:1.7.0_80]
> at java.lang.String.valueOf(String.java:2849) ~[na:1.7.0_80]
> at java.lang.StringBuilder.append(StringBuilder.java:128) ~[na:1.7.0_80]
> at
> org.glassfish.jersey.server.model.Resource$Builder.toString(Resource.java:676)
> ~[jersey-server-2.21.jar:na]
> at java.lang.String.valueOf(String.java:2849) ~[na:1.7.0_80]
> at java.lang.StringBuilder.append(StringBuilder.java:128) ~[na:1.7.0_80]
> at
> org.glassfish.jersey.server.model.Resource$Builder.toString(Resource.java:676)
> ~[jersey-server-2.21.jar:na]
> at java.lang.String.valueOf(String.java:2849) ~[na:1.7.0_80]
> at java.lang.StringBuilder.append(StringBuilder.java:128) ~[na:1.7.0_80]
> at java.util.AbstractCollection.toString(AbstractCollection.java:458)
> ~[na:1.7.0_80]