XSL problem with javax.xml.transform.sax.SAXTransformerFactory

Dear sirs,
I use SAXTransformerFactory in order to transform a Hashtable to SAX Event and apply a XSL.
I try this code with the lastest version of apache parser.
It run well.
But, I put this software to WEBLOGIC 6.2 server and no run.
this check is true:
          if (transFact.getFeature(javax.xml.transform.sax.SAXTransformerFactory.FEATURE)&&transFact.getFeature(javax.xml.transform.sax.SAXSource.FEATURE))
Some one can help me.
Thank in avance
The code:
java.io.ByteArrayOutputStream bout = new java.io.ByteArrayOutputStream();
          com.cajarural.xml.HashtableParser parser = new com.cajarural.xml.HashtableParser(hashtable);
          // Codigo para el TansformerHandler
          // set the destination for the XSLT transformation
               javax.xml.transform.TransformerFactory transFact = javax.xml.transform.TransformerFactory.newInstance();
               if (transFact.getFeature(javax.xml.transform.sax.SAXTransformerFactory.FEATURE)&&transFact.getFeature(javax.xml.transform.sax.SAXSource.FEATURE))
javax.xml.transform.sax.SAXTransformerFactory saxTransFact = (javax.xml.transform.sax.SAXTransformerFactory) transFact;
javax.xml.transform.sax.TransformerHandler transHand = saxTransFact.newTransformerHandler(templates);
transHand.setResult(new javax.xml.transform.stream.StreamResult(bout));
parser.setContentHandler(transHand);
// attach the XSLT processor to the           parser.parse();
          return new String(bout.toByteArray());

put Xalan in your war file then try using this kind of commands:     System.setProperty("org.xml.sax.parser", "org.apache.xerces.parsers.SAXParser");
System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.TransformerFactoryImpl");This tells JAXP what implementations it should use without even asking your administrator to modify the WebLogic setup...
It's what I've done with the WLS7.0 server I am using ;-)

Similar Messages

  • Styling XML with XSLT Problem with javax.xml.transform???

    I have been trying to make a transformation and seem to be having a problem in that javax.xml.transform can not be found while using jdk1.3....If I use jdk1.4, there is no problem....
    Does anyone know how I can get things to work using jdk1.3???
    (Description of what I am doing...1) Building XML Source 2) Setting up the XSLT File 3) Building Source Object 4) Build Result Object 5) Transforming the Data.....MY RESULT SHOULD BE AN HTML PAGE)
    I have tried putting xerces.jar and xalan.jar in my CLASSPATH....but this still doesn't work....onyl thing that has worked is using jdk1.4 as my JAVA_HOME....
    PLEASE HELP!!!!

    PLEASE HELP....your advice here would be greatly appreciated.....

  • Problem with JBuilder and javax.xml.transform package

    Hi,
    My JBuilder 7 can not find javax.xml.transform package. i use javax.xml.parsers package but i can not access to javax.xml.transform. is there a problem or something necessary to do to access that?
    Best Wishes - WiseWarrior

    Hey WiseWarrior,
    your problem is directly related to your jar file in run time. The xml parser jar which you are using to perform transfor is not having the appropriate classes, take the latest version of xalan it has transform package and put it into your class path, it will work.
    CheerS!!
    Sandeep Raikwar

  • Problem with return of javax.xml.transform.Source impl from webService

    I have a web services that needs to return an XML string to the calling client. If I return the XML as a String object it gets deserialized twice and the end result is no longer XML. My research indicates that I can return an implementation of javax.xml.transform.Source and this will cause SOAP to attach the XML string to the message rather than embed it (protecting it from deserialization). The following is the effective part of my method:
    public Source[] consumeTextMessage(String id) throws RemoteException {
    try {
    MessageConsumer mc = new MessageConsumer();
    String[] messages = mc.consumeTextMessage(id);
    StreamSource[] sources = new StreamSource[messages.length];
    for(int i = 0; i < messages.length; i++) {
    sources[ i ] = new StreamSource();
    return sources;
    } catch(RemoteException e) {
    throw e;
    note: the mc.consumeTextMessage(id) call works correctly and I know that I'm not putting anything in the StreamSource objects in the loop to build the array of StreamSource objects - just trying to get SOMETHING to work
    so this deploys without problem, but when I try to get a wsdl for the webservice i get a Server 500 error; the log says this:
    javax.servlet.ServletException: WSDL Generation exception: java.lang.Exception javax.xml.transform.Source is an abstract class: cannot be instanciated
    ok.... if I change the method return type to a concrete class (StreamSource[]), redeploy and try to get a wsdl, I get this absolutely crazy error:
    javax.servlet.ServletException: WSDL Generation exception: java.lang.Exception java.io.Reader is an abstract class: cannot be instanciated
    I have NO clue why it thinks it needs a Reader.
    If I change the method return type to String[] (and make the various adjustments to the method) then it deploys ok and gives me a good WSDL (though it still doesn't work because the Strings are deserialized twice so this isn't a viable solution but it does show that my webservice config is correct).
    So... bottom line seems to be that the webService "engine" of 10g AS doesn't like Source or StreamSource.....
    Any ideas what I can do??

    Funny story here: trying to deploy a different webserivce all together and got the same error message; thought I remembered seeing it before but wasn't sure; did a google search on it and lo and behold came across my first posting in this thread.... crazy.
    Anyway, I have discovered something that answers some of the questions I had in my first post: It seems that the argument types used in a webservice signature MUST be CONCRETE classes (and I would think primitives would work too though I don't remember trying them) - they can not be Interfaces or abstract classes. Probably if I read the webservices spec it would tell me that.
    So the error I was getting before was because Source was not a concrete class, and presumably the second error was caused by some signature somewhere along the line using the Reader abstract class.
    Fun stuff.

  • Javax.xml.transform.TransformerException durin XSL Transformation in Java

    Hi,
    Below is my piece of code where i access a web service that returns a xml as a string. I apply a xsl tranformation on it and try to store the result as a string. I get this error message
    javax.xml.transform.TransformerException: Result object passed to ''{0}'' is invalid.
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(Unknown Source)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
         at NewService.main(NewService.java:52)My Code:
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.StringReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.rmi.RemoteException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceException;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    public class NewService {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              String endPoint = "http://localhost:8080/SampleDynamicWebProj/services/SampleClient";
              Service service = new Service();
              Call callOne;
              try {
                   callOne = (Call) service.createCall();
                   callOne.setTargetEndpointAddress(new URL(endPoint));
                   callOne.setOperationName(new QName("http://DefaultNamespace",
                             "getXMLString"));
                   String concated = (String) callOne.invoke(new Object[] { "s" });
                   InputStream xsltFile = new FileInputStream("xslpackage/empTran.xsl");
                   Source xmlSource = new StreamSource(new StringReader(concated));
                 Source xsltSource = new StreamSource(xsltFile);
                 TransformerFactory transFact =
                    TransformerFactory.newInstance();
                 Transformer trans = transFact.newTransformer(xsltSource);
                 Result result = new StreamResult();
                 trans.transform(xmlSource, result);
                 System.out.println(result.toString());
              } catch (ServiceException e) {
                   e.printStackTrace();
              } catch (MalformedURLException e) {
                   e.printStackTrace();
              } catch (RemoteException e) {
                   e.printStackTrace();
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (TransformerConfigurationException e) {
                   e.printStackTrace();
              } catch (TransformerException e) {
                   e.printStackTrace();
    }I get the transformed XML into a Result object, but when i do a toString() oon it, i get the above exception.
    any help wil be appreciated,
    Dilip

    Oh well, yes it was a typo in address tag...ok agreed that its a bad example, check this out then,
    i have a XML data that i convert to a html format using xsl transformation, now this converted html has to be shown in a html page(i use the out.write option).
    so my initial xml looks like this ::
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Results>
        <ColumnCount>6</ColumnCount>
        <Columns>
            <column>UID</column>
            <column>UserName</column>
            <column>Password</column>
            <column>LastName</column>
            <column>FirstName</column>
            <column>EmailAddress</column>
        </Columns>
        <Rows>
            <Row>
                <value>1</value>
                <value>userone</value>
                <value>password-1</value>
                <value>Anant</value>
                <value>Dilip</value>
                <value>[email protected]</value>
            </Row>
            <Row>
                <value>2</value>
                <value>usertwo</value>
                <value>password-2</value>
                <value>Palli</value>
                <value>Gilli</value>
                <value>[email protected]</value>
            </Row>
        </Rows>I apply XSL transformation on this to get a HTML which i will be writing into my output screen hoping that the user will see it in a tabular format!
    <[!CDATA["
    <?xml version="1.0" encoding="UTF-8"?>
    <table border="1">
    <tr bgcolor="#9acd32">
    <th align="left">UID</th>
    <th align="left">UserName</th>
    <th align="left">Password</th>
    <th align="left">LastName</th>
    <th align="left">FirstName</th>
    <th align="left">EmailAddress</th>
    </tr>
    <tr>
    <td>1</td>
    <td>userone</td>
    <td>password-1</td>
    <td>Anant</td>
    <td>Dilip</td>
    <td>[email protected]</td>
    </tr>
    <tr>
    <td>2</td>
    <td>usertwo</td>
    <td>password-2</td>
    <td>Palli</td>
    <td>Gilli</td>
    <td>[email protected]</td>
    </tr>
    </table>
    "]]>The entire data is passed to a XML parser . I want the transformed xml data (which will be inside a <status></status> tag to be untouched by this parser. As you see i have put the transformed xml in a CDATA tag, but this aint helping me...
    need urgent help,
    Dilip

  • What is default value of the javax.xml.transform.Transformer sys property?

    Hi all
    In my other thread "javax.xml.transform." last replied to on 17/04/05, I described that having & in my xml was causing TransformerExceptions when I attempted to apply a stylesheet to the xml.
    I've now deployed exactly the same xml, xsl and java on a completely different environment and have found that the error does NOT occur.
    This completely baffled me at first, but then I read the following in the API documentation for TransformerFactory: -
    "A TransformerFactory instance can be used to create Transformer and Templates objects.
    The system property that determines which Factory implementation to create is named "javax.xml.transform.TransformerFactory". This property names a concrete subclass of the TransformerFactory abstract class. If the property is not defined, a platform default is be used.
    I think that the key must lie in the system property "javax.xml.transform.TransformerFactory". The two environments must be using a different value for this - one representing a class that objects to & and one that doesn't. In neither case do I actually set this property, so my main question is what does it default to and how can I find out what each environment is using for this?
    I'm really baffled here guys, any help would be massively appreciated.
    Thank you
    Jon

    javax.xml.transform.TransformerFactory is a real class implemented by someone. It looks at the system property to figure out what actual implementation to use. It the property doesn't exist, it uses the class that came bundled with the javax.xml.transform.TransformerFactory class you are using.
    Here, for instance, is the javax.xml.transform.TransformerFactory that comes with jdk1.4.2
        public static TransformerFactory newInstance()
            throws TransformerFactoryConfigurationError
            try {
                return (TransformerFactory) FactoryFinder.find(
                    /* The default property name according to the JAXP spec */
                    "javax.xml.transform.TransformerFactory",
                    /* The fallback implementation class name */
                    "org.apache.xalan.processor.TransformerFactoryImpl");
            } catch (FactoryFinder.ConfigurationError e) {
                throw new TransformerFactoryConfigurationError(e.getException(),
                                                               e.getMessage());
        }

  • Javax.xml.transform.TransformerConfigurationException

    Hi,
    I am deploying a bpel process and a bpel test to a remote oc4j, then running the tests via an ant build script.
    The tests are run fine and the results are created in an xml file, however the bpeltest task then try's to convert the xml to a junit report xml format and throws an exception when it can't find bpeltest-junit.xsl.
    The exception is vague and I don't know if its because it can't find the xls file our one of its dependancies.
    exception,
    [bpeltest] ERROR: 'File "" not found.'
    [bpeltest] FATAL ERROR: 'Could not compile stylesheet'
    [bpeltest] javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    [bpeltest] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:824)
    [bpeltest] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:619)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.doXForm(BpelTest.java:615)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.createJUnitReport(BpelTest.java:685)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.createReport(BpelTest.java:877)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.execute(BpelTest.java:1033)
    [bpeltest] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [bpeltest] at org.apache.tools.ant.Task.perform(Task.java:364)
    [bpeltest] at org.apache.tools.ant.Target.execute(Target.java:341)
    [bpeltest] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [bpeltest] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [bpeltest] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [bpeltest] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    [bpeltest] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [bpeltest] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [bpeltest] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [bpeltest] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [bpeltest] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    My ant script invokes the test as follows,
    <bpeltest
         user="oc4jadmin"
                        password="babylon5"
         hostname="wells175732.int.rdel.co.uk"
                        httpport="80"
         domain="default"
                        process="AmazonFlow"
         rev="${rev}"
                        name="AmazonFlowTests"
         timeout="${bpeltest.timeout}"
         numWorkers="${bpeltest.numWorkers}"
         minCoverage="${bpeltest.minCoverage}"
         callHandler="${bpeltest.callHandler}"
         context="${bpel.context.properties}"
         resultsDir="${basedir}/bpel_test_results"
         resultsPropertyFile="${basedir}/bpel_test_results/AmazonFlow.properties"
                        failonerror="false"
         verbose="false"/>
    the top of my build script imports the following dependancies,
    <property file="${basedir}/conf/ant-oracle.properties"/>
    <property name="bpel.home" value="${oracle.home}/bpel"/>
    <import file="${bpel.home}/utilities/ant-orabpel.xml"/>
    <import file="${basedir}/conf/ant-oracle.xml"/>
    <property file="${bpel.home}/utilities/ant-orabpel.properties"/>
    <property file="${bpel.home}/utilities/bpel_build_template.properties"/>
    ant-oracle.xml conatins all necessary jar files including the orabpel-ant.jar where the bpeltest-junit.xsl resides under com\collaxa\cube\ant
    In the bpelTest ant task their is an attribute callHandler="${bpeltest.callHandler}"
    this property value is defined in the bpel_build_template.properties file but is empty,
    bpeltest.callHandler =
    I tried changing this to
    bpeltest.callHandler = com.collaxa.cube.ant.taskdefs.BpelTest
    and build script threw the following exception,
    [bpeltest] java.lang.ClassCastException: com.collaxa.cube.ant.taskdefs.BpelTest
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.loadHandler(BpelTest.java:425)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.runTestsOverRMI(BpelTest.java:544)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.runTests(BpelTest.java:603)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.execute(BpelTest.java:1024)
    [bpeltest] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [bpeltest] at org.apache.tools.ant.Task.perform(Task.java:364)
    [bpeltest] at org.apache.tools.ant.Target.execute(Target.java:341)
    [bpeltest] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [bpeltest] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [bpeltest] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [bpeltest] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    [bpeltest] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [bpeltest] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [bpeltest] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [bpeltest] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [bpeltest] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    the xsl file looks as follows,
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="XSD">
    <schema location="UTResult.xsd"/>
    <rootElement name="testRunResults" namespace="http://xmlns.oracle.com/bpel/unittest"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="XSD">
    <schema location="JUnit.xsd"/>
    <rootElement name="testsuites" namespace=""/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 10.1.2.0.0(build 050412) AT [SUN APR 17 02:06:34 PDT 2005]. -->
    ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://xmlns.oracle.com/bpel/bpeltest"
    xmlns:utd="http://xmlns.oracle.com/bpel/instancedriver"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:java="http://xml.apache.org/xslt/java"
    exclude-result-prefixes="xsl ns0 utd xsd ldap xp20 bpws ora orcl">
    <xsl:param name="minCodeCoverage">0</xsl:param>
    <xsl:param name="minPartnerCodeCoverage">0</xsl:param>
    <xsl:param name="packageFormat"/>
    <xsl:template match="/">
    <testsuites>
    <xsl:for-each select="/ns0:testRunResults/ns0:testSuite">
    <testsuite>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getQualifiedSuite($packageFormat, ../@domain, ../@processName, ../@processRevision, @name)" />
    </xsl:attribute>
    <xsl:attribute name="failures">
    <xsl:value-of select="@numFailures"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="@durationInSeconds"/>
    </xsl:attribute>
    <xsl:attribute name="tests">
    <xsl:value-of select="@numTests"/>
    </xsl:attribute>
    <xsl:attribute name="errors">
    <xsl:value-of select="0"/>
    </xsl:attribute>
    <properties>
    <xsl:for-each select="../ns0:properties/ns0:property">
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="@name"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="@value"/>
    </xsl:attribute>
    </property>
    </xsl:for-each>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'run.start.date'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="../@startDate"/>
    </xsl:attribute>
    </property>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'run.end.date'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="../@endDate"/>
    </xsl:attribute>
    </property>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'suite.start.date'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="@startDate"/>
    </xsl:attribute>
    </property>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'suite.end.date'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="@endDate"/>
    </xsl:attribute>
    </property>
    </properties>
    <xsl:for-each select=".//ns0:testResult">
    <testcase>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.testToClass(@testName)"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="@durationInSeconds"/>
    </xsl:attribute>
    <xsl:attribute name="classname">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.testToQualifiedClass($packageFormat, @domain, @processName, @processRevision, @testName)"/>
    </xsl:attribute>
    <xsl:for-each select=".//ns0:executionError">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getExecutionErrorTitle()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getExecutionErrorMessage(.)"/>
    </xsl:attribute>
    </failure>
    </xsl:for-each>
    <xsl:for-each select=".//ns0:xmlAssertion">
    <xsl:if test="(@passed = &quot;false&quot;) or (@wasExecuted = &quot;false&quot;)">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getFailureType(@wasExecuted, @fatal)"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getXMLFailureMessage(local-name(..), ../@instanceRefID, ../@testName, @wasExecuted, @fatal, utd:message, @activityName, @variableName, @partName, utd:actualPath, @iteration)"/>
    </xsl:attribute>
    </failure>
    <xsl:for-each select="ns0:xmlDiff">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getXMLDiffType()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getXMLDiffMessage(.)"/>
    </xsl:attribute>
    </failure>
    </xsl:for-each>
    </xsl:if>
    </xsl:for-each>
    <xsl:for-each select=".//ns0:valueAssertion">
    <xsl:if test="(@passed = &quot;false&quot;) or (@wasExecuted = &quot;false&quot;)">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getFailureType(@wasExecuted, @fatal)"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getFailureMessage(local-name(..), ../@instanceRefID, ../@testName, @wasExecuted, @fatal, utd:message, @activityName, @variableName, @partName, utd:actualPath, utd:expected,ns0:actualValue, @iteration)"/>
    </xsl:attribute>
    </failure>
    </xsl:if>
    </xsl:for-each>
    <xsl:for-each select=".//ns0:activityAssertion">
    <xsl:choose>
    <xsl:when test="@passed = &quot;false&quot;">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getActivityAssertionTitle()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getActivityAssertionMessage(local-name(..), ../@instanceRefID, ../@testName, @activityName, ns0:expectedExecutionCount, ns0:actualExecutionCount)"/>
    </xsl:attribute>
    </failure>
    </xsl:when>
    </xsl:choose>
    </xsl:for-each>
    </testcase>
    </xsl:for-each>
    </testsuite>
    </xsl:for-each>
    <!-- *************************
    begin code coverage logic
    ************************* -->
    <xsl:if test="$minCodeCoverage &gt; 0">
    <testsuite>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageSuiteName($packageFormat, ns0:testRunResults/@domain, ns0:testRunResults/@processName, ns0:testRunResults/@processRevision)" />
    </xsl:attribute>
    <xsl:attribute name="failures">
    <!-- count( (if the main process coverage is too low) + (number of sub process's with insufficient coverage) ) -->
    <xsl:value-of select="count(/ns0:testRunResults/ns0:codeCoverage[@processName = /ns0:testRunResults/@processName and @processRevision = /ns0:testRunResults/@processRevision and $minCodeCoverage &gt; @coverage] | /ns0:testRunResults/ns0:codeCoverage[(@processName != /ns0:testRunResults/@processName or @processRevision != /ns0:testRunResults/@processRevision) and $minPartnerCodeCoverage &gt; @coverage])"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="'0'"/>
    </xsl:attribute>
    <xsl:attribute name="tests">
    <xsl:choose>
    <xsl:when test="$minPartnerCodeCoverage = 0">
    <xsl:value-of select="1"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="count(/ns0:testRunResults/ns0:codeCoverage)"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    <xsl:attribute name="errors">
    <xsl:value-of select="'0'"/>
    </xsl:attribute>
    <properties>
    <xsl:for-each select="/ns0:testRunResults/ns0:properties/ns0:property">
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="@name"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="@value"/>
    </xsl:attribute>
    </property>
    </xsl:for-each>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'required.coverage'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="$minCodeCoverage"/>
    </xsl:attribute>
    </property>
    <xsl:if test="$minPartnerCodeCoverage &gt; 0">
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'required.subprocess.coverage'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="$minPartnerCodeCoverage"/>
    </xsl:attribute>
    </property>
    </xsl:if>
    </properties>
    <xsl:for-each select="/ns0:testRunResults/ns0:codeCoverage">
    <xsl:choose>
    <xsl:when test="@processName = /ns0:testRunResults/@processName and @processRevision = /ns0:testRunResults/@processRevision">
    <testcase>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageTestName($packageFormat, @domain, @processName, @processRevision)"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="'0'"/>
    </xsl:attribute>
    <xsl:attribute name="classname">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.coverageTestToQualifiedClass($packageFormat, @domain, @processName, @processRevision)"/>
    </xsl:attribute>
    <xsl:if test="@coverage &lt; $minCodeCoverage">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageTitle()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageMessage($minCodeCoverage, @coverage)"/>
    </xsl:attribute>
    </failure>
    </xsl:if>
    </testcase>
    </xsl:when>
    <xsl:when test="$minPartnerCodeCoverage &gt; 0">
    <testcase>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageTestName($packageFormat, @domain, @processName, @processRevision)"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="'0'"/>
    </xsl:attribute>
    <xsl:attribute name="classname">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.coverageTestToQualifiedClass($packageFormat, @domain, @processName, @processRevision)"/>
    </xsl:attribute>
    <xsl:if test="@coverage &lt; $minPartnerCodeCoverage">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageTitle()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageMessage($minPartnerCodeCoverage, @coverage)"/>
    </xsl:attribute>
    </failure>
    </xsl:if>
    </testcase>
    </xsl:when>
    </xsl:choose>
    </xsl:for-each>
    </testsuite>
    </xsl:if>
    </testsuites>
    </xsl:template>
    </xsl:stylesheet>
    the classloader seems to want to make callbacks to the BpelTest methods in order to generate the xml file for junit.
    any help on this would be greatly appreciated,

    I'm having almost the same issue so I was hoping the xalan jars solution would resolve it, but even with the jars copied to the directory and renamed as instructed, the error still occurs when the ant bpeltest task tries to transform the test results into junit format. The error message I'm getting is slightly different but issue seems to be the same. The error message I'm getting is:
    [bpeltest] ERROR: 'null'
    [bpeltest] FATAL ERROR: 'Could not compile stylesheet'
    [bpeltest] javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    [bpeltest] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:824)
    ...etc...
    BUILD FAILED
    C:\projects\jdev_user_home_10g\mywork\BPELTests\BPELTest1\build.xml:179: An error occurred while translating the test results to JUnit results.
    Could not compile stylesheet
    Please verify the XSL:
    bpeltest-junit.xsl
    The original XML results have been saved in... ...etc...
    Using filemon, I can see where the ant javaw.exe process is reading bpeltest-format.xsl but bpeltest-junit.xsl is never read from the file system (although it could be getting loaded via classloader from orabpel-ant.jar as previously mentioned.) Either way, it doesn't seem like bpeltest-junit.xsl is actually missing.
    The error message does not indicate what was null and the references passed to the TransformerFactory are controlled by the bpeltest ant task code so I don't know what's missing.
    Anyone have a clue what might be 'null'? Anyone know how to get it fixed? Anyone have a suggestion for a way to a dig up more context and figure out what's missing?
    -R

  • Xalan.jar ----- javax.xml.transform.TransformerException

    Hi,
    I am using Pramati 4.1 Server.
    My application is working fine for a single or few more users. But In Performance Testing when more than 100 users hit the same link at a time, it throws lots of Transformer Exception such as �
    Exception in quicklinks.jsp: javax.xml.transform.TransformerException: java.net.SocketException: Connection reset
    javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: 8195
         at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725)
         at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
         at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
         at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
         at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160)
         at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213)
         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
         at com.niit.cliks.control.web.tagext.viewmenu.doStartTag(Unknown Source)
         at com.pramati.jsp.generated.jsp_p2f_common_p2f_menu._pramati_tag_var_cliks_viewmenu12_method(jsp_p2f_common_p2f_menu.java:315)
         at com.pramati.jsp.generated.jsp_p2f_common_p2f_menu._jspService_delegate(jsp_p2f_common_p2f_menu.java:599)
         at com.pramati.jsp.generated.jsp_p2f_common_p2f_menu._jspService(jsp_p2f_common_p2f_menu.java:623)
         at com.pramati.jsp.runtime.HttpJspSuper.service(HttpJspSuper.java:64) ....
    .....................Can anybody please help me out to resolve this problem?
    Thank you.

    I've found that using the document() function in XSL is the trigger for this bug.
    The Xalan JAXP implementation caches any document() calls. A workaround apparerently is to put in the processing instruction <?xalan-doc-cache-off?>.

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

  • Error in rendering JSR168 Portlet - javax.xml.transform.Transformer

    Hi all,
    after we have successfully deployed a JSR 168 Portlet including some libraries,
    we have an error in rendering the html. Used libs:
    while deploying : a warning occus with the json taglib
              1. Warning occurred on server 6015250 during deploy sap.com/isp12EAR : Web Model Builder: Exception occurred: com.sap.engine.services.webservices.jaxrpc.exceptions.XmlUnmarshalException: XML Deserialization Error. XML is not valid. Node <description> child of <taglib> not described in Schema. at com.sap.engine.services.webservices.jaxrpc.encoding.GeneratedComplexType.deserialize(GeneratedComplexType.java:1455), file: isp12.war#C:\usr\sap\CE3\J00\j2ee\cluster\server0\temp\deploy\work\deploying\isp12EAR.ear1214289890546\isp12.extracted.war\WEB-INF\lib\json-taglib-0.2.jar#META-INF/json.tld, column 0, line 0, severity: warning
    Resources:
       C:\usr\sap\CE3\J00\j2ee\cluster\apps\sap.com\isp12EAR\servlet_jsp\isp12\root\WEB-INF\lib\json-lib-1.1-jdk15.jar
       C:\usr\sap\CE3\J00\j2ee\cluster\apps\sap.com\isp12EAR\servlet_jsp\isp12\root\WEB-INF\lib\json-taglib-0.2.jar
        C:\usr\sap\CE3\J00\j2ee\cluster\apps\sap.com\isp12EAR\servlet_jsp\isp12\root\WEB-INF\lib\xalan.jar
       C:\usr\sap\CE3\J00\j2ee\cluster\apps\sap.com\isp12EAR\servlet_jsp\isp12\root\WEB-INF\lib\xbean.jar
       C:\usr\sap\CE3\J00\j2ee\cluster\apps\sap.com\isp12EAR\servlet_jsp\isp12\root\WEB-INF\lib\xercesImpl.jar
       C:\usr\sap\CE3\J00\j2ee\cluster\apps\sap.com\isp12EAR\servlet_jsp\isp12\root\WEB-INF\lib\xml-apis.jar
       C:\usr\sap\CE3\J00\j2ee\cluster\apps\sap.com\isp12EAR\servlet_jsp\isp12\root\WEB-INF\lib\xom-1.1.jar
    does anybody have an idea ?
    The error on the JSR 168 Portlet is:
    Fehler:
    javax.xml.transform.TransformerConfigurationException: Die Formatvorlage konnte nicht kompiliert werden.
    Stacktrace:
    com.inubit.ibis.servlets.task.UserData.getFormToHtml(UserData.java:310)
    com.inubit.ibis.servlets.task.action.SynchronShowFormAction.perform(SynchronShowFormAction.java:37)
    com.inubit.ibis.servlets.task.Dispatcher.dispatch(Dispatcher.java:113)
    com.inubit.ibis.servlets.FormPortlet.doFormDispatcher(FormPortlet.java:25)
    com.inubit.ibis.servlets.FormPortlet.doView(FormPortlet.java:30)
    javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
    com.inubit.ibis.servlets.FormPortlet.render(FormPortlet.java:50)
    com.sap.engine.services.portletcontainer.container.request.RenderDispatchHandler.service(RenderDispatchHandler.java:55)
    com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:93)
    com.sap.engine.services.portletcontainer.container.PortletContainer.render(PortletContainer.java:244)
    com.sap.portal.prt.portlet.integration.PortletProxyComponent.doContent(PortletProxyComponent.java:53)
    com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:200)
    com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
    com.sap.portal.prt.component.CachablePortalComponent.service(CachablePortalComponent.java:352)
    com.sap.portal.prt.core.RequestDispatcherFactory$PortalComponentRequestDispatcher$5.service(RequestDispatcherFactory.java:308)
    com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:93)
    com.sap.portal.prt.core.RequestDispatcherFactory$PortalComponentRequestDispatcher.service(RequestDispatcherFactory.java:298)
    com.sap.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:278)
    com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:115)
    com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:158)
    com.sap.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:216)
    com.sap.portal.prt.pom.PortalNode.service(PortalNode.java:618)
    com.sap.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:282)
    com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:115)
    com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:158)
    com.sap.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:640)
    com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:203)
    com.sap.portal.prt.dispatcher.DispatcherServlet.service(DispatcherServlet.java:122)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:66)
    com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:32)
    com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:145)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:163)
    com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:82)
    com.sap.portal.http.EnrichNavRequestFilter.doFilter(EnrichNavRequestFilter.java:49)
    com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:74)
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:425)
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:289)
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:376)
    com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:85)
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:160)
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)
    com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:309)
    com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222)
    com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    java.security.AccessController.doPrivileged(Native Method)
    com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
    com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
    Any ideas? THank you a lot!

    Hi Nils,
    The problem is in the json.tld.
    In the file ther are the following lines:
    <tlib-version>1.0</tlib-version>
    <short-name>json</short-name>
      <description>JSON (JavaScript Object Notation) rendering taglib</description>
         <uri>http://www.atg.com/taglibs/json</uri>
    according to the web-jsptaglibrary_2_0.xsd the describtion element should be written first.
    As the falidation fails the taglib is not loaded and the application cannot work as expected.
    I would sujest to corect the tld definition in the json-taglib-0.2.jar.
    Regards,
    Diyan

  • Slow performance with javax.xml.ws.Endpoint.publish method

    I've published an endpoint on my computer with the javax.xml.ws.Endpoint.publish method. When I'm load testing my endpoint on the local machine, with the client side in another jvm, the endpoint reacts very fast (server side(endpoint) and the client side on the same computer). There's not performance problem there.
    But when I try to run a load test with the server side endpoint on my local computer and the client side on another computer the endpoint reacts slow, very slow compared to the local scenario. Instead of 500 requests / second I get like 3 requests / second. Why?
    When I look at the traffic between the client and the server running on different machines it's like 4,5 kB/sec on a 100Mbit connection. And almost no cpu activity (neither server or client).
    When I've a web server, like Tomcat or Sun Java Application Server and deploy my endpoint there the traffics goes up to 400kB/sec. So then it works fine with good performance over the same network, same ip address, same port and everything.
    Why is my endpoint so slow when I publish it with javax.xml.ws.Endpoint.publish instead of on a for example Tomcat. And why is the endpoint fast when I'm running client and server on the same machine?

    the timeout is a client side thing, most likely. you need to set the http request timeout on the client.

  • Error: while trying to invoke the method javax.xml.transform.Transformer.

    Hi All,
    I am working on Version 12.1.8 Build(20),  I have referred  SAP notes 1294013 and placed the following files
    - serializer.jar
    - xalan.jar
    - xercesImpl.jar
    - xml-apis.jar
    - xsltc.jar
    in the specified path.
    now when i use XSLT transformation block using IllumRowsetTableWithPageBreaks.xsl i am getting an error
    [ERROR] [XSL_Transformation_0]XSLTransform error: while trying to invoke the method javax.xml.transform.Transformer.transform(javax.xml.transform.Source, javax.xml.transform.Result) of an object loaded from local variable 'processor'
    please guide me.

    Hi Alex,
    No, the case you have explained is not applicable to me. Sharing the code snippet for your reference. This is the code due to which my XSLT gives an error, if I remove these lines of code then the XSLT works fine.
    <xsl:variable name="ENERGY" select="translate(ENERGY,',','')">
         <xsl:choose>
              <xsl:when test="ENERGY= ''">
                   <xsl:value-of select="0.00"/>
              </xsl:when>
              <xsl:otherwise>
                   <xsl:value-of select="ENERGY"/>
              </xsl:otherwise>
         </xsl:choose>
    </xsl:variable>
    Also, the same XSLT works absolutely fine in 12.1 but gives error in 14.0 SP05.
    Warm Regards,
    Anuj

  • Problem with generating xml and nested cursor (ora-600)

    I have a problem with generating xml (with dbms_xmlquery or xmlgen) and nested cursors.
    When I execute the following command, I get a ORA-600 error:
    select dbms_xmlquery.getxml('select mst_id
    , mst_source
    , cursor(select per.*
    , cursor(select ftm_fdf_number
    , ftm_value
    from t_feature_master
    where ftm_mstr_id = pers_master_id ) as features
    from t_person per
    where pers_master_id = mst_id ) as persons
    from f_master
    where mst_id = 3059435')
    from dual;
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00600: internal error code, arguments: [kokbnp2], [1731], [], [], [], [], [], []
    </ERROR>
    The problem is the second cursor (t_feature_master).
    I want to generate this:
    <master>
    <..>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    </master>
    If i execute the select-statement in sql-plus, then I get the next result.
    MST_ID MST_SOURCE PERSONS
    3059435 GG CURSOR STATEMENT : 3
    CURSOR STATEMENT : 3
    PERS_MASTER_ID PERS_TITLE PERS_INITI PERS_FIRSTNAME PERS_MIDDL PERS_LASTNAME
    3059435 W. Name
    CURSOR STATEMENT : 15
    FTM_FDF_NUMBER FTM_VALUE
    1 [email protected]
    10 ....
    I use Oracle 8.1.7.4 with Oracle XDK v9.2.0.5.0.
    Is this a bug and do somebody know a workaround?

    Very simple...Drop all type objects and nested tables and create them again. You will get no error. I'll explain the reason later.

  • Problem with the XML in Word 2007 (Word Template)

    Hi Experts,
    i am new on CRM 2007 and i have a problem with the XML Structure of the Word Template.
    First i built a Web Service Design Tool. Then i saw on the Testpage, that it works.
    So i started the Document Templates and created a new Template. Object Type was BUS2000126 - CRM Business Activity. Web Service was my created and tested Web Service Tool.
    As i opened the Word 2007 with the XML-Structure, i recognized, that there was something wrong.
    The Responce on my Testpage from the Web Service Tool had the following structure:
    response (test.types.p1.CrmostZlaWord5ReadResponse)
       Output (test.types.p1.CrmostZla010RoszlaWord5001)
            ZlaWord5 (test.types.p1.CrmostZla010Rosbtorder)
                Administrativeheaderoforder (test.types.p1.CrmostZla010Rosbtorderhea001)
                     Partiesinvolvedofheader (test.types.p1.CrmostZla010Rosbtheaderpa001)
                         Allpartiesinvolved (test.types.p1.CrmostZla010Rosbtpartnera002[]) Displaying 3 elements of 3
                              element1 (test.types.p1.CrmostZla010Rosbtpartnera002)
                                   Btpartneraddress (test.types.p1.CrmostZla010Rosbtpartnera001)
    My Problem is now, that the XML-Structure got not that point "element1".
    Instead of "element1" there is the point "item" in my XML-Structure in Word 2007.
    I guess that is the Problem why i am not getting the fields of the Btpartneraddress filled in my Word.
    Can anyone help me? Or put me in the right direction that i can change the XML?
    Thanks for your help
    André

    Hi andré, I guess the issue is coming from the fact that you selected "AllPartiesInvolved" and that may contain any numbers of entries. So when you test your webservice, you put a key and then get a result for that key, and in that case you might get "element1" until "element3" for example if there was 3 partners involved in you activity.
    But, when you design your template, you don't have a key at that moment, so in the Web Service structure, you have "items" which stands for all the possible entries you might retrieve at runtime. I guess you could use an index in your template to specify which item you need, but this is quite hasardeous, so i would be you, I would not design my web service to use "AllPartiesInvolved" but rather a specific Partner type like contact person for instance.
    Regards,
    Xavier

  • Problem with castor xml mapping

    Hi,
    we have following problem with castor xml mapping.
    How to use references in the collections(Hashmap or vector)?
    WE have a method called getAttribute map which will return a hashmap consist different type of objects. We want to keep only the
    references of objects if that object occurs more than once,instead of keeping the whole object
    Following is the the xml mapping file.
    <mapping>
    <class name="com.opvista.ndtool.core.mos.ManagedObject" identity="Id" auto-complete="false" verify-constructable="false">
    <map-to xml="ManagedObject"/>
    <field name="Id" get-method="getId" set-method="setId" type="string">
    <bind-xml name="Id" node="attribute"/>
    </field>
    <field name="AttributeMap" type="org.exolab.castor.mapping.MapItem" collection="map" get-method="getAttributeMap">
    <bind-xml name="AttributeMap" node="element">
         <class name="org.exolab.castor.mapping.MapItem">
    <field name="key" type="java.lang.Object">
         <bind-xml name="key" node="attribute"/>
    </field>
    <field name="value" type="java.lang.Object">
         <bind-xml name="value" node="element" reference="true"/>
         </field>
    </class>
         </bind-xml>
    </field>
    </class>
    </mapping>
    we are using reference=true for the values. But it will throw below exception.
    Unable to resolve ID for instance of class 'java.lang.String' due to the following error: Unable to resolve ClassDescriptor.
         at org.exolab.castor.xml.Marshaller.getObjectID(Marshaller.java:1988)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1628)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1831)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1814)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1825)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:821)
    Please help us to overcome from this problem?
    Thanks,
    Dileep

    for your ref here is what i think the basic mapping file would look like
    <class name="Person">
    <map-to xml="person"/>
    <field name="name" type="string">
    <bind-xml name="name" node="attribute" />
    </field>
    <field name="age" type="string">
    <bind-xml name="age" node="attribute" />
    </field>
    </class>
    <class name="MetaPerson">
    <map-to xml="person"/>
    <field name="dependents" type="string">
    <bind-xml name="dependents" node="attribute" />
    </field>
    <field name="presentAdd" type="string">
    <bind-xml name="present_add " node="attribute" />
    </field>
    <field name="permanentAdd" type="string">
    <bind-xml name="permanent_add " node="attribute" />
    </field>
    </class>
    however i am still not clear as to how i can use the metaperson object in the person class as well as in the mapping file.
    hope this gives a better idea abt my problem statement.
    Please help me out

Maybe you are looking for

  • ITunes crashing when iPod is connected

    iTunes has been crashing on my computer for the past few weeks some (not all) of the time when I connect my iPod for updating and recharging. The program doesn't quit all the time, as I stated, and it never immediately repeats itself when I relaunch

  • Some fields of SD Tables

    Hi friends, Can anybody help in specifying me in which SD table I will get the fields Sales Document Number, Planned Delivery Date & Actual Delivery Date. Thanx in advance Nishant

  • How do you calibrate the touch display on an HP B210a?

    Well, I screwed up. I was messing around in the service menu (stupid me). I hit calibrate touch screen thinking it would be beneficial, but it ended up with me not knowing what I was doing, and now I cannot get the printer to respond to touch. So, ho

  • What happened to the code reference panel from CS5?

    I have been watching a CS5 Flash ActionScript tutorial, but I am using Flash CC. In the tutorial, there is a code reference panel to the left of the actions panel that has a list of all the possible code pieces, and when hovering over any of them, it

  • Special Purpose Ledger & Special General Ledger

    Hi Experts Is there any difference between Special Purpose Ledger & Special General Ledger. If so please give me some real time examples. Points will be rewarded. Sincerely, Ali Abidi