Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven with stack overflow with enunciate 2.1.1 JDK 7 #227

Closed
htran1970 opened this issue Nov 24, 2015 · 3 comments
Closed

Maven with stack overflow with enunciate 2.1.1 JDK 7 #227

htran1970 opened this issue Nov 24, 2015 · 3 comments
Labels
Milestone

Comments

@htran1970
Copy link

enunciate.xml

<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.1.0.xsd">

  <title>REST Service API</title>
  <description package="">REST Service API</description>
  <application root="http://localhost:8080/rests"/>
  <api-classes>
    <exclude pattern="org.jboss.**"/>
  </api-classes>
  <modules>
    <docs docsDir="${project.build.directory}/docs"></docs>
    <basic-app disabled="true" />
    <jaxb disabled="true" />
    <jackson disabled="false" />
    <jackson1 disabled="true" />
    <jaxrs disabled="false" />
    <jaxws disabled="true" />
    <gwt-json-overlay disabled="true" />
    <java-client disabled="true" />
    <java-json-client disabled="true" />
    <php-json-client disabled="true" />
    <ruby-json-client disabled="true" />
    <xml disabled="true" />
    <jaxws-client disabled="true" />
    <jboss disabled="true" />
    <jaxws-ri disabled="true" />
    <jaxws-support disabled="true" />
    <csharp disabled="true" />
    <jersey disabled="true" />
    <c disabled="true" />
    <obj-c disabled="true" />
    <swagger disabled="true"/>
  </modules>

</enunciate>
[ERROR] Failed to execute goal com.webcohesion.enunciate:enunciate-maven-plugin:2.1.1:assemble (assemble) on project rests-war: Execution assemble of goal com.webcohesion.enunciat
e:enunciate-maven-plugin:2.1.1:assemble failed: com.webcohesion.enunciate.EnunciateException: freemarker.core._TemplateModelException: An error has occurred when reading existing s
ub-variable "dataType"; see cause exception! The type of the containing value was: extended_hash+string (com.webcohesion.enunciate.modules.jackson.api.impl.PropertyImpl wrapped int
o f.e.b.StringModel)
[ERROR]
[ERROR] ----
[ERROR] FTL stack trace ("~" means nesting-related):
.m2/repository/com/webcohesion/enunciate/enunciate-docs/2.1.1/enunciate-docs-2.1.1.
jar!/com/webcohesion/enunciate/modules/docs/docs.fmt" at line 159, column 1]
[ERROR] (Hidden 8 "~" lines for terseness)
[ERROR]
[ERROR] ----: InvocationTargetException: StackOverflowError

       at rx.schedulers.ExecutorScheduler$ExecutorAction.run(ExecutorScheduler.java:173)
       at rx.schedulers.ExecutorScheduler$ExecutorSchedulerWorker.run(ExecutorScheduler.java:99)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
       at java.lang.Thread.run(Thread.java:745)
aused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:606)
       at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:1458)
       at freemarker.ext.beans.BeanModel.invokeThroughDescriptor(BeanModel.java:255)
       at freemarker.ext.beans.BeanModel.get(BeanModel.java:159)
       ... 153 more
aused by: java.lang.StackOverflowError
       at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:583)
       at com.sun.tools.javac.code.Types$UnaryVisitor.visit(Types.java:3803)
       at com.sun.tools.javac.code.Types.supertype(Types.java:1750)
       at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1412)
       at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1401)
       at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:583)
       at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3724)
       at com.sun.tools.javac.code.Types.asSuper(Types.java:1398)
       at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1414)
       at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1401)
       at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:583)
       at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3724)
       at com.sun.tools.javac.code.Types.asSuper(Types.java:1398)
       at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1420)
       at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1401)
       at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:583)
       at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3724)
       at com.sun.tools.javac.code.Types.asSuper(Types.java:1398)
       at com.sun.tools.javac.code.Types$5.visitClassType(Types.java:474)
       at com.sun.tools.javac.code.Types$5.visitClassType(Types.java:400)
       at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:583)
       at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3724)
       at com.sun.tools.javac.code.Types.isSubtype(Types.java:396)
       at com.sun.tools.javac.code.Types.isSubtype(Types.java:372)
       at com.sun.tools.javac.code.Types.isSubtypeUncheckedInternal(Types.java:323)
       at com.sun.tools.javac.code.Types.isSubtypeUnchecked(Types.java:309)
       at com.sun.tools.javac.code.Types.isConvertible(Types.java:281)
       at com.sun.tools.javac.code.Types.isAssignable(Types.java:1608)
       at com.sun.tools.javac.code.Types.isAssignable(Types.java:1569)
       at com.sun.tools.javac.model.JavacTypes.isAssignable(JavacTypes.java:99)
       at com.webcohesion.enunciate.javac.decorations.DecoratedTypes.isAssignable(DecoratedTypes.java:193)
       at com.webcohesion.enunciate.javac.decorations.type.DecoratedTypeMirror.isInstanceOf(DecoratedTypeMirror.java:80)
       at com.webcohesion.enunciate.javac.decorations.type.DecoratedTypeMirror.isCollection(DecoratedTypeMirror.java:97)
       at com.webcohesion.enunciate.javac.decorations.type.TypeMirrorUtils.getComponentType(TypeMirrorUtils.java:176)
       at com.webcohesion.enunciate.modules.jackson.model.util.JacksonUtil.findAdapterType(JacksonUtil.java:93)
       at com.webcohesion.enunciate.modules.jackson.model.util.JacksonUtil.findAdapterType(JacksonUtil.java:84)
       at com.webcohesion.enunciate.modules.jackson.model.util.MapType.findMapTypeDeclaration(MapType.java:132)
       at com.webcohesion.enunciate.modules.jackson.model.util.MapType.findMapType(MapType.java:85)
       at com.webcohesion.enunciate.modules.jackson.model.types.JsonTypeVisitor.visitDeclared(JsonTypeVisitor.java:107)
       at com.webcohesion.enunciate.modules.jackson.model.types.JsonTypeVisitor.visitDeclared(JsonTypeVisitor.java:42)
       at com.webcohesion.enunciate.javac.decorations.type.DecoratedDeclaredType.accept(DecoratedDeclaredType.java:83)
       at com.webcohesion.enunciate.modules.jackson.model.types.JsonTypeFactory.getJsonType(JsonTypeFactory.java:189)
       at com.webcohesion.enunciate.modules.jackson.model.types.JsonTypeVisitor.visitDeclared(JsonTypeVisitor.java:109)
       at com.webcohesion.enunciate.modules.jackson.model.types.JsonTypeVisitor.visitDeclared(JsonTypeVisitor.java:42)
       at com.webcohesion.enunciate.javac.decorations.type.DecoratedDeclaredType.accept(DecoratedDeclaredType.java:83)
       at com.webcohesion.enunciate.modules.jackson.model.util.MapType.accept(MapType.java:188)
       at com.webcohesion.enunciate.modules.jackson.model.types.JsonTypeFactory.getJsonType(JsonTypeFactory.java:189)
       at com.webcohesion.enunciate.modules.jackson.model.types.JsonTypeVisitor.visitDeclared(JsonTypeVisitor.java:110)
       at com.webcohesion.enunciate.modules.jackson.model.types.JsonTypeVisitor.visitDeclared(JsonTypeVisitor.java:42)
@stoicflame
Copy link
Owner

Thanks for the report. Assigning to 2.2.

@stoicflame
Copy link
Owner

Fixed at abbd9bf.

It's because you had a class that extended a Map that contained itself. E.g.:

public class MapThing extends Map<String, MapThing> { ... }

The fix was pretty ugly.

@stoicflame
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants