This discussion is archived
9 Replies Latest reply: Jul 17, 2013 6:47 AM by user418106 RSS

WebLogic deployment error

953257 Newbie
Currently Being Moderated
Hi,

Project built in JDK1.6 and deployed on was 6.1 was recently migrated to JrockitJDK (vjrockit-jdk1.6.0_24-R28.1.3-4.0.1) and weblogic 12. During deployment we are facing an error a JaxBException. I've pasted the logs for it below

Caused by: javax.xml.bind.JAXBException
- with linked exception:
[java.lang.NoSuchFieldError: com/sun/xml/bind/DatatypeConverterImpl.theInstanceL
javax/xml/bind/DatatypeConverterInterface;]
at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_
0_1.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:197)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:147)
... 29 more


This error was not faced in the previous jdk1.6/was6.1 deployment. Is there any known solution for this. Any help pertaining to this would be appreciated.

Thanks.
  • 1. Re: WebLogic deployment error
    953257 Newbie
    Currently Being Moderated
    Hi,

    We're still unable to determine the root cause of this error. We've attempted several redeployments but it still persists. Could anyone point to even a generalised deployment process? It would be helpful to verify our own.

    Thanks.
  • 2. Re: WebLogic deployment error
    Kalyan Pasupuleti-Oracle Expert
    Currently Being Moderated
    Hi,

    this seems to JVM BUG as if you can provide complete stack then we can find out the root cause.

    Note: try to use sun JDK instead of Jrockit once..

    Regards,
    Kal
  • 3. Re: WebLogic deployment error
    vladodias Guru
    Currently Being Moderated
    Hi,

    I'm guessing you have code using Sun's implementation ... com.sun.* ... classes that are not there when you switch to JRockit, but work fine with Sun JDK...

    May you have to include jaxb-impl.jar in your project or change the code to avoid using com.sun.* classes...

    Cheers,
    Vlad
  • 4. Re: WebLogic deployment error
    953257 Newbie
    Currently Being Moderated
    Hi,

    Thanks for the replies. I'm sorry I took so long, was kind of losing hope :). I've added the jaxb-impl.jar file in the domain lib, it throws a different error when the jars are not present in the lib folder, which is why I can tell that it is reading the jars here. I've added the entire stack trace below just in case I've missed out on anything important.

    Thanks.

    com.tech.j2ee.core.ServiceException: All the services are not created properly
    at com.tech.j2ee.core.impl.RadienServiceLocator.getService(RadienServiceLocator.java:84)
    at com.tech.bankaway.util.LogManager.<clinit>(Unknown Source)
    at com.tech.bankaway.servlet.BankAwayServlet.processRequest(Unknown Source)
    at com.tech.bankaway.servlet.BankAwayServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:845)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:222)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2091)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Caused by: com.tech.j2ee.core.ServiceException: com.tech.j2ee.core.XMLConfigException: 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: com/sun/xml/bind/DatatypeConverterImpl.theInstanceLjavax/xml/bind/DatatypeConverterInterface;]
    - with linked exception:
    [javax.xml.bind.JAXBException
    - with linked exception:
    [java.lang.NoSuchFieldError: com/sun/xml/bind/DatatypeConverterImpl.theInstanceLjavax/xml/bind/DatatypeConverterInterface;]]
    at com.tech.j2ee.core.impl.RadienServiceManager.createAllServices(RadienServiceManager.java:178)
    at com.tech.j2ee.core.impl.RadienServiceLocator.getService(RadienServiceLocator.java:76)
    ... 22 more
    Caused by: com.tech.j2ee.core.XMLConfigException: 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: com/sun/xml/bind/DatatypeConverterImpl.theInstanceLjavax/xml/bind/DatatypeConverterInterface;]
    - with linked exception:
    [javax.xml.bind.JAXBException
    - with linked exception:
    [java.lang.NoSuchFieldError: com/sun/xml/bind/DatatypeConverterImpl.theInstanceLjavax/xml/bind/DatatypeConverterInterface;]]
    at com.tech.j2ee.core.impl.XMLConfigReader.<init>(XMLConfigReader.java:74)
    at com.tech.j2ee.core.impl.RadienServiceDefReader.<init>(RadienServiceDefReader.java:57)
    at com.tech.j2ee.core.impl.RadienServiceManager.createAllServices(RadienServiceManager.java:96)
    at com.tech.j2ee.core.impl.RadienServiceLocator.getService(RadienServiceLocator.java:77)
    ... 22 more
    Caused by: 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: com/sun/xml/bind/DatatypeConverterImpl.theInstanceLjavax/xml/bind/DatatypeConverterInterface;]
    - with linked exception:
    [javax.xml.bind.JAXBException
    - with linked exception:
    [java.lang.NoSuchFieldError: com/sun/xml/bind/DatatypeConverterImpl.theInstanceLjavax/xml/bind/DatatypeConverterInterface;]]
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:161)
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:309)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409)
    at com.tech.j2ee.core.impl.XMLConfigReader.<init>(XMLConfigReader.java:72)
    at com.tech.j2ee.core.impl.RadienServiceDefReader.<init>(RadienServiceDefReader.java:45)
    ... 24 more
    Caused by: javax.xml.bind.JAXBException
    - with linked exception:
    [java.lang.NoSuchFieldError: com/sun/xml/bind/DatatypeConverterImpl.theInstanceLjavax/xml/bind/DatatypeConverterInterface;]
    at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:56)
    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:197)
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:147)
    ... 29 more
    Caused by: java.lang.NoSuchFieldError: com/sun/xml/bind/DatatypeConverterImpl.theInstanceLjavax/xml/bind/DatatypeConverterInterface;
    at com.tech.j2ee.core.jaxb.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:50)
    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:197)
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:147)
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:309)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409)
    at com.tech.j2ee.core.impl.XMLConfigReader.<init>(XMLConfigReader.java:72)
    at com.tech.j2ee.core.impl.RadienServiceDefReader.<init>(RadienServiceDefReader.java:57)
    at com.tech.j2ee.core.impl.RadienServiceManager.createAllServices(RadienServiceManager.java:96)
    at com.tech.j2ee.core.impl.RadienServiceLocator.getService(RadienServiceLocator.java:76)
    at com.tech.bankaway.util.LogManager.<clinit>(Unknown Source)
    at com.tech.bankaway.servlet.BankAwayServlet.processRequest(Unknown Source)
    at com.tech.bankaway.servlet.BankAwayServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
    ... 2 more
  • 5. Re: WebLogic deployment error
    vladodias Guru
    Currently Being Moderated
    Any chance you change your weblogic to use Sun JDK rather than JRockit ?

    It's gonna be very hard work to find out all the com.sun.* classes you need...

    Other alternative is maybe to find a way to change the JAXB provider ... com.sun.xml.bind.ContextFactory_1_0_1 could not be instantiated...

    See this...
    http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.5/tutorial/doc/JAXBWorks2.html

    Cheers,
    Vlad
  • 6. Re: WebLogic deployment error
    953257 Newbie
    Currently Being Moderated
    Thanks for the reference Vlad, it really helped.

    I changed the property inside the jaxb file to point to a different context factory which was mentioned under javax.xml.bind.context.factory. I'm not sure if it is a valid provider but at least I have managed to find out the origin of the error. I've added the trace below. We can't change the jdk version because the server doesn't have it installed and it is owned by another. Will however try and get a local deployment up. I'll keep you posted.

    Caused by: com.tech.j2ee.core.ServiceException: com.tech.j2ee.core.XMLConfigException: javax.xml.bind.JAXBException: Provider org.eclipse.persistence.jaxb.JAXBContextFactory could not be instantiated: javax.xml.bind.JAXBException
    - with linked exception:
    [Exception [EclipseLink-50000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JAXBException
    Exception Description: The context path com.tech.j2ee.core.jaxb.def contains no ObjectFactory or jaxb.index, no external metadata was found in properties Map, and no sessions.xml was found.]
    - with linked exception:
    [javax.xml.bind.JAXBException
    - with linked exception:
    [Exception [EclipseLink-50000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JAXBException
    Exception Description: The context path com.tech.j2ee.core.jaxb.def contains no ObjectFactory or jaxb.index, no external metadata was found in properties Map, and no sessions.xml was found.]]
    at com.tech.j2ee.core.impl.RadienServiceManager.createAllServices(RadienServiceManager.java:178)
    at com.tech.j2ee.core.impl.RadienServiceLocator.getService(RadienServiceLocator.java:76)
    ... 22 more
    Caused by: com.tech.j2ee.core.XMLConfigException: javax.xml.bind.JAXBException: Provider org.eclipse.persistence.jaxb.JAXBContextFactory could not be instantiated: javax.xml.bind.JAXBException
    - with linked exception:
    [Exception [EclipseLink-50000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JAXBException
    Exception Description: The context path com.tech.j2ee.core.jaxb.def contains no ObjectFactory or jaxb.index, no external metadata was found in properties Map, and no sessions.xml was found.]
    - with linked exception:
    [javax.xml.bind.JAXBException
    - with linked exception:
    [Exception [EclipseLink-50000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JAXBException
    Exception Description: The context path com.tech.j2ee.core.jaxb.def contains no ObjectFactory or jaxb.index, no external metadata was found in properties Map, and no sessions.xml was found.]]
    at com.tech.j2ee.core.impl.XMLConfigReader.<init>(XMLConfigReader.java:74)
    at com.tech.j2ee.core.impl.RadienServiceDefReader.<init>(RadienServiceDefReader.java:57)
    at com.tech.j2ee.core.impl.RadienServiceManager.createAllServices(RadienServiceManager.java:96)
    at com.tech.j2ee.core.impl.RadienServiceLocator.getService(RadienServiceLocator.java:77)
    ... 22 more
    Caused by: javax.xml.bind.JAXBException: Provider org.eclipse.persistence.jaxb.JAXBContextFactory could not be instantiated: javax.xml.bind.JAXBException
    - with linked exception:
    [Exception [EclipseLink-50000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JAXBException
    Exception Description: The context path com.tech.j2ee.core.jaxb.def contains no ObjectFactory or jaxb.index, no external metadata was found in properties Map, and no sessions.xml was found.]
    - with linked exception:
    [javax.xml.bind.JAXBException
    - with linked exception:
    [Exception [EclipseLink-50000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JAXBException
    Exception Description: The context path com.tech.j2ee.core.jaxb.def contains no ObjectFactory or jaxb.index, no external metadata was found in properties Map, and no sessions.xml was found.]]
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:161)
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:309)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409)
    at com.tech.j2ee.core.impl.XMLConfigReader.<init>(XMLConfigReader.java:72)
    at com.tech.j2ee.core.impl.RadienServiceDefReader.<init>(RadienServiceDefReader.java:45)
    ... 24 more
  • 7. Re: WebLogic deployment error
    user385398 Newbie
    Currently Being Moderated
    Many of the problems with WLS 12c origin from merging weblogic and glassfish application servers. Current release includes some glassfish jars under $MIDDLEWARE_HOME/modules. I've seen errors with same origin because of wrong JSTL lib in classpath (glassfish.jstl_1.2.0.2.jar) when compiling JSP-s.

    The problem described by you is caused by glassfish.jaxb_2.0.0.0_2-2-4.jar, which somehow is included in all application classpaths before application lib-s. Even setting prefer-web-inf-classes in your weblogic.xml descriptor won't help you. You probably built your app with a newer version of jaxb (2.1+ ?), which is incompatible with the older version. A quick fix would be removing that conflicting jar without guarantees that the server won't throw any ClassNotFoundExceptions after that. You could also try including a newer version in your domain-s lib if you get those exceptions.
  • 8. Re: WebLogic deployment error
    950013 Newbie
    Currently Being Moderated

    Hi,

     

    We also faced same issue after closely looking at the log and files I found that its a version conflict.

    a application packaged war file has newer version of jaxb-impl-2.2.jar and weblogic has glassfish_jaxb2.0.0.0_2_2_4.jar

    both has same package structure only version conflict. and due to this even by providing prefer-application-package/class does not help because

    system classloader finds glassfish DatatypeConverterImpl which do not have theInstance field.

    Currently checking with Oracle support if there is solution on this?

  • 9. Re: WebLogic deployment error
    user418106 Newbie
    Currently Being Moderated

    Same issue.

     

    Resolved?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points