Classpath isolation in Weblogic 9.1 and Xerces - Weblogic
This is a discussion on Classpath isolation in Weblogic 9.1 and Xerces - Weblogic ; Hi,
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 faile=
d with the following exception: "java.lang.ClassCastException: weblogic.xml=
...
-
Re: Classpath isolation in Weblogic 9.1 and Xerces
Hi,
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 faile=
d 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:=20
1.)javax.xml.parsers.DocumentBuilderFactory=3Dweblogic.xml.jaxp.RegistryDoc=
umentBuilderFactory
2.)javax.xml.parsers.SAXParserFactory=3Dweblogic.xml.jaxp.RegistrySAXParser=
Factory
3.)javax.xml.transform.TransformerFactory=3Dweblogic.xml.jaxp.RegistrySAXTr=
ansformerFactory=20
But I still get the same exception.
Please suggest in case someone has faced a similar problem / have some solu=
tion for this ...
regards,
Saurabh
-
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:=20
xmlns:j2ee=3D"http://java.sun.com/xml/ns/j2ee" version=3D"2.4"
in the web.xml file.
I started getting this new exception:
<BEA-149265> <Failure occured in the execution of deployment request with I=
D '1172158214379' for task '0'. Error is: 'weblogic.application.ModuleExcep=
tion: '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=3D"c" uri=3D"http://java.sun.com/jsp/jstl/core" %>=20
<%@ taglib prefix=3D"fmt" uri=3D"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 i=
ssue? Please do let me know ...
regards,
Saurabh
-
Re: Classpath isolation in Weblogic 9.1 and Xerces
used the latest jstl jar and changed schema def(s). in web.xml and in weblo=
gic.xml
It also required me to change the tag-lib uri to:
<%@ taglib uri=3D"http://struts.apache.org/tags-bean" prefix=3D"bean" %>
<%@ taglib uri=3D"http://struts.apache.org/tags-html" prefix=3D"html" %>
<%@ taglib uri=3D"http://struts.apache.org/tags-logic" prefix=3D"logic" %>
<%@ taglib uri=3D"http://java.sun.com/jsp/jstl/core" prefix=3D"c" %>
<%@ taglib uri=3D"http://java.sun.com/jsp/jstl/fmt" prefix=3D"fmt" %>
<%@ taglib uri=3D"http://acegisecurity.org/authz" prefix=3D"authz" %>
<%@ taglib uri=3D"http://java.sun.com/jsf/html" prefix=3D"h"%>
<%@ taglib uri=3D"http://java.sun.com/jsf/core" prefix=3D"f"%>
It also requires you to add:
<jsp-descriptor>
=09<jsp-param>
=09=09<param-name>backwardCompatible</param-name>
=09=09<param-value>true</param-value>
=09</jsp-param>
</jsp-descriptor>
in the weblogic.xml, else there would be error in some of=20
the runtime expressions.
exception encountered:
[ERROR] - ContextLoader.initWebApplicationContext(177) |
Context initialization failed
java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFact=
ory
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Sou=
rce)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.cr=
eateD
ocumentBuilderFactory(XmlBeanDefinitionReader.java:200)
Have changed hibernate / spring / ehcache / xbean jars to the latest ones a=
nd done the required config. changes ...
But still the same exception, along with this one:
<BEA-101162> <User defined listener org.springframework.web.context.Context=
LoaderListener failed: org.springframework.beans.factory.BeanDefinitionStor=
eException: Unexpected exception parsing XML document from ServletContext r=
esource=20
Anyone had some idea ?
regards,
Saurabh
-
Re: Classpath isolation in Weblogic 9.1 and Xerces
hi,
i've been trying to solve my problem with xerces.jar and xml-apis.jar on th=
e classpath for over 3 days until I came across the post from merlin4269. E=
very time I had the prefer-web-inf-classes set to true I was getting "Class=
CastException: weblogic.xml.jaxp.RegistrySAXParserFactory". For sure the pr=
oblem 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 <s=
axparser-factory>org.apache.xerces.jaxp.SAXParserFactoryImpl</saxparser-fac=
tory> 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 (requi=
red if deploying BirtViewer in Weblogic) was to add below lines to weblogic=
-application.xml file
<prefer-application-packages>
<package-name>org.apache.xerces.*</package-name>
</prefer-application-packages>
good stuff merlin4269
-
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 recom=
mend the Implementation that should be used.