External Methods

Hi I need help please, this is my code but when i run the application it gives me an error message, can anybody tell me what i did wrong please??? The error message I get is after I run the application it says this:
Exception in the thread "main" java.lang.NoSuchMethodError: main
Many thanks you's in advance.
import java.io.*;
public class Employee
     //Declare class variables
     String FirstName;
     String LastName;
     String Position;
     float Rate;
     float Hours;
     //First method constructor
     public Employee (String f, String l, String p, float r, float h)
          FirstName = f;
          LastName = l;
          Position = p;
          Rate = r;
          Hours = h;
          //Second method contructor
          public Employee (String f, String l, String p)
               FirstName = f;
               LastName = l;
               Position = p;
               //Instance methods
               public String getFirstName()
                    return FirstName;
                    public String getLastName()
                         return LastName;
                         public String getPosition()
                              return Position;
                              public float getRate()
                                   return Rate;
                                   public float getHours()
                                        return Hours;
                                        }

Hello,
If you want to execute a class, it must have a main method, like this:
public class Example {
    public static void main(String[] args) {
        System.out.println("Hello World!");
}If your class don't have such a method, it can't be run directly.
The error
Exception in the thread "main" java.lang.NoSuchMethodError: mainis telling you that the Employee class don't have a main method.

Similar Messages

  • Im new to java can someone please help me with external method calls

    I have only been doing java for a couple of months using bluej, I really dont understand external method calls, this is for an assignment and i have managed the bulk of the code, ineed to make external calls to the other classes to return and input data.
    this is the code i have writen so far.
    class CD
    // The fields.
    public Artist performer;
    private String album;
    private String genre;
    private int numberOfTracks;
    private int yearReleased;
    *Please enter CD details, text entry requires quote marks "Greatest Hits"
    public CD (String album_Name){
    album = album_Name;
    numberOfTracks = 0;
    yearReleased = 0;
    performer = new Artist();
    /**blank constructor*/
    public CD ()
    {album = "";
                genre = "";
                numberOfTracks = 0;
                yearReleased = 0;
                performer = new Artist();}
    * accessor methods
    /** method to return album details to the output window*/
    public void print_albumDetails(){
    System.out.println("Album: " + album);
    System.out.println("Genre: " + genre);
    System.out.println("Number of Tracks: " + numberOfTracks);}
    /** accessor method to return the name of the album*/
    public String show_album(){
    return album;}
    /** accessor method to show artist details from artist class*/
    public void print_details(){
    performer.print_details();}
    * mutator methods
    /** mutator method to change album name please enter name with quotes*/
    public void change_album(String newAlbum){
    album = newAlbum;}
    /**mutator method for adding the album year and checking it correct
    * please enter a year between 1900 and 2005*/
    public void album_year (int year){
    if ((year < 1900) || (year > 2005))
    System.out.println("sorry the year is incorrect please enter a year between 1900 and 2005");
    else yearReleased = year;}
    /** mutator method to alter the number of tracks and check if the ammount is greater
    * than zero*/
    public void change_Number_Of_Tracks(int no_Of_Tracks){
    if (no_Of_Tracks > 0)
    numberOfTracks = no_Of_Tracks;
    else System.out.println("you have not entered a correct number");}
    /** mutator method to change the genre and check it has been entered correctly
    * Please enter 1 for Soul
    * 2 for Blues
    * 3 for Jazz*/
    public void change_Genre(int Change_Genre){
    if ((Change_Genre <= 0) || (Change_Genre > 3)){
    System.out.println("You have not entered the correct available genres");
    System.out.println("which are 1 for Soul,2 for Blues or 3 for Jazz");}
    else if (Change_Genre == 1)
    genre = "Soul";
    else if (Change_Genre == 2)
    genre = "Blues";
    else if (Change_Genre == 3)
    genre = "Jazz";
    to this i need to add an external call to the class Artist to be able to enter firstname and second name, I know that external calls use dot notation
    and the instance of Artist is called performer but i cant get the call to these methods in the Artist class to work
    Artist class
    /** mutator method to change or add artist first name, remember to add quotes*/
    public void cName(String name){
    firstname = name;}
    /** mutator method to change or add artist surname remember to add quotes*/
    public void csurName(String surname){
    lastname = surname;}
    can some please give me some help

    Also, if you can't get them to work, what is the error message you are getting?
    Baron Samedi

  • External methods in xslt mapping

    can we call external JAVA and ABAP methods in XSLT mapping ? 
    thanks
    kumar

    Kumar,
    Yes you can, please refer the below webelogs.
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    Best regards,
    raj.

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • Passing variables frm xsl to a java method

    here is my current frustration -- aside from being new to java and xsl...
    i have an xml message (that is passed to me from another process) as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <WillsXMLStart>
        <inputEventStart>TRUE</inputEventStart>
        <inputEventNumber>1</inputEventNumber>
        <inputEventID>HEREISTHEID</inputEventID>
        <inputEventEnd>TRUE</inputEventEnd>
    </WillsXMLStart>ok now i am using netbeans to create and xsl to gram the information and reformat the information because the end process want the data and event tags differantly. my xsl is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:gng="java:GetAndConvert"
                    exclude-result-prefixes="gng"
                    version="2.0">
        <xsl:output     encoding="UTF-8" indent="yes" method="xml"/>
        <xsl:template match="/">
            <WillsXMLStart>
                <inputEventStart>
                    <xsl:value-of select="WillsXMLStart/inputEventStart"/>
                </inputEventStart>
                <inputEventNumber>
                    <xsl:value-of select="WillsXMLStart/inputEventNumber"/>
                </inputEventNumber>
                <inputEventID>
                    <xsl:variable name="inputVariable">
                        <xsl:value-of select="WillsXMLStart/inputEventID"/>
                    </xsl:variable>
                    <!-- <xsl:value-of select="$inputVariable"/> -->
                    <xsl:value-of select="gng:getString('$inputVariable')"/>
                </inputEventID>
                <inputEventEnd>
                    <xsl:value-of select="WillsXMLStart/inputEventEnd"/>
                </inputEventEnd>
            </WillsXMLStart>
        </xsl:template>
    </xsl:stylesheet>ok... now for the frustrating part... what i need to do is (as the code shows(i think)), get and store in a variable called "inputVariable" the specific informati that is stored in the "inputEventID" from the xml. that works fine... but i need to pass that information as a string to the java method "getString(String inputVariable)".... my java code (just a test) is as follows:
    * GetAndConvert.java
    *  @author william
    * Created on June 27, 2007, 8:04 AM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    public class GetAndConvert {
        /** Creates a new instance of GetAndConvert */
        public String getString(String inputVariable) {
            String x = "test";
            System.out.print("this is the string that is hardcoded into GAC: " + inputVariable);
            return x;
    }OK.... i am getting the following error when i try to run the whole thing -- translation from within XSL:
    XML validation started.
    Checking file:/home/william/PROGRAMMING/TestingJavaXML/src/testingXML-JavaInput.xsl...
    Cannot find class 'java:GetAndConvert'.
    Cannot find external method 'java:GetAndConvert.getString' (must be public).
    Could not compile stylesheeti have 2 packages in my "project". 1 = default where i have my xml and xsl files... 2 = JavaEvents where i have my .Java file.
    any and all help would really be appreciated... as i am going bald trying to figure this out. you can either post here or you can email me at: [email protected]
    thanks in advance for all your help.
    Deathsbain.

    OK... now i am getting this error...:
    XSL
    <!--
        Document   : translatorJavaXSL.xsl
        Created on : June 27, 2007, 3:53 PM
        Author     : william
        Description:
            Purpose of transformation follows.
    -->
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:gng="java:JavaSRC.xmljavamain"
                    exclude-result-prefixes="gng"
                    version="1.0">
        <xslutput encoding="UTF-8" indent="yes" method="xml"/>
        <xsl:template match="/">
            <WillsInputXML>
                <eventStart>
                    <xsl:value-of select="WillsInputXML/eventStart"/>
                </eventStart>
                <eventNumber>
                    <xsl:value-of select="WillsInputXML/eventNumber"/>
                </eventNumber>
                <eventUniqueID>
                    <xsl:variable name="inputVariable">
                        <xsl:value-of select="WillsInputXML/eventUniqueID"/>
                    </xsl:variable>
                    <xsl:value-of select="$inputVariable"/>
                    <xsl:variable name="myInstance">
                        <xsl:value-of select="gng:new()"/>
                    </xsl:variable>
                    <xsl:value-of select="gng:xmlJavaConverter($myInstance, $inputVariable)"/>
                </eventUniqueID>
                <eventEnd>
                    <xsl:value-of select="WillsInputXML/eventEnd"/>
                </eventEnd>
            </WillsInputXML>
        </xsl:template>
    </xsl:stylesheet>
    JAVA
    * xmljavamain.java
    * Created on July 2, 2007, 8:58 AM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package javaSRC;
    * @author william
    public class xmljavamain
        /** Creates a new instance of xmljavamain */
        public String xmlJavaConverter (String inputValue)
            return ("this is the xmljavamain function...");
    }when running the "NetBeans" translator for the XSL page i get this error.
    XML validation started.
    Checking file:/home/william/PROGRAMMING/XML-Java-XSL/src/xmljavaxsl/translatorJavaXSL.xsl...
    Cannot find class 'java:JavaSRC.xmljavamain'.
    Cannot find external constructor 'java:JavaSRC.xmljavamain'.
    The first argument to the non-static Java function 'xmlJavaConverter' is not a valid object reference.
    Could not compile stylesheet
    Could not compile stylesheet
    XML validation finished.WHAT AM I DOING WRONG?
    Deathsbain.

  • Debugging of method at runtime

    Hi,
    I need to examine behaviour of a methofd in a workflow after clicking approve button.
    The method  i want to debug is in task below user decision task,
    Can anybody guide me how to debug this bachground task mehtod?
    Thanks.

    Hi Sanjay,
    Did you customized the standard user decision Task?
    If you used the method in user decision Task, then it should be a Dialog method, not a Background method right?
    Anyway if you want to Debug the dialog method  execute your workflow. It will wait at the some user's inbox. Log in to that user  and set  External external method in the corresponding method. Then execute the work item from the user's inbox. It will go the debug mode directly.
    If you want to debug the background method, then in the task just change it as a dialog method and do the same.
    Thanks,
    viji.

  • Reading HTML after the onload Method is used in the website

    Hello,
    I try to read a HTML site with the HttpURLConnection. That works fine.. But I only geht the static html. Is it possible to read the html after the javascript is done... In the site I calc a result with a external method (JS) so I need to calc and than I read the elements....
    Example:
    mySite.jsp?first=1&second=3
    in the Site
    <script>
    function test() {
    document.getElementById("foo").innerHTML = <c:out value="${param.first * param.second\" />;
    window.onload = test;
    </script>
    <div id="foo"></div>
    This is a simple example to show how the site works.... But I have no chance to disclaim the javascript....
    Thanks for help

    The server just generates the Javascript. It doesn't run it at all. That's the job of the client, which in this case is your program. So, you would have to parse the HTML and execute the Javascript that's in the onload method. This will be a non-trivial amount of work.

  • XSLT mapping error in PI 7.1

    Hi,
    The below xslt compiles and runs fine with SAPXML toolkit but the same fails with error
    u201CCannot find external method 'java.util.Map.get' (must be public).".
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:map="java:java.util.Map"
      xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:output indent="no" />
    <xsl:param name="inputparam"/>
    <xsl:template match="/">
        <!-- change dynamic configuration -->
        <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
        <xsl:variable name="dynamic-value"
            select="dyn:get($dynamic-conf, $dynamic-key)" />
        <xsl:variable name="new-value"    
            select="concat($dynamic-value, 'subfolder\')" />
        <xsl:variable name="dummy"
            select="dyn:put($dynamic-conf, $dynamic-key, $new-value)" />
        <!-- copy payload -->
        <xsl:copy-of select="." />
    </xsl:template>
    </xsl:stylesheet>
    Regards,
    Vishal

    Hi,
    I am already using jdk 5 for the same.
    Can you please tell me what is the setting(s) that need to be done for XSLT to be used with JDK5.
    I have a knowledge on how to develop a XSLT mapping, but fail to understand what is the relation between XSLT and JDK5.
    It will be very helpful to me if you post your reply to my question here: Basic Settings in Operation Mapping
    Appreciate your help and time.
    Thanks.

  • Rules Engine Environment in MDM

    Hi Everyone,
    I am evaluating the capability of SAP MDM to see if there is any kind of rules engine delivered that can create a material master (SKU) number.  I am not trying to create material master records yet - just the material number !
    Background:
    Defned rules, coupled with reference data should be able to generated the list of SKUs.
    Example:
    Reference Data contained in 3 tables:
    Product Line: LN1, LN2
    Release: 2009
    Language: EN, JA, FR, DE
    SKU mask: AA-BB-CC
    AA = Product Line
    BB = Release
    CC = Language
    The rules would be to create combinations of all the reference data values and output a list of SKUs according to the SKU mask/format.  In other words, by implmenting rules, I should be able to generate  2x1x4 = 8 SKUs in total (2 values for product line, mulitplied by 1 value for Release, multiplied by 4 values for Language).
    Questions:
    I know I can implment rules on the ABAP workbench in R/3 to create material master numbers, and then later create actual material master records with reference to other materials all within R/3.  However, I would like to create and manage the material master directly in MDM.
    1) Is a rules engine like drools provided as part of MDM?
    2) Since MDM is based on the Netweaver and sits on the web apps server, is there an ABAP workbench provided in MDM from where I can create the rules and create z tables for the reference data.
    3) Do I need to create a separate web service in Netweaver Developer Studio to create these rules.
    Thanks in advance
    -Rajiv

    Hi Rajiv,
      In some scenarios Material master is imported to SAP MDM from R/3 and all the logic is performed in R/3 itself. For such cases You can use the standrad MDM Material Repository provided by SAP.
    <i>How do people create specific part numbers (material numbers / SKUs) in SAP MDM based upon some specific business logic?</i>
    Let us say the Part number is an depandant on another field say Product ID.
    In MDM Console you can specify the business logic in the Calculation field.
    Also i would like to add that in SAP MDM most of this business logic are mere mathematical fuctions (part no = 1.5 * product ID). There is no provision to call external methods (like RFCs in R/3).
    I suggest you to get the Standard MDM Materials Repository and play around the Calculated fields\ Auto ID Fields in MDM Console.
    Get back for help,
    Vijay

  • Some {@link} tags do not seem to generate hyperlinks

    Hi,
    I am having some trouble getting some {@link} tags to generate hyperlinks. Specifically, {@link} tags to methods in classes in other packages. I've tried specifying the method arguments, including the fully qualified argument types, but I cannot get the output to generate hyperlinks.
    In the example at the end of this post, I have a {@link} to a class as well as three {@link} tags to one of its methods. (Note the wrapping of the link tags in the example is due to the line length limits of the text area in which I entered this posting--they are NOT wrapped in the original code.) The hyperlink for the class gets generated. The method names all get expanded in the output to include their argument lists, so I know it's finding the methods, and the method names are in a fixed font, but they're not hyperlinks!
    I didn't get any errors or warnings, and I'm using j2sdk1.4.1. I used the following command, with Sun's API package-list in the current directory (.) and generating the output to the html subdirectory:
    javadoc -d html -linkoffline
    http://java.sun.com/j2se/1.4/docs/api . DocTest.java
    Any ideas what's wrong?
    Thanks,
    Robbie
    P.S. I also included the HTML output at the end even though you can't see the hyperlink for the LayoutFocusTraversalPolicy class.
    **** Example Program
    import java.awt.*;
    import javax.swing.*;
    * This is a class to test out javadoc links.
    * <p>It uses class {@link javax.swing.LayoutFocusTraversalPolicy}
    * <p>It uses the method:
    * {@link javax.swing.LayoutFocusTraversalPolicy#getComponentAfter}
    * <p>It uses the method:
    * {@link javax.swing.LayoutFocusTraversalPolicy#getComponentAfter(Container,Component)}
    * <p>It uses the method:
    * {@link javax.swing.LayoutFocusTraversalPolicy#getComponentAfter(java.awt.Container,java.awt.Component)}
    public class DocTest
    public DocTest ()
    *** Here is a cut-and-past of the HTML Output
    *** Note that LayoutFocusTraversalPolicy class is a hyperlink in the
    *** original HTML, but the three methods are not, but even the first
    *** method has been expanded to include its arguments, so I know it's
    *** finding the method name:
    public class DocTest
    extends Object
    This is a class to test out javadoc links.
    It uses class LayoutFocusTraversalPolicy
    It uses the method: LayoutFocusTraversalPolicy.getComponentAfter(java.awt.Container, java.awt.Component)
    It uses the method: LayoutFocusTraversalPolicy.getComponentAfter(Container,Component)
    It uses the method: LayoutFocusTraversalPolicy.getComponentAfter(java.awt.Container,java.awt.Component)

    Sadly, the -link option is broken in two severe ways in 1.4.1:
    4652655 @link does not link to external -link'd classes
    See bug report: http://developer.java.sun.com/developer/bugParade/bugs/4652655.html
    4720957 link and -linkoffline creates wrong link to ../../../http&#058;//
    See bug report: http://developer.java.sun.com/developer/bugParade/bugs/4720957.html
    There are no known workarounds.
    We believe we have fixed these for 1.4.2. The state of -link wasn't much better in 1.4.0.
    Here are the major bugs in javadoc 1.4.1:
    http://java.sun.com/j2se/1.4.1/relnotes.html#javadoc
    and the major bugs in javadoc 1.4.0:
    http://java.sun.com/j2se/1.4/relnotes.html#javadoc
    The main -link bug in 1.4.0 appears to be this:
    Links to external methods using -link or -linkoffline are not generated. No known workaround. Bug 4615751
    -Doug Kramer
    Javadoc team

  • Java object XSLT parameters problem. JDK vs Xalan.

    Hello all,
    I need to create a small application which requires to run some transformation interacting with a number of Java classes.
    Small example is below: I have a Java class, which I'm going to use within transformation.
    package com.example;
    public class Document
      private String filename=null;
      public String getFilename() {
        return this.filename;
    }and transformation which extracts some information from the passed parameter object
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:document="com.example.Document">
        <xsl:param name="theDocument"/>
        <xsl:template match="/">
            <example>
                <xsl:value-of select="document:getFilename($theDocument)"/>
            </example>
        </xsl:template>
    </xsl:stylesheet>The code which launches transformation is following:
            try {
                TransformerFactory factory = TransformerFactory.newInstance();
                Templates template = factory.newTemplates(new StreamSource(new FileInputStream(transformationFilename)));
                Source source = new StreamSource(new FileInputStream(theSourceFilename));
                Result result = new StreamResult(new FileOutputStream(theTargetFilename));
                Transformer transformer = template.newTransformer();
                transformer.setParameter("theDocument", theDocument);
                transformer.transform(source, result);
            } catch (TransformerConfigurationException e) {
                e.printStackTrace();
            } catch (FileNotFoundException e) {
                e.printStackTrace();
        }When I run it I get
    ERROR:  'Cannot find external method 'com.example.Document.getFilename' (must be public).'
    FATAL ERROR:  'Could not compile stylesheet'at this line
      Templates template = factory.newTemplates(new StreamSource(new FileInputStream(transformationFilename)));I made a test with a variable, when Document instance is not a parameter but an instance created within transformation and assigned to an XSLT variable. Everything works fine in variable case, but not with parameter.
    Once I've added Xalan-2.7.1 .jars to the classpath it had been fixed. I guess the issue is described here (yep, I'm using 1.5).
    XSLTC does not support all the extensions that Xalan does. These extensions are beyond the definition of the JAXP and XSLT specifications. For those users impacted by this, the work around of downloading the Xalan classes from Apache is still available. Also, going forward we expect to be supporting more and more extensions in XSLTC.
    However, I'd like to find Xalan free solution. Could someone explain what is the difference and how implement the same behaviour without using Xalan?
    Thank you in advance.

    georgemc, your answer may not have helped the original poster, but it just helped me out. So, thank you very much.
    To clarify, for the benefit of anyone else who encounters this issue, it looks as if a possible cause of the 'Cannot find external method' error is that the transformer is defaulting to something - possibly XSLTC - that does not support certain extension methods. Ensuring that a recent Xalan JAR is in the classpath may resolve the problem.
    Edited by: slamci on Mar 13, 2010 11:14 AM

  • Removing non printable characters from an excel file using powershell

    Hello,
    anyone know how to remove non printable characters from an excel file using powershell?
    thanks,
    jose.

    To add - Excel is a binary file.  It cannot be managed via external methods easily.  You can write a macro that can do this.  Post in the Excel forum and explain what you are seeing and get the MVPs there to show you how to use the macro facility
    to edit cells.  Outside of cell text "unprintable" characters are a normal part of Excel.
    ¯\_(ツ)_/¯

  • Convert Map String, Object to Map String,String ?

    How can I convert a map say;
    Map<String, Object> map = new Map<Striing, Object>();
    map.put("value", "hello");
    to a Map<String,String>.
    I want to pass the map to another method which is expecting Map<String,String>.
    Thanks

    JoachimSauer wrote:
    shezam wrote:
    Because im actaully calling an external method to populate map which returns <String, Object>.Now we're getting somewhere.
    Oh wait, no, we're not! We're back to my original reply:
    What do you want and/or expect to happen if one of the values isn't actually a String object but something else?Nothing like a bit of confusion :). They are and always will be String objects.
    So this external method, call it external1 for now returns a Map<String, Object>, I then want to pass this map to another external method external2 which takes Map <String,String> as a parameter.

  • Creating cache for multiple property files run time/dynamically.

    Hi,
    I have a requirement, where in I need to create cache for each property file present in a folder at server side or in the lib or resources directory. Please help me how I can do this?
    Thanks.

    ok thank you.
    I follwed this method implementation:
    static HashMap<String, HashMap<Object, String>> cacheHolder = new HashMap<String, HashMap<Object, String>>();
         static HashMap<Object, String>[] cache = new HashMap[2];
         static Integer fileCount = 0;
         static int incrementSize = 2;
    public method1(Map<Object,String>map){
    File file = new File((new StringBuilder(
                             "ABC/XYZ/")).append(value)
                             .toString()); // where value is the file name returned from the external method
                   int newSize = existingMapLength+incrementSize;
                   if (someVal== null) {                    
                        synchronized (fileCount) {
                             int oldSize = cache.length;
                             if(fileCount==cache.length){
                                  HashMap[] oldData = new HashMap[oldSize];
                                  oldData = cache;                              
                                  cache = new HashMap[newSize];
                                  LOGGER.info("New Size added:==>"+cache.length);
                                  for(int i=0;i<oldSize;i++){                                   
                                       cache[i] = oldData;
                                  cache[fileCount] = readExternalPropertiesFile(file); // external method which returns the properties of the file in hashmap
                                  cacheHolder.put(value, cache[fileCount]);                    
                                  keys = cache[fileCount].keySet();
                             else{                         
                             cache[fileCount] = readPropertiesFile(file);
                             cacheHolder.put(value, cache[fileCount]);                    
                             keys = cache[fileCount].keySet();
                             someVal= cache[fileCount];
    fileCount = fileCount + 1;
    Please let me know if any improvemnets are possible.

Maybe you are looking for

  • How do I connect to my WIFi with Netgear

    I just received an iPad for Christmas and have Comcast internet also Netgear and a SonicWall.  I can't connect to WiFi here at home.  I could connect at my daughter's.

  • When create a new user into AD by default permissions also added for share point site

    HI i have a sharepoint farm. when i create new  user in AD, by default below permissions are added to that user, how its happen ? site permissions: View Web Analytics Data   Browse Directories  -  Enumerate files and folders in a Web site using Share

  • How to update stylesheets at runtime?

    Strangely the style does'nt change if i manually change the css class rules in one of the css document and switch between the 2 files.   @Override   public void initialize(URL url, ResourceBundle rb) {     final String cssUrl1 = getClass().getResourc

  • 2 Mac User Accounts - 1 cannot open a catalog

    Hi, I have a Mac with 2 users account (wife and I) and I have spent hours creating a catalog and setting up it perfectly. I now want my wife to be able to see this from her account. After many trials I have moved all my photos to the Shared Users fol

  • [SOLVED]dwm-sprinkles: can't right click

    Just installed dwm-sprinkles (compiled from source grabbed using svn because there's nothing in AUR or ABS for it), and I can no longer right click in firefox or use the drop-down menus.  Drop downs on websites work fine, but I can't use anything in