Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ServletException on WebLogic

    SmartGWT 3.0p NB 20120704
    Deployed to WebLogic 12c

    There appears to be a conflict with the Isomorphic XML parser.
    On load, Firebug reports "unexpected end of XML source (73 out of range 72)" and this:

    Code:
    <BR>BaseServlet Global Exception<BR>
    <PRE>
    javax.servlet.ServletException: java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory
    	at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
    	at com.isomorphic.xml.XML.parseXML(XML.java:144)
    	at com.isomorphic.xml.XML.parseXML(XML.java:125)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:290)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:282)
    	at com.isomorphic.xml.XML$RecordsFromXMLCache.loadObjectFromFile(XML.java:377)
    	at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:132)
    	at com.isomorphic.xml.XML.loadCacheableDSRecords(XML.java:388)
    	at com.isomorphic.store.DataStructCache.loadInstance(DataStructCache.java:179)
    	at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:65)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:178)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:170)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:165)
    	at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:95)
    	at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:102)
    	at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:82)
    	at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:87)
    	at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:109)
    	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:84)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	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.TailFilter.doFilter(TailFilter.java:25)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)
    	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: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)
    
    	at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:124)
    	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:84)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	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.TailFilter.doFilter(TailFilter.java:25)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)
    	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: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)
    </PRE>
    Researching this error led me to:
    1 - verify I have set <prefer-web-inf-classes>true</prefer-web-inf-classes> in weblogic.xml
    2 - ensure that no javax jars are in the war file
    3 - remove the Isomorphic-supplied spring-2.0.8.jar from the war lib
    4 - verify the inclusion of 4 Spring jars:
    -com.springsource.org.aopalliance-1.0.0.jar
    -org.springframework.beans-3.0.5.RELEASE.jar
    -org.springframework.context-3.0.5.RELEASE.jar
    -org.springframework.core-3.0.5.RELEASE.jar

    But still the error persists.

    I didn't find any post that seemed related to this problem.

    I realize this could be a WebLogic issue but I am posting just in case there might be some known issue specific to Isomorphic, or perhaps the trace tells you something I don't see.

    Thanks!
    Last edited by susanpemble; 21 Aug 2012, 08:28.

    #2
    Hey -- I do not have an answer to your question, but I have a question for you: Why are you using WebLogic? Any specific feature you don't get from Jetty/Tomcat/JBoss/Geronimo/Whatever?

    Comment


      #3
      Big project I'm on needs something from WebLogic but I don't know exactly what. I am stuck.

      Comment


        #4
        I found this:
        Originally posted by Isomorphic View Post
        It looks like Struts, or some other server side layer you have deployed, is altering the XML before you receive it. Take a look at the request as logged by Firebug or the RPC tab in the developer console to verify this.

        If you do verify that the request is being munged, it's likely to be some kind of security service that thinks it is helping out by removing attributes fr inbound XML.
        so I'll investigate that.

        Comment


          #5
          That message about Struts definitely doesn't apply..

          The best thing with a mysterious error like this is usually to Google the error message. Most of the suggestions seem to indicate duplicate or conflicting copies of .jars (such as xml-apis.jar).

          Comment


            #6
            Yes, thanks, that's what I've been doing. I don't have or use the xml-apis.jar.

            I'm looking into explicitly configuring the DocumentBuilderFactory on WebLogic as posted here:
            https://forums.oracle.com/forums/thread.jspa?threadID=1032294

            Comment

            Working...
            X