java.lang.NoSuchFieldError: theInstance]

ForgeRock JIRA | avallen | 5 years ago
  1. 0

    The fedlet's SAML metadata parsing fails with the following exception, I did not try if OpenAM also has problems with this glassfish release. 3.1.2 is considered an important glassfish update release, fixing lots of bugs, some of them critical :-( libSAML2:03/28/2012 05:44:36:912 PM MESZ: Thread[http-thread-pool-8181(5),5,grizzly-kernel] ERROR: SAML2MetaUtils.static: javax.xml.bind.JAXBException: Provider com.sun.xml.bind.ContextFactory_1_0_1 could not be instantiated: javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance] - with linked exception: [javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance]] at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:160) at javax.xml.bind.ContextFinder.find(ContextFinder.java:308) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:313) at com.sun.identity.saml2.meta.SAML2MetaUtils.<clinit>(SAML2MetaUtils.java:120) at com.sun.identity.saml2.meta.SAML2MetaManager.<clinit>(SAML2MetaManager.java:88) at org.apache.jsp.index_jsp._jspService(index_jsp.java from :355) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) Caused by: javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance] at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:196) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146) ... 37 more Caused by: java.lang.NoSuchFieldError: theInstance at com.sun.identity.saml2.jaxb.assertion.impl.runtime.DefaultJAXBContextImpl.<init>(DefaultJAXBContextImpl.java:50) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:94) ... 43 more

    ForgeRock JIRA | 5 years ago | avallen
    java.lang.NoSuchFieldError: theInstance]
  2. 0

    The fedlet's SAML metadata parsing fails with the following exception, I did not try if OpenAM also has problems with this glassfish release. 3.1.2 is considered an important glassfish update release, fixing lots of bugs, some of them critical :-( libSAML2:03/28/2012 05:44:36:912 PM MESZ: Thread[http-thread-pool-8181(5),5,grizzly-kernel] ERROR: SAML2MetaUtils.static: javax.xml.bind.JAXBException: Provider com.sun.xml.bind.ContextFactory_1_0_1 could not be instantiated: javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance] - with linked exception: [javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance]] at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:160) at javax.xml.bind.ContextFinder.find(ContextFinder.java:308) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:313) at com.sun.identity.saml2.meta.SAML2MetaUtils.<clinit>(SAML2MetaUtils.java:120) at com.sun.identity.saml2.meta.SAML2MetaManager.<clinit>(SAML2MetaManager.java:88) at org.apache.jsp.index_jsp._jspService(index_jsp.java from :355) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) Caused by: javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance] at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:196) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146) ... 37 more Caused by: java.lang.NoSuchFieldError: theInstance at com.sun.identity.saml2.jaxb.assertion.impl.runtime.DefaultJAXBContextImpl.<init>(DefaultJAXBContextImpl.java:50) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:94) ... 43 more

    ForgeRock JIRA | 5 years ago | avallen
    java.lang.NoSuchFieldError: theInstance]
  3. 0

    In order to solve the memory leak problem described and solved in http://java.net/jira/browse/JAXB-844 I tried to upgrade my application from using JAXB 2.1.4 to using JAXB 2.2.5. However, now I encounter the following problem in one of my programs that uses code generated by JAXB 1.0.4: {noformat} Caused by: javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance] at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:100) 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 javax.xml.bind.ContextFinder.newInstance(Unknown Source) at javax.xml.bind.ContextFinder.find(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at mypackage.JAXBContextWrapper.getInstance(JAXBContextWrapper.java:57) at mypackage.JAXBObjectWrapper.getUnmarshallerStatic(JAXBObjectWrapper.java:161) at mypackage.JAXBObjectWrapper.unmarshalStatic(JAXBObjectWrapper.java:184) at mypackage.JAXBObjectWrapper.<init>(JAXBObjectWrapper.java:67) ... 11 more Caused by: java.lang.NoSuchFieldError: theInstance at mypackage.generated.jaxb104.impl.runtime.DefaultJAXBContextImpl.<init>(DefaultJAXBContextImpl.java:50) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:94) ... 24 more {noformat} Part of the source code created by JAXB 1.0.4 looks as follows: {code} mypackage.generated.jaxb104.impl.runtime.DefaultJAXBContextImpl public DefaultJAXBContextImpl( String contextPath, ClassLoader classLoader ) throws JAXBException { this( GrammarInfoFacade.createGrammarInfoFacade( contextPath, classLoader ) ); // initialize datatype converter with ours DatatypeConverter.setDatatypeConverter(DatatypeConverterImpl.theInstance); } {code} Part of the source of class com.sun.xml.bind.DatatypeConverterImpl in JAXB 2.1.4 looks as follows: {code} * This class is responsible for whitespace normalization. * * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul> * @version $Revision: 1.9.6.5 $ * @since JAXB1.0 */ public final class DatatypeConverterImpl implements DatatypeConverterInterface { /** * To avoid re-creating instances, we cache one instance. */ public static final DatatypeConverterInterface theInstance = new DatatypeConverterImpl(); protected DatatypeConverterImpl() { } {code} However, part of the source of the same class in JAXB 2.2.5 looks as follows: {code} * This class is responsible for whitespace normalization. * * @author <ul><li>Ryan Shoemaker, Martin Grebac</li></ul> * @since JAXB1.0 * @deprecated in JAXB 2.2.4 - use javax.xml.bind.DatatypeConverterImpl instead * or let us know why you can't */ public final class DatatypeConverterImpl { protected DatatypeConverterImpl() { // shall not be used } {code} Obviously, the field theInstance is now missing. This breaks the JAXB 1.0.4 generated code.

    Java.net JIRA | 5 years ago | hartmannt
    java.lang.NoSuchFieldError: theInstance]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The fedlet's SAML metadata parsing fails with the following exception, I did not try if OpenAM also has problems with this glassfish release. 3.1.2 is considered an important glassfish update release, fixing lots of bugs, some of them critical :-( libSAML2:03/28/2012 05:44:36:912 PM MESZ: Thread[http-thread-pool-8181(5),5,grizzly-kernel] ERROR: SAML2MetaUtils.static: javax.xml.bind.JAXBException: Provider com.sun.xml.bind.ContextFactory_1_0_1 could not be instantiated: javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance] - with linked exception: [javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance]] at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:160) at javax.xml.bind.ContextFinder.find(ContextFinder.java:308) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:313) at com.sun.identity.saml2.meta.SAML2MetaUtils.<clinit>(SAML2MetaUtils.java:120) at com.sun.identity.saml2.meta.SAML2MetaManager.<clinit>(SAML2MetaManager.java:88) at org.apache.jsp.index_jsp._jspService(index_jsp.java from :355) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) Caused by: javax.xml.bind.JAXBException - with linked exception: [java.lang.NoSuchFieldError: theInstance] at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:196) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146) ... 37 more Caused by: java.lang.NoSuchFieldError: theInstance at com.sun.identity.saml2.jaxb.assertion.impl.runtime.DefaultJAXBContextImpl.<init>(DefaultJAXBContextImpl.java:50) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:94) ... 43 more

    ForgeRock JIRA | 5 years ago | avallen
    java.lang.NoSuchFieldError: theInstance]]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchFieldError

      theInstance

      at com.sun.identity.saml2.jaxb.assertion.impl.runtime.DefaultJAXBContextImpl.<init>()
    2. com.sun.identity
      DefaultJAXBContextImpl.<init>
      1. com.sun.identity.saml2.jaxb.assertion.impl.runtime.DefaultJAXBContextImpl.<init>(DefaultJAXBContextImpl.java:50)
      1 frame
    3. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      4 frames
    4. Old JAXB Runtime
      ContextFactory_1_0_1.createContext
      1. com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:94)
      2. com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:100)
      2 frames
    5. Java RT
      ContextFinder.newInstance
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      5. javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:196)
      6. javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146)
      6 frames