1 2 Previous Next 25 Replies Latest reply: May 19, 2008 9:25 AM by 666705 Go to original post RSS
      • 15. Re: Classpath isolation in Weblogic 9.1 and Xerces
        Weblogic 9.2 adds a new feature in the weblogic-application.xml file that helps get past this problem.

        The new prefer-application-packages feature allows you to specify certain package hierarchies to use from the webapp without forcing WLS itself to use the classes.

        Here is a sample snippet of our weblogic-application.xml file - this file should be placed in the META-INF directory of your ear or exploded ear directory:

        <?xml version="1.0"?>

        <weblogic-application xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">



        I hope this helps.

        • 16. Re: Classpath isolation in Weblogic 9.1 and Xerces
          I am tring to deploy our application with Weblogic 9.2 and We are also facing same error :
          <Feb 19, 2007 4:49:11 PM IST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
          java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:124)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:98)

          I tried it also by adding prefer-application-packages feature ,but it didnt work in my case.
          Is there any other solution.
          • 17. Re: Classpath isolation in Weblogic 9.1 and Xerces
            Hi all,
            This issue is a long withstanding issues with WebLogic. To the luck of us all, this is claimed to be fixed in WebLogic 10 that is scheduled to be released in March (maybe someone from Bea can confirm this?)
            There is no workaround for previous versions of WL.

            • 18. Weblogic 9.2 and Xerces

              I'm also trying to deploy an Application, which was previously being compiled in jdk 1.4 and deployed in Weblogic 8.1.

              I did the following:
              - I replaced the wlclient and wljmsclient jars(in my Application lib) with the new jars in WLS 9.2

              - I tried to deploy the war on the Weblogic, but I'm getting exceptions and the context startup is failing:
              java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl

              Hence I replaced the XercesImpl, xml-apis and xalan jars with the latest one.

              - believe that there is a difference in the parser being used by Weblogic and the Xerces jar.
              Hence I did the following:

              - put my jars in the startWebLogic, classpath variable:
              THIS ALSO DOESN'T WORK ...
              - tried changing the XML registy(in Weblogic) to over ride the XML implementation: NO SUCCESS.

              - I have tried by deleting the Application folder (war deployed) and restarting in case there would be some cache.

              - I tried to set

              But in this case my struts tag libs do not get loaded
              I get an exception message:
              Failure while Precompiling JSPs: weblogic.servlet.jsp.CompilationException error

              Hence I removed the struts tag impl. and the context load up, on starting the server was a SUCCESS.
              But when I tried to access the url through browser, it was not available

              Can some one please HELP ME with this ?
              • 19. Re: Classpath isolation in Weblogic 9.1 and Xerces

                I tried to change the implementation class(at the time of instantiating) for javax.xml.parsers.DocumentBuilderFactory from org.apache.xerces.jaxp.DocumentBuilderFactoryImpl TO com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

                But even this doesn't work for me, by either specifying it on the web.xml or passing it as a parameter in the JAVA_OPTS.

                If some have some idea about this / knws a way to FIX this issue, please let me knw ...
                • 20. Re: Classpath isolation in Weblogic 9.1 and Xerces

                  I changed my imports to: com.sun.org.apache.xml.internal.serialize.*

                  compiled and deployed. I removed the xercesImpl jar from my Application lib.

                  But now I get the following message:
                  The validator class: "org.apache.taglibs.standard.tlv.JstlFmtTLV" has failed with the following exception: "java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory".

                  I tried by making the following entry in the Java_Home/lib/jaxp.properties file:



                  But I still get the same exception.
                  Please suggest in case someone has faced a similar problem / have some solution for this ...

                  • 21. Re: Classpath isolation in Weblogic 9.1 and Xerces
                    Hi friends,

                    I replaced my old jar with jstl.jar (version 1.1.2) and added:
                    xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" version="2.4"
                    in the web.xml file.

                    I started getting this new exception:

                    <BEA-149265> <Failure occured in the execution of deployment request with ID '1172158214379' for task '0'. Error is: 'weblogic.application.ModuleException: 'weblogic.application.ModuleException:
                    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:295)

                    Basically looks like request time values are not been supported ?

                    I read somewhere and hence tried:
                    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
                    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

                    But notthing seems to be working?
                    Is there some one who is facing similar problem / might have resolved the issue? Please do let me know ...

                    • 22. Re: Classpath isolation in Weblogic 9.1 and Xerces
                      used the latest jstl jar and changed schema def(s). in web.xml and in weblogic.xml

                      It also required me to change the tag-lib uri to:

                      <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
                      <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
                      <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
                      <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
                      <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
                      <%@ taglib uri="http://acegisecurity.org/authz" prefix="authz" %>
                      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
                      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

                      It also requires you to add:

                      in the weblogic.xml, else there would be error in some of
                      the runtime expressions.

                      exception encountered:

                      [ERROR] - ContextLoader.initWebApplicationContext(177) |
                      Context initialization failed
                      java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory
                      at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createD

                      Have changed hibernate / spring / ehcache / xbean jars to the latest ones and done the required config. changes ...

                      But still the same exception, along with this one:

                      <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource

                      Anyone had some idea ?

                      • 23. Re: Classpath isolation in Weblogic 9.1 and Xerces

                        i've been trying to solve my problem with xerces.jar and xml-apis.jar on the classpath for over 3 days until I came across the post from merlin4269. Every time I had the prefer-web-inf-classes set to true I was getting "ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory". For sure the problem was related to having a xml-apis.jar file on the classpath. I've even tried to manually specify SAXParser in application-weblogic.xml file to <saxparser-factory>org.apache.xerces.jaxp.SAXParserFactoryImpl</saxparser-factory> but still whenever the xml-apis was on the classpath I was finishing with the same result.

                        The only workaround to having the prefer-web-inf-classes set to true (required if deploying BirtViewer in Weblogic) was to add below lines to weblogic-application.xml file


                        good stuff merlin4269
                        • 24. Re: Classpath isolation in Weblogic 9.1 and Xerces
                          Thanks all. It worked for me.

                          Adding weblogic-application.xml fixed my problem. Through this XML we recommend the Implementation that should be used.
                          • 25. Re: Classpath isolation in Weblogic 9.1 and Xerces
                            I've got <prefer-web-inf-classes>true</prefer-web-inf-classes> in my weblogic.xml, and I added <prefer-application-packages> as you described in my weblogic-application.xml. Yet I still get this exception on startup when I deploy to WebLogic 10:

                            java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl

                            I also tried putting my xalan.jar, xml-apis.jar, and xercesImpl.jar in the /jre/lib/ext directory, but no joys.

                            The same app deploys to WebLogic 8.1.6 without any issues.

                            This is a long standing problem. Is anybody from BEA paying attention to this forum? Is there any better advice to be had?
                            1 2 Previous Next