Setting classpath in Process object

Anybody run into this before?
I am trying to call the OracleXML utility on Windows using the Runtime to get a process object. When I pass my classpath to the Process object, somebody is changing the period in the file name (eg. classes12.zip) to a forward slash (eg. classes12/zip). It doesn't like it if I used the escape character, or any of the other hundred things I tried.
here is my code:
String tmp[] = {"java",
" -classpath ./lib/classes12.zip;./lib/xmlparserv2.jar;./lib/xsu12.jar ",
" OracleXML -getXML -withDTD -rowsetTag ",
" \"RESULTS\" ",
" -conn \"jdbc:oracle:oci8:@xxxxxx\" ",
" -user \"xxxxx/xxxxx\" ",
" \"espread.sql\" ",
" > espread.xml "};
for(int i=0;i<tmp.length; i++) {
System.out.println("Command line array is >" + tmp[i] + "<");
Process p = Runtime.getRuntime().exec(tmp);
int returnVal = p.waitFor();
System.out.println("returnVal from OracleXML = " + returnVal + "<");
java.io.DataInput d = new java.io.DataInputStream(p.getErrorStream());
String line;
while ((line=d.readLine()) != null)
System.out.println(line);
And here is the output showing the substitution:
java.lang.NoClassDefFoundError: -classpath //lib/classes12/zip;//lib/xmlparserv
2/jar;//lib/xsu12/jar
Exception in thread "main"
Any help is greatly appreciated. Thanks in advance.

java.lang.NoClassDefFoundError: -classpath //lib/classes12/zip;//lib/xmlparserv2/jar;//lib/xsu12/jarYeah. Java is doing that. It thinks that whole mess is the name of the class you want to run. In that parameter it allows either . or / to separate the parts of package names, but it prefers / so it does that conversion.
The problem, of course, is that whole mess isn't the name of the class you want to run. I would fix that by not using an array of Strings, but just concatenating all of them into a single String that's going to be your command line.

Similar Messages

  • SSAS Tabular - Adding Column to a table gives error "Object reference not set to instance of object"

    If I make changes to a table in SSAS Tabular Visual Studio, the newly added column gives error as "Object
    reference not set to instance of object"

    Hi VikasJain13,
    According to your description, you get the "Object reference not set to instance of object" error when adding columns in Tabular. Right?
    Generally, it throws this error when the internal code is accessing the property of an empty object. As you mentioned it happens when you make changes on a table, mostly it means that table is already a empty object. Please re-process your tabular to see
    if this table is still existing. 
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY- ERROR EVENT_RAISED - Error updating the process object

    Hi All
    I have set up a simple custom HCM process and Form regarding Infotype TO CREATE AND CHANGE POSITION. I have checked the process and form consistency and it seems fine. Now when I run the process from HRASR_DT it generates a process number but it also gives an error workflow could not start.I get following error (SWIA log - Step history)
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Exception occurred - Error when starting work item 000000007031
    PROCESS_NODE - Error when processing node '0000000014' (ParForEach index 000000)
    CREATE - Error when creating a component of type 'Step'
    CREATE_WIM_HANDLE - Error when creating a work item
    CREATE_VIA_WFM - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event CREATED and (target) status
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY->ERROR
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Executing flow work item - Work item 000000007031: Object FLOWITEM method EXECUTE cannot be executed
    Executing flow work item - Error when processing node '0000000014' (ParForEach index 000000)
    Points to be noted:
    1) I have searched few SAP notes such as 1384961(Notes for 6.0.4) but our system is in higher level patch 6.0.5
    2) WF-BATCH have SAP_NEW and SAP_ALL authorization.
    Appreciate your valuable suggestions.
    Thanks
    Ragav

    Hi Ragav
    did you try to debug this? maybe something is missing in config of P&F?
    Since you are on 605, the following note would be there in your system....use it to debug:
    1422496 - Debugging background workflow tasks in HCM P&F
    This will help you find the root cause.
    regards,
    modak

  • Error updating the process object in MSS workflow...

    Hi All,
    I copied the standard workflow 'WS18900010' and triggered the same in backend. In this the first step is to approve the form. I set the agent as WF Initiator for this step. Now I approved the form. But the workitem went into error giving the error message 'ERROR UPDATING THE PROCESS OBJECT'.
    What could be the reason for this?
    If the originator of request and approver of request is same(just for testing purpose), then may dis also result into above error?
    Please suggest.
    Guddan

    Hello,
    Please maintain this 'CL_HRASR00_POBJ_WF_EXIT' in the workflow exit for the specific task and also at the workflow header level.
    Execute the process and if still error occurs, check for HCM P&F authorization  and if it is fine, then check if the case settings are maintained correctly.
    you can find the case configuration in HCM P&F help docu.
    hope this helps.
    Best Regards
    Saujanya

  • Clone dbtier error-- ERROR : Unable to set CLASSPATH

    i am setting a new clone of PROD server.i restored the backup from prod and now i ran
    perl adpreclone.pl dbTier
    Here is the error message-->
    perl adcfgclone.pl dbTier
    Enter the APPS password [APPS]:
    xxxx
    ERROR : Unable to set CLASSPATH
    /u02/lifedb/9.2.0/appsutil/clone/bin/../jlib/classes111.zip: is missing
    First Creating a new context file for the cloned system.
    The program is going to ask you for information about the new system:
    Error: can't find libjava.so.
    ERROR: context creation not completed successfully.
    Please check /tmp/adcfgclone_1376.err file for errors
    The err file does not have anything.
    I added /u02/lifedb/9.2.0/jdbc/lib to path and classpath. classpath is empty. I made cc,ar,ld,make,perl come in the path as well.
    Now how do i resolve the above err?
    Thanks

    If you want to migrate from Solaris to Linux, refer to:
    For the application tier:
    Note: 238276.1 - Migrating to Linux with Oracle Applications Release 11i
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=238276.1
    For the database tier:
    Note: 362205.1 - 10g Release 2 Export/Import Process for Oracle Applications Release 11i
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=362205.1
    Note: 331221.1 - 10g Export/Import Process for Oracle Applications Release 11i
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=331221.1
    Note: 230627.1 - Export/Import Process for Oracle Applications Release 11i Database Instances Using Oracle9i Enterprise Edition
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=230627.1

  • Can we set classpath dynamically

    Is it possible to set Classpath from java code .. Before executing a Java class we can set classpath manually using set classpath option in windows .. But here i want to do that from java code .. not thru this dos command.. is there any java API's to do this ??

    Hey its possible ..
    File afile = new File (MyJarName);
    URL rl = new URL (afile.toURL().toString());
    URL [] ury = new URL [] {rl};
    URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();
    Class sysclass = URLClassLoader.class;
    Method method = sysclass.getDeclaredMethod("addURL", new Class[]{rl.getClass()});
    method.setAccessible(true);
    method.invoke(sysloader, new Object[] {rl});
    String Classpath = System.getProperty("java.class.path");
    System.out.println("Before->"+Classpath);
    Classpath = Classpath + System.getProperty("path.separator") + rl.toString();
    System.setProperty("java.class.path", Classpath);
    Classpath = System.getProperty("java.class.path");
    System.out.println("After->"+Classpath);

  • Setting classpath during Runtime

    hi,
    here's what i want to archive:
    i have a directory (not! the starting dir) containing classes
    the location of that directory i don't know until runtime
    the classes have to be accessible by the Class.forName("class").newInstance(); method
    no, i can not write a classloader instead of the forName() <- this is fix
    i tried with System.setProperty("java.class.path", newclasspath);
    and with a classloader, that loads the classes, before the forName() method is invoked (i hoped forName() would find already loaded classes)
    didn't work
    i'm deeply thankful for every hint

    It's not exactly Pure Java (not at all, really).. But
    couldn't you do a:
    String myOldClasspath,myNewClasspath;
    myOldClasspath =
    System.getProperty("java.class.path");
    Runtime.getRuntime().exec("SET
    CLASSPATH="+myNewClasspath);
    // Perform Operations
    Runtime.getRuntime().exec("SET
    CLASSPATH="+myOldClasspath);Probably not.
    First 'set' is a shell command so the program wouldn't run at all. You would need to provide a shell.
    Second anytime you use exec() it starts another process space. Anything that happens to the environment in that process only affects that process. So this solution would only work if it was acceptable to have two running java applications. The first sets up the environment and the second does the real work.

  • Set classpath in JAXB - schemagen

    Using JAXB -(schemagen.bat) i need to create the .xsd file.
    To which , should i set the classpath.
    (TO schemagen.bat OR any-other jar file )
    After setting the classpath, how can i run it to create the .xsd
    (Is this the way???)
    c:\>schemagen MyJfile.java
    C:\jaxb-ri-20060801\bin>schemagen.bat
    When i do this it gives an exception like this -->
    Exception in thread "main" java.lang.NoClassDefFoundError: Files\Java\jdk1/5/0_0
    6\lib;/;F:\java\packages;C:\Program
    https://jaxb.dev.java.net/nonav/2.0.2/docs/schemagen.html

    The first major problem with the Runtime.exec() method is that path is obviously a variable and would need to be placed outside the quote marks: Process p = Runtime.exec("set classpath=" + path); Secondly this would only work under Windows, in Unix/BASH the command to set an environment variable would be export CLASSPATH=path.
    I had a similar problem two years ago, unfortunately I can't remember exactly how I did it, but I'm fairly certain it involved using the system properties of the System class. There is a system property called java.class.path, more info can be found in the API for the System class: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html
    Look especially at the methods getProperties() (contains a list of the system property names), and setProperty().

  • Using a Variable in SSIS - Error - "Command text was not set for the command object.".

    Hi All,
    I am using a OLE DB Source in my dataflow component and want to select SQL Query from the master table  I have created variables v_Archivequery
    String packageLevel (to store the query).
    <Variable Name="V_Archivequery" DataType="String">
         SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
         FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
         ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
         Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)
        </Variable>
    I am assigning this query to the v_Archivequery variable, "SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
    FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
     ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
    Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)"
    Now in the OLE Db source, I have selected as Sql Command from Variable, and I am getting the variable, v_Archivequery .
    But when I am generating the package and when running I am getting bewlo errror
     Error at Data Flow Task [OLE DB Source [1]]: An OLE DB error has occurred. Error code: 0x80040E0C.
    An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E0C  Description: "Command text was not set for the command object.".
    Can Someone guide me whr am going wrong?
    Please let me know where am going wrong?
    Thanks in advance.
    Thankx & regards, Vipin jha MCP

    What happens if you hit Preview button in OLE DB Source Editor? Also you can use the same query by selecting SQL Command option and test.
    Could you try set the Delay Validation = True at Package and re-run ?
    If set the query in variable expression (not in value), then Set Evaluate As Expression = True.
    -Vaibhav Chaudhari

  • Trouble Setting Classpath on Windows XP

    I'm having trouble setting up a classpath on Windows XP for SDK1.3.1_04.
    I've tried Control Panel\Advanced\Environment Variables\System Variables. There was a Path variable present, to which I've added:
    c:\jdk1.3.1_04\bin;
    There wasn't a Classpath variable present though. I've tried adding it myself in System Variables as follows:
    Variable name: Classpath
    Variable value: set classpath=.;
    But no joy. When I run "set" from the command prompt, there's no classpath present.
    I'd appreciate any help.
    Cheers.

    Hi,
    I am running on XP (unfortunately), but also win2000 and win98.
    Setting up the classpath is not a problem, although if you are logged in as root, then it does not always show correctly.
    Try logging back in as yourself and then checking the classpah through the set command.
    Altrnatively, if this is not the problem, actualy try a reboot. which should not be necessary.
    best
    kev

  • How to set classpath from java class ??

    I have tried to use System.setProperty("java.class.path", "my class path string ") to set classpath dynamically. But it is not working. How to set it dynamically from java class ?? Thanks , gary

    Look into the java.net.URLClassLoader. You can't set the classpath after the fact but you can specify URL's that will checked when you try to load a class with that loader.

  • How do i set text in a object so that object expands with text and has even space on both sides of the object in illustrator cc?

    how do i set text in a object so that object expands with text and has even space on both sides of the object in illustrator cc?

    if you see all the different panel. I past the info in and have to manually expand the width of every panel. Is there a way of pasting the text in and the panel moves to the right with so that there is an even space on both sides of the blue panel?

  • Problems in setting classpath in vista

    i am using Xp pro and Vista.
    My issue is that I am not able to set classpath in vista.
    i want to set classpath so that I can compile and run programs from different folder other than default one in which java is installed.
    Please help.

    i am using Xp pro and Vista.
    My issue is that I am not able to set classpath in
    vista.
    Don't worry about it. The CLASSPATH variable is best avoided anyway. Specify classpaths for particular apps on the command-line. Teh Docs show you how
    i want to set classpath so that I can compile and run
    programs from different folder other than default one
    in which java is installed.
    Please help.This suggests you're talking about PATH rather than classpath. Do you understand the difference?

  • Setting Classpath in linux

    Hi !! Can anyone help me in setting classpath in linux to run servlets/? I tried using this command..but didnt work
    export CLASSPATH="$CLASSPATH:/usr/share/tomcat5/server/lib/servlets-common.jar"
    Thanks
    Nive

    in ur autoexec.bat file write the following
    set PATH=C:\jdk1.5.0_04\bin;%PATH%
    set JAVA_HOME=C:\jdk1.5.0_04
    set
    CLASSPATH=.;C:\jakarta-tomcat-5.5.9\common\lib\servlet
    -api.jar;C:\jakarta-tomcat-5.5.9\common\lib\jsp-api.ja
    r;C:\Servlets+JSP;..;..\..;C:\jakarta-struts-1.2.4\lib
    \struts.jarThis response is meaningless. Principally because the OP specifically mentioned the use of LINUX. Not Windows.
    I've taken the advice of other forum users by avoiding a system level classpath variable. I define the classpath each time I compile and run. Working on Linux I tend to use command line argument files ( http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html#commandlineargfile ) which eliminates the need to redefine the classpath each time I compile or run my classes and apps. But others may do things differently.
    Here is a website you might want to check out which pertains to setting the classpath on Solaris and Linux.
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/classpath.html

  • How to set classpath and server configuration in eclipse

    i am new to eclipse tool pls anyone tell me to set classpath and serverconfiguration (tomcat) and sample program

    Get WTP [1], install it [2] and checkout one of the lot Eclipse WTP tutorials [3].
    [1] http://www.eclipse.org/webtools/
    [2] http://ftp.osuosl.org/pub/eclipse/technology/phoenix/demos/install-wtp/install-wtp.html
    [3] http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html

Maybe you are looking for

  • Please help!! How to implement a company directory with OSX and exchange?

    We just have our exchange setup correctly with our Snow Leopard clients. Everything is working perfect, email, calendar. The only problem is despite the OSX's Address Book being integrated, there is no possible way to view everyone in the company. In

  • How to get sales org. field value in CUSTOMER_ADD_DATA~SAVE_DATA  ?

    Dear Guru , The requirment is we send some information to external email system when user save the customer master data ( XD01 , XD02 ) . I try to use badi CUSTOMER_ADD_DATA~SAVE to satisfy this requirment , but i can't get the Sales Org value ( KNVV

  • Stuffed up during the factory reinstallm​ent

    i own a tablet X200 Lenova. recently i made a product recovery media (3 discs) and then tried reformatting the laptop by restoring to the faculty state but now its even worse then before. none of the problems work and constently a message says "blahb

  • Easing the entry of 2 point interpolat​ions into scaling module.

    I have a program that I need to check and calibrate the scaling data x1 and x2 frequently . I would like to make this entry without typing in the voltage setpoints and from the Layout if possible to keep the machine operator out of the worksheet . Ca

  • Images shift in CS4 when file reopened

    Recently been having a problem in Illustrator CS4 (MAC). I'll design something, place JPG images in the design, use a clipping mask (seems to occur when one is used only) then save the file including linked images (embedded). Next day, I reopen the f