1 Reply Latest reply: Oct 30, 2012 4:33 AM by 970809 RSS

    OpenCMIS 0.6 and 0.8 error with Weblogic 12c

    970809
      When try to access OpenCMIS repository in webservices mode, got the following error :


      INFO: Connecting to CMIS using webservices, impersonating admin, URL http://host:port/alfresco/cmis
      Oct 18, 2012 12:43:27 PM jsp_servlet._lal._content.__browsecmis getBinding
      INFO: Binding: org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingImpl@1d3a3bc
      javax.xml.bind.JAXBException:
      Descriptor Exceptions:
      ---------------------------------------------------------

      +Exception [EclipseLink-110] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException+
      +Exception Description: Descriptor is missing for class [org.apache.chemistry.opencmis.commons.impl.jaxb.EnumIncludeRelationships].+
      +Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping[includeRelationships]+
      +Descriptor: XMLDescriptor(org.apache.chemistry.opencmis.commons.impl.jaxb.GetDescendants --> [DatabaseTable(getDescendants)])+
      Runtime Exceptions:
      ---------------------------------------------------------

      at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:535)
      at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:476)
      at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:435)
      at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:676)
      at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:634)
      at org.eclipse.persistence.oxm.XMLContext$XMLContextState.<init>(XMLContext.java:830)
      at org.eclipse.persistence.oxm.XMLContext$XMLContextState.<init>(XMLContext.java:770)
      at org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java:177)
      at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:860)
      at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:830)
      +... 76 more+

      Added new Eclipselink MOXY and started getting the below error. This error seems to be resulting from module class loader not finding web classloader reference. The class is there in one of the openCMIS jar placed inside web-inf lib.


      Oct 23, 2012 2:26:35 PM jsp_servlet._lal._content.__browsecmis getBinding
      SEVERE: SPI cannot be initialized: null
      org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: SPI cannot be initialized: null
      at org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingsHelper.getSPI(CmisBindingsHelper.java:81)
      at org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingImpl.clearAllCaches(CmisBindingImpl.java:218)
      at org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingImpl.<init>(CmisBindingImpl.java:129)
      at org.apache.chemistry.opencmis.client.bindings.CmisBindingFactory.createCmisWebServicesBinding(CmisBindingFactory.java:174)
      at org.apache.chemistry.opencmis.client.bindings.CmisBindingFactory.createCmisWebServicesBinding(CmisBindingFactory.java:139)
      at jsp_servlet._lal._content.__browsecmis.getBinding(__browsecmis.java:934)
      at jsp_servlet._lal._content.__browsecmis.getBinding(__browsecmis.java:957)
      at jsp_servlet._lal._content.__browsecmis._jspService(__browsecmis.java:1361)
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
      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.onAddToMapException(ServletStubImpl.java:453)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:364)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3288)
      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)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
      Caused by: java.lang.reflect.InvocationTargetException
      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 org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingsHelper.getSPI(CmisBindingsHelper.java:77)
      +... 53 more+
      Caused by: java.lang.NoClassDefFoundError: org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider
      at org.apache.chemistry.opencmis.client.bindings.spi.webservices.CmisWebServicesSpi.<init>(CmisWebServicesSpi.java:65)
      +... 58 more+
      Caused by: java.lang.ClassNotFoundException: org.apache.chemistry.opencmis.client.bindings.spi.webservices.PortProvider
      at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
      at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
      at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
      at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
      ... 59 more

      Any help would be appreciated. I have tried several approaches of class loading like <prefer-web-inf-classes> to true and referred CAT tool to add <prefer-application-packages> and etc. All results in some or other error.

      Edited by: 967806 on Oct 30, 2012 2:20 AM
        • 1. Re: OpenCMIS 0.6 and 0.8 error with Weblogic 12c
          970809
          I could get rid of above error if I hard code the below line in CmisWebServicesSpi class.

          AbstractPortProvider portProvider = new WebSpherePortProvider();

          However, the next set of error I get is RuntimeException resulting from EclipseLink MOXy.

          javax.xml.bind.JAXBException:
          Descriptor Exceptions:
          ---------------------------------------------------------
          ....
          ......
          Runtime Exceptions:
          ---------------------------------------------------------

          - with linked exception:
          [Exception [EclipseLink-0] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.IntegrityException
          Descriptor Exceptions:
          ---------------------------------------------------------
          ....

          I have upgraded org.eclipse.persistence_2.0.0.0_2-3.jar in modules directory to org.eclipse.persistence_2.5. Then I get class not found error for classes in CMIS jars which are right inside the WEB-INF/lib folder of war.