Destroy java subprocess

Hi, all.
I have a Java program that runtime exec's several other Java
programs. I'm looking for a
way to destroy the java process. I try to call destroy method but it doesn't work, the process continue executing.
public String start() {
rt = Runtime.getRuntime();
try {
processo = rt.exec("cmd /K start java StartELAB");
catch (Exception ex) {
ex.printStackTrace();
return "";
public String stop {
if(processo != null) {
try {
processoElab.destroy();
catch (Exception ex) {
ex.printStackTrace();
//StartELAB doesn't stop.
PS
I'm using Windows 2000.
If I start a no java subprocess I can stop it.
i.e.:
Process p = rt.exec("notepad.exe");
p.destroy(); //OK.
Help me!!!!!
Piddu

hi,
When you start a java sub process using the following code,
processo = rt.exec("cmd /K start java StartELAB");
the exec method returns you the process instance that contains the details about the process. You should preserve this instance & operate on this to destroy.
For example, in the code below the processes are destroyed. Java Runtime does not differentiate whether its a java/non java process. If you call the destroy() method on a Process's instance it will destroy it.
public class MyRuntime
public static void main(String args[])
Runtime rt= Runtime.getRuntime();
Process notepad=null;
Process java=null;
try
notepad = rt.exec("notepad.exe");
Thread.sleep(500);
notepad.destroy();
java = rt.exec("cmd /K start java StartELAB");
Thread.sleep(500);
java.destroy();
catch (Exception ex)
ex.printStackTrace();

Similar Messages

  • How can destroy Java Plug - in when i jump to another page without Applet

    When I jump to another HTML page, that not include <Applet> </Applet> tag, the Java Plug-in does not exit and use system's resource. I don't want it make my computer run slow then I want sutdown the Java Plug-in when I stop the page, that have an Applet.

    Hi dekassequi:
    Sorry if I misunderstood the problem......I've never tried swing set because it requires the JVM plugin. All my applets are non-swing and I've noticed that frequently when I exited the browser, it would be stuck in a never-never land requiring ALT-CTRL-DEL to end the browser's task. By overriding the destroy a the call to system.exit seems to have solved my problem -- if there is any error message in the system console, it is not noticeable because it disappeared instantenousely when the browser's own JVM is used.... Besides, destroy is the last thing an applet does anyway....without looking at Java source code, I can only surmise that that's what it does
    As a matter of fact, I've just tried to write some stupid swing applet but I've noticed that one cannot really script an applet that requires a Sun JVM. Here is a link, perhaps you can take a quick look and see if I'm doing something wrong.
    http://home.attbi.com/~aokabc/test/test2.htm
    BTW, I did notice late last night that overriding the destroy method in an applet that requires a JVM plugin does give an error message in the system console which takes a bit longer to close but you know what, at least it got rid of the console afterward -- otherwise, the console just sit in the tray and ALT-CTRL-DEL can't even get rid of it. In the mean time, I'll simply remove the system.exist(0) and leave a skeleton destroy method and see if the JVM console still sit in the system tray.
    Regards,
    V.V.

  • WinVista: QuickTime won't run, steps on Java JRE, destroys Java

    Noticed my Java desktop apps no longer load after installing QuickTime. Also cannot get the QT player to load. It loads, and then immediately exits. Any suggestions?

    You might want to try updating Java from the Java control panel. I recall answering a post where where that was the issue. The version I have is: Java Platform, Standard Edition 6. Version 1.6.0 (build 1.6.0_01-b06) which I believe is the latest update. A firewall could also be something to consider.

  • How to get return value from Java runtime.getRuntime.exec?

    I'm running shell commands from an Oracle db (11gr2) on aix.
    But, I would like to get a return value from a shell comand... like you get with "echo $?"
    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        return retval;
    /but I do not get a return value... because I don't know how to get return value..
    Edited by: user9158455 on 22-Sep-2010 07:33

    Hi,
    Have your tried pr.exitValue() ?
    I think you also need a finally block that destroys the subprocess
    Regards
    Peter

  • System.setProperty("java.class.path", cp)

    hello,
    I have written a little program that is supposed to set the CLASSPATH var in a instance of
    bash ... not set it permantly. Anyway, after running the program when i run,
    echo $CLASSPATH
    none of the changes i make with the program are there.... why is this?
    thanks,
    jd
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import layout.TableLayout;
    import com.incors.plaf.kunststoff.KunststoffLookAndFeel;
    public class JPathGui extends JFrame{
         JButton cpSubmit;
         JButton cpClear;
         JButton qaSubmit;
         JButton qaClear;
         JTextField cptf;
         JTextField qatf;
         public JPathGui(){
              super("JPATH ver .001");
              try {
                        UIManager.setLookAndFeel(new KunststoffLookAndFeel());
                 } catch (Exception ignored) {}
              addWindowListener(new WindowAdapter()
                     public void windowClosing(WindowEvent e){
                    System.exit(0);
              JPanel mainPanel = new JPanel();
              mainPanel.setPreferredSize(new java.awt.Dimension(800,230));
              double[][] size = {{10,780,10},{20,30,5,30,10,20,30,5,30}};
            TableLayout layout = new TableLayout(size);
            mainPanel.setLayout(layout);
              myGetClassPath(mainPanel);
              myQuickAdd(mainPanel);          
              getContentPane().add(mainPanel);
              pack();
            setSize(820,230);
            setVisible(true);
         public void myGetClassPath(JPanel mainPanel){
              JLabel cpl = new JLabel("ClassPath");
              JPath jp = new JPath();     
              cptf = new JTextField(jp.getClassPath());
              cptf.setFont( new Font("Monospaced", Font.PLAIN, 10) );
              cptf.setPreferredSize(new java.awt.Dimension(780,50));
              mainPanel.add(cpl, "1,0");
              mainPanel.add(cptf, "1,1");
              JPanel cpActionPanel = new JPanel();
              cpActionPanel.setPreferredSize(new java.awt.Dimension(780,50));
              double[][] size1 = {{570,100,100,30},{30}};
            TableLayout layout1 = new TableLayout(size1);
            cpActionPanel.setLayout(layout1);
              cpSubmit = new JButton("Submit");
              cpClear = new JButton("Clear");
              cpSubmit.setSize(40,20);
              cpClear.setSize(40,20);
              cpSubmit.addMouseListener(new command_listner());
              cpClear.addMouseListener(new command_listner());
              cpActionPanel.add(cpSubmit , "1,0");
              cpActionPanel.add(cpClear, "2,0");
              mainPanel.add(cpActionPanel, "1,3");
         public void updateCPTF(){
              JPath jp = new JPath();     
              cptf.setText(jp.getClassPath());
         public void myQuickAdd(JPanel mainPanel){
              JLabel qal = new JLabel("QuickAdd");
              qatf = new JTextField();
              qatf.setFont( new Font("Monospaced", Font.PLAIN, 10) );
              qatf.setPreferredSize(new java.awt.Dimension(780,50));
              mainPanel.add(qal, "1,5");
              mainPanel.add(qatf, "1,6");
              JPanel qaActionPanel = new JPanel();
              qaActionPanel.setPreferredSize(new java.awt.Dimension(780,50));
              double[][] size2 = {{570,100,100,30},{30}};
            TableLayout layout2 = new TableLayout(size2);
            qaActionPanel.setLayout(layout2);
              qaSubmit = new JButton("Submit");
              qaClear = new JButton("Clear");
              qaSubmit.setSize(40,20);
              qaClear.setSize(40,20);
              qaSubmit.addMouseListener(new command_listner());
              qaClear.addMouseListener(new command_listner());
              qaActionPanel.add(qaSubmit , "1,0");
              qaActionPanel.add(qaClear, "2,0");
              mainPanel.add(qaActionPanel, "1,8");
         public class command_listner extends MouseAdapter{
                 public void mouseClicked(java.awt.event.MouseEvent evt){
                       Object source = evt.getSource();
                   //cpSubmit
                   if(source == cpSubmit){
                        JPath jp = new JPath();
                        String newCP = cptf.getText();
                        boolean b = false;
                        String olcp = jp.setClassPath(newCP,b);
                        updateCPTF();
                   //cpClear
                   else if(source == cpClear){
                        updateCPTF();
                   //qaSubmit
                   else if(source == qaSubmit){
                        JPath jp = new JPath();
                        String newCP = qatf.getText();
                        boolean b = true;
                        String olcp = jp.setClassPath(newCP,b);
                        qatf.setText(null);
                        updateCPTF();
                   //qaClear
                   else if(source == qaClear){
                        qatf.setText(null);
         public class JPath {
              public String getClassPath(){
                   String cp = System.getProperty("java.class.path");
                   return cp;
              public String getPathSep(){
                   String ps = System.getProperty("path.separator");
                   return ps;
              public String getUserName(){
                   String un = System.getProperty("user.name");
                   return un;
              public String getUserHome(){
                   String uh = System.getProperty("user.home");
                   return uh;
              public String getOSName(){
                   String osn = System.getProperty("os.name");
                   return osn;
              public String getOSVersion(){
                   String osv = System.getProperty("os.version");
                   return osv;
              public String setClassPath(String newClassPath, boolean append){
                   String oldClassPath = null;
                   if(append){
                        String cp = getClassPath() + getPathSep() + newClassPath;
                        System.out.println("from setClassPath" + cp);
                        oldClassPath = System.setProperty("java.class.path", cp);
                   else{
                        System.out.println("else - " + newClassPath);
                        oldClassPath = System.setProperty("java.class.path", newClassPath);
                   return oldClassPath;          
         public static void main(String[] args){
              JPathGui jpg = new JPathGui();
    }     

    Two reasons:
    1) Setting the system property java.class.path does not change the value of the CLASSPATH environment variable in the first place.
    2) Even if it did, the change would not be visible in the original shell because the environment of the Java subprocess is destroyed. You can't change the environment of the parent process from any subprocess, including shell scripts. (That's why you have to "source" and not run .bashrc or .profile to customize environment settings)

  • How to terminate a java thread from c++ code?

    Hi,
    I made a screensaver which loads a jvm, forks a thread running a java class, wait until user's action(i.e. mouse move/click keyboard input), then terminate the java thread.
    However, I met a problem, How to terminate a running java thread from c++ code?
    Here is my code, but it does not work: (even after the terminate is called, jvm throws an error)
    JNIEnv* env;
    JavaVM* jvm;
    HANDLE hThread; //handle for the startThread
    unsigned __stdcall startThread(void *arg)
         jclass cls;
         jmethodID mainId;
         jint          res;
         int threadNum = (int)arg;
         res = jvm->AttachCurrentThread((void**)&env, NULL);
    cls = env->FindClass( MAIN_CLASS);
         mainId = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
         // setup the parameters to pass to main()
         jstring str;
         jobjectArray args;
         int i=0;
         args = env->NewObjectArray(1, env->FindClass("java/lang/String"), 0); //only one input parameters
         str = env->NewStringUTF("localhost");
         env->SetObjectArrayElement(args, 0, str);
         env->CallStaticVoidMethod(cls, mainId, args); // call main()      
         if (env->ExceptionOccurred()) {
                   env->ExceptionDescribe();
         return TRUE;
    Here is the main method:
    First create the jvm and load the thread. then tries to terminate the thread, but failed here
    switch (msg)
    { case WM_CREATE:
              JavaVMOption options[NUMBEROFOPTIONS];
              JavaVMInitArgs vmargs;     
              jint rc;
              vmargs.version = JNI_VERSION_1_4; /* version 1.4 */
              vmargs.options = options;
              vmargs.nOptions = NUMBEROFOPTIONS;
              vmargs.ignoreUnrecognized = JNI_FALSE;          
              rc=JNI_CreateJavaVM( &jvm, (void **)&env, &vmargs ); /* create JVM */
              /* We pass the thread number as the argument to the invoked thread */
              unsigned int threadId = -1;
              // to initialize a thread-safe C runtime library
              hThread = (HANDLE)_beginthreadex(NULL, 0, &startThread, NULL, 0, &threadId );
    } break;
    case (WM_DESTROY):
              CloseHandle( hThread );
              jvm->DestroyJavaVM(); /* kill JVM */
              Debug("Destroy Java Virtual Machine\n");
    }break;
    Note, after the thread "startThread" runs, it has an infinite loop and will not terminate, until the user clicks to terminate.(I didn't call jvm->DetachCurrentThread();_endthreadex(0); in the "startThread" because the java thread will not terminate by itself)
    Thus, the only way to terminate the thread is to call closehandle(hthread) in the main thread, which may cause jvm to throw an error.
    Do you know how to terminate a java thread safely???
    Thanks a lot

    Assuming that your java thread is in a loop of some kind. Such as
    int i=1; /* I tried using a boolean, I just could not get my C++ env, to change this value. So i decided to use an int */
    run {
    while(i)
    isdfjsdfj
    void seti()
    i=0
    So, B/4, i call destroyVM in my C++ code, i call this seti(). so the loop terminates, therefore my thread finishes executing and ends.
    Hope this helps
    tola.

  • Java Web Start

    Hi,
       I've got the XI 3.0 installed and also the SP number 09 has been installed.the JDK version is 1.3.1.which version of the JAVA Web Start should i download and from where can i get it dowloaded.
    Thanks and Regards,
    Jishi

    I got the answer take Pacifist and the Macos 10.4. DVD pull from the DVD Java web start and copy to my Java folder and it works.
    But caution there is something wrong with the latest Java Update the free one after my construction i have tried to install the Java Update over and it destroy java web start.

  • How to call object method (eg, CallIntMethod)in C?

    I aslo get problem when I use "CallIntMehtod", the following is my program
    test.java
    public class test {
    public int getvalue(int n)
    System.out.println("cjf, welcome");
    return n*n;
    invoke.c
    #include <jni.h>
    int main() {
    int res;
    JavaVM *jvm;
    JNIEnv *env;
    JavaVMInitArgs vm_args;
    JavaVMOption options[3];
    jclass cls;
    jmethodID mid;
    vm_args.version = JNI_VERSION_1_2;
    vm_args.nOptions = 3;
    // vm_args.options = options;
    vm_args.ignoreUnrecognized = JNI_TRUE;
    res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args); /* create VM */
    if (res < 0) {
    fprintf(stderr, "Can't create Java VM\n");
    exit(1);
    printf("success create java VM \n");
    cls = (*env)->FindClass(env, "test");/* find class */
    if ( cls != (jclass)0 ) {
    mid = (*env)->GetMethodID( env, cls, "getvalue", "(I)I" );/* get method ID */
    if( mid != 0 ){
    printf("First call to Java returns:%d\n", (*env)->CallIntMethod(env, cls, mid,2) );/* execute
    method */
    (*jvm)->DestroyJavaVM(jvm);/* destroy java VM */
    fprintf(stdout, "Java VM destory.\n");
    return 0;
    when I compiled them and run it, I cann't get the expected result. the result is:
    nspws1@/home/bss>./invoke
    success create java VM
    First call to Java returns:0
    Java VM destory.
    so ,what' wrong?

    Your method "getvalue" is not static.
    You have to create an object of your class "test" and call the method with this object (not with the class) as parameter: CallIntMethod(env, obj, mid,2).

  • Run applet as application

    Hi To All,
    I'm converting a Applet into Application.
    All the things are runing well but when my Applet gets to try the access getDocumentBase() method
    its giving a nullPointerException
    My all code is written below please help me to find out the problem
    import java.awt.Frame;
    import java.awt.event.*;
    import java.awt.Dimension;
    import java.applet.Applet;
    // Applet to Application Frame window
    public class AppletFrame extends Frame implements java.awt.event.WindowListener
    public static void startApplet(String className, String title,String args[])
    { Dimension appletSize;
    try
    // create an instance of your applet class
    myApplet = (Applet) Class.forName(className).newInstance();
    catch (ClassNotFoundException e)
    { System.out.println("AppletFrame " + e);
    return;
    catch (InstantiationException e)
    System.out.println("AppletFrame " + e);
    return;
    } catch (IllegalAccessException e)
    System.out.println("AppletFrame " + e);
    return;
    } // initialize the applet myApplet.init();
    myApplet.start();
    AppletFrame f = new AppletFrame(title);
    f.add("Center", myApplet);
    f.addWindowListener(f);
    appletSize = myApplet.getSize();
    f.pack();
    f.setSize(appletSize);
    f.show();
    public AppletFrame(String name)
    { super(name);
    } public void windowClosing(java.awt.event.WindowEvent ev)
    { myApplet.stop();
    myApplet.destroy();
    java.lang.System.exit(0);
    } public void windowClosed(java.awt.event.WindowEvent ev) {}
    public void windowActivated(java.awt.event.WindowEvent ev) {}
    public void windowDeactivated(java.awt.event.WindowEvent ev) {}
    public void windowOpened(java.awt.event.WindowEvent ev) {}
    public void windowIconified(java.awt.event.WindowEvent ev) {}
    public void windowDeiconified(java.awt.event.WindowEvent ev) {}
    private static Applet myApplet;
    public static void main(String args[]){
    startApplet("appletImageBook.appletImage.Standalone2","XApplets",args);
    ====================================================
    And Standalone2.java is
    public class Standalone2 extends Applet {
    Image img ;
    public void init()
    { add(new Button("Standalone Applet Button"));
    img = getImage(getDocumentBase(),"images/office1.jpg");
    public void paint(Graphics g) {
    g.drawImage(img,0,0,null);
    =====================================================
    And while runing AppletFrame.java it is giving Error below
    ===============================
    Exception in thread "main" java.lang.NullPointerException at java.applet.Applet.getDocumentBase(Applet.java:125)
    at appletImageBook.appletImage.Standalone2.init(Standalone2.java:20) at appletImageBook.appletImage.AppletFrame.startApplet(AppletFrame.java: 38)
    at appletImageBook.appletImage.AppletFrame.main(AppletFrame.java:99)
    ===============================
    Any type of help will be fine for me
    Thanks in advance

    The only difference between an applet and an application should be the way they are started.
    Instead of adding an applet to a frame, open a frame from the applet. Open the same frame from your application.
    Or instead of a frame, use a (J)Panel. Add it directly to your applet, or add it to a new frame when you want to run it as an application.
    In any case: separate the way the UI is created from the way the application is started.

  • Spawned process blocks grand parent

    I ran into a problem on Windows with a chain of processes where the top Java process would not exit until the bottom non-Java process exited, even though intermediate Java or Non-java processes had exited. For example: the top Java process spawns a Java subprocess and communicate with it through standard IO streams. That subprocess then spawns a detached non-Java subsubprocess and returns. The problem is that even though the subprocess had exited, the parent process blocked until the subsubprocess exited.
    I tracked down the source of the problem to Java executing all sub processes with the "bInheritHandles" flag for the CreateProcess API set to TRUE, while it should be set to FALSE for detached processes.
    Are there any plan for Java to provide an API to create fully detached processes under Windows?
    Georges
    I reduced the problem to this code:
    Here is the top level script that demonstrate the problem:
    @ECHO OFF
    SETLOCAL & PUSHD %~dp0
    SET JDK_HOME=c:\Program Files\Java\jdk1.6.0
    SET JDK_HOME=c:\j2sdk1.4.2_09
    "%JDK_HOME%\bin\javac" *.java
    ECHO This shows the problem with child Java subprocess that
    ECHO spawns Notepad subsubprocess:
    "%JDK_HOME%\bin\java" -classpath . Exec1
    ECHO Parent Java process exits when Notepad subsubprocess exits.
    POPD & ENDLOCALThis is the parent Java process that spawns a Java subprocess and gets status from it: Exec1.java:
    class Exec1 {
        private static Thread streamOutputThread;
        private static Thread streamErrorThread;
        public static void main(String[] args) {
            try {
                Process process = Runtime.getRuntime().exec("Exec2.bat");
                streamOutputThread = new Thread(new StreamReader(process
                        .getInputStream()));
                streamOutputThread.setDaemon(true);
                streamErrorThread = new Thread(new StreamReader(process
                        .getErrorStream()));
                streamErrorThread.setDaemon(true);
                streamOutputThread.start();
                streamErrorThread.start();
                process.waitFor();
                streamOutputThread.join();
                streamErrorThread.join();
            } catch (Exception ex) {
                ex.printStackTrace();
                return;
    }This is the class that handle the communication: StreamReader.java.
    import java.io.InputStream;
    public class StreamReader implements Runnable {
        private static final int SIZE = 128;
        private InputStream is;
        public StreamReader(InputStream is) {
            this.is = is;
        public void run() {
            final byte[] buf = new byte[SIZE];
            int length;
            try {
                while ((length = is.read(buf)) > 0) {
                    System.out.write(buf, 0, length);
            } catch (Exception e) {
                // ignore errors
    }This is the intermediate script that show that the Java subprocess has exited: Exec2.bat
    @ECHO OFF
    SETLOCAL & PUSHD %~dp0
    SET JDK_HOME=c:\Program Files\Java\jdk1.6.0
    SET JDK_HOME=c:\j2sdk1.4.2_09
    "%JDK_HOME%\bin\java" -classpath . Exec2
    POPD & ENDLOCAL
    ECHO Child Java subprocess exited.
    ECHO Parent Java process still waiting for spawned Notepad subsubprocess to exit!!!!!This is the Java subprocess that spans the Notepad subsubprocess: Exec2.java.
    class Exec2 {
        public static void main(String[] args) {
            try {
                System.out.println(
                    "Child java subprocess spawning Notepad subsubprocess...");
                Runtime.getRuntime().exec("Notepad");
            } catch (Exception ex) {
                ex.printStackTrace();
                return;
    }

    It would be helpful if you posted a question!

  • JavaFX applets hang on Vista 64

    I'm unable to run any applet that uses JavaFX on my 64-bit Vista machine (Vista Business 64-bit, SP2). The applet hangs during the Java loading animation. It consumes no CPU. For example, the Vancouver Olympics medal viewer (http://www.vancouver2010.com/olympic-medals/geo-view/). This happens on both Firefox (v3.6) and IE 8. On Firefox, it hangs the whole browser until I use Process Explorer to kill the Java subprocess. On IE, it does not hang the browser; the loading animation just spins forever. On Firefox, I turned on logging in the Java console (which also hangs) but saw nothing obvious. The last four lines are
    Load Geographic View
    reset view 2010
    getEligibleCountriesForCurrentYear
    network: Cache entry found [url: http://www.vancouver2010.com//api/country/list.json, version: null] prevalidated=false/0
    I'm using Sun JDK 1.6.0_18, and it happens with both the 32- and the 64-bit versions. (Also, I have the JavaFX 1.2 SDK installed). Note that non-JavaFX applets work fine, for example the demo applets that ship with the JDK. One more data point: the Java EE 6 installer hangs also. The splash screen appears, then it opens a new window, then it hangs. The new window never fully paints. I don't know if this is related to my JavaFX troubles.
    I'm a developer evaluating Java EE 6 and JavaFX for a possible RIA, but this has me completely stuck. Any help much appreciated.

    Okay, here's the stack traces, split across multiple replies to handle the 7,500 character limit:
    Full thread dump Java HotSpot(TM) Client VM (16.0-b13 mixed mode, sharing):
    "AWT-EventQueue-3" prio=4 tid=0x062fd400 nid=0xe80 runnable [0x0b31e000]
    java.lang.Thread.State: RUNNABLE
    at sun.java2d.d3d.D3DRenderQueue.flushBuffer(Native Method)
    at sun.java2d.d3d.D3DRenderQueue.flushBuffer(Unknown Source)
    at sun.java2d.d3d.D3DRenderQueue.flushNow(Unknown Source)
    at sun.java2d.d3d.D3DBlitLoops.Blit(Unknown Source)
    at sun.java2d.d3d.D3DSwToSurfaceBlit.Blit(Unknown Source)
    at sun.java2d.pipe.DrawImage.blitSurfaceData(Unknown Source)
    at sun.java2d.pipe.DrawImage.renderImageCopy(Unknown Source)
    at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
    at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
    at sun.java2d.SunGraphics2D.copyImage(Unknown Source)
    at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
    at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.renderClip(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.doRender(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.render(Unknown Source)
    at com.sun.scenario.scenegraph.SGGroup.renderContent(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.doRender(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.render(Unknown Source)
    at com.sun.scenario.scenegraph.SGGroup.renderContent(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.doRender(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.render(Unknown Source)
    at com.sun.scenario.scenegraph.SGGroup.renderContent(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.doRender(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.render(Unknown Source)
    at com.sun.scenario.scenegraph.SGGroup.renderContent(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.doRender(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.render(Unknown Source)
    at com.sun.scenario.scenegraph.SGGroup.renderContent(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.doRender(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.render(Unknown Source)
    at com.sun.scenario.scenegraph.SGGroup.renderContent(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.doRender(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.render(Unknown Source)
    at com.sun.scenario.scenegraph.SGGroup.renderContent(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.doRender(Unknown Source)
    at com.sun.scenario.scenegraph.SGNode.render(Unknown Source)
    at com.sun.scenario.scenegraph.JSGPanel.paintComponent(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintToOffscreen(Unknown Source)
    at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown S
    ource)
    at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
    at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
    at javax.swing.RepaintManager.paint(Unknown Source)
    at javax.swing.JComponent._paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at com.sun.scenario.scenegraph.JSGPanel.repaintDirtyRegions(Unknown Sour
    ce)
    at com.sun.scenario.scenegraph.JSGPanelRepainter.repaintAll(Unknown Sour
    ce)
    at com.sun.scenario.scenegraph.JSGPanelRepainter$FrameDisplay.run(Unknow
    n Source)
    at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(Unknown
    Source)
    at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(Unknown S
    ource)
    at com.sun.embeddedswing.EmbeddedEventQueue.doPulse(Unknown Source)
    - locked <0x24591090> (a java.lang.Object)
    at com.sun.embeddedswing.EmbeddedEventQueue.access$000(Unknown Source)
    at com.sun.embeddedswing.EmbeddedEventQueue$2.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at com.sun.embeddedswing.EmbeddedEventQueue.dispatchEvent(Unknown Source
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Locked ownable synchronizers:
    - <0x29b02850> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
    "pool-1-thread-1" daemon prio=4 tid=0x062fd000 nid=0xd64 waiting on condition [0
    x0b28f000]
    java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for <0x2459cf08> (a java.util.concurrent.locks.Abstra
    ctQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(Unknown Source)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
    .await(Unknown Source)
    at java.util.concurrent.DelayQueue.take(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.tak
    e(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.tak
    e(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Locked ownable synchronizers:
    - None
    "Long sleeping thread" daemon prio=4 tid=0x062fc800 nid=0x1300 waiting on condit
    ion [0x0b1ff000]
    java.lang.Thread.State: TIMED_WAITING (sleeping)
    at java.lang.Thread.sleep(Native Method)
    at com.sun.scenario.animation.MasterTimer$LongSleepingThread.run(Unknown
    Source)
    Locked ownable synchronizers:
    - None
    "ConsoleWriterThread" daemon prio=6 tid=0x062fc400 nid=0x13a0 in Object.wait() [
    0x0a84f000]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x29ac88c0> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:485)
    at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unkn
    own Source)
    - locked <0x29ac88c0> (a java.lang.Object)
    Locked ownable synchronizers:
    - None

  • Error while shutting down the OC4J Conatiner

    I am always getting a time out error message when shutting down my OC4J container. I am using AS 10.1.2.0.0 on Linux x86 RedHat ES 4.4
    Below is the error:
    An error occurred while stopping "OC4J_APP_PR".
    OC4J : OC4J_APP_PR - time out while waiting for a managed process to stop
    For more information, look at the logs using the related link below.
    Contents of log file
    08/04/08 21:23:03 App-web: Closing Spring root WebApplicationContext
    08/04/08 21:23:03 App-web: Error in servlet 'MainController' destroy()
    java.lang.NullPointerException
    at javax.servlet.GenericServlet.getServletContext(GenericServlet.java:205)
    at javax.servlet.GenericServlet.log(GenericServlet.java:300)
    at javax.servlet.GenericServlet.destroy(GenericServlet.java:122)
    at com.evermind.server.http.ServletInstanceInfo.destroy(ServletInstanceInfo.java:116)
    at com.evermind.server.http.HttpApplication.destroyServlets(HttpApplication.java:5869)
    at com.evermind.server.http.HttpApplication.destroy(HttpApplication.java:5790)
    at com.evermind.server.http.HttpSite.destroy(HttpSite.java:897)
    at com.evermind.server.http.HttpServer.destroy(HttpServer.java:615)
    at com.evermind.server.ApplicationServer.destroy(ApplicationServer.java:2093)
    at com.evermind.server.ApplicationServerShutdownHandler.run(ApplicationServerShutdownHandler.java:39)
    at java.lang.Thread.run(Thread.java:534)
    08/04/08 21:23:03 App-web: Stopped
    08/04/08 21:23:03 Stopped (Shutdown executed by jazn.com/admin from 127.0.0.1 (localhost))

    And in the soa-diagnostic log i am getting the following exception
    [2012-03-10T01:24:55.162-05:00] [tst_soa1] [ERROR] [] [oracle.soa.bpel.engine.cluster] [tid: ClusterNodeHeartbeat] [userId: <anonymous>] [ecid: f0166805c11697fc:312c7017:135faf7d4dc:-8000-0000000000000002,1:24871] [APP: soa-infra] Failed to execute heartbeat update[[
    java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedSta

  • Will it be ok if API  DestroyJavaVM is not called at all?

    As mentioned on http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4712793
    DestroyJavaVM does not destroy java vm.
    Is it still required to call this API while exiting the program or will it be ok if API DestroyJavaVM is not called in entire program?
    Edited by: ketu1 on Apr 2, 2009 2:41 AM

    will it be ok if API DestroyJavaVM is not called at all?It doesn't do anything, so yes.

  • Code to set and destroy session variables in Java Server Pages(JSP)

    code to set and destroy session variables in Java Server Pages(JSP)
    we have use following statement to set session variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session variable
    session.setAttribute("userClient","");
    and
    the session.invalidate() is not working
    Plz. solve this probem

    code to set and destroy session variables in Java
    Server Pages(JSP)
    we have use following statement to set session
    variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session
    variable
    session.setAttribute("userClient","");Perhaps if you tried using
    session.setAttribute("userClient", null);
    or
    session.removeAttribute("userClient");
    and
    the session.invalidate() is not workingNot working how?
    >
    Plz. solve this probem

  • NullPointerException at ADFBindingFilter.destroy(ADFBindingFilter.java:111)

    Hi
    thank you for reading my post
    can some one please explain why this error happens ?
    i deployed that adf faces + bc application on tomcat and now when ever we stop the application it return this exception and does not start until the whole tomcat restart.
    can some one please tell me how i can resolve it ?
    here is the exception
    SEVERE: HTMLManager: ManagerServlet.stop[tapp]
    java.lang.NullPointerException
         at oracle.adf.model.servlet.ADFBindingFilter.destroy(ADFBindingFilter.java:111)
         at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:255)
         at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3635)
         at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4336)
         at org.apache.catalina.manager.ManagerServlet.stop(ManagerServlet.java:1226)
         at org.apache.catalina.manager.HTMLManagerServlet.stop(HTMLManagerServlet.java:545)
         at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:106)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)

    Hello,
    I ran into exactly the same problem. After some source analysis i found that there is just a bug.
    public void init(FilterConfig filterConfig) throws ServletException
    if (JboEnvUtil.inOC4J())
    mOC4JContextRef = new WeakReference(ADFContext.getCurrent().getApplication().getId());
    public void destroy()
    mFilterConfig = null;
    Object context = null;
    if ((context = mOC4JContextRef.get()) != null)
    BindingRequestHandler.destroyApplication(context);
    mOC4JContextRef = null;
    So, it looks like mOC4JContextRef attribute doesn't get initialized if its not oc4j environment, while destroy method thinks that it will never be null.
    As a temporary workaround you can write your own Filter which extends ADFBindingFilter and overrides "destroy" method, which doesn't do anything very special anyway.

Maybe you are looking for

  • [SOLVED] form based logout

    Hi, using Jdeveloper 10.1.3.3 ADF BC & JSF, I've implemented form based login like here: http://technology.amis.nl/blog/?p=1462 the problem is with logout. I have a commandLink and a method: public void doLogout() throws IOException { FacesContext ct

  • License check failure

    To whom it may concern, It looks that my license is expired but based on the instructions to update my license I'm unable to get into the Visual Administrator to update. It kind a caught 22? How am I going to update the license key if I'm unable to l

  • Eset Node 32 interfering with icloud photos

    I have recently installed Eset Node 32 on my WIndows 7 PC. My photos are now not updating on my Photo Stream/iCloud Photos folder. Any ideas?

  • Select-Option field grey out-no further input

    Hi SDNers, I have select Option field  sales document type AUART ,I need to default the values and should grey out the field to not allow the user from entering any other value. I have tried using modif id, at-selection screen output loop at screen s

  • I am not able to click on anything in the top one inch of every browser page??

    On page like facebook... I am not able to click on any links that are in the top one inch of the browser... including the main menu bar