Calling ANT from WLST with propertiesFile

Has anyone successfully used the <wlst> type from ANT?
I'm trying to use the <wlst> tag from ant to perform some WLST scripting. However, when I include a propertiesFile value in the <wlst> tag I get the following error:
"The <wlst> type doesn't support the "propertiesfile" attribute."
I'm referencing the example from the wlst Ant Task Syntax (http://e-docs.bea.com/wls/docs92/config_scripting/using_WLST.html) and using the setEnv.cmd from the command line before executing the ant call.
Here's my ant target:
<!-- Call the WLST script which starts the Domain Admin Server -->
<target name="startAdmin" >
<wlst debug="false" executeScriptBeforeFile="true" propertiesFile="wlst-global.properties" failOnError="true">
<script>
     print Starting a server at ' adminURL ' with server name '
</script>
</wlst>
</target>
Can anyone offer a solution to this error / my problem? I've check everywhere I know to look but found no other examples.
Thanks in advance.
Jeff

Never mind. I've decided to use the ANT <wlst> tag to call my py scripts and pass use the -loadProperties as part of the <arg> tag.
Just in case anyone else out there has a similar dilema here's what is working for me (where prop.wlst is defined as a property):
     <target name="startAdmin" depends="">
          <java classname="weblogic.WLST" fork="no">
               <arg line="-loadProperties ${prop.wlst} nsStartAdmin.py" />
          </java>
     </target>
-Jeff

Similar Messages

  • Calling ant from java

    public static void main(String[] args) {
              String arr[] = null;
              arr = new String[2];
              arr[0] = "-buildfile";
              arr[1] = "C:\\workspace\\my projects\\ANTTASKS\\bin\\build.xml";
              try {
                   Launcher launcher = new Launcher();
                   launcher.main(arr);     
              } catch (Exception e) {
                   System.out.println(e.getMessage());
                   // TODO: handle exception
    I tried calling ant from java. But the problem is that, i am not sure how to get the handle of error & input stream from this.
    I also need to know how do I kill the ant executable if there is some kind of exception like ConnectionTimeOut or is there any some kind of timeout mechanism.
    Earlier i was calling ant as an external process like Process P = new Process(), where p.execute("ant.bat xxxxx"). I used to get the error & input stream from the process itself.
    Please help!!!
    thanks

    A better approach would be to use the classes provided in Ant. The API documentation for Ant has all the necessary information.
    The sample code would look like:
    Project ant = new Project();
    ProjectHelper helper = new ProjectHelperImpl();
    ant.init();
    helper.parse(ant, new File("build.xml"));
    ant.executeTarget("clean");

  • Calling BAPI from VB with ECC 6.0

    I have a Visual Basic 6 application that calls some standard BAPI's in a SAP R/3 system using Frontend 4.6d in order to upload data.  It also calls some custom RFC enabled ABAP to download data.
    We are upgrading to ECC 6.0 with SAP GUI 7.1.
    Can anyone tell me if I can still call BAPI's from VB6 or will I need to upgrade to VB.net?  Are there any changes to references in VB that I will need to make?
    Thanks!!
    Edited by: Jolene Roell on Feb 20, 2009 8:33 AM

    Well I could never figure out a way to call a BAPI from VB6 with ECC 6.  I ended up creating a VB.net dll using the SAP connector to call the BAPIs.  I could then call the dll from my existing VB 6 program.  That cut down on the recoding that I had to do.

  • Call report from java with deployment of java web start

    I need call report from java,the call function is:execURL ( String pURL )
    pURL is a url link to call report from report services .
    such as :http://10.20.1.43:8888/reports/rwservlet?destype=cache&desformat=PDF&report=test.rdf&user=scott/tiger@cims
    public static void execURL ( String pURL )
    String tempstr = new String();
    int posIdx = 0;
    if ( (System.getProperty("os.name").equals("Windows NT"))||
    (System.getProperty("os.name").equals("Windows 2000")) )
    posIdx = pURL.indexOf("&");
    while ( posIdx > 0 )
    tempstr = pURL.substring(0,posIdx)+"^"+pURL.substring(posIdx);
    pURL = tempstr;
    posIdx = pURL.indexOf("&",posIdx+2);
    try
    Runtime.getRuntime().exec("cmd /c start "+pURL);
    catch (Exception e1) {System.out.println(e1.getMessage()); }
    else
    try
    Runtime.getRuntime().exec("start "+pURL);
    catch (Exception e2)
    System.out.println(e2.getMessage());
    It's run with no problem with deployment of simple jar.
    But when i call report with deployment of java web start,it can not.
    I think it's java secuity problem,so i add
    Permission java.io.FilePermission "c://winnt//system32//cmd.exe", "execute";
    in java.policy file in client(windows 20000).However ,it can not too.
    Who can help me,Thanks in Advance!

    David,
    In your code, 'cmd' is invoked as Runtime.getRuntime().exec("cmd /c start "+pURL);
    but in your policy file you specify
    Permission java.io.FilePermission "c://winnt//system32//cmd.exe", "execute";
    Before creating a new process, the security manager checks for FilePermission(cmd,"execute")
    if cmd is an absolute path, otherwise it calls checkPermission with
    FilePermission("<<ALL FILES>>","execute"). Try specifying
    FilePermission("<<ALL FILES>>","execute") in your policy file.
    But, I believe using exec, may not be the right solution as it may not work on
    other platforms. Also you will have to expect the client m/c to relax security
    permission.
    Did you consider using java.net.HttpUrlConnection class instead to access the report
    service URL?
    HTH,
    Sathish.

  • Calling report from form with lexical parameter

    hi
    DECLARE
         repid REPORT_OBJECT;
         v_rep VARCHAR2(1000);
         rep_status VARCHAR2(20);
    BEGIN
              repid := FIND_REPORT_OBJECT( 'REPORT34' );
              set_report_object_property(repid,report_other,'p_SEASON_YEAR='||:SALE_ORDER.SEASON_YEAR
              ||' &sort='||:sale_order.sort1);
              --set_report_object_property(repid,report_other,'p_g_id =20');
              v_rep := RUN_REPORT_OBJECT(repid);
              rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    --Display report in the browser
    WEB.SHOW_DOCUMENT('http://127.0.0.1:8889/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
    ELSE
    message('Error when running report');
    END IF;
    PAUSE;
    END;i had made a lexical parameter in reports the reports code is
    SELECT s.season_year,sd.prod_id,P.PROD_NAME,sum(sd.total_qty)
    FROM sale_order s,sale_order_detail sd,PRODUCT P,CUSTOMER_MASTER cm,CUSTOMER_DETAIL cd
    where s.id=sd.id and P.PROD_ID=SD.PROD_ID AND s.season_year = :p_season_year
    AND CD.CUST_ID=CM.CUST_ID AND CD.CUST_ID=S.CUST_ID AND CD.COUNTRY NOT LIKE 'SPA%' AND Sd.PROD_ID LIKE  'CA%'
    group by s.season_year,sd.prod_id,P.PROD_NAME
    &sortthanks and regards
    vikas

    Vikas,
    So, is your code producing an error when your report is called? Also, it would be helpful to know your Forms and Reports versions. Is ":p_season_year" set up as a USER_PARAMETER (UP) in your report or is it a true lexical parameter (meaning you should reference it with '&' instead of ':')? If it is a UP, the typical way to pass a value to this UP from Forms is to use a ParamList object instead of the REPORT_OTHER parameter of the Set_Report_Object_Property built-in. For example:
    DECLARE
       pl_id    ParamList;
       pl_name  VARCHAR2(10) := 'REPORT34';
       v_rep VARCHAR2(1000);
       rep_status VARCHAR2(20);
    BEGIN
       pl_id := Get_Parameter_List(pl_name);
       IF id_null(pl_id) THEN
          pl_id := Create_Parameter_List(pl_name);
       END IF;
       Add_Parameter(pl_id, 'P_SEASON_YEAR', TEXT_PARAMETER, :SALE_ORDER.SEASON_YEAR);
       repid := FIND_REPORT_OBJECT( 'REPORT34' );
       v_rep := RUN_REPORT_OBJECT(repid, pl_id);
       ...  rest of your code here  ...
    END;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Issue calling program from transaction with selection criteria

    Hi Guys,
        I ve a issue regarding calling a program from transaction.
    There is a standard transaction calling a program  using selection criteria no (say for eq 10 fields, just look at the eg below)
    Submit  <table-proname> and return using selection-set <table-varia>
    With rbukrs  = i_bkorm-burks    “Comp Code
    with  Revent = i_bkorm-event  “ event
    with rbelnr  = ibkorm-belnr     “Doc no
    with rgjahr = ibkorm-gjahr   “fiscal year
    with ruzeit = ibkorm-ruzeit  “time
    with rusnam = ibkorm-rusnam “user name
    And so on
    Now, In my program selection screen  i  ve only three fields, (not all mentioned above)
    Parameter:
    Rbukrs  type bukrs, “comp code
    Rbelnr type belnr, “doc no
    Rghar type gjahr.  “fiscal year
    Now, i configure this transaction with this program i can able to run this program  from transaction.
    Is every thing go right, Pls give your sugg
    Points & help awarded.
    Thanks in advance.

    Hi,
    you can call the program using 3 selection screen fields even though it is having 10 fileds, but before calling make sure that there is no mandatory fields (in rest of the 7 fields), then it will runs you report.
    reward if needful.
    Thanks,
    Sreeram.

  • Error is calling callablestatement from spring with in parameter as date

    [5/14/07 20:01:29:554 IST] 40b3b5f0 WebGroup E SRVE0026E: [Servlet Error]-[CallableStatementCallback; SQL []; ORA-01858: a non-numeric character was found where a numeric was expected
    ; nested exception is java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected
    ]: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL []; ORA-01858: a non-numeric character was found where a numeric was expected
    ; nested exception is java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected
    java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected
    i m trying to pass the date as the in papameter in stored procedure.
    the format is MM-dd-yy in database.
    but i m getting the error
    date passed is in the correct format i.e 05-14-07

    Vikas,
    So, is your code producing an error when your report is called? Also, it would be helpful to know your Forms and Reports versions. Is ":p_season_year" set up as a USER_PARAMETER (UP) in your report or is it a true lexical parameter (meaning you should reference it with '&' instead of ':')? If it is a UP, the typical way to pass a value to this UP from Forms is to use a ParamList object instead of the REPORT_OTHER parameter of the Set_Report_Object_Property built-in. For example:
    DECLARE
       pl_id    ParamList;
       pl_name  VARCHAR2(10) := 'REPORT34';
       v_rep VARCHAR2(1000);
       rep_status VARCHAR2(20);
    BEGIN
       pl_id := Get_Parameter_List(pl_name);
       IF id_null(pl_id) THEN
          pl_id := Create_Parameter_List(pl_name);
       END IF;
       Add_Parameter(pl_id, 'P_SEASON_YEAR', TEXT_PARAMETER, :SALE_ORDER.SEASON_YEAR);
       repid := FIND_REPORT_OBJECT( 'REPORT34' );
       v_rep := RUN_REPORT_OBJECT(repid, pl_id);
       ...  rest of your code here  ...
    END;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Calling html from java with some values

    Hello friends,
    I can call a HTML file from java.I want to pass some values from java class file to that html file.Anybody help me how to pass parameters?
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://localhost:8080/jcoDemo/dp.html");
    is one i am using for calling html file
    thanks

    Just add GET query parameters to the URL.
    Besides, if you were using Java 1.6 or newer, then rather use [Desktop#browse()|http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#browse(java.net.URI)] instead of Runtime#exec(). It is crossplatform while your runtime approach works in Mircosoft Windows systems only.

  • Calling ant script from another's project ant script

    Hello there,
    I would like to ask something about ant script. Sorry if this is not the right forum but I could not find a better one.
    I have 2 projects ProjectA and ProjectB in 2 different direcory structures, that contain 2 different build.xml files. I am trying to call ant of ProjectA inside the build.xml file of ProjectB like the following:
             <!-- inside build.xml of ProjectB-->
            <target name="buildProjectA">
                <ant antfile="${ProjectA.root}/build.xml" dir="${ProjectA.root}" inheritAll="false"/>
            </target>Unfortunately I get a different output than calling ant for Project A from the command prompt. Shouldn't this call to ant for ProjectA from ProjectB be exactly the same as calling ant from the command Prompt

    thanks for your reply,
    the problem is not that it does not file the xml file (although you re right, I changed it) but that later on in the building it behaves differently
    So, basically, what I want to know, is this the right way I am doing it or the two approaches are different cause in my approach ant is not called from the project's directory but from another ant script?

  • Call Program from another Program using varient

    Hi...
    How to call program from program with varient....?
    i have used submit but how to pass varient dynamically.
    Regards,
    Chintan

    Hi,
    Use the FM SUBMIT_REPORT
    OR
    SUBMIT <Program Name> VIA SELECTION-SCREEN
                                      USING SELECTION-SET <VARIANT>
                                      AND RETURN.

  • How to call people from built-in speakers?

    Does anyone know how you can call people from Skype™ with no microphone, but only from speakers? My friend wants to know this, he apparently wants to use some soundboard, and if you call from your speakers, the person you are calling can only hear the soundboard but nothing else like background noise or anything.
    He's been bugging me to find this out, lol. Anyone know? He has a MacBook Pro 15" OS X Lion.

    for others to hear you or for you to record your voice a microphone is required
    a speaker can never be used at all it's just a magnetic construction which moves air to  produce sound

  • Using WLST with ant. Need help

    I try to create ant task which connects to WLST engine and creates datasource.
    This is build.xml :
    +<?xml version="1.0" ?>+
    +<project name="deploy" default="connect" basedir=".">+
    +<echo> ${wl.home} </echo>+
    +<path id="wl.appc.classpath">+
    +<pathelement location="${wl.home}/server/lib/weblogic.jar"/>+
    +</path>+
    +<taskdef name="wlst" classpathref="wl.appc.classpath" classname="weblogic.ant.taskdefs.management.WLSTTask" />+
    +<target name="connect">+
    +<wlst executescriptbeforefile="true" debug="false">+
    +<script>+
    connect('weblogic','weblogic','t3://localhost:7001')
    +</script>+
    +</wlst>+
    +</target>+
    +</project>+
    Running this is script I'm getting the following error:
    Buildfile: c:\wl-ds.xml
    [echo] C:/Oracle/Middleware11.1.1.4/wlserver_10.3
    connect:
    [wlst] java.lang.NoClassDefFoundError: weblogic/management/scripting/WLSTInterpreterInvoker
    [wlst] Caused by: java.lang.ClassNotFoundException: weblogic.management.scripting.WLSTInterpreterInvoker
    [wlst] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    [wlst] at java.security.AccessController.doPrivileged(Native Method)
    [wlst] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    [wlst] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    [wlst] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    [wlst] at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    [wlst] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    [wlst] Could not find the main class: weblogic.management.scripting.WLSTInterpreterInvoker. Program will exit.
    [wlst] Exception in thread "main"
    BUILD FAILED
    c:\wl-ds.xml:12: Java returned: 1
    Ant founds weblogic.ant.taskdefs.management.WLSTTask but in some reasons cannot find weblogic.management.scripting.WLSTInterpreterInvoker, although they both placed in the weblogic.jar
    I can't understand what I do wrong! Please, help or advice what to do...
    Edited by: creed on 03.03.2011 20:55

    Hi,
    Just wanted to check if the issue was resolved, I have the same issue , Below is the details of the error i get when i try jay's script
    Apache Ant version 1.8.0 compiled on February 1 2010
    Trying the default build file: build.xml
    Buildfile: D:\anttest\build.xml
    Adding reference: ant.PropertyHelper
    Detected Java version: 1.6 in: D:\SYS\JAVA\jdk1.6.0_21\jre
    Detected OS: Windows Server 2008
    Adding reference: ant.ComponentHelper
    Setting ro project property: ant.file -> D:\anttest\build.xml
    Setting ro project property: ant.file.type -> file
    Adding reference: ant.projectHelper
    Adding reference: ant.parsing.context
    Adding reference: ant.targets
    parsing buildfile D:\anttest\build.xml with URI = file:/D:/anttest/build.xml
    Setting ro project property: ant.project.name -> deploy
    Adding reference: deploy
    Setting ro project property: ant.project.default-target -> run
    Setting ro project property: ant.file.deploy -> D:\anttest\build.xml
    Setting ro project property: ant.file.type.deploy -> file
    Project base dir set to: D:\anttest
    +Target:
    +Target: connect
    +Target: run
    Adding reference: ant.LocalProperties
    parsing buildfile jar:file:/D:/SYS/apache-ant-1.8.0/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/D:/SYS/apache-ant-1.8.0/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
    Setting project property: wl.home -> D:\SYS\Weblogic1034\wlserver_10.3
    Adding reference: wl.classpath
    fileset: Setup scanner in dir D:\SYS\Weblogic1034\wlserver_10.3\server\lib with patternSet{ includes: [*.jar] excludes: [] }
    Finding class weblogic.ant.taskdefs.management.WLSTTask
    Loaded from D:\SYS\Weblogic1034\wlserver_10.3\server\lib\weblogic.jar weblogic/ant/taskdefs/management/WLSTTask.class
    Class org.apache.tools.ant.taskdefs.Java loaded from parent loader (parentFirst)
    Class weblogic.ant.taskdefs.management.WLSTTask loaded from ant loader (parentFirst)
    Class java.lang.Object loaded from parent loader (parentFirst)
    Class java.lang.Throwable loaded from parent loader (parentFirst)
    Class org.apache.tools.ant.BuildException loaded from parent loader (parentFirst)
    Class java.lang.Exception loaded from parent loader (parentFirst)
    Class java.lang.IllegalStateException loaded from parent loader (parentFirst)
    Class java.io.Reader loaded from parent loader (parentFirst)
    Class java.io.StringReader loaded from parent loader (parentFirst)
    Class java.lang.String loaded from parent loader (parentFirst)
    Class java.io.IOException loaded from parent loader (parentFirst)
    Class java.io.OutputStream loaded from parent loader (parentFirst)
    Class java.io.FileOutputStream loaded from parent loader (parentFirst)
    +Datatype wlst weblogic.ant.taskdefs.management.WLSTTask
    Setting ro project property: ant.project.invoked-targets -> run
    Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
    Adding reference: ant.executor
    Build sequence for target(s) `run' is [connect, run]
    Complete build sequence is [connect, run, ]
    connect:
    [echo] WebLogic Home is : D:\SYS\Weblogic1034\wlserver_10.3
    Class org.apache.tools.ant.types.Path loaded from parent loader (parentFirst)
    Finding class weblogic.ant.taskdefs.management.WLSTScript
    Loaded from D:\SYS\Weblogic1034\wlserver_10.3\server\lib\weblogic.jar weblogic/ant/taskdefs/management/WLSTScript.class
    Class org.apache.tools.ant.Task loaded from parent loader (parentFirst)
    Class weblogic.ant.taskdefs.management.WLSTScript loaded from ant loader (parentFirst)
    Class java.lang.Boolean loaded from parent loader (parentFirst)
    Class java.lang.StringBuilder loaded from parent loader (parentFirst)
    Class org.apache.tools.ant.types.Commandline$Argument loaded from parent loader (parentFirst)
    Class org.apache.tools.ant.util.FileUtils loaded from parent loader (parentFirst)
    Class java.io.PrintWriter loaded from parent loader (parentFirst)
    Class java.io.LineNumberReader loaded from parent loader (parentFirst)
    Finding class weblogic.utils.StringUtils
    Loaded from D:\SYS\Weblogic1034\modules\com.bea.core.utils_1.9.0.0.jar weblogic/utils/StringUtils.class
    Class weblogic.utils.StringUtils loaded from ant loader (parentFirst)
    Class java.lang.SecurityException loaded from parent loader (parentFirst)
    Class java.lang.NoSuchMethodException loaded from parent loader (parentFirst)
    Finding class weblogic.utils.StringUtils$StringMaker
    Loaded from D:\SYS\Weblogic1034\modules\com.bea.core.utils_1.9.0.0.jar weblogic/utils/StringUtils$StringMaker.class
    Class weblogic.utils.StringUtils$StringMaker loaded from ant loader (parentFirst)
    Finding class weblogic.utils.StringUtils$ReflectedStringMaker
    Loaded from D:\SYS\Weblogic1034\modules\com.bea.core.utils_1.9.0.0.jar weblogic/utils/StringUtils$ReflectedStringMaker.class
    Class weblogic.utils.StringUtils$ReflectedStringMaker loaded from ant loader (parentFirst)
    Class java.lang.Class loaded from parent loader (parentFirst)
    Class java.lang.Integer loaded from parent loader (parentFirst)
    Class java.lang.reflect.Constructor loaded from parent loader (parentFirst)
    Class java.lang.reflect.InvocationTargetException loaded from parent loader (parentFirst)
    Class java.lang.IllegalAccessException loaded from parent loader (parentFirst)
    Class java.lang.InstantiationException loaded from parent loader (parentFirst)
    Class java.lang.RuntimeException loaded from parent loader (parentFirst)
    Class java.lang.Character loaded from parent loader (parentFirst)
    Class java.io.File loaded from parent loader (parentFirst)
    Class org.apache.tools.ant.types.CommandlineJava loaded from parent loader (parentFirst)
    [wlst] Executing 'D:\SYS\JAVA\jdk1.6.0_21\jre\bin\java.exe' with arguments:
    [wlst] '-Ddebug=false'
    [wlst] '-DfailOnError=true'
    [wlst] '-DexecuteScriptBeforeFile=true'
    [wlst] '-DscriptTempFile=C:\Users\Administrator\AppData\Local\Temp\2\wlsttempfile214271013.py'
    [wlst] '-classpath'
    [wlst] 'D:\SYS\apache-ant-1.8.0\lib\ant-launcher.jar;D:\SYS\apache-ant-1.8.0\lib\ant-antlr.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-bcel.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-bsf.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-log4j.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-oro.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-regexp.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-resolver.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-xalan2.jar;D:\SYS\apache-ant-1.8.0\lib\ant-commons-logging.jar;D:\SYS\apache-ant-1.8.0\lib\ant-commons-net.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jai.jar;D:\SYS\apache-ant-1.8.0\lib\ant-javamail.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jdepend.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jmf.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jsch.jar;D:\SYS\apache-ant-1.8.0\lib\ant-junit.jar;D:\SYS\apache-ant-1.8.0\lib\ant-netrexx.jar;D:\SYS\apache-ant-1.8.0\lib\ant-nodeps.jar;D:\SYS\apache-ant-1.8.0\lib\ant-stylebook.jar;D:\SYS\apache-ant-1.8.0\lib\ant-swing.jar;D:\SYS\apache-ant-1.8.0\lib\ant-testutil.jar;D:\SYS\apache-ant-1.8.0\lib\ant-trax.jar;D:\SYS\apache-ant-1.8.0\lib\ant.jar;D:\SYS\apache-ant-1.8.0\lib\xercesImpl.jar;D:\SYS\apache-ant-1.8.0\lib\xml-apis.jar;D:\SYS\JAVA\jdk1.6.0_21\lib\tools.jar'
    [wlst] 'weblogic.management.scripting.WLSTInterpreterInvoker'
    [wlst]
    [wlst] The ' characters around the executable and arguments are
    [wlst] not part of the command.
    [wlst] Using input " "
    Execute:Java13CommandLauncher: Executing 'D:\SYS\JAVA\jdk1.6.0_21\jre\bin\java.exe' with arguments:
    '-Ddebug=false'
    '-DfailOnError=true'
    '-DexecuteScriptBeforeFile=true'
    '-DscriptTempFile=C:\Users\Administrator\AppData\Local\Temp\2\wlsttempfile214271013.py'
    '-classpath'
    'D:\SYS\apache-ant-1.8.0\lib\ant-launcher.jar;D:\SYS\apache-ant-1.8.0\lib\ant-antlr.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-bcel.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-bsf.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-log4j.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-oro.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-regexp.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-resolver.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-xalan2.jar;D:\SYS\apache-ant-1.8.0\lib\ant-commons-logging.jar;D:\SYS\apache-ant-1.8.0\lib\ant-commons-net.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jai.jar;D:\SYS\apache-ant-1.8.0\lib\ant-javamail.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jdepend.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jmf.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jsch.jar;D:\SYS\apache-ant-1.8.0\lib\ant-junit.jar;D:\SYS\apache-ant-1.8.0\lib\ant-netrexx.jar;D:\SYS\apache-ant-1.8.0\lib\ant-nodeps.jar;D:\SYS\apache-ant-1.8.0\lib\ant-stylebook.jar;D:\SYS\apache-ant-1.8.0\lib\ant-swing.jar;D:\SYS\apache-ant-1.8.0\lib\ant-testutil.jar;D:\SYS\apache-ant-1.8.0\lib\ant-trax.jar;D:\SYS\apache-ant-1.8.0\lib\ant.jar;D:\SYS\apache-ant-1.8.0\lib\xercesImpl.jar;D:\SYS\apache-ant-1.8.0\lib\xml-apis.jar;D:\SYS\JAVA\jdk1.6.0_21\lib\tools.jar'
    'weblogic.management.scripting.WLSTInterpreterInvoker'
    The ' characters around the executable and arguments are
    not part of the command.
    [wlst] java.lang.NoClassDefFoundError: weblogic/management/scripting/WLSTInterpreterInvoker
    [wlst] Caused by: java.lang.ClassNotFoundException: weblogic.management.scripting.WLSTInterpreterInvoker
    [wlst] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    [wlst] at java.security.AccessController.doPrivileged(Native Method)
    [wlst] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    [wlst] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    [wlst] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    [wlst] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    [wlst] Could not find the main class: weblogic.management.scripting.WLSTInterpreterInvoker. Program will exit.
    [wlst] Exception in thread "main"

  • Calling Ant script from Jdeveloper

    Hello Gurus,
    I am trying to call Ant script from Jdeveloper.
    I am able to call it when i don't use any javac in ant script.
    But as soon as i include a javac command
       <javac srcdir="${src}" destdir="${build}"/>
    I get below error
    C:\ant\windows\svn\AntJava\Project1\build.xml:20: Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK.
    It is currently set to "C:\Oracle\jdk160_24\jre"
    Needless to say i already have implemented all the steps mentioned in the internet.
    I have my JAVA_HOME correctly set in my PATH environment variable.
    I have tools.jar in the CLASSPATH
    Please give a solution from JDeveloper perspective and not a generic one as i am done with all the steps provided in internet.

    any one?????

  • Upload data from excel with vba by calling a function module

    Hello all,
    i have a problem with the function module "ALSM_EXCEL_TO_INTERNAL_TABLE". I will call this function module with vba to load data from excel to sap with a Buttonclick. I have copied this function module and set it remotable. But i can´t call it from excel.
    Can you give me some tips how can i
    upload data from excel with vba by click a button.
    The problem seems the function: call method cl_gui_frontend_services=>clipboard_import in the function module, because when i comment this function call the vba-call is true but no results. 
    How can I call the function module correct with vba?
    Thanks a lot for your tips!!!!
    Chris
    Message was edited by:
            Christoph Kirschner

    HI
    Uploading data directly from Excel file format
    * Upload data direct from excel.xls file to SAP
    REPORT ZEXCELUPLOAD.
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
                begcol TYPE i DEFAULT 1 NO-DISPLAY,
                begrow TYPE i DEFAULT 1 NO-DISPLAY,
                endcol TYPE i DEFAULT 100 NO-DISPLAY,
                endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    * Tick don't append header
    PARAMETERS: kzheader AS CHECKBOX.
    DATA: BEGIN OF intern OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern.
    DATA: BEGIN OF intern1 OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern1.
    DATA: BEGIN OF t_col OCCURS 0,
           col LIKE alsmex_tabline-col,
           size TYPE i.
    DATA: END OF t_col.
    DATA: zwlen TYPE i,
          zwlines TYPE i.
    DATA: BEGIN OF fieldnames OCCURS 3,
            title(60),
            table(6),
            field(10),
            kz(1),
          END OF fieldnames.
    * No of columns
    DATA: BEGIN OF data_tab OCCURS 0,
           value_0001(50),
           value_0002(50),
           value_0003(50),
           value_0004(50),
           value_0005(50),
           value_0006(50),
           value_0007(50),
           value_0008(50),
           value_0009(50),
           value_0010(50),
           value_0011(50),
           value_0012(50),
           value_0013(50),
           value_0014(50),
           value_0015(50),
           value_0016(50),
           value_0017(50),
           value_0018(50),
           value_0019(50),
           value_0020(50),
           value_0021(50),
           value_0022(50),
           value_0023(50),
           value_0024(50),
           value_0025(50),
           value_0026(50),
           value_0027(50),
           value_0028(50),
           value_0029(50),
           value_0030(50),
           value_0031(50),
           value_0032(50),
           value_0033(50),
           value_0034(50),
           value_0035(50),
           value_0036(50),
           value_0037(50),
           value_0038(50),
           value_0039(50),
           value_0040(50),
           value_0041(50),
           value_0042(50),
           value_0043(50),
           value_0044(50),
           value_0045(50),
           value_0046(50),
           value_0047(50),
           value_0048(50),
           value_0049(50),
           value_0050(50),
           value_0051(50),
           value_0052(50),
           value_0053(50),
           value_0054(50),
           value_0055(50),
           value_0056(50),
           value_0057(50),
           value_0058(50),
           value_0059(50),
           value_0060(50),
           value_0061(50),
           value_0062(50),
           value_0063(50),
           value_0064(50),
           value_0065(50),
           value_0066(50),
           value_0067(50),
           value_0068(50),
           value_0069(50),
           value_0070(50),
           value_0071(50),
           value_0072(50),
           value_0073(50),
           value_0074(50),
           value_0075(50),
           value_0076(50),
           value_0077(50),
           value_0078(50),
           value_0079(50),
           value_0080(50),
           value_0081(50),
           value_0082(50),
           value_0083(50),
           value_0084(50),
           value_0085(50),
           value_0086(50),
           value_0087(50),
           value_0088(50),
           value_0089(50),
           value_0090(50),
           value_0091(50),
           value_0092(50),
           value_0093(50),
           value_0094(50),
           value_0095(50),
           value_0096(50),
           value_0097(50),
           value_0098(50),
           value_0099(50),
           value_0100(50).
    DATA: END OF data_tab.
    DATA: tind(4) TYPE n.
    DATA: zwfeld(19).
    FIELD-SYMBOLS: <fs1>.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT intern.
        intern1 = intern.
        CLEAR intern1-row.
        APPEND intern1.
      ENDLOOP.
      SORT intern1 BY col.
      LOOP AT intern1.
        AT NEW col.
          t_col-col = intern1-col.
          APPEND t_col.
        ENDAT.
        zwlen = strlen( intern1-value ).
        READ TABLE t_col WITH KEY col = intern1-col.
        IF sy-subrc EQ 0.
          IF zwlen > t_col-size.
            t_col-size = zwlen.
    *                          Internal Table, Current Row Index
            MODIFY t_col INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t_col LINES zwlines.
      SORT intern BY row col.
      IF kzheader = 'X'.
        LOOP AT intern.
          fieldnames-title = intern-value.
          APPEND fieldnames.
          AT END OF row.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO zwlines TIMES.
          WRITE sy-index TO fieldnames-title.
          APPEND fieldnames.
        ENDDO.
      ENDIF.
      SORT intern BY row col.
      LOOP AT intern.
        IF kzheader = 'X'
        AND intern-row = 1.
          CONTINUE.
        ENDIF.
        tind = intern-col.
        CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
        ASSIGN (zwfeld) TO <fs1>.
        <fs1> = intern-value.
        AT END OF row.
          APPEND data_tab.
          CLEAR data_tab.
        ENDAT.
      ENDLOOP.
      CALL FUNCTION 'DISPLAY_BASIC_LIST'
           EXPORTING
                file_name     = filename
           TABLES
                data_tab      = data_tab
                fieldname_tab = fieldnames.
    *-- End of Program
    <b>Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT</b>
    *Title : Excel Uploading
    TYPES:   BEGIN OF t_datatab,
             col1(25)  TYPE c,
             col2(30)  TYPE c,
             col3(30)  TYPE c,
             col4(30)  TYPE c,
             col5(30)  TYPE c,
             col6(30)  TYPE c,
             col7(30) TYPE c,
             col8(30)  TYPE c,
             col9(30)  TYPE c,
             col10(30)  TYPE c,
             col11(30)    TYPE c,
           END OF t_datatab.
    DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
          wa_datatab TYPE t_datatab.
    Data : p_table type t_datatab occurs 0 with header line.
    DATA : gd_scol   TYPE i VALUE '1',
           gd_srow   TYPE i VALUE '1',
           gd_ecol   TYPE i VALUE '256',
           gd_erow   TYPE i VALUE '65536'.
    DATA: it_tab TYPE filetable,
          gd_subrc TYPE i.
    field-symbols : <fs>.
    *Selection screen definition
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:  p_file LIKE rlgrap-filename
                   DEFAULT 'c:test.xls' OBLIGATORY.   " File Name
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      REFRESH: it_tab.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title     = 'Select File'
          default_filename = '*.xls'
          multiselection   = ' '
        CHANGING
          file_table       = it_tab
          rc               = gd_subrc.
      LOOP AT it_tab INTO p_file.
    *    so_fpath-sign = 'I'.
    *    so_fpath-option = 'EQ'.
    *    append so_fpath.
      ENDLOOP.
    START-OF-SELECTION.
      PERFORM upload_excel_file TABLES   it_datatab
                                 USING   p_file
                                         gd_scol
                                         gd_srow
                                         gd_ecol
                                         gd_erow.
    * END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3,
                wa_datatab-col4,
                wa_datatab-col5,
                wa_datatab-col6,
                wa_datatab-col7,
                wa_datatab-col8,
                wa_datatab-col9,
                wa_datatab-col10,
                wa_datatab-col11.
      ENDLOOP.
    *&      Form  UPLOAD_EXCEL_FILE
    *       upload excel spreadsheet into internal table
    *      -->P_TABLE    Table to return excel data into
    *      -->P_FILE     file name and path
    *      -->P_SCOL     start column
    *      -->P_SROW     start row
    *      -->P_ECOL     end column
    *      -->P_EROW     end row
    FORM upload_excel_file TABLES   p_table
                           USING    p_file
                                    p_scol
                                    p_srow
                                    p_ecol
                                    p_erow.
      DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.
    * Has the following format:
    *             Row number   | Colum Number   |   Value
    *      i.e.     1                 1             Name1
    *               2                 1             Joe
      DATA : ld_index TYPE i.
    * Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename                = p_file
          i_begin_col             = p_scol
          i_begin_row             = p_srow
          i_end_col               = p_ecol
          i_end_row               = p_erow
        TABLES
          intern                  = LT_INTERN
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'Error Uploading file'.
        EXIT.
      ENDIF.
      IF lt_intern[] IS INITIAL.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'No Data Uploaded'.
        EXIT.
      ELSE.
        SORT lt_intern BY row col.
        LOOP AT lt_intern.
         MOVE lt_intern-col TO ld_index.
         assign component ld_index of structure
         p_table to <fs>.
    move : lt_intern-value to <fs>.
    *     MOVE lt_intern-value TO p_table.
          AT END OF row.
            APPEND p_table.
            CLEAR p_table.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "UPLOAD_EXCEL_FILE
    Regards
    Pavan

  • How to call a AM method with parameters from Managed Bean?

    Hi Everyone,
    I have a situation where I need to call AM method (setDefaultSubInv) from Managed bean, under Value change Listner method. Here is what I am doing, I have added AM method on to the page bindings, then in bean calling this
    Class[] paramTypes = { };
    Object[] params = { } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    This works and able to call this method if there are no parameters. Say I have to pass a parameter to AM method setDefaultSubInv(String a), i tried calling this from the bean but throws an error
    String aVal = "test";
    Class[] paramTypes = {String.class };
    Object[] params = {aVal } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    I am not sure this is the right way to call the method with parameters. Can anyone tell how to call a AM method with parameters from Manage bean
    Thanks,
    San.

    Simply do the following
    1- Make your Method in Client Interface.
    2- Add it to Page Def.
    3- Customize your Script Like the below one to Achieve your goal.
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("GetUserRoles");
    operationBinding.getParamsMap().put("username", "oracle");
    operationBinding.getParamsMap().put("role", "F1211");
    operationBinding.getParamsMap().put("Connection", "JDBC");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    i hope it help you
    thanks

Maybe you are looking for