Entity transformation within xsl

Hello
I try to transfer the an xml document with an xsl document containing a line, which should generate an html table border tag. The entity > will be transferred to the corresponding > character, but the < will not transferred.
<xsl:if test="position()=1">
     <xsl:text disable-output-escaping="yes">&lt;table border="1"&gt;</xsl:text>
</xsl:if>
So as a result, I get the following line
&lt;table border="1">
instead of <table border="1">.
The xsl document works correctly within xml spy (altova) but does not within the package dbms_xmlquery.
Any idea to solve this problem?

-- xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.0.1 U (http://www.xmlspy.com) by Alexander Pilz (private) -->
<Company xmlns="http://my-company.com/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://my-company.com/namespace
AddressLast.xsd">
     <Address xsi:type="US-Address">
          <Name>US dependency</Name>
          <Street>Noble Ave.</Street>
          <City>Dallas</City>
          <Zip>04812</Zip>
          <State>Texas</State>
     </Address>
     <Person Manager="true" Degree="BA" Programmer="false">
          <First>Fred</First>
          <Last>Smith</Last>
          <PhoneExt>22</PhoneExt>
          <Email>[email protected]</Email>
     </Person>
</Company>
-- xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:n1="http://my-company.com/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:template match="/">
<html>
<head />
<body>
<xsl:for-each select="n1:Company">
<xsl:for-each select="n1:Address">
<xsl:for-each select="n1:Name">
<div>
<xsl:apply-templates />
</div>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each select="n1:Person">
<xsl:if test="position()=1">
<xsl:text disable-output-escaping="yes">&lt;table border="1"&gt;</xsl:text>
</xsl:if>
<xsl:if test="position()=1">
<thead>
<tr>
<td>First</td>
<td>Last</td>
<td>Title</td>
<td>PhoneExt</td>
<td>EMail</td>
</tr>
</thead>
</xsl:if>
<xsl:if test="position()=1">
<xsl:text disable-output-escaping="yes">&lt;tbody&gt;</xsl:text>
</xsl:if>
<tr>
<td>
<xsl:for-each select="n1:First">
<xsl:apply-templates />
</xsl:for-each>
</td>
<td>
<xsl:for-each select="n1:Last">
<xsl:apply-templates />
</xsl:for-each>
</td>
<td>
<xsl:for-each select="n1:Title">
<xsl:apply-templates />
</xsl:for-each>
</td>
<td>
<xsl:for-each select="n1:PhoneExt">
<xsl:apply-templates />
</xsl:for-each>
</td>
<td>
<xsl:for-each select="n1:EMail">
<xsl:apply-templates />
</xsl:for-each>
</td>
</tr>
<xsl:if test="position()=last()">
<xsl:text disable-output-escaping="yes">&lt;/tbody&gt;</xsl:text>
</xsl:if>
<xsl:if test="position()=last()">
<xsl:text disable-output-escaping="yes">&lt;/table&gt;</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
-- my result
<root>
<html xmlns:n1="http://my-company.com/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<head/>
<body><div>US dependency</div>&lt;table border="1"><thead><tr><td>First</td><td>Last</td><td>Title</td><td>PhoneExt</td><td>EMail</td></tr></thead>&lt;tbody><tr><td>Fred</td><td>Smith</td><td/><td>22</td><td/></tr>&lt;/tbody>&lt;/table></body>
</html>
</root>

Similar Messages

  • BPEL Variables in to Transform activity (XSL)

    Hi,
    I need to access a BPEL variable from within a Transform activity (XSL).
    I need an output like this:
    <XML>
    <val1>1</val1>
    <val2>2</val2>
    <val3>3</val3>
    <val4>4</val4>
    </XML>
    Val1 and val2 is reachable from the xsd in the Transform activity (source variable). A DB-adapter is used to provide these data.
    Val3 and val4 is present in the BPEL, within BPEL variables.
    I have created a Transform activity with source = result of DP-adapter (val1 + val2), but will then need to get val3 + val4 (BPEL vars) from inside the Transform activity as well.
    How can I do this ?
    I have tried passing the variables in as parameters, but can't get this to work. I either only get the parameters, or only get the values from the DB-adapter, as it seems I only can have 1 source.
    Similar thread, but with no answer:
    Global Variables in to XSL

    Thank you for answering.
    The link you're referring to is the thing that I mentioned that I couldn't get to work.
    Works fine when just passing parameters, but when I already have a source (like my DB-adapter output), and want the parameters as well, it's getting tricky. Seems there can only be 1 source: Parameters or DB-adapter output.
    What I need is values from a source (DB-adapter output) + be able to send BPEL variables to the same Transform activity (XSL).
    Have you tried this ? Is it at all possible ?

  • Creating New Entity Instances within OPA

    This is another one that I think I know the answer to, but I think it is best to confirm.
    In prior versions, it was not possible to create entity instances within RuleBurst/Haley Office Rules. Is that still the case in OPA?
    For example, my rules are determining the status of a case and the reason(s) why that status was determined. The case status may be Denied and the reasons may be "invalid customer Id", "expenses to income ratio too high", "primary customer not employed long enough", etc. I want to return all the reasons for the status. While the list of reasons is pre-determined, the ones that apply to a particular case are dynamic, as any, but not all can apply.
    Given this situation using a database, I would create an instance of reason for each applicable one and link it to the case. In the past, with OPA's predecessor(s), it was not possible to create new instances from within. They either had to all be passed into the rulebase or a list of all allowable reasons attributes had to be created and then set to true for the ones that applied.
    My preference is to create the instances inside OPA. Is that functionality provided in the current version?
    Thanks,
    Terry

    Hi Terry,
    Michael is correct that you can't write rules at design time which will dynamically create new entity instances at runtime. However, perhaps the new inferred relationships functionality in v10 could address what you're trying to do.
    You can write rules which conclude membership of an inferred relationship. So you might always have, say, 10 instances of 'the reason' in every case, but as for which of those instances apply in any particular case, it depends on the details of the case. You could use an inferred relationship to collect up the entity instances which apply in the case.
    First you'd need to set up a regular one-to-many relationship to instantiate the 10 instances at runtime - this would be done in the usual way. Then you'd also need to set up an inferred relationship and write rules to conclude the members of the inferred relationship. The instances which are members of the inferred relationship are then effectively the list of entity instances you wanted to create in your example above.
    Have a look at this OPM Help article: http://www.oracle.com/technology/products/applications/policy-automation/help/opm10_1/Content/Rules%20using%20entity%20instances/Reason_about_relship_between_2_entities.htm
    Cheers,
    Jasmine

  • Unique encoding transformation using XSL

    i know that when u use xsl to trnsform XML, the standart say it support UTF-8/16
    for example in hebrew there are encoding that are not included in UTF-8/16.
    is there any option that during the prosses of transformation, the XSL will know whats the local encoding the system it works on and transform by it.
    tank's
    d'

    XSL is specified at a model above the character encoding layer, so it shouldn't matter what the input encoding is.
    <xsl:output encoding="whatever"/> should do you for encoding the output.
    It's unlikely that there are Hebrew characters that cannot be encoded in UTF-8; if they are, they are not Unicode, and so cannot be represented in any XML. Check that you're encoding the input document properly.
    Pete

  • Problem transforming XML/XSL Using Xalan

    Hi, I am using the xalan apis to transform XML/XSL in a servlet..My servlet code is like...
    response.setContentType("text/html; charset=UTF-8");
    // Output goes in the response stream.
    PrintWriter out = response.getWriter();
    boolean environmentOK = (new org.apache.xalan.xslt.EnvironmentCheck()).checkEnvironment (out);
    try
    TransformerFactory tFactory = TransformerFactory.newInstance();
    // Get the XML input document and the stylesheet.
    Source xmlSource = new StreamSource("D:\\DATA\\jrun\\test\\test.xml");
    Source xslSource = new StreamSource("D:\\DATA\\jrun\\test\\test.xsl");
    // Generate the transformer.
    Transformer transformer = tFactory.newTransformer(xslSource);
    // Perform the transformation, sending the output to the response.
    transformer.transform(xmlSource, new StreamResult(out));
    I am getting the error ..
    javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Namespace not supported by SAXParserjavax.xml.transform.TransformerConfigurationException
    That's why I have added the line..
    boolean environmentOK = (new org.apache.xalan.xslt.EnvironmentCheck()).checkEnvironment (out);
    But that gives me the following error diagnostic information...
    ERROR.version.DOM=ERROR attempting to load DOM level 2 class: java.lang.NoSuchMethodException
    I have put all the 3 required classes, xml-apis.jar, xercesImpl.jar and xalan.jar in my application servers classpath..
    Please let me know what I am doing wrong..and how this can be fixed.
    Thanks
    Surajit

    hey Surajit
    Your code is unable to create a transformer from a factory instance.
    I would check why it is not creating the Transformer.On my win32 system i usee two forward slashes..to identify the file path
    D://xyz//abc....instead of D:\\...i wonder if thats one reason why your code is not able to create a transformer based on the StreamSource u create for the file paths.
    Code i use..that works
    javax.xml.transform.TransformerFactory tFactory =
                                                                javax.xml.transform.TransformerFactory.newInstance();
                                                      javax.xml.transform.Source xmlSource = new javax.xml.transform.stream.StreamSource                              (xmlInputSource);
                                                 javax.xml.transform.Source xslSource = new javax.xml.transform.stream.StreamSource
                                       (xslInputSource);
                                                                                                        // Generate the transformer.
                                                                javax.xml.transform.Transformer transformer = tFactory.newTransformer(xslSource);
                                                                                                   // Perform the transformation, sending the output to the response.
                                                                transformer.transform(xmlSource,new javax.xml.transform.stream.StreamResult(out));
                                                                                                        I used jaxp-1.2 with tomcat 4.1.12
    Hope that helps.

  • No validation of xsl transforms within process

    Hi there,
    I've posted this before with no avail.
    I have process which creates an XML schema from a file adpator.
    The input/output XML validation is turned on, on my BPEL server and is working well.
    I then transform this XML to another 'global schema' which is heavily validated with lots of <restricts>.
    More processing is done on this global schema, then finally it is converted over to a DB schema for output to a DB.
    As meationed above the schemas are validated on input and output (from file, to DB) fine. If i place a <restrict> on any values on these schemas the process fails.
    BUT, is the transformation the takes place within the process (from the file schema to the global schema) suppose to be validated?
    Using the XSLT mapping tool i am able to test the transformation and when i click validate quite rightly it fails. But when in the BPEL server this section does not fail, it just does the tranformation without validation.
    Is this just functionality?
    thanks,

    You want to tell whether the output of an XSL transformation will validate against a schema? I don't see what good looking at the XPath expressions in the XSLT would do -- it might not even have any, or they might be simple ones relative to the context node. And even if you did have any, I can't see how they are relevant to the output of the transformation. Which could be anything.
    And I don't see how you could find out anything about paths in the output document. I doubt you could even tell whether the output was well-formed XML let alone whether it conformed to a schema.
    So: I don't think there's an existing solution for that because (a) it isn't very simple and (b) it isn't a common requirement. Of course I could be wrong in my opinion that it isn't possible to do such a thing. But I don't think I'm wrong about it being extremely difficult.

  • Process external functions within xsl maps

    Hi,
    i am working with xslt maps, and i have now the problem to generate the current date/time.
    I found some postings with the solution to implement some new java classes.
    Does somebody know, how to use the registerd java libs within xslt maps ?
    - publish the xslns
    - define the xsl:script
    - use the class
    Thanks
    Bernd

    Hi Rasto,
    very good.
    Could you please send the whole xslt.
    The following does not work (in XMLSPY):
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="java:java.util.Date" xmlns:formatter="java:java.text.SimpleDateFormat">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:template match="ROOT">
         <xsl:variable name="v_dNow" select="date:new()"/>
         <xsl:value-of select="$v_dNow"/>
         <!-- <xsl:variable name="v_formatter" select="formatter:new('yyyyMMdd')"/> -->
         <!-- <xsl:variable name="v_dateToday" select="formatter:format($v_formatter, $v_dNow)"/> -->
         <!-- <xsl:value-of select="$v_dateToday"/> -->
         </xsl:template>
    </xsl:stylesheet>
    Thanks Regards
    Mario

  • XSL transformation with xsl:import generates exceptions

    I am using the Schematron's basic XSL file basic-schematron.xsl to validate the XML format of one of our data files. The XSL file looks something like this
    ================
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias">
    <xsl:import href="skeleton1-5.xsl"/>
    <xsl:template name="process-prolog">
    <axsl:output method="text" />
    </xsl:template>
    ==================
    But, the validation fails while trying to run the transformation on my Schematron input file using this basic-schematron.xsl with java.lang.NoSuchMethodError:
    ======= OUTPUT ============
    Markup Error: no match attribute on <key> outside <rule>
    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: GregorSamsa.process$dash$root(Lcom/sun/org/apache/xalan/internal/xsltc/DOM;Lcom/sun/org/apache/xml/internal/dtm/DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;ILjava/lang/Object;)V
         at GregorSamsa.applyTemplates()
         at GregorSamsa.applyTemplates()
         at GregorSamsa.transform()
         at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:594)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:640)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
         at com.solipsa.xsdvalidator.XSDValidator.validateSchematron(XSDValidator.java:137)
         at com.solipsa.xsdvalidator.XSDValidator.validate(XSDValidator.java:181)
         at com.solipsa.xsdvalidator.XSDValidatorUI.jButton1ActionPerformed(XSDValidatorUI.java:244)
         at com.solipsa.xsdvalidator.XSDValidatorUI.access$300(XSDValidatorUI.java:21)
         at com.solipsa.xsdvalidator.XSDValidatorUI$4.actionPerformed(XSDValidatorUI.java:140)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1766)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    ============= OUTPUT ==============
    I tried the individual JAXP 1.3 for J2SDK 1.4.2 (Using the -Djava.endorsed.dirs JVM param) and tried the JDK 1.5.0_02 which has JAXP 1.3 inbuilt and they all fail.
    I tried the above with separate Xalan/Xerces jar files, and then it works fine.
    The problem seems to be somthing specific to the JAXP 1.3 environment. I can provide more details, if required. Any help is highly appreciated.

    One morning your code woke up and found it had been transformed into a giant insect.
    But seriously, here's the name of the method that doesn't exist:GregorSamsa.process$dash$rootIs GregorSamsa your class? Maybe your server has an old version of it which is missing that method? (Or: those $ signs look strange to me, maybe they are a mistranslation of some other character?)

  • XML transform using XSL

    Hi,
    I am new to the javax technology.
    I have a xml that has data in this format
    <?xml version="1.0" encoding="UTF-8"?>
    <emps>
    <emp>
    <empName>Me</empName>
    <empAge>23</empAge>
    </emp>
    <emp>
    <empName>You</empName>
    <empAge>23</empAge>
    </emp>
    </emps>Can i convert this to an XML that has tags and data like
    <employees>
    <employee>
    <name>me</name>
    <age>23</age>
    </employee>
    <employee>
    <name>you</name>
    <age>23</age>
    </employee>
    </employees>using a XSLT?
    thanks,
    Dilip

    So the only change is changing the element names? Sure you can. Or at least I can. Here's a template that changes an emps element into an employees element and preserves its children:<xsl:template match="emps">
    <employees><xsl:apply-templates/></employees>
    </xsl:template>Use an identity transformation and put in one of these for each element whose name you want to change.

  • Xmltype.transform and xsl:output method="html"

    hi, 9.2.0.4 winxp,
    i wonder whether xmltype.transform regards any output instructions in the stylesheet. i requested any of xml, html and text and always got the same result?
    any ideas or hints to more info?
    regards peter

    Sorry for jumping in on this thread, but I have a question regarding you reply. I have an XSL stylesheet that preforms XML to HTML conversion. Everything works correctly with the exception of those HTML tags that are not weel formed. Using your example if I have something like:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <input type="text" name="{NAME}" size="{DISPLAY_LENGTH}" maxlength="{LENGTH}"></input>
    </xsl:stylesheet>
    It would render HTML in the format of
    <HTML>
    <input type="text" name="in1" size="10" maxlength="20"/>
    </HTML>
    While IE can handle this Netscape can not. Is there anyway to generate completely cross browser complient HTML with XSL?
    Thanks!

  • SQL data transformed by XSL-TEXT template

    Hi,
    please, how can I transform data retrived by SQL query using XSL-TEXT template (need to generate text file using rpad/lpad XSL function)? There is no problem if the data set is 'XML file', with setting the data set as SQL querry I'm lost..
    Thanks for all replies.
    Rad

    Hi,
    problem solved by using data template.
    Rad

  • Transformer(XML, Xsl)

    Hello
    There is my class. When I run it I get error: stylesheet requires attribute version ; missimg or incorect XSLT Namespaces
    What to do?
    I have in database XML and Xsl file and i nead this function to join them.
    import java.io.*;
    import java.lang.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.parsers.DocumentBuilder;
    public class Parser{
         public static void main(String[] args)     {
                   Parser f = new Parser();
                   f.join();
         public void join(){
              try{
                   File stylesheet = new File("d:/jelenak/install/vezba/cdcatalog.xsl");
                   File xmlfile = new File("d:/jelenak/install/vezba/cdcatalog.xml");
                   File outputFile=new File("d:/jelenak/install/vezba/cdcatalog.xml");
                   TransformerFactory tFactory =TransformerFactory.newInstance();
                   StreamSource stylesource = new StreamSource(stylesheet);
                   StreamSource source = new StreamSource(xmlfile);
                   StreamResult result = new StreamResult(outputFile);
                   Transformer transformer = tFactory.newTransformer(stylesource);
                   transformer.transform(source, result);
              }catch (Exception e) {
                   e.printStackTrace(System.err);
    Thanks a lot

    aaaaaah! in a servlet, ok.
    you can build a StreamResult on the Servlet response output stream.
    personally, to provide the browser with the correct size of data to receive in the HTTP header, i output the XSLT result in a ByteArrayOutputStream (baos) then i use this kind of code in my servlet:
    response.setContentType("text/xml");
    response.setContentLength(baos.size());
    baos.writeTo(response.getOutputStream());

  • Problems using Free Transform within a Photoshop action

    I have a few hundred images each containing text on a separate layer.  The text is in different positions on each image.  I'm trying to write an action to move the text in each image to a specific location on each one.  When creating the action I use free transform to move the current layer to x=750 y=800.  I type in the desired coordinates and make sure not to click the delta between the x and y settings so that it doesn't use relative positioning.  When I click the return button the text moves to the desired spot so all seems okay.  When I run the action the text moves a fixed amount relative to its initial position which is not what I want.  Each text layer is supposed to move to x750, y 800.  I'm having this problem with both Photoshop CS6 and CC2014 running on  a Mac using OS 10.9.4.
    Does anyone have any idea what I'm doing wrong?

    I think you misunderstood me. You can use the mesh on images of the same size but different resolutions, but you don't have to if you don't want to. Simply do your distortions, save the mesh, then load it for any image of the same size and all your distortions will be applied. Note that if you go into and out of liquify, the mesh will not remember the distortions you made in previous liquify adjustments. Any mesh you save will only remember the distortions you applied within that current instance of the filter.
    I don't know how liquify may interact with an action, so you'll have to test that yourself.

  • EJB 3.0 entity found within JDeveloper but not on OAS 10.1.3

    I'm tearing my hair out with this!
    Basically I have an entity bean with a primary key annotated with @Id, a stateful session bean facade which has an EntityManager injected through @Resource, and a java client in JDeveloper which calls this bean through a lookup.
    In JDeveloper 10.1.3 it works fine, no problems. I deploy the app, along with a JSP version of this client, to Oracle AS 10.1.3.0 - the deploy goes through without a problem. Whenever I try to use the JSP to test that it's working, I get a NPE in the server logs - but it only points to the compiled JSP class, and therefore not corresponding to a line in the actual JSP!
    Here is the error stack trace:
    06/10/12 12:01:51 java.lang.NullPointerException
    06/10/12 12:01:51 at usernametest.jspService(_usernametest.java:121)
    06/10/12 12:01:51 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    06/10/12 12:01:51 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416)
    06/10/12 12:01:51 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
    06/10/12 12:01:51 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
    06/10/12 12:01:51 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    06/10/12 12:01:51 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
    06/10/12 12:01:51 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    06/10/12 12:01:51 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    06/10/12 12:01:51 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    06/10/12 12:01:51 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
    06/10/12 12:01:51 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
    06/10/12 12:01:51 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    06/10/12 12:01:51 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303
    06/10/12 12:01:51 at java.lang.Thread.run(Thread.java:595)
    Does this look obvious to anyone? All I am asking is a general idea to what the problem might be. I have been looking at this for 2 weeks and keep going round in circles. If anyone here has any idea that would be much appreciated.
    I will supply other code (JSP, bean) if necessary, as this isn't a Java forum ;)
    Thanks in advance
    Paul

    Hi Lonneke,
    Here is the bean class:
    import java.util.List;
    import javax.annotation.Resource;
    import javax.ejb.Stateful;
    import javax.persistence.EntityManager;
    import javax.persistence.Query;
    @Stateful(name="cart")
    public class CartBean implements CartRemote, CartLocal {
    @Resource
    protected EntityManager manager;
    public CartBean() {
    public User getUser(String username){
    User user = manager.find(User.class, username);
    return user;
    public List<Ereq> getEreqs(String username) {
    Query query = manager.createNativeQuery("SELECT p.BAAN_ACTIVITY_CODE, p.CLIENT_REF_NO, p.DELIVERY_SITE, p.EREQ_MESSAGE, p.EREQ_REF_NO, p.EREQ_STATUS, " +
    "p.LAB_REF_NO, p.ORDER_DATE, p.PROJECT_CODE, p.PURCHASED_ORDER_NUMBER, p.REQUIRED_DATE, p.USER_FULLNAME " +
    "FROM Processed_Ereq p, Ereq_User_Link e, Users u " +
    "WHERE p.ereq_ref_no = e.ereq_ref_no " +
    "AND e.user_id = u.user_id " +
    "AND u.username= '" + username + "'", Ereq.class);
    return query.getResultList();
    Here is the JSP:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="sun.misc.BASE64Encoder,java.util.regex.*" %>
    <%@ page import="com.evotec.ereq.CartLocal" %>
    <%@ page import="com.evotec.ereq.User" %>
    <%@ page import="javax.naming.InitialContext" %>
    <%@ page import="java.util.List" %>
    <%@ page import="java.util.ArrayList" %>
    <%!String m_username = "pbarrett";%>
    <%!String emailAddress = "";%>
    <%
    try {
    InitialContext ctx = new InitialContext();
    //CartLocal cart = (CartLocal) session.getAttribute("Cart");
    //if (cart==null) {
    CartLocal cart = (CartLocal) ctx.lookup("java:comp/env/cart");
    //session.setAttribute("Cart", cart);
    //ereqs = cart.getEreqs(m_username);
    User user = cart.getUser(m_username);
    emailAddress = user.getEmailAddress();
    %>
    <html>
    <body>
    you are: <%= m_username %><BR>
    your email address is: <%= emailAddress %><BR>
    </body>
    </html>
    <%
    catch (NullPointerException e){
    e.printStackTrace();
    %>
    Any help is welcome
    Thanks
    Paul

  • Transforming XML/XSL data to PDF

    What is a process to convert a XML document to a PDF? Where could I find some Java classes that aid in this process?

    There's XSL Formatter from www.antennahouse.com, and there's FOP from xml.apache.org/fop, and probably others that could be found by a simple Google search.

Maybe you are looking for