Show console when executing java via ProcessBuilder

Hi all,
I have a Swing app with an updater that checks for updates off the server, and then fires up the main app using ProcessBuilder. On Windows it looks like this:
            ArrayList<String> list = new ArrayList<String>();
            list.add(javaPath); // Path to java.exe
            list.add("-cp");
            list.add(clientClasspath); // Classpath built up from a lib directory of jars
            list.add("-Xms128M");
            list.add("-Xmx256M");
            list.add("-XX:MaxPermSize=128m");
            list.add("-Djava.security.policy=.\\conf\\rmi.policy");
            list.add("-Dlog4j.configuration=file:.\\conf\\uniti_app_log4j.xml");
            list.add("uniti.client.UnitiClient_IMPL");
            processBuilder = new ProcessBuilder(list);
            processBuilder.directory(new File(clientAbsCodebasePath));
            process = processBuilder.start();The code works fine - problem is, Log4J isn't creating any log files, so I want to be able to see the Java console when the process builder runs.
Any ideas on how to display the console?
Thanks,
Paul C.

In most cases, you should not have to stop and restart OC4J_BI_FORMS to pick such changes. However, since you are having problems, I would ensure that all frmweb processes have been stopped, then stop and restart OC4J_BI_FORMS and retest. If that doesn't work, you should review how you imported the java into your app. Look closely at the Importer options you used and ensure that you have not change the file name at any point. Because you are working with Java, case sensitivity is critical.
Also, where are you seeing the error message? Client java console or in a server side log? If server side, exactly which log file is reporting the problem? I would suggest you post the first 4 ro 5 lines of the error and not just the NoClassDefFound part.

Similar Messages

  • Error ORA-03113 when execute procedure via OEM

    Hi All,
    I got error messages
    ORA-03113: end-of-file on communication channel
    ERROR at line 1:
    ORA-03114: not connected to ORACLE
    when execute procedure via Oracle Enterprise Manager
    Who do you know what 's the problem and how can I resolves ?
    Thanks,
    Mcka

    Solution Description:
    =====================
    The ORA-3113 error is a general error reported by Oracle client tools,
    which signifies that they cannot communicate with the oracle shadow
    process. As it is such a general error more information must be collected
    to help determine what has happened.
    This short article describes what information to collect for an
    ORA-3113 error when the Oracle server is on a Unix platform.
    General Issues:
    ===============
    1) Is it only one tool that encounters the error or
    do you get an ORA-3113 from any tool doing a similar operation?
    If the problem reproduces in SQL*Plus, use this in all tests
    below.
    2) Check if the problem is just restricted to:
    [ ] One particular UNIX user,
    [ ] Any UNIX user
    or [ ] Any UNIX user EXCEPT as the Oracle user.
    3) Check if the problem is just restricted to:
    [ ] One particular ORACLE logon
    or [ ] Any ORACLE logon that has access to the
    relevant tables.
    4) If you have a client-server configuration does this occur from:
    [ ] Any client
    [ ] Just one particular client
    or [ ] Just one group of clients ?
    If so what do these clients have in common ?
    Eg: Software release .
    5) Do you have a second server or database version where the
    same operation works correctly?

  • Error when executing Java code, java.lang.NoClassFoundError:

    Hi, I am new learner in Java Programming and I am using J2SDK and notepad to write a code. I don't have problem in compiling using javac filename, however I received an error when executing using java filename.
    The error message I got is Exception in thread "main" java.lang.NoClassDefFoundError: Hello/jawa.
    I have verified this simple code - Hello has no issue but somehow it does not run. I even try to compile and execute in other computer also the similiar error returned.
    My Client Platform is Windows XP Professional.
    I would appreciate any expert can help to suggest me the knowledge/solution to fix this kind of error. Thanks
    Jackie

    It looks like you entered the command "java Hello.java" or "java Hello/java" (I assumed 'jawa' was a typo.)
    You should have entered "java Hello" if your class name is Hello. I am guessing that Hello.java is probably the source code file name. The argument to the java command is the fully qualified class name. "java Hello.java" tells the java command to look for a class named java that is in the Hello package.

  • Jrockit 3.0.0-1.5.0 on Solaris 9 - coredump when executing java -version

    Hi,
    I installed jrrt-3.0.0-1.5.0 on a Solaris 9 virtual machine. When I set JAVA_HOME and PATH to point to the jrockit install and then execute java -version, I get a Segmentation Fault. Any idea why this would be happening? I don't see a core dump file being output so I'm not sure how to troubleshoot.
    Thanks in advance for your help. We are trying to install JRockit to overcome some PermGen memory issues we are seeing while running WL 9.2.3 with Sun's Java 1.5.

    Hello,
    First, make sure you have followed the installation instructions with regards to OS patches etc to the letter:
    http://e-docs.bea.com/platform/suppconfigs/configs/solaris/solaris9_92.html
    If you still get the segfault and get a text dump (jrockit.<pid>.dump) can you post it here in its entirety? If not, I suggest that you contact Oracle Support to get help. It is possible that you have OS configuration issues or are running in an unsupported configuration (the virtualizaton setup).
    Regards,
    Henrik

  • In Java 2 - when executing java get "realpath.. ,libjava.so not found" erro

    Hi !
    I have installed Java 2( j2se 1.4.1_02) and when i execute java it gives
    Error: realpath ("//java") not found
    Error: could not find libjava.so
    Error: could not find Java 2 Runtime Environment
    I have been trying for the past 3 days to get this setup working, but no success. Have made the LD_LIBRARY_PATH and PATH to have the required values. Is there anything else that need to be done.
    Can anyone help please?
    Thanks
    Raji

    Which platform is it? Java version "1.4.1_02" works fine for me on my Linux. Maybe these pieces of information are of some help.
    $ uname -a
    Linux bijpc 2.4.19-4GB #1 Wed Sep 25 18:58:10 UTC 2002 i686 unknown
    $ java -version
    java version "1.4.1_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
    Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
    $ type java
    java is hashed (/usr/lib/jdk1.4.1_02/bin/java)
    $ file /usr/lib/jdk1.4.1_02/bin/java
    /usr/lib/jdk1.4.1_02/bin/java: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped
    $ ldd /usr/lib/jdk1.4.1_02/bin/java
    libpthread.so.0 => /lib/libpthread.so.0 (0x40025000)
    libdl.so.2 => /lib/libdl.so.2 (0x4003a000)
    libc.so.6 => /lib/libc.so.6 (0x4003d000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
    $ find /usr/lib/jdk1.4.1_02 -name 'libjava*so'
    /usr/lib/jdk1.4.1_02/jre/lib/i386/libjava.so
    /usr/lib/jdk1.4.1_02/jre/lib/i386/libjavaplugin_jni.so
    /usr/lib/jdk1.4.1_02/jre/plugin/i386/ns600/libjavaplugin_oji.so
    /usr/lib/jdk1.4.1_02/jre/plugin/i386/ns610/libjavaplugin_oji.so

  • Java.lang.NoClassDefFoundError when executing JAVA code

    Hy everyone,
    Trying to execute some java code through forms I got this error when running my program : java.lang.NoClassDefFoundError : simple (where simple is a java class I developped).
    These are the steps I followed:
    1- Devopping a simple JAVA class (simple.java) and compiling in JDK 1.4 (for compatibilty with forms 10.1.2.0.2)
    2- Creating the JAR file
    3- Copying the JAR file in <ORACLE_HOME>\forms\java
    4- Adding the adress of the JAR file in CLASSPATH (environment variable of the server)
    5- Adding the adress of the JAR file in CLASSPATH (environmental file of OAS default.env)
    6- Importing the JAVA class trought forms builder (program>>import java class)
    7- Invoking the JAVA class via the PL/SQL packages created by forms builder
    8- Running the program
    Thanks for your help.
    Regards.

    In most cases, you should not have to stop and restart OC4J_BI_FORMS to pick such changes. However, since you are having problems, I would ensure that all frmweb processes have been stopped, then stop and restart OC4J_BI_FORMS and retest. If that doesn't work, you should review how you imported the java into your app. Look closely at the Importer options you used and ensure that you have not change the file name at any point. Because you are working with Java, case sensitivity is critical.
    Also, where are you seeing the error message? Client java console or in a server side log? If server side, exactly which log file is reporting the problem? I would suggest you post the first 4 ro 5 lines of the error and not just the NoClassDefFound part.

  • Java.security.AccessControlException when executing java from the DB

    Hello
    I'm running a Oracle 10.1.0.3.0 on Linux
    I'm having trouble with executing some java code from the DB.
    I created following java stored procedure used to create the directory given by the parameter
    package be.vlaamsparlement.dis.os_commands;
    import java.io.*;
    import java.lang.*;
    import java.sql.*;
    import java.util.*;
    public class ManageOSDirectory {
    public static String createDir(String directoryName) throws Exception
    if ((new File(directoryName)).mkdirs())
    { return ("TRUE");}
    else
    { return ("FALSE");}
    Wrapped it in a pl/sql procedure an execute it as follows under DB schema DIS :
    begin
    declare
    b boolean;
    begin
    b := pck$os_commands.CreateDir('/data/files/vp_docs/schv/2004-2005/jan/1/');
    end;
    end;
    Where /data/files/vp_docs/schv/ already exist, so the proc needs to create the direcories '2004-2005', 'jan' and '1'
    this gives me following error :
    ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException:
    the Permission (java.io.FilePermission /data/files/vp_docs/schv/2004-2005/month/1 write) has not been granted to DIS.
    The PL/SQL to grant this is dbms_java.grant_permission( 'DIS', 'SYS:java.io.FilePermission', '/data/files/vp_docs/schv/2004-2005/jan/1', 'write' )
    I can't give this permission as the given directory does not yet exist. File permissions on os are ok and when i execute
    the code on the os (not from the DB) it works fine.
    This also worked on a Windows 10G DB without any extra grants.
    Also, i can execute the followint
    b := pck$os_commands.CreateDir('/data/files/vp_docs/schv/2004-2005/');
    but if i then execute
    b := pck$os_commands.CreateDir('/data/files/vp_docs/schv/2004-2005/jan/');
    I get the same error. So i can only creaet 1 directory beneath the schv directory
    Any ideas anyone ?

    The Error message is right.
    You need to:
    Ensure the Directory exist in Unix.
    Create the Directory in the Database as SYS.
    Grant Read,Write permission on th DIrectory to DIS
    Grant Java permission on th DIrectory to DIS (using the syntax already shown in the Error message).
    See my example below (10g R1)
    SQL> connect /as sysdba
    Connected.
    SQL> GRANT CONNECT,RESOURCE TO DIS IDENTIFIED BY DIS;
    Grant succeeded.
    SQL> create or replace directory DIS_DOWNLOAD_DIR as '/data/files/vp_docs/schv/2004-2005/month/1';
    Directory created.
    SQL> col DIRECTORY_PATH format a50
    SQL> select * from dba_directories;
    OWNER DIRECTORY_NAME DIRECTORY_PATH
    SYS DIS_DOWNLOAD_DIR /data/files/vp_docs/schv/2004-2005/month/1
    1 row selected.
    SQL> GRANT READ,WRITE ON DIRECTORY "SYS"."DIS_DOWNLOAD_DIR" TO "DIS";
    Grant succeeded.
    SQL> EXECUTE DBMS_JAVA.GRANT_PERMISSION( 'DIS', 'SYS:java.io.FilePermission', '/data/files/vp_docs/schv/2004-2005/jan/1', 'write' )
    2 /
    PL/SQL procedure successfully completed.
    SQL>

  • OIM error ADP.RUNTIME_ERROR when executing java adapter

    We have compiled a java jar file with a number of methods that can be used to set an adaptor in Oracle Identity Manager Design Console and call them on 'post update' event on a table.
    Whe it is executed it fails with ADP.RUNTIME_ERROR. No other information is available on the web application.
    If the same update is executed from the java development environment the following exception is raised:
    Thor.API.Exceptions.tcAPIException: Error occurred while running adapter "SendJMSMsg". Task: testJar5, Message: null, Reason: , Exception: com.thortech.xl.dataobj.util.tcAdapterTaskException
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:248)
         at com.thortech.xl.ejb.beans.tcUserOperations_voj9p2_EOImpl_816_WLStub.updateUser(Unknown Source)
         at Thor.API.Operations.tcUserOperationsClient.updateUser(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy0.updateUser(Unknown Source)
         at com.nnit.ModifyUserTest.main(ModifyUserTest.java:61)
    Did anyone come accross a similar issue?

    Here is the adapter code - log says that it fails in this line 46 ihTaskRetVals.put("TESTJAR3", TESTJAR3()); :
    /* Copyright (c) 2001 - 2007, Oracle Corporation. All rights reserved.
    package com.thortech.xl.adapterGlue;
    import com.thortech.xl.dataobj.*;
    //import com.thortech.xl.adapterGlue.*;
    //import com.thortech.xl.dataobj.tcDataSet;
    import java.io.IOException;
    import java.util.*;
    import java.io.FileWriter;
    import java.io.File;
    import java.sql.Timestamp;
    import java.text.DateFormat;
    import com.thortech.xl.dataobj.util.tcAdapterTaskException;
    import com.thortech.xl.dataobj.util.*;
    import com.thortech.xl.dataobj.util.tcJarEntryClassLoader;
    import com.thortech.xl.remotemanager.*;
    import java.rmi.*;
    import java.net.URL;
    import java.lang.reflect.Constructor;
    import java.lang.reflect.Method;
    import java.lang.reflect.Modifier;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Field;
    import java.net.*;
    public class adpSENDJMSMSG extends com.thortech.xl.adapterfactory.events.tcAdpEvent {
         public adpSENDJMSMSG() {
              super();
              setEventName("SendJMSMsg");
    Hashtable ihTaskRetVals = new Hashtable();
    // Adapter Variables
    protected void implementation() throws Exception {
              try {
              if (! initAdapter("SendJMSMsg"))
                   return;
                   // Execute Tasks and store results in Hashtable...
    ihTaskRetVals.put("TESTJAR3", TESTJAR3());
              finalizeAdapter();
              } catch (tcAdapterTaskException e) {
                        e.printStackTrace();
                        adapterError(e);
                        return;
              } catch (Exception e) {
                        e.printStackTrace();
                        adapterError(e);
                        return;
    // *** testJar3 ***
    private Object TESTJAR3() throws Exception {
                   Object oRetVal = "";
                   Object objCons;
                   String sTaskName = "testJar3";
                   try {
                             System.out.println("Running TESTJAR3");
                             // Load class
                             // Initialize URLs
                             ClassLoader moURLClassLoader = tcADPClassLoader.getClassLoader(null);
                             Class moTargetClass = Class.forName("com.nnit.JMSClient.JMSClientUtilities", true, moURLClassLoader);
                             System.out.println("Target Class = " + moTargetClass.getName());
                             // Initialize method
                             Class[] moMethodParmTypes = new Class[] {String.class, String.class, String.class};
                             Object[] moMethodParams = new Object[] {"mm", "mmm", "mmmm"};
                             Method moMethod = moTargetClass.getMethod("sendCreateUser", moMethodParmTypes);
                             // Check for static method
                             if (Modifier.isStatic(moMethod.getModifiers()))
                                  objCons = null;
                             else {
                                  // Initialize constructor
                                  Object[] maoConstructorArgs = new Object[]{};
                                  Class[] masConParamTypes = new Class[]{};
                                  Constructor moCons = moTargetClass.getConstructor(masConParamTypes);
                                  objCons = moCons.newInstance(maoConstructorArgs);
                             // Invoke method
                             moMethod.invoke(objCons, moMethodParams);
                   } catch (Exception e) {
                             e.printStackTrace();
                             if (e instanceof InvocationTargetException) {
                                  Throwable t = ((InvocationTargetException)e).getTargetException();
                                  throw new tcAdapterTaskException("adpSENDJMSMSG", "testJar3", t.getMessage(), "", "");
                             } else {
                                  throw new tcAdapterTaskException("adpSENDJMSMSG", "testJar3", e.getMessage(), "", "");
                   return returnVal(oRetVal);
    Exception stack:
    DEBUG,30 May 2009 01:32:35,377,[XELLERATE.SERVER],Class/Method: tcDataObj:handle
    Err - Data: poError.isCode - Value: ADP.RUNTIME_ERROR
    DEBUG,30 May 2009 01:32:35,377,[XELLERATE.SERVER],Class/Method: tcDataObj:handle
    Err - Data: poError.isDescription - Value: Error occurred while running adapter
    "SendJMSMsg". Task: testJar3, Message: null, Reason: , Exception: com.thortech.x
    l.dataobj.util.tcAdapterTaskException
    DEBUG,30 May 2009 01:32:35,377,[XELLERATE.SERVER],Class/Method: tcDataObj:handle
    Err - Data: poError.isRemedy - Value:
    DEBUG,30 May 2009 01:32:35,377,[XELLERATE.SERVER],Class/Method: tcDataObj:handle
    Err - Data: poError.isDetail - Value: com.thortech.xl.dataobj.util.tcAdapterTask
    Exception
    at com.thortech.xl.adapterGlue.adpSENDJMSMSG.TESTJAR3(adpSENDJMSMSG.java
    :104)
    at com.thortech.xl.adapterGlue.adpSENDJMSMSG.implementation(adpSENDJMSMS
    G.java:46)
    at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.eventPostUpdate(Unknown Source)
    at com.thortech.xl.dataobj.tcUSR.eventPostUpdate(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUserData(Unk
    nown Source)
    at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUser(Unknown
    Source)
    at com.thortech.xl.ejb.beans.tcUserOperationsSession.updateUser(Unknown
    Source)
    ........

  • Genmissing error when executing java on database

    Hi,
    I have a java program that concatenate several PDFs in one. When I execute the program on my computer everything works fine. However when I upload the java code in the database I have an error that I do not understand. The line where the error is generated is :
    reader = new PdfReader((URL)rap[index][0]);
    The error is : !!!ERROR!!! generated by genmissing
    From what I have read on the Web, it seems that I have a class that is missing on the database. However I did not found the solution, the class com.lowagie.text.pdf.PdfReader is there. To load the java program I do : C:\num>loadjava -user gdem/psw@wagnertest -genmissing -verbose ConsolidationDemande.java
    Can you help me please ?
    Thanks a lot !
    Pierrick

    Hi,
    I cannot reproduce the stacktrace. When I do :
    StackTraceElement [] ste;//OK...
    ste = Thread.currentThread().getStackTrace(); it says that it cannot resolve symbols
    The JVM on the BD is 1.4.
    The program has 741 lines, it is weird that it cannot understand this.
    Do you know how to get the stack trace ?
    On the other hand, it is weird that my original problem is only at execution time and not at complile time. Maybe it is missing something like a class or a classpath variable... I don't know.
    Thanks,
    Pierrick

  • How to run executable files via ProcessBuilder existing in another drive??

    hi,
    I was using Runtime Class to execute other programs through my application but as I'm using j2se 5 I want to make use of ProcessBuilder Class and utilize its some added features. I wanted it to run my .bat file located in some other folder than the current class file it is showing me IOException. I'm running a class file that is in the folder D:\CyberStation\classes\build\ and I want to execute the .bat file located in D:\CyberChat\build\. Any suggestion is appreciated...
    regards,
    Jay

    The following code was for the .bat file located in the same directory where I am running my .class file:
    ProcessBuilder pb=new ProcessBuilder("cmd.exe","/C","registry.bat");
    Process p=pb.start();Now what I wonder is what are the things that I need to change to make it capable of running .bat or any other executable file in some other directory. I tried:
    ProcessBuilder pb=new ProcessBuilder("cmd.exe","registry.bat");
    File basedir=new File(File_name.class.getResource(File_name.class.getName()+".class").getFile()).getParentFile().getParentFile().getParentFile().getParentFile();
    pb.directory(basedir+"CyberChat\build");
    Process p=pb.start();but didn't success.

  • Different thread/memory limits when running Java via Windows Service?

    My company is developing a Java application that employs a "black-box" interface, which generates several memory-intensive threads. When we run the application via a batch file, the threads seem to run in parallel on a quad-core server. However, when we install the application as a Windows Service on the same server, it appears that we hit a hard limit of 35 threads, and the process pegs out one of the server's CPU's at 100%. Does anyone know why we don't see the parallelism when we run it as a Windows Service? Does anyone know if Windows imposes different memory or thread restrictions on services, as opposed to normal desktop applications?

    My company is developing a Java application that employs a "black-box" interface, which generates several memory-intensive threads. When we run the application via a batch file, the threads seem to run in parallel on a quad-core server. However, when we install the application as a Windows Service on the same server, it appears that we hit a hard limit of 35 threads, and the process pegs out one of the server's CPU's at 100%. Does anyone know why we don't see the parallelism when we run it as a Windows Service? Does anyone know if Windows imposes different memory or thread restrictions on services, as opposed to normal desktop applications?

  • Haviing double quotes show up when executing a command with a variable

    I am trying to run a command that requires double quotes to be part of it. For example:
    $adddiskname = "Harddisk5"
    "$adddiskname(No
    Signature)"
    only gives the output of
    Hardisk5 (No Signature)
     but I need it to look this when it runs:
    "Harddisk5 (No Signature)"
    Here is the command line I have now:
    $adddiskname = "Harddisk5" Start-Process-FilePath'C:\Program
    Files\Veritas\Veritas Volume Manager\vxdisk'-ArgumentList"-f","sig","$adddiskname(Not
    Signature)"-Wait
    Any help would be great.
    Thanks,

    The entire string needs to be in the Quotes, so when the command is run, it shows the (No Signature) as well.
    Example:
    "Harddisk5 (No Signature)" is the end result.
    Okay:
    $addDiskName = 'Harddisk5'
    "`"$addDiskName (No Signature)`""
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • Undefined variable or classname snpRef (when executing Java within a KM)

    Hi there,
    I'm looking into ODI, specifically customizing scripts using java functions and have hit a bit of a problem.
    Does the following error ring any bells?
    Attempt to resolve method: getobjectname() on undefined variable or class name: snpref
    I find it quite weird and strange that it cannot find snpref?
    The script is below - as you can see, I'm just having a play around
    drop table <%=odiRef.getTable("L", "COLL_NAME", "A")%>
    +<%String sTestString = odiRef.getFrom(); %>+
    +<%sTestString = sTestString.toLowerCase();%>+
    +<%out.print("/*"+sTestString+"*/");%>+
    As you can see, I have no clue where snpref is being called from. It may be an internal translation of odiRef but I thought snpRef has been deprecated!? What's also weird is that without the last or penultimate line, everything works fine?
    For example, this works:
    drop table <%=odiRef.getTable("L", "COLL_NAME", "A")%>
    +<%String sTestString = odiRef.getFrom(); %>+
    +<%out.print("/*"+sTestString+"*/");%>+
    it gives:
    drop table ODI_TESTING."C$_0SmalldatetimeTable"
    +/*Testing.dbo.SmalldatetimeTable as SMALLDATETIMETABLE*/+
    Also this works:
    drop table <%=odiRef.getTable("L", "COLL_NAME", "A")%>
    +<%String sTestString = "TeSt"; %>+
    +<%sTestString = sTestString.toLowerCase(); %>+
    +<%out.print("/*"+sTestString+"*/");%>+
    outputting (as totally expected):
    drop table ODI_TESTING."C$_0SmalldatetimeTable"
    +/*test*/+
    What gives? I know this is a bit theoretical but I'd really love to know what's causing it to break so spectacularly? Could it be some sort of misconfiguration?
    Here's the stack trace:
    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: Error during task interpretation.
    Task: 4
    java.lang.Exception: BeanShell script error: Sourced file: inline evaluation of: ``out.print("drop table ") ; out.print(snpRef.getObjectName("L", "%COL_PRF0Smallda . . . '' : Attempt to resolve method: getobjectname() on undefined variable or class name: snpref : at Line: 4 : in file: inline evaluation of: ``out.print("drop table ") ; out.print(snpRef.getObjectName("L", "%COL_PRF0Smallda . . . '' : snpref .getobjectname ( "l" , "smalldatetimetable" , "testing" , "" , "d" )
    BSF info: Drop work table at line: 0 column: columnNo
    +     at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:485)+
    +     at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:711)+
    +     at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:461)+
    +     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)+
    +     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)+
    +     at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)+
    +     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)+
    +     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)+
    +     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)+
    +     at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)+
    +     at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)+
    +     at java.lang.Thread.run(Thread.java:662)+
    Caused by: org.apache.bsf.BSFException: BeanShell script error: Sourced file: inline evaluation of: ``out.print("drop table ") ; out.print(snpRef.getObjectName("L", "%COL_PRF0Smallda . . . '' : Attempt to resolve method: getobjectname() on undefined variable or class name: snpref : at Line: 4 : in file: inline evaluation of: ``out.print("drop table ") ; out.print(snpRef.getObjectName("L", "%COL_PRF0Smallda . . . '' : snpref .getobjectname ( "l" , "smalldatetimetable" , "testing" , "" , "d" )
    BSF info: Drop work table at line: 0 column: columnNo
    +     at bsh.util.BeanShellBSFEngine.eval(Unknown Source)+
    +     at bsh.util.BeanShellBSFEngine.exec(Unknown Source)+
    +     at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:471)+
    +     ... 11 more+
    Text: drop table <?=snpRef.getObjectName("L", "%COL_PRF0SmalldatetimeTable", "W") ?>
    +/*<?=snpref.getobjectname("l", "smalldatetimetable", "testing", "", "d")?> as smalldatetimetable*/.+
    +     at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:738)+
    +     at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:461)+
    +     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)+
    +     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)+
    +     at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)+
    +     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)+
    +     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)+
    +     at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)+
    +     at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)+
    +     at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)+
    +     at java.lang.Thread.run(Thread.java:662)+
    Thanks!
    Matt
    Edited by: 979675 on Jan 9, 2013 1:04 AM

    Okay here is the solution.
    I tried 100s of ways but it didnt work. So the alternative is create one more step in your KM with jython technology. Below code will print it in lowercase.
    sTestString= '<%=sTestString%>'
    raise (sTestString.lower())
    Note: Click on ignore error. So that the flow will move on.
    Bhabani

  • Scheduled job throws Class Not Found error when executing Java class

    Hi,
    I have written a java class to carry out a file upload to an external site and put the class on our server.
    I also wrote a script to call this java class, passing inthe relevant parameters.
    If i call the script using the ./ syntax from SSH it runs file logged in as Root and Oracle.
    I the setup a scheduled job to call this script but the job fails with the error...
    STANDARD_ERROR="Exception in thread "main" java.lang.NoClassDefFoundError: HttpsFileUpload Caused by: java.lang.ClassNotFoundException: HttpsFileUpload at java.net.URLClassLoader$1.run(URLClassLoader.java:"I cannot understand why it is raising the error if it runs from SSH.
    O/S = Red Hat Enterprise Linux ES, oracle version = 10.2.0.1.0
    Any help or guidance would be appreciated
    Thank you in advance
    Graham.
    Edited by: gpc on Feb 4, 2009 12:46 PM

    Hi,
    See this link for some tips if you haven't yet :
    Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files
    I can think of two things. Your script may not be able to run as the nobody user (by default external jobs run as the nobody user). Or your script might require that some environment variable be set (by default environment variables are not set in external jobs).
    Maybe you need to set the CLASSPATH variable in your script before calling java ?
    Hope this helps,
    Ravi.

  • ORA-27369 Exit-Code: 255 when executing sql script as job

    Dear all
    I'd like to find and compile all invalid objects in an instance. This should be done every day as a scheduled job with the use of DBMS_SCHEDULER.
    For this, I set up the following sql-script:
    ---------start script--------------
    set heading off;
    set feedback off;
    set echo off;
    Set lines 999;
    Spool /tmp/run_invalid.sql
    select
    'ALTER ' || OBJECT_TYPE || ' ' ||
    OWNER || '.' || OBJECT_NAME || ' COMPILE;'
    from
    dba_objects
    where
    status = 'INVALID'
    spool off;
    set heading on;
    set feedback on;
    set echo on;
    @/tmp/run_invalid.sql
    exit
    ------ end script ----
    The script ist working well when executed manualy via sqlplus. As you can see, it spools the commands to a second file (run_invalid.sql) which is the beeing executed to compile the invalid objects found.
    I now want to schedule this script via DBMS_SCHEDULER (running the job every day at 7AM). Creation of the job:
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'compile_invalid_objects',
    job_type => 'EXECUTABLE',
    job_action => '/home/oracle/scripts/sql/compile_invalid_objects.sql',
    start_date => trunc(sysdate)+1+7/24,
    repeat_interval => 'trunc(sysdate)+1+7/24',
    enabled => TRUE,
    comments => 'SQL-Script, und invalid objects zu finden und zu kompilieren'
    END;
    Manualy execute and error message:
    BEGIN
    DBMS_SCHEDULER.RUN_JOB (job_name => 'compile_invalid_objects',
    use_current_session => true);
    END;
    FEHLER in Zeile 1:
    ORA-27369: Job vom Typ EXECUTABLE nicht erfolgreich mit Exit-Code: 255
    ORA-06512: in "SYS.DBMS_ISCHED", Zeile 150
    ORA-06512: in "SYS.DBMS_SCHEDULER", Zeile 441
    ORA-06512: in Zeile 2
    --> Sorry for this, I'm using german localized oracle.
    Unfortunately, it seems that only Shell-Scripts can be scheduled when using job_type='EXECUTABLE'. Can you confirm this?
    BTW: The script is chmoded to 777, therefore it can't be a permission problem.
    Is there maybe another solution with one single script using dbms_output functionality and run the script in a loop?
    To complete my post, here are the commands used to create and test the job:
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'compile_invalid_objects',
    job_type => 'EXECUTABLE',
    job_action => '/tmp/compile_invalid_objects.sql',
    start_date => trunc(sysdate)+1+7/24,
    repeat_interval => 'trunc(sysdate)+1+7/24',
    enabled => TRUE,
    comments => 'SQL-Script, und invalid objects zu finden und kompilieren'
    END;
    Thanks for your help
    Casi

    You could more simply use $ORACLE_HOME/dbms/admin/utlrp.sql

Maybe you are looking for

  • Computer no longer recognizes one of my ipods

    I've got 2 15 gig ipods, one has becomes increasingly hard to to transfer new tunes from itunes. At first the problem was sporadic, so I got a new USB cable, but now my computer does not recognize that I've hooked up anything when I plug it in, but i

  • RD Web Access using HAProxy

    I setup an AIO RDS Windows Server 2012 R2 server farm, added a CA Certificate and everything runs fine including Web Access and RemoteApp. I decided to add an reverse proxy (HAProxy) as I want users to have access to a web application from home. HAPr

  • Full text index searching in large document sets

    I have been placed in charge of a digital PDF document library for a small biotech company. The library consists of about 1000 100-300 page .pdf documents which have been scanned and OCRed. In order to facilitate the full text searching of the docume

  • Error : \tmp\xdof7Y048KY4c110710_0511471440.fo (The system can

    HI I have one page in oaf jdeveloper that call publisher template to view report . but show error :( \tmp\xdof7Y048KY4c110710_0511471440.fo (The system cannot find the path specified) ) in this line: TemplateHelper.processTemplate( ((OADBTransactionI

  • How to create 640x480 iPod movies

    I have some movies in iMovie, and some other DV files that I want to convert to mp4 or m4v 640x480 files. I have QuickTime Pro, but the "Export > Movie to iPod" does 320x240. I've tried to export using MPEG-4, using the settings provided by Apple, bu