java.lang.ExceptionInInitializerError

Atlassian JIRA | Pierre-Etienne Poirot [Atlassian] | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When you run the Ant target {{wadl}} to generate the REST API documentation, an exception occurs because of a ClassCastException in the examples: {noformat:title=Output from "ant wadl"} ... [javadoc] /Users/pepoirot/work/crucible/fe/src/java/com/cenqua/fisheye/web/admin/actions/user/UserDeleteAction.java:94: warning - Tag @see: can't find this.getNumActiveReviews() in com.cenqua.fisheye.web.admin.actions.user.UserDeleteAction [javadoc] javadoc: error - In doclet class com.sun.jersey.wadl.resourcedoc.ResourceDoclet, method start has thrown an exception java.lang.reflect.InvocationTargetException [javadoc] java.lang.ExceptionInInitializerError [javadoc] at com.atlassian.crucible.spi.rpc.SearchExampleDocuments.<clinit>(SearchExampleDocuments.java:12) [javadoc] at sun.misc.Unsafe.ensureClassInitialized(Native Method) [javadoc] at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25) [javadoc] at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122) [javadoc] at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918) [javadoc] at java.lang.reflect.Field.getFieldAccessor(Field.java:899) [javadoc] at java.lang.reflect.Field.get(Field.java:358) [javadoc] at com.sun.jersey.wadl.resourcedoc.ResourceDoclet.getSerializedLinkFromTag(ResourceDoclet.java:516) [javadoc] at com.sun.jersey.wadl.resourcedoc.ResourceDoclet.getSerializedExample(ResourceDoclet.java:422) [javadoc] 1 error [javadoc] at com.sun.jersey.wadl.resourcedoc.ResourceDoclet.addResponseDoc(ResourceDoclet.java:334) [javadoc] 171 warnings [javadoc] at com.sun.jersey.wadl.resourcedoc.ResourceDoclet.start(ResourceDoclet.java:164) [javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [javadoc] at java.lang.reflect.Method.invoke(Method.java:597) [javadoc] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269) [javadoc] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143) [javadoc] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340) [javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:128) [javadoc] at com.sun.tools.javadoc.Main.execute(Main.java:41) [javadoc] at com.sun.tools.javadoc.Main.main(Main.java:31) [javadoc] Caused by: java.lang.ClassCastException: com.atlassian.fecrurestplugin.crucible.data.RestFisheyeReviewItemData cannot be cast to com.atlassian.crucible.spi.data.FisheyeReviewItemData [javadoc] at com.atlassian.crucible.spi.data.ReviewItems.<init>(ReviewItems.java:19) [javadoc] at com.atlassian.crucible.spi.rpc.ReviewExampleDocuments.<clinit>(ReviewExampleDocuments.java:227) [javadoc] ... 21 more {noformat} As a consequence, the REST API doc is not generated.

    Atlassian JIRA | 6 years ago | Pierre-Etienne Poirot [Atlassian]
    java.lang.ExceptionInInitializerError
  2. 0

    When you run the Ant target {{wadl}} to generate the REST API documentation, an exception occurs because of a ClassCastException in the examples: {noformat:title=Output from "ant wadl"} ... [javadoc] /Users/pepoirot/work/crucible/fe/src/java/com/cenqua/fisheye/web/admin/actions/user/UserDeleteAction.java:94: warning - Tag @see: can't find this.getNumActiveReviews() in com.cenqua.fisheye.web.admin.actions.user.UserDeleteAction [javadoc] javadoc: error - In doclet class com.sun.jersey.wadl.resourcedoc.ResourceDoclet, method start has thrown an exception java.lang.reflect.InvocationTargetException [javadoc] java.lang.ExceptionInInitializerError [javadoc] at com.atlassian.crucible.spi.rpc.SearchExampleDocuments.<clinit>(SearchExampleDocuments.java:12) [javadoc] at sun.misc.Unsafe.ensureClassInitialized(Native Method) [javadoc] at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25) [javadoc] at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122) [javadoc] at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918) [javadoc] at java.lang.reflect.Field.getFieldAccessor(Field.java:899) [javadoc] at java.lang.reflect.Field.get(Field.java:358) [javadoc] at com.sun.jersey.wadl.resourcedoc.ResourceDoclet.getSerializedLinkFromTag(ResourceDoclet.java:516) [javadoc] at com.sun.jersey.wadl.resourcedoc.ResourceDoclet.getSerializedExample(ResourceDoclet.java:422) [javadoc] 1 error [javadoc] at com.sun.jersey.wadl.resourcedoc.ResourceDoclet.addResponseDoc(ResourceDoclet.java:334) [javadoc] 171 warnings [javadoc] at com.sun.jersey.wadl.resourcedoc.ResourceDoclet.start(ResourceDoclet.java:164) [javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [javadoc] at java.lang.reflect.Method.invoke(Method.java:597) [javadoc] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269) [javadoc] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143) [javadoc] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340) [javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:128) [javadoc] at com.sun.tools.javadoc.Main.execute(Main.java:41) [javadoc] at com.sun.tools.javadoc.Main.main(Main.java:31) [javadoc] Caused by: java.lang.ClassCastException: com.atlassian.fecrurestplugin.crucible.data.RestFisheyeReviewItemData cannot be cast to com.atlassian.crucible.spi.data.FisheyeReviewItemData [javadoc] at com.atlassian.crucible.spi.data.ReviewItems.<init>(ReviewItems.java:19) [javadoc] at com.atlassian.crucible.spi.rpc.ReviewExampleDocuments.<clinit>(ReviewExampleDocuments.java:227) [javadoc] ... 21 more {noformat} As a consequence, the REST API doc is not generated.

    Atlassian JIRA | 6 years ago | Pierre-Etienne Poirot [Atlassian]
    java.lang.ExceptionInInitializerError

    Root Cause Analysis

    1. java.lang.ExceptionInInitializerError

      No message provided

      at com.atlassian.crucible.spi.rpc.SearchExampleDocuments.<clinit>()
    2. com.atlassian.crucible
      SearchExampleDocuments.<clinit>
      1. com.atlassian.crucible.spi.rpc.SearchExampleDocuments.<clinit>(SearchExampleDocuments.java:12)
      1 frame
    3. Java RT
      Field.get
      1. sun.misc.Unsafe.ensureClassInitialized(Native Method)
      2. sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
      3. sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
      4. java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
      5. java.lang.reflect.Field.getFieldAccessor(Field.java:899)
      6. java.lang.reflect.Field.get(Field.java:358)
      6 frames
    4. wadl-resourcedoc-doclet
      ResourceDoclet.getSerializedExample
      1. com.sun.jersey.wadl.resourcedoc.ResourceDoclet.getSerializedLinkFromTag(ResourceDoclet.java:516)
      2. com.sun.jersey.wadl.resourcedoc.ResourceDoclet.getSerializedExample(ResourceDoclet.java:422)
      2 frames