XALAN and XERCES on WL6

Hi!
I just can't get WLS6.0 to use new versions of XALAN and XERCES. I keep
getting errors that are obviously because Weblogic is loading an older
version of XALAN before my app ever gets loaded, and as a result I'm having
trouble with <xsl:param> and <xsl:variable> tags not being able to recognise
other params and variables in the top level scope. This is crucial to my
application but after a day of messing around with everything from
classpaths to startweblogic.cmd, I'm pretty much stuck.
Does ANYONE know how to fix this?
TIA,
Navneet

Hmm.. what's this I'm hearing about an XML registry for weblogic?
"Jeffrey Winter" <[email protected]> wrote in message
news:3ae702c5$[email protected]..
>
If you put the latest xerces.jar and xalan.jar file before anything elsein the
CLASSPATH in your startup command file it will work. I'm doing in rightnow with
Xerces 1.3.1 and Xalan 2.0.1.
If you're trying to use JAXP however, you'll have problems because WLalways returns
their own internal version of the DocumentBuilderFactory even if you putthe JAXP
1.1 jar file in the class path and specify theorg.apache.xerces.jaxp.DocumentBuilderFactory
in your registry.
We got around this by defining a stub subclass of DocumentBuilderFactoryand instantiating
is directly instead of through DocumentBuilderFactory.newInstance(). It'sa pain,
but after that you can get around using the older versions that they'vebaked
in.

Similar Messages

  • Xalan and Xerces

    Where do I get the compatible versions of above jars to do XSL Transformations. Pls help... Tried to do lot of research and not able to do much. Lates Xalan does not have XSLTProcessor, XSLTProcessorFactory and XSLTInputSource. I tried to use older version of Xalan and found that Xerces is not compatible with it.

    Xalan-Java version 2.6.0 distribution includes xercesImpl.jar from Xerces-Java 2.6.2.
    http://xml.apache.org/xalan-j/

  • Weblogic and xerces and xalan

    I understand that xerces and xalan are a part of the weblogic's distribution.
    Will BEA also upgrade to newer versions of these softwares as they are available?
    If not how do I use newer versions of these softwares with weblogic.
    This is becoming a critical issue for us as I already see a remarkable difference
    in performance while doing transformations. The newer versions of xalan and xerces
    are performing much better with the same xml and xsl documents as compared to
    the previous versions.

    According to that link your right it is not supported.
    Have you tried adding the xerces jars at the beginning of the classpath?

  • Xalan-j_2_0_1 xerces-1_3_1 and jdom-b6

    I know that people have already posted message regarding xalan, xerces compatability
    with weblogic 6.0sp1 but all the fixes suggested don't work when I use jdom!
    When using JDOM, if i put xerces before the weblogic_sp.jar then Hotspot will
    die with the following error when i start using jdom.
    # HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Error ID: 4F533F57494E13120E43505002D4
    if I put xerces after weblogic_sp.jar and before weblogic.jar then xalan gets
    a method not found error when I try a to execute transform() on a document. Also,
    I tried my transformation outside of weblogic and it worked just fine.
    here is the exception when i try to do the transform in weblogic
    java.lang.NoSuchMethodError
    at org.apache.xpath.patterns.NodeTest.execute(NodeTest.java:403)
    at org.apache.xpath.axes.PredicatedNodeTest.acceptNode(PredicatedNodeTest.java:388)
    at org.apache.xpath.axes.ChildTestIterator.nextNode(ChildTestIterator.java:193)
    at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:428)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2202)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
    at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:498)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2202)
    at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2085)
    at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1219)
    at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2942)
    at java.lang.Thread.run(Thread.java:484)

    I could see how that would fail if Weblogic was using the default registry
    values of:
    DocumentBuilderFactory="weblogic.apache.xerces.jaxp.DocumentBuilderFactoryIm
    pl"
    SAXParserFactory="weblogic.apache.xerces.jaxp.SAXParserFactoryImpl"
    it would find weblogic's internal classes.
    But if Weblogic is using an xml registry such as:
    DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"
    SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"
    and was starting with the system property of:
    ..-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.Transf
    ormerFactoryImpl ...
    Wouldn't JDOM correctly find the org.apache factories instead?
    I seem to be having a very similar problem to yours with 6.0 sp2; I'm not
    invoking JDOM directly, but I'm using Syslog from protomatter to handle
    logging; and Syslog DOES invoke the new SAXBuilder() that you cite. I'm
    using xalan 2.1.0 and xerces 1.3.1 placed after the weblogic jars. I also
    get a NoSuchMethodError during the transformer.transform, but the same
    document is successfully transformed at the command line
    TransformerFactory tFactory = TransformerFactory.newInstance();
    String xString = xmlDoc.toString() ;
    StringReader xmlReader = new StringReader( xString );
    StreamSource streamSource = new StreamSource( xmlReader ) ;
    Source stylesheet = tFactory.getAssociatedStylesheet( streamSource,
    media, title, charset);
    Transformer transformer = tFactory.newTransformer(stylesheet);
    StreamResult streamResult = new StreamResult( outWriter ) ;
    transformer.transform( new StreamSource( new StringReader( xString ) ),
    streamResult ) ;
    "Eric Van" <[email protected]> wrote in message
    news:[email protected]...
    >
    FIGURED IT OUT!
    The problem is that JDOM's SAXBuilder, when used with weblogic, loadsweblogic's
    jaxp sax parser, which for some reason doesn't work if the newest xercesis placed
    in the classpath before weblogic_sp.jar.
    So, to get around this all you have to do is tell JDOM's SAXBuilder to useanother
    parser when you create it, preferable one that WORKS!!
    I used the one that comes with xerces
    new SAXBuilder("org.apache.xerces.parsers.SAXParser")
    and it worked fine.
    Hope this helps everyone else out.
    "Steve Liles" <[email protected]> wrote:
    Eric's solution works great if you can get away with always using a
    DOMBuilder.
    >>
    However, I can't always use a DOMBuilder - I need to use the SAXBuilder
    in one particular
    case where I need to specify the SystemId dynamically as in:
    .. SAXBuilder builder = new SAXBuilder(reader, _systemId); ..
    There is no DOMBuilder equivalent. Anyone have any suggestions?
    cheers,
    Steve Liles
    "Eric Van" <[email protected]> wrote:
    Looks like if you avoid using the org.jdom.input.SAXBuilder and usethe
    org.jdom.input.DOMBuilder
    instead that the Hotspot error can be avoided. I have a feeling thatthere
    is
    something else going on here, but OH WELL, NOW IT WORKS.
    "Eric Van" <[email protected]> wrote:
    I know that people have already posted message regarding xalan, xerces
    compatability
    with weblogic 6.0sp1 but all the fixes suggested don't work when I
    use
    jdom!
    When using JDOM, if i put xerces before the weblogic_sp.jar then
    Hotspot
    will
    die with the following error when i start using jdom.
    # HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Error ID: 4F533F57494E13120E43505002D4
    if I put xerces after weblogic_sp.jar and before weblogic.jar thenxalan
    gets
    a method not found error when I try a to execute transform() on a
    document.
    Also,
    I tried my transformation outside of weblogic and it worked just fine.
    here is the exception when i try to do the transform in weblogic
    java.lang.NoSuchMethodError
    atorg.apache.xpath.patterns.NodeTest.execute(NodeTest.java:403)
    atorg.apache.xpath.axes.PredicatedNodeTest.acceptNode(PredicatedNodeTest.java:
    388)
    atorg.apache.xpath.axes.ChildTestIterator.nextNode(ChildTestIterator.java:193)
    atorg.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja
    va:428)
    atorg.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
    a:193)
    atorg.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
    erImpl.java:2202)
    atorg.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
    739)
    atorg.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja
    va:498)
    atorg.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
    a:193)
    atorg.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
    erImpl.java:2202)
    atorg.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
    Impl.java:2085)
    atorg.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
    ava:1219)
    atorg.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2942)
    at java.lang.Thread.run(Thread.java:484)

  • Weblogic 8.1 with Xalan 2.6.1 and Xerces 2.6.2 ?!?

    Hi,
    I'm trying to use Xalan 2.6.1 and Xerces 2.6.2 with Weblogic 8.1SP2, but no result yet...
    I found docs on bea website:
    http://edocs.bea.com/wls/docs81/pdf/faq.pdf
    http://e-docs.bea.com/wls/docs81/xml/xml_admin.html
    where I found this:
    "Warning: In version 8.1 of WebLogic Server, you can plug in only the following versions of the Apache Xerces parser:
    Xerces 2.2.0
    Xerces 2.3.0
    Xerces 2.4.0
    In addition, you can plug in only those versions of the Apache Xalan transformer that are compatible with the preceding versions of the Apache Xerces parser."
    I can't find any solution to this?
    I tried various option:
    - xercesImpl2.6 in the classpath variable
    - xalan2.6.2 in the endorsed lib
    - registered factory impl names in xml registry
    - prefer web-inf set to true
    Errors result in following exception:
    - NoMethodFound (rhino classes inside weblogic.jar)
    - ClassCast (xalan/xerces conflicts)
    Any one has suggestions?
    Regards
    Leonardo

    According to that link your right it is not supported.
    Have you tried adding the xerces jars at the beginning of the classpath?

  • [svn:fx-trunk] 7796: get the correct locales of batik and xerces jars into the build

    Revision: 7796
    Author:   [email protected]
    Date:     2009-06-12 13:01:48 -0700 (Fri, 12 Jun 2009)
    Log Message:
    get the correct locales of batik and xerces jars into the build
    bug: https://bugs.adobe.com/jira/browse/SDK-21565
    qa: i18n team (make sure they're all there)
    checkintests: pass
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21565
    Modified Paths:
        flex/sdk/trunk/build.xml

    Originally posted by: rosec.messagingdirect.com
    I'll look into it; I'm a bit under the gun here and can't easily upend
    my development environment at this time, but hopefully I can look into
    it early next week. Thanks for the pointer.
    Daniel Megert wrote:
    > Chris Rose wrote:
    >> I don't know if this has been asked before (and you'd be amazed at how
    >> hard it is to find specific information when your search query is
    >> "eclipse 100% cpu usage opening class files in a jar"!) but, well,
    >> that's what I'm getting:
    >>
    >> When I open a class file in the editor that is contained in a jar file
    >> anywhere on a Java project's classpath, one of my processor pegs at
    >> 100% usage for anywhere from 15-120 seconds and eclipse becomes
    >> non-responsive for that period of time, not even redrawing the UI.
    >>
    >> This occurs for jars as large as the jboss client jar and the weblogic
    >> 80Mb uber-jar and for jars as small as a 241kb library jar.
    >>
    >> Is there anything I can do to track down WHY this is happening? I end
    >> up having to trace into third party code a lot while debugging
    >> container behaviour and this plays merry havoc with the timeouts for
    >> remote calls, so I'm quite motivated to suss out why it's happening.
    >>
    >> Eclipse details are attached.
    > There was a bug regarding big JARs on the build path. Can you try
    > whether this still happens using 3.4 M7. If so, please file a bug report
    > with steps to reproduce. Also, please create some stack dumps while
    > waiting and attach them to the bug report.
    >
    > Dani
    Chris Rose
    Developer Planet Consulting Group
    (780) 577-8433
    [email protected]

  • DOM and XERCES

    Hi Friends,
    I am using ECLIPSE IDE and writing a java class using DOM and XERCES
    to traverse through an xml file which is already stored in the local drive by hard coding the path in the code.
    and this is working fine.
    But now i want to traverse an Active Document (an xml file that is already opened when u launch an Eclipse application) so.. is there any method in DOM to access or traverse through the current Active Document ?
    if there is please let me know.. it's urgent.. help me on this please.
    Thanks in advance,
    -Karthik

    Can u send me the code. You might have missed out something on reading that XML .

  • Problem with Xalan and JDK and Tomcat

    hi all,
    i have a webapplication under Apache Tomcat 4.1.30/Linux which use an XML/XSL transformation.
    I got the following error:
    org.apache.xml.utils.WrappedRuntimeException: The output format must have a '{http://xml.apache.org/xalan}content-handler' property!
         at org.apache.xalan.serialize.SerializerFactory.getSerializer(SerializerFactory.java:142)
         at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java:1048)
         at
    Any suggestion ?
    Cheers.
    Stefano

    Here is an anwser for you
    http://testdrive.mapinfo.com/TECHSUPP/MIPROD.NSF/0/4a9bc2a8f684237f85256e63006f9ad4?OpenDocument
    JDK 1.4 and above, I believe, is packaged with an old version of Xalan jar. So sometimes, like when trying to run XSLTC, you have to override the JDK 1.4 Xalan version with the newer Xalan.jar. Or else your newer Xalan.jar classes are not looked at. You do this by putting your Xalan.jar in the /lib/endorsed directory. or /common/endorsed in this case.
    http://xml.apache.org/xalan-j/faq.html#faq-N100CC
    Hope this helps

  • SAX parsers hanging (crimson and xerces) on InputStream

    Hi,
    While searching I've seen a lot of postings about sax parsers hanging on InputStreams. Many have no replies, some do. So far I've tried several fixes mentioned to no avail. I've seen it hang in the startDocument() and hang after reading the entire document. All sorts of hangs . . . Oh and in some situations it works fine, but that's not good enough.
    1. I tried wrapping the InputStream as described at the jdom.org FAQ with my own InputStream that hides the close() call. Then I pass my wrapper InputStream to the saxparser.parse() method. This didn't work, because you need to wrap SocketInputStream, not InputStream and SocketInputStream has package permissions which keep me from inheriting from it. If somebody can shed some light on how to do this, I'll try again, but for now that approach is shelved.
    2. I tried adding an EOF character, 0x1A, to the end of the xml string being sent over the socket. The parser still hangs.
    Any more suggestions?
    Thanks,
    Steve

    Here's a faq question and answer from jdom.org. Can anybody explain how to do this in more detail? He mentions two workarounds. I've done the second and it works fine, but I'd prefer to get the first workaround working instead -- the wrapper InputStream idea.
    Why does passing a document through a socket sometimes hang the parser?
    The problem is that several XML parsers close the input stream when they read EOF (-1). This is true of Xerces, which is JDOM's default parser. It is also true of Crimson. Unfortunately, closing a SocketInputStream closes the underlying SocketImpl, setting the file descriptor to null. The socket's output stream is useless after this, so your application will be unable to send a response. To workaround, protect your socket's input stream with an InputStream wrapper that doesn't close the underlying stream (override the close() method), or read everything into a buffer before handing off to the JDOM builder:
    byte[] buf = new byte[length];
    new DataInputStream(inputStream).readFully(buf);
    InputStream in = new ByteArrayInputStream(buf);
    (Contributed by Joseph Bowbeer)

  • WSAD 5.0 and Xerces

    Has anybody used Toplink with WSAD 5.0. org.apache.xerces.framework.XMLParser isn't supported in the version of xerces.jar. The xerces.jar that comes with Toplink screws up the app server. The early release of WSAD 5.0 and 4.0 are fine but we need to move to servlet 2.3 and don't want to lose Toplink!
    Thanks for any help.

    I found the same issue in an earlier topic (Maarten Coene (Feb 24, 2003 7:28 AM)). The work around seems fine but is there news on 9.0.4?
    Thanks

  • Using Applets and RMI on WL6 - Error marshaling transport header; nested exception is:  - java.io.EOFException

    I have a project that I am porting from WL5.1 to WL6. It was working fine
    in WL5.1
    but cannot get it working in WL6. So, I went back to the HelloWorld
    example to
    see if I could get it working. The problem I am having is basically getting
    applet to
    talk to a server via RMI. The applet works fine alone and RMI works fine
    alone.
    I can't get the applet to talk to the server via RMI.
    I am trying to get the "HelloWorld" applet example in WL6 working with RMI.
    I previously had the same app working in WL5.1 with SP9 but cannot get it
    working in WL6.
    I am running WebLogic Server 6.0 with SP2.
    I have registered a startup class in the WebLogic console
    named "HelloServer". When starting up the server, it states
    that the HelloImpl class has been registered as "HelloServer".
    When starting up the client applet I get the following error:
    java.rmi.MarshalException: Error marshaling transport header; nested
    exception is:
    java.io.EOFException
    These are two different methods of looking up the same object.
    The exception occurs at the "lookup" method call in both cases.
    "myserver" is the name of my machine that WL is running on.
    7001 is the port that WL is using.
    Registry reg = LocateRegistry.getRegistry("myserver", 7001);
    obj = (Hello)reg.lookup("HelloServer");
    or...
    obj = (Hello)weblogic.rmi.Naming.lookup("rmi://" +
    getCodeBase().getHost() + ':' + port + "/HelloServer");
    I previously ran this same program under WL5.1 SP9 and everything works
    fine.
    I defined the startupClass in the weblogic.properties file in WL5.1
    Can anyone tell my what is causing this exception and how to correct the
    problem?
    Thanks
    Terry Antle

    "Terry Antle" <[email protected]> writes:
    These are two different methods of looking up the same object.
    The exception occurs at the "lookup" method call in both cases.
    "myserver" is the name of my machine that WL is running on.
    7001 is the port that WL is using.
    Registry reg = LocateRegistry.getRegistry("myserver", 7001);
    obj = (Hello)reg.lookup("HelloServer");
    or...
    obj = (Hello)weblogic.rmi.Naming.lookup("rmi://" +
    getCodeBase().getHost() + ':' + port + "/HelloServer");
    I previously ran this same program under WL5.1 SP9 and everything works
    fine.
    I defined the startupClass in the weblogic.properties file in WL5.1
    Can anyone tell my what is causing this exception and how to correct the
    problem?I don't know what the problem is but you shouldn't be using either of
    these methods for looking up RMI objects - you should use JNDI instead.
    Thanks
    andy

  • Authenticating against both RDBMS and LDAP in WL6.0

    Hi,
    We are designing a webapp that will be accessible to both internal and
    external users. For internal users, we would like to authenticate via LDAP;
    for external users we would like to use RDBMS. In WL5.1, this looked to be
    possible with the DelegatingRealm, however this has been removed in WL6.0.
    Two questions:
    1) Why was it removed?
    2) How can we get this functionality in WL6.0?
    Thanks much for your help,
    -jt

    We are currently deployed on WL5.1 with a similar situation as you and in
    the process of migrating to WL6. We are Authenticating against LDAP and
    Authorizing against RDBMS. But I can't see how you could tell it to go
    one way for certain users and another for other users.
    The delegatingrealm in WL5 was intended to split the responsibility of
    Authenticating to one source and Authorization to another. To make this
    work for your Application of splitting internal and external users
    security, I suppose you can do it if you can somehow pass the information
    to the Security Realm the type of the user that is logging in. Maybe you
    can make this code a part of the userid such as ext_uersID or int_userID.
    Doing this will allow you to filter the where the users are coming from
    and Direct them to the appropriate security realm.
    As far as WL6 goes, the Delegating realm class is no longer available
    since the security model for WL6 is different from WL5. But you can take
    a look at what they did with the RDBMSrealm example and use that. This is
    what we did to make our Security work in WL6. However, you can no longer
    store ACLs in the RDBMS realm in WL6.
    Hopes this helps.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    You will need to create a Custom Realm which delegates to both your RDBMS
    and LDAP perhaps using the Weblogic supplied RDBMS and LDAP realms
    "Jonathan Thompson" <[email protected]> wrote in message
    news:3accf1a3$[email protected]..
    Hi,
    We are designing a webapp that will be accessible to both internal and
    external users. For internal users, we would like to authenticate viaLDAP;
    for external users we would like to use RDBMS. In WL5.1, this looked tobe
    possible with the DelegatingRealm, however this has been removed in WL6.0.
    >
    Two questions:
    1) Why was it removed?
    2) How can we get this functionality in WL6.0?
    Thanks much for your help,
    -jt
    [att1.html]

  • SunOne and Xerces-c

    We developed a C++ native driver which linked with Xerces-c lib. When our jsp under SunOne to load our native driver and parse xml file cause sunOne crashed at /opt/SunWappserver7/lib/libxerces-c.so commonInit(...). It looks like sunOne's Xerces-c conflict with our Xerces-c. We used Xerces-c2.2. Did anyone knows what version of Xerces sunOne used?
    Thank you.

    Your question seems to be about the Sun ONE application server, and not about C++. You could try the Java Technology forum, but you probably need to go the tech support route for the app server. It's not likely that anyone in the C++ forum would be able to help.

  • Xalan and NetWeaver

    Hi everybody
    We are trying to deploy our application to NetWeaver 2004. Since our application needs Xalan 2.6, our test failed. Is there any way to use a different (newer) version of Xalan in NW? If this is not possible, is there any NW version that ships with Xalan 2.6?
    Thanks in advance

    Hi,
    It really depends on what type of application you are referring to. Of course, there are different ways of setting up an external jar file as a library in different types of component (web module, EAR, WebDynpro etc).
    Which one are you after?
    Thanks,
    Rajit

  • Xalan and EXSLT problems - namespace issue?

    Hi all,
    I have some code that runs fine when using some older Xalan libraries:
    import org.apache.xalan.extensions.ExpressionContext;
    import org.apache.xpath.NodeSet;I was trying to upgrade to use the latest libraries (from what I understand are included in the latest version of the JDK):
    import com.sun.org.apache.xalan.internal.extensions.ExpressionContext;
    import com.sun.org.apache.xpath.internal.NodeSet;However when running exactly the same code I get the following exception:
    javax.xml.transform.TransformerException: java.lang.NoSuchMethodException: For extension function, could not find method
    I think this could be related to EXSLT namespaces or something but am really not sure,
    Any help appreciated,

    Hi all,
    I have some code that runs fine when using some older Xalan libraries:
    import org.apache.xalan.extensions.ExpressionContext;
    import org.apache.xpath.NodeSet;I was trying to upgrade to use the latest libraries (from what I understand are included in the latest version of the JDK):
    import com.sun.org.apache.xalan.internal.extensions.ExpressionContext;
    import com.sun.org.apache.xpath.internal.NodeSet;However when running exactly the same code I get the following exception:
    javax.xml.transform.TransformerException: java.lang.NoSuchMethodException: For extension function, could not find method
    I think this could be related to EXSLT namespaces or something but am really not sure,
    Any help appreciated,

Maybe you are looking for