TriangleArea java Help!!

I have a coding problem... and if someone can help me finish it.. it would be garetful... i can't make the numbers to respond to the answers...... and try to follow the img says....
Code:
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
public class TriangleArea extends Applet implements ActionListener {
private Label lblInstructions, lblSideA, lblSideB, lblSideC,
lblSelect, lblAngles, lblArea, lblRightAngle;
private TextField txtSideA, txtSideB, txtSideC;
private Button btnCM, btnM, btnKM;
double[] angles = new double[3];
double radians;
public void init() {
setLayout(null);
setupGUIComponents();
final int WIDTH = 470, HEIGHT = 220;
setSize(WIDTH, HEIGHT);
public void actionPerformed(ActionEvent ae) {
String command = ae.getActionCommand();
lblAngles.setText("Three angles are "+angles[0]+"degree, "+angles[1]+"degree and "+angles[2]+"degree");
lblArea.setText("Area of the triangle is "+command);
lblRightAngle.setText("It is a "+command+" triangle");
private void setupGUIComponents() {
// initiaze the components
lblInstructions = new Label("Enter the length of the sides of a triangle");
lblSideA = new Label("a"); txtSideA = new TextField(5);
lblSideB = new Label("b"); txtSideB = new TextField(5);
lblSideC = new Label("c"); txtSideC = new TextField(5);
lblSelect = new Label("Select unit:");
btnCM = new Button("cm"); btnM = new Button("m"); btnKM = new Button("km");
lblAngles = new Label();
lblArea = new Label();
lblRightAngle = new Label();
// add action-listeners to the buttons
btnCM.addActionListener(this);
btnM.addActionListener(this);
btnKM.addActionListener(this);
// allign the components to the frame
lblInstructions.setBounds(100,10,250,20);
lblSideA.setBounds(100,35,20,20); txtSideA.setBounds(220,35,115,20);
lblSideB.setBounds(100,55,20,20); txtSideB.setBounds(220,55,115,20);
lblSideC.setBounds(100,75,20,20); txtSideC.setBounds(220,75,115,20);
lblSelect.setBounds(130,100,70,20);
btnCM.setBounds(210,100,30,20);
btnM.setBounds(245,100,30,20);
btnKM.setBounds(280,100,30,20);
lblAngles.setBounds(20,140,410,20);
lblArea.setBounds(20,165,410,20);
lblRightAngle.setBounds(20,190,410,20);
// add the components to the frame
add(lblInstructions);
add(lblSideA); add(txtSideA);
add(lblSideB); add(txtSideB);
add(lblSideC); add(txtSideC);
add(lblSelect); add(btnCM); add(btnM); add(btnKM);
add(lblAngles); add(lblArea); add(lblRightAngle);
private double[] getAngles(int a, int b, int c)
// create an array to store the 3 angles
double[] angles = new double[3];
double radians;
// cast all the int values to double
double dA=(double)a, dB=(double)b, dC=(double)c;
// angle A in radians = cos^-1 (b^2 + c^2 - a^2 / 2bc)
// and then convert the radians to degrees
radians = Math.acos((dB*dB + dC*dC - dA*dA) / (2.0*dB*dC));
angles[0] = radians * 180.0 / Math.PI;
// angle B in radians = cos^-1 (a^2 + c^2 - b^2 / 2ac)
// and then convert the radians to degrees
radians = Math.acos((dA*dA + dC*dC - dB*dB) / (2.0*dA*dC));
angles[1] = radians * 180.0 / Math.PI;
// angle C in degrees = 180 - degrees A - degrees B
angles[2] = 180.0 - angles[0] - angles[1];
// return the 3 angles
return angles;

> I have a coding problem... and if someone can help me
finish it.. it would be garetful... i can't make the
numbers to respond to the answers...... and try to
follow the img says....
So Mzbarz, it's a small world, isn't it?
Any particular reason why you didn't continue to post here?
http://forums.devx.com/showthread.php?t=149717&page=2&pp=15
Wasn't I being helpfull enough? The code you got sofar is mostly mine. You havn't done jack untill now, only nagging for copy-n-paste answers.

Similar Messages

  • XSLT mapping with Java helper classes

    Hi,
    I'm trying to implement a XSLT mapping to convert my request to a specific soap request message format for this I'm calling some methods from a java helper class. I have imported the jar file into the archives. When I tried to test the interface it keeps complaing there is some exception but doesn't give me the exact error. Has any one called any java helper classes with in XSLT mapping, if so I would appreciate if you could help me with this. Here is the code from xsl.
    <wsse:Security soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"   xmlns:UserToken="java:com.company.test.mapping.UserTokenMap">
    <wsse:UsernameToken>
        <wsse:Username xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
          <xsl:value-of select="UserToken:getUsername()"/>
        </wsse:Username>
        <wsse:Password wsse:Type="wsse:PasswordDigest" xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsl:value-of select="UserToken:getPasswordDigest()"/>
        </wsse:Password>
        <wsse:Nonce xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsl:value-of select="UserToken:getNonce()"/>
        </wsse:Nonce>
        <wsu:Created xsi:type="soapenc:string" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <xsl:value-of select="UserToken:getCreateDate()"/>
    </wsu:Created>
    </wsse:UsernameToken>
    </wsse:Security>
    Thanks,
    Joe

    Hi,
    I'm getting following exception when I refer to the java class with in my XSLT mapping. Any one encountered the same problem.
    com.sap.engine.services.ejb.exceptions.BaseRemoteException:
    Exception in method transform.
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:218)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native
    Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.lang.UnsupportedClassVersionError:
    com/earthlink/xi/mapping/UserTokenMap (Unsupported
    major.minor version 49.0)
         at java.lang.ClassLoader.defineClass0(Native
    Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at com.sap.engine.lib.xsl.xpath.JLBLibrary.<init>(JLBLibrary.java:33)
         at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:69)
         at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:98)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43)
         at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51)
         at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java:76)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248)
         at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296)
         at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:431)
         at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:394)
         at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398)
         at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepSequenceMapping.execute(RepSequenceMapping.java:54)
         at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80)
         at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127)
         at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40)
         at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:167)
         ... 10 more
    ; nested exception is:
         java.lang.UnsupportedClassVersionError:
    com/earthlink/xi/mapping/UserTokenMap (Unsupported
    major.minor version 49.0)

  • How to bundle java help class into jar file ?

    Hi, all,
    I have some package in my project, with which I have a java help jar file as classpath, when I run my project, I need the jh.jar file in directory /jar/jh.jar.
    Now, I bundled all my class packages into a jar file, my.jar, together with the /jar directory. When i run my jar file with command:
    java -jar my.jar
    It tells me couldn't find javahelp class.
    What shall I do? How can I create my jar file with the jh.jar?
    Thanks in advance.

    I think you'd be better off just adding the jh.jar as
    a classpath argument and running it like that:
    java -classpath /myjavalibdir/jh.jar -jar myjar.jar
    ...otherwise you're stepping into redistribution of
    binary issues licensing-wise. That won't work either; when you run java with the -jar option, it ignores both the -classpath option and the CLASSPATH environment variable. However, it will see jh.jar automatically if you put it in the <path-to-java>/jre/lib/ext directory. But for distribution purposes, it might be simpler just to combime the contents of jh.jar into myjar.jar (if you use Ant, its <jar> task makes that very easy). Or, you can just run it this way:java -classpath myjar.jar;jar/jh.jar MyMainClassBTW, I don't think redistribution is a problem; otherwise how anyone even use JavaHelp?

  • XSLT Mapping : RFC Lookup using java helper class

    Hi All,
    I am doing RFC Lookup in xslt mapping using java helper class. I have found blog for the same (http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14) However this blog is very advanced.
    Can anybody help me with step by step approach for the same?
    My basic questions are not answered in the blog as:
    1) where to add the jar file of the java class used in xslt mapping.
    I have added zip file of XSLT mapping in imported archived and using that in mapping.
    Thanks in advace.
    Regards,
    Rohan

    Hi,
    Can u please have look at this in detail , u can easily point out yourself the problem...
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
    Please observe the line,
    xmlns:javamap="java:com.company.group.MappingClass
    in XSLT mapping..
    The packagename of class and class name and XSLT namespace should be matching...
    Babu
    Edited by: hlbabu123 on Sep 29, 2010 6:04 PM

  • Java Error in RFC Lookup in XSLT Mapping usinf Java helper class

    Hi All,
    I am doing RFC Lookup in XSLT Mapping using Java Helper class.
    The Lookup works fine when called one RFC at a time However my requirement is I want to do 2 Lookups.
    Both Lookups works when done individually however when I call both lookups in one mapping I get following error "javax.xml.transform.TransformerException: DOMSource whose Node is null."
    Following is the code I have written in XSLT for the lookup:
         <xsl:template name="Lookup_1">
              <xsl:param name="STDPN"/>
                   <rfc:RFC_READ_TABLE>
                        <QUERY_TABLE>KNA1</QUERY_TABLE>
                        <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$STDPN"/>
                             </TEXT></item>
                        </OPTIONS>
                        <FIELDS>
                             <item>
                                  <FIELDNAME>KUNNR</FIELDNAME>
                             </item>
                        </FIELDS>
                   </rfc:RFC_READ_TABLE>
              </xsl:variable>
              <xsl:variable name="response" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request, 'BS_D, 'cc_RfcLookup', $inputparam)"/>
              <xsl:element name="STDPN">
                   <xsl:value-of select="$response//DATA/item/WA"/>
              </xsl:element>
         </xsl:template>
         <xsl:template name="Lookup_2">
              <xsl:param name="BELNR"/>
                   <xsl:variable name="Query">AGMNT = '<xsl:value-of select="$BELNR"/>'</xsl:variable>
                   <xsl:variable name="request1">
                        <rfc:RFC_READ_TABLE>
                             <QUERY_TABLE>ZTABLE</QUERY_TABLE>
                             <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$Query"/>
                                  </TEXT></item>
                             </OPTIONS>
                             <FIELDS>
                                  <item>
                                       <FIELDNAME>KUNAG</FIELDNAME>
                                  </item>
                             </FIELDS>
                        </rfc:RFC_READ_TABLE>
                   </xsl:variable>
                   <xsl:variable name="response1" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request1, 'BS_D','cc_RfcLookup', $inputparam)"/>
                   <xsl:element name="BELNR">
                        <xsl:value-of select="$response1//DATA/item/WA"/>
                   </xsl:element>
         </xsl:template>
    My Question: Am I doing anything wrong? Or Is it possible to call multiple lookups in one XSLT?
    Thanks and Regards,
    Atul

    Hi Atul,
    I had the same problem like you had.
    The main Problem is that with the example code the request variable is created as NodeList object. In XSLT a variable is somekind of a constant and can't be changed. As the request object is empty after the first request the programm fails at the following line:
    Source source = new DOMSource(request.item(0));
    So I've created a workaround for this problem.
    In the call of the template I've put the request as a parameter object at the template call:
    <xsl:with-param name="req">
    <rfc:PLM_EXPLORE_BILL_OF_MATERIAL xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <APPLICATION>Z001</APPLICATION>
      <FLAG_NEW_EXPLOSION>X</FLAG_NEW_EXPLOSION>
      <MATERIALNUMBER><xsl:value-of select="value"/></MATERIALNUMBER>
      <PLANT>FSD0</PLANT>
      <VALIDFROM><xsl:value-of select="//Recordset/Row[name='DTM-031']/value"/></VALIDFROM>
      <BOMITEM_DATA/>
    </rfc:PLM_EXPLORE_BILL_OF_MATERIAL>
    </xsl:with-param>
    With this change the request will be provided as a String object and not as a NodeList object.
    Afterwards the RfcLookup.java has to be changed to the following:
    package com.franke.mappings;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.lookup.Channel;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.lookup.RfcAccessor;
    import com.sap.aii.mapping.lookup.LookupService;
    import com.sap.aii.mapping.lookup.XmlPayload;
    * @author Thorsten Nordholm Søbirk, AppliCon A/S
    * Helper class for using the XI Lookup API with XSLT mappings for calling RFCs.
    * The class is generic in that it can be used to call any remote-enabled
    * function module in R/3. Generation of the XML request document and parsing of
    * the XML response is left to the stylesheet, where this can be done in a very
    * natural manner.
    * TD:
    * Changed the class that request is sent as String, because of IndexOutOfBound-exception
    * When sending multiple requests in one XSLT mapping.
    public class RfcLookup {
         * Execute RFC lookup.
         * @param request RFC request - TD: changed to String
         * @param service name of service
         * @param channelName name of communication channel
         * @param inputParam mapping parameters
         * @return Node containing RFC response
         public static Node execute( String request,
                 String service,
                 String channelName,
                 Map inputParam)
              AbstractTrace trace = (AbstractTrace) inputParam.get(StreamTransformationConstants.MAPPING_TRACE);
              Node responseNode = null;
              try {
                  // Get channel and accessor
                  Channel channel = LookupService.getChannel(service, channelName);
                  RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   // Serialise request NodeList - TD: Not needed anymore as request is String
                   /*TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer();
                   Source source = new DOMSource(request.item(0));
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   StreamResult streamResult = new StreamResult(baos);
                   transformer.transform(source, streamResult);*/
                    // TD: Add xml header and remove linefeeds for the request string
                    request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+request.replaceAll("[\r\n]+", ""); 
                    // TD: Get byte Array from request String to send afterwards
                    byte[] requestBytes = request.getBytes();
                   // TD: Not used anymore as request is String
                    //byte[] requestBytes = baos.toByteArray();
                    trace.addDebugMessage("RFC Request: " + new String(requestBytes));
                    // Create input stream representing the function module request message
                    InputStream inputStream = new ByteArrayInputStream(requestBytes);
                    // Create XmlPayload
                    XmlPayload requestPayload =LookupService.getXmlPayload(inputStream);
                    // Execute lookup
                    XmlPayload responsePayload = accessor.call(requestPayload);
                    InputStream responseStream = responsePayload.getContent();
                    TeeInputStream tee = new TeeInputStream(responseStream);
                    // Create DOM tree for response
                    DocumentBuilder docBuilder =DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Document document = docBuilder.parse(tee);
                    trace.addDebugMessage("RFC Response: " + tee.getStringContent());
                    responseNode = document.getFirstChild();
              } catch (Throwable t) {
                   StringWriter sw = new StringWriter();
                   t.printStackTrace(new PrintWriter(sw));
                   trace.addWarning(sw.toString());
              return responseNode;
         * Helper class which collects stream input while reading.
         static class TeeInputStream extends InputStream {
               private ByteArrayOutputStream baos;
               private InputStream wrappedInputStream;
               TeeInputStream(InputStream inputStream) {
                    baos = new ByteArrayOutputStream();
                    wrappedInputStream = inputStream;
               * @return stream content as String
               String getStringContent() {
                    return baos.toString();
              /* (non-Javadoc)
              * @see java.io.InputStream#read()
              public int read() throws IOException {
                   int r = wrappedInputStream.read();
                   baos.write(r);
                   return r;
    Then you need to compile and upload this class and it should work.
    I hope that this helps you.
    Best regards
    Till

  • Code Sample: Easy RFC Lookup From XSLT Mappings Using a Java Helper Class

    Hi everyone,
    This is just a shameless plug for my article: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14">Easy RFC Lookup From XSLT Mappings Using a Java Helper Class</a>. I hope you're interested in reading it, and I welcome your comments in this thread.
    Kind regards,
    Thorsten

    Hi Stefan. Thanks for your post. I have already done that. It still does not work. As a base for my java helper class I have usesd Thorstens code.
    The problem is quite confusing. I will try to ouline both issues here.
    First of all, when try to test from within the Operation Mapping, I always get a java error saying it cannot find the communication channel (it is there and working because I have tested it with the RFCLookup in graphical mapping). I have found a way to work around this, and that is to uncheck the "Use SAP XMLToolkit" checkbox --> switch to test tab, enter my ReceiverService in the parameter tab (header parameter) --> switch back to Definition tab, check the "Use SAP XMLToolkit" checkbox --> switch to Test tab and run the test. Then the XSLT and call to java helper class will work. Of course this is not really something you want to do all the time. Maybe there is a bug.
    Secondly, it never works when I try to do it "live". I am using a file adapter to pick up one file, convert it and a file adapter to drop the converted file. I get the following error code in SXMB_MONI.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--  Request Message Mapping   -->
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">TRANSFORMER_CONF_EX</SAP:Code>
      <SAP:P1>ATJ_Accounting2XML_Accounting.xsl</SAP:P1>
      <SAP:P2>http://rd.accounting.logica.com</SAP:P2>
      <SAP:P3>fd552c30-bad9-11dd-9761-c21dac1b818c</SAP:P3>
      <SAP:P4>-1</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>TransformerConfigurationException triggered while loading XSLT mapping ATJ_Accounting2XML_Accounting.xsl; http://rd.accounting.logica.comfd552c30-bad9-11dd-9761-c21dac1b818c-1</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Using an XSLT without a call to a java helper class, works just fine.
    I am totally at a loss here. Any more input would be much appreciated.
    /Patrik

  • Java Help Exception in Linux

    Hi all, I have a piece of code that initializes Java help on windows perfectly but the same code causes an exception in Linux. below is the exception I am getting in Linux. because of this, the applications help is not appearing in Linux. Does anybody know why this happens only in Linux / has come across this or a fix for this earlier?
    Also I am working on Linux for the first time and I noticed that when i gave a couple of System.outs in the code to find out what was happening, they appeared allright in windows, but did not appear in Linux !! (then even the exception below disappeared, and that did not load help either !!)
    java.lang.NullPointerException
    at javax.help.HelpSet.parseInto(HelpSet.java:567)
    at javax.help.HelpSet.<init>(HelpSet.java:129)
    at com.mysoftware.util.MyJavaHelp.<init>(MyJavaHelp.java:52)
    at com.mysoftware.util.MyJavaHelp.getInstance(MyJavaHelp.java:64)
    Parsing failed for null
    Got an IOException (null)
    An answer to this will be highly appreciated...

    At present I am not sure if I can post code. I am trying to find that out. However, can u tell me what u mean by a Windows - window? I will try to figure that out...
    Thanks a lot..

  • Regarding Java Help System...('',)

    Hello All,
    I had successfully implemented Java Help System for my chat messenger...
    But the problem I am facing is.... after making a jar file of my helpsystem..I am trying to access my Helpset file from my java code....
    When I click on Help topics button to display the Helpset It will give me the following error....
    HelpSet: Could not parse
    Got an IOException (null)
    Parsing failed for null
    HelpSet: Master.hs not found
    Exception in thread "main" java.lang.NullPointerException
    at HelpMenu.<init>(HelpMenu.java:30)
    at HelpMenu.main(HelpMenu.java:63)
    But I have placed that Jar file in my program....where all files are given....
    Can anybody help me out here.....
    Thanks in advance.....

    I am using the following program to do so...
    public class JavaHelpDemo extends JFrame
    private HelpBroker someHelpBroker;
    public JavaHelpDemo()
    HelpSet hs;
    try
            File f = new File("Master.hs");
            URL url = f.toURL();
            hs = new HelpSet (null, url);
            HelpBroker hb = hs.createHelpBroker();
            new CSH.DisplayHelpFromSource(hb);
            hb.setDisplayed(true);
          catch (Exception a)
            System.out.println("Error is here");
            System.out.print(a);
    // constructor
    public static void main(String[] args)
    JavaHelpDemo javaHelpDemo1 = new JavaHelpDemo();
    }//classActually my this program is running well and I m getting my helpset only when i insert all my files with htmls in my source path.....
    I hav created a Jar or all these files and named it Help.jar
    is there any way just to call that helpset using this jar without giving all files into source path.....
    Regards,
    Damz

  • Please tell me some conversion tools to generate java help

    hello,
    I am doing some project of migration, and I need some tools to convert from windows help file (chm) to java help file.
    Anyone has some experience of that?
    If not possible, what's the fastest way to do the conversion?
    Thanks

    Hello,
    You don't mention what format the source files are in, so I'm assuming that you only have access to the actual .chm files and not whatever those were created from. Given that, you'll need a tool that is capable of backward converting Help output into some source format, and then converting that to JavaHelp. I don't know of anything that would convert directly from .chm to JavaHelp.
    I believe that RoboHelp is capable of taking Window Help output and converting it backwards to source, and it is also supports JavaHelp, so this would be one tool to investigate.
    HelpBreeze is another tool that supports both formats and is also a lot cheaper that RoboHelp.
    I apologize for not having first-hand experience with either of these. We currently use a CMS tool, AuthorIT, to single source publish to JavaHelp and other outputs.

  • Special double quotes and apostrophes in java help

    We are writing help for an application and using doctor help to generate it. The help is written in Word and converted to html. Word however, converts all the " characters to those "squiggly ones" which point towards the word they're quoting.
    When we viewed the generated help with java help those squiggly were not rendered. They are rendered as a square which means java help does not understand them.
    I'm sure someone else must have encountered this issue.
    Please can you tell me how to successfully render the squiggly double quotes in java help?

    You need the following encoding for those characters:
    &#8220;
    &#8221;
    using an xml encoder, e.g. xmlenc solves this issue, otherwise you must do it manually.
    But I have a related problem. When characters in the XML file are encoded
    they are only displayed correctly if some non encoded character follows.
    When there are two successive encoded characters then only the first one
    is displayed correctly. Putting a whitespace in between them displays both
    characters correctly, but with the whitespace in between.
    I guess there is an issue with the XML parser. Changing the encoding of the XML file does not help.
    example: TOC.xml file (displayed correctly in IE)
    <?xml version='1.0' encoding='ISO-8859-9' standalone='yes' ?>
    <!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN" "http://java.sun.com/products/javahelp/toc_1_0.dtd"><!--generated by JHelpDev Version: 0.4, 18 August 2005, see jhelpdev.sourceforge.net-->
    <toc version="1.0">
    <tocitem text="images "/>
    <tocitem text="&#286;&#286;RENC&#304; MOD&#220;L&#220; " target="index"/>
    </toc>
    Any ideas?

  • How can I change the Jframe Java help Icon

    How can I change then Jframe Java help Icon?.
    I am using then HelpSet class and HelpBroker.
    I want to change the java help icon
    Any Idea? thanks. ...

    It can be done, but it's ugly...
    Add in a listener to your topmost JFrame to sense when the focus is lost, since this happens when a help window comes up. When the focus leaves the main window, check all the windows that are up to see if one is a help window. If so, this will give you a reference to the help window and you can drill down to change what you want.
    Here's an example that changes the icon and removes the borders from the javahelp buttons.
    WindowListener wndCloser = new WindowAdapter() {
              //A necessarily roundabout method to affect
              //look and feel aspects of the javahelp viewer.
              //(there is no way to get at these components directly.)
              //When the main frame loses focus, it may be because
              //the help viewer was brought up. Look through all
              //the current frames to see if one is a help viewer.
              //If it is, change the look of the help viewer
              //to what we want.
              Frame m_helpFrame = null;
              public void windowDeactivated(WindowEvent e) {
              if (m_helpFrame != null)
                   return;
              Frame[] frames = getFrames();
              for (int k = 0; k < frames.length; k++) {
                   if (!(frames[k] instanceof JFrame))
                   continue;
                   JFrame jf = (JFrame)frames[k];
                   if (jf.getContentPane().getComponentCount()==0)
                   continue;
                   Component c = jf.getContentPane().
                   getComponent(0);
                   if (c == null || !(c instanceof JHelp))
                   continue;
                   m_helpFrame = jf;
                   //now that we know the Frame, we can change the title icon
                   final Image image2 = <your icon here>
                   m_helpFrame.setIconImage(image2);
                   JHelp jh = (JHelp)c;
                   for (int s=0; s<jh.getComponentCount(); s++) {
                   c = jh.getComponent(s);
                   if (c == null || !(c instanceof JToolBar))
                        continue;
                   JToolBar jtb = (JToolBar)c;
                   //now that we've accessed the toolbar, we can
                   //modify the look of the buttons.
                   for(int i=0; i<jtb.getComponentCount(); i++) {
                        Component comp = jtb.getComponentAtIndex(i);
                        if(comp instanceof JButton) {
                        JButton button = (JButton)comp;
                        button.setBorder(null);

  • Wscompile.bat shows java help

    Hello to everyone!,
    I have unusual problem with my JWSDP 1.6. I am trying to run wscompile.bat on my windows XP. but instead of wscompile help or stubs generated I get java help like this:
    Usage: java [-options] class [args...]
               (to execute a class)
       or  java [-options] -jar jarfile [args...]
               (to execute a jar file)
    where options include:
        -client       to select the "client" VM
        -server       to select the "server" VM
        -hotspot      is a synonym for the "client" VM  [deprecated]
                      The default VM is client.
        -cp <class search path of directories and zip/jar files>
        -classpath <class search path of directories and zip/jar files>
                      A ; separated list of directories, JAR archives,
                      and ZIP archives to search for class files.
        -D<name>=<value>
                      set a system property
        -verbose[:class|gc|jni]
                      enable verbose output
        -version      print product version and exit
        -version:<value>
                      require the specified version to run
        -showversion  print product version and continue
        -jre-restrict-search | -jre-no-restrict-search
                      include/exclude user private JREs in the version search
        -? -help      print this help message
        -X            print help on non-standard options
        -ea[:<packagename>...|:<classname>]
        -enableassertions[:<packagename>...|:<classname>]
                      enable assertions
        -da[:<packagename>...|:<classname>]
        -disableassertions[:<packagename>...|:<classname>]
                      disable assertions
        -esa | -enablesystemassertions
                      enable system assertions
        -dsa | -disablesystemassertions
                      disable system assertions
        -agentlib:<libname>[=<options>]
                      load native agent library <libname>, e.g. -agentlib:hprof
                        see also, -agentlib:jdwp=help and -agentlib:hprof=help
        -agentpath:<pathname>[=<options>]
                      load native agent library by full pathname
        -javaagent:<jarpath>[=<options>]
                      load Java programming language agent, see java.lang.instrumentI am waisting too much time trying to sort it out on my own, so please help me.
    Cheers
    Michal

    Thanks a lot for your quick response. You was right. Now I am getting somthing diffrent:
    java.io.FileNotFoundException: D:\Development\Tomcat\jakarta-tomcat-5.0.27\bin\l
    auncher.xml (The system cannot find the file specified)
            at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:
    243)
            at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:
    140)
            at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
    a:91)
            at org.apache.commons.launcher.Launcher.start(Launcher.java:390)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)Do you know what's going on ?
    Take care
    Michal

  • How can I create a Java help file (*.hs)?

    How can I create a Java help file (*.hs)?

    Thanks a lot.
    I know it is rather poorly used, but I still need it for our current software
    Mit freundlichen Grüßen / With best regards
    Hans-Jürgen Hengsbach - Produktmanagement / Product Management (-227)
    Von: Peter Grainge [email protected]
    Gesendet: Dienstag, 29. April 2014 16:48
    An: Hengsbach.Hans-Juergen
    Betreff: How can I create a Java help file (*.hs)?
    Re: How can I create a Java help file (*.hs)?
    created by Peter Grainge <http://forums.adobe.com/people/Peter+Grainge>  in RoboHelp - View the full discussion <http://forums.adobe.com/message/6340535#6340535

  • Transaction propogation to java helper class

              Hi
              EJB A calls EJB B and EJB B does certain numbr of updates/insert. If one them
              fails everything rollsback in second EJB. This works fine.
              But instead of EJB B being an EJB the initial design was a regular java helper
              class. EJB A creates a new instance of this java class and calls a method on this
              class. The EJB A is set to be transactional (Required). The java class get a DB
              connection from TX datasource and does the same operation as EJB B that I described
              above. I tried to throw an exception to the EJB A and catching the Exception did
              a setRollbackOnly() in EJB A and the transaction does not rollback. I was under
              the impression that even if DB operations are done in a java class they are still
              under the same transaction and thus container is still under control of it if
              it is a container managed transaction. it does not look like it is teh case.
              Is there any requirement that DB connection obtained /operation made need to be
              inside the EJB method itself and not in the java helper class. Does this means
              that the transaction gets suspended on the duration of execution of the java helper
              class. I was under the impression that they are all under the same transaction
              context and it applies to that as well. Any help on this is greatly appreciated.
              

    Well, that's the only way. The container has to start the transaction in its
              invocation wrapper for CMT EJBs and then terminate the transaction (commit or
              rollback) after the method has exited (either normally or by throwing an
              exception). Anything that happens inside the call to the business method is in
              the transaction...
              --dejan
              Toad wrote:
              > That's good to know but somewhat surprising.
              >
              > "Deyan D. Bektchiev" <[email protected]> wrote in message
              > news:[email protected]...
              > > The transaction is associate with the thread that the EJB method executes
              > in so
              > > any calls in the same threads are part of the transaction.
              > > So even if you have a separate class that functions as a connection
              > factory (in
              > > the end getting the connections from a TX datasource) those connections
              > still
              > > would be part of the transaction.
              > >
              > > You can test that if you do
              > > System.out.println(weblogic.transaction.TxHelper.getTransaction()) and you
              > > should see the current transaction.
              > >
              > >
              > > --dejan
              > >
              > > Toad wrote:
              > >
              > > > I'm thinking the key to the failure to rollback is that the helper bean
              > > > "gets a connection" which is effectively stepping outside the confines
              > of
              > > > your CMP model. How would the container know that you hand-carved a
              > > > connection or even a set of connections and executed several
              > transactions
              > > > independently? That would be no mean feat if it wasn't specifically
              > designed
              > > > in.
              > > >
              > > > "Priya Vasudevan" <[email protected]> wrote in message
              > > > news:[email protected]...
              > > > >
              > > > > Hi
              > > > >
              > > > > EJB A calls EJB B and EJB B does certain numbr of updates/insert. If
              > one
              > > > them
              > > > > fails everything rollsback in second EJB. This works fine.
              > > > >
              > > > > But instead of EJB B being an EJB the initial design was a regular
              > java
              > > > helper
              > > > > class. EJB A creates a new instance of this java class and calls a
              > method
              > > > on this
              > > > > class. The EJB A is set to be transactional (Required). The java class
              > get
              > > > a DB
              > > > > connection from TX datasource and does the same operation as EJB B
              > that I
              > > > described
              > > > > above. I tried to throw an exception to the EJB A and catching the
              > > > Exception did
              > > > > a setRollbackOnly() in EJB A and the transaction does not rollback. I
              > was
              > > > under
              > > > > the impression that even if DB operations are done in a java class
              > they
              > > > are still
              > > > > under the same transaction and thus container is still under control
              > of it
              > > > if
              > > > > it is a container managed transaction. it does not look like it is teh
              > > > case.
              > > > >
              > > > > Is there any requirement that DB connection obtained /operation made
              > need
              > > > to be
              > > > > inside the EJB method itself and not in the java helper class. Does
              > this
              > > > means
              > > > > that the transaction gets suspended on the duration of execution of
              > the
              > > > java helper
              > > > > class. I was under the impression that they are all under the same
              > > > transaction
              > > > > context and it applies to that as well. Any help on this is greatly
              > > > appreciated.
              > > > >
              > >
              

  • Some easy java help required

    Kay
    Say for example i had:
    public int[] i d= new int[3];
    {code}And i[0] was set to 3, i[1] was set to 5, i[2] was set to 4, and i[3] was set to 1.
    Basically in easier terms:
    {code:java}
    i[0] = 3;
    i[1] = 5;
    i[2] = 4;
    i[3] = 1;
    {code}Right, how would i make an alternative int like this:
    {code:java}
    int highestNumber = (*);
    {code}Basically i want (*) to select the biggest integer out of the i[] int. So in that case i would want it to automatically select i[1] as it has the largest amount, that's what i need help with.
    *ALSO*
    How could i reset all of those int's to 0 in one easy code?
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Ryan_Stanyer wrote:
    Can you tell me why that wouldn't work? Or what alternative method i can use to make something with the same function?You create an array of 3 elements but try to put 4 elements there.
    And also.
    Ryan_Stanyer wrote:
    int highestNumber = (*);
    {code}Basically i want (*) to select the biggest integer out of the i[] int. So in that case i would want it to automatically select i[1] as it has the largest amount, that's what i need help with.create a method
    int getMaximalItem(int []array) [
       //implementation goes here
    Ryan_Stanyer wrote:ALSO
    How could i reset all of those int's to 0 in one easy code?
    Thanks.Create a method like:
    public void setToZeros(int []array) {
       // implementation goes here
    }Put some effort into this task and then ask specific questions if somethings are still not working.
    Regards,

Maybe you are looking for

  • How can I export a stylesheet (either CSS or XSLT) with XML from indesign?

    Hi, I am using indesign CS4. I want to export style sheet whether it is CSS or XSLT file with xml. I try to get it but can't. Also the XML i am exporting does not styles that has been applied by me while creating the file in Indesign. Please help me

  • Run preupgrade script for AppleMobileDeviceSupport. Contact the software manufacturer for assistance.

    everytime i try to update itunes this is what it says run preupgrade script for AppleMobileDeviceSupport. Contact the software manufacturer for assistance.

  • Replication of SRM PO to ECC

    Hi , In my case, SRM PO is not replicating to ECC.In BBP_PD message is displayed as " Type conflict when calling a function module. BBP_PD_PO_TRANSFER_EXEC (Transfer Failed (E.Sys.) " When I checked in transaction message is displayed as " Purc: meth

  • Menu Bar features disappeared

    In Acrobat XI Pro what happened to the menu bar choices of 'Document', 'Comments', 'Forms', 'Tools', 'Advance' that was available in Acrobat 9 Pro

  • Keynote menu won't stay open

    When clicking on a menu in the format bark (ex: color) the sub menu pops open then disappears when releasing the mouse key. In the past the menu would stay open until select a color or clicking off the menu. Any thoughts on what's wrong?