Connect Java to native terminal (Solaris specifically)

How can I connect to the native terminal through my own Java application?
Calling my processes using Runtime.exec does not always work because the processes usually know it is not a terminal.
Is there a way in Java to call a child as if through the terminal, or is there a way in Solaris to call a middle man process that calls the next child as if through the terminal?

gimbal2 wrote:
generally that is done by actually invoking the shell through runtime.exec(). I don't know what the main shell is under solaris, but under windows you would invoke CMD and under Linux you could invoke BASH for example.
Start your adventures by reading the four pages of this article carefully:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
The fourth page shows an example of how to invoke the DIR command on windows.I started reading that document, I believe I already have all that under my belt. Perhaps I was too breif in my original question.
If you run "ps -ef | more" in Solaris, it will show you one window-full of text at a time. If you resize your window, "|more" adjusts accordingly. That is because a terminal will tell the client height and width. That is one of the features of a terminal.
If I went and ran "cp -i", it would ask if I wanted to replace any files I might be overwriting. But if I did it through System.exec() it would just overwrite because there is no terminal. (even if running through a shell like sh/bash)
"prstat -a" (Solaris) will also detect if there is a terminal and provide underlined column headers.
Java 6 has a Terminal object that is permitted to be null.
What I really want is to make these processes think they are in a terminal. I am not too particular with window height/width and don't care much about underlines/bold/blink/strike/colors. (of course better to have these than to not :) )
So how can I tell these processes they are in a terminal?

Similar Messages

  • Ghost connections "Java(TM) 2 Platform Standard Edition"

    We have a server application with multiple threads each using JDBC connections. On the Database server (MS SQL Server 7) we notice more and more connections with the SQLQueryAnalyzer-ProgramName "Java(TM) 2 Platform Standard Edition". But all our (known) connections have custom names or the default name of the JDBC driver (jTDS). The developer of jTDS answered that the driver only have connections that are requested by the application. But we don't have connections named dbc connections "Java(TM) 2 Platform Standard Edition" ... ?

    We don't use an application server, it's just a plain Java application. No frameworks and only 3rd party libs that don't handle any database connection - and the JDBC driver jTDS. As one of the developers got very angry about my bug report, because he insists that it's not the fault of jTDS, I have to rule out jTDS. That would mean that it's somewhere in my application. But I just have 1 single class that actually creates a JDBC connection, so it's not hard to debug this. And I can't see any additional connections as all of my connections get specific names and not "Java(TM) 2 Platform Standard Edition".
    I searched all source code of the Java SDK, jTDS and my source code for occurences of "Java(TM) 2 Platform Standard Edition" and can't find any. I hoped that somebody knows who is using this string (and when). It sounds like general Java (SDK/JRE) is setting this name, but I haven't found it.

  • Java node 'server0' terminated with exit code 2150 after JSPM patches

    Dear Experts,
    We want to install SAP Netweaver 7.3 EHP1.
    After applying patches SP11 from JSPM utility we tried to restart the SAP Java instances from SAP MMC.
    But it failed to start with error code :
    *** LOG => SfCJavaVm: exit hook is called. (rc = 2150)
    *** ERROR => Java node 'server0' terminated with exit code 2150.
    *** To resolve the issue, we restarted machine, Database services, SAP services but it still did not start.
    *** Let us know if you need any other trace file for debugging.
    Below is the log file:
    stdout log file:-
    stdout/stderr redirection
    node name   : server0
    host name   : INPUNEME01
    system name : ME2
    system nr.  : 00
    started at  : Thu Jul 17 00:10:29 2014
    JVMX version - Jun 22 2014 00:31:35 - 61_REL - optU - windows amd64 - 6 - bas2:220276 (mixed mode)
    (CompilerOracle read from file C:\usr\sap\ME2\J00\exe\sapjvm_6\jre\.hotspot_compiler)
    The active factory is : com.sap.engine.boot.loader.StandardClassLoaderFactory
    Class loading cache information loaded from package index [C:\usr\sap\ME2\J00\j2ee\cluster\bin\index.list]
    Reading manager properties from [kernelProperties.bin] file
       Checked the data for [16] ms
       Objects read for [109] ms
       Substituted the values for [94] ms
    Finished reading kernel objects for [203] ms
    Startup mode [NORMAL] and action [NONE] read
    AS Java version [7.31.3710.148365.20111012091351] is starting server process [ID3448650] on host [INPUNEME01.India.***.com] ...
    Loading [LogManager]... [109] ms
    Loading [PoolManager]... [0] ms
    Loading [ApplicationThreadManager]... 2.296: [GC2.296: [ParNew: 343552K->8912K(381696K), 0.0251348 secs] 343557K->8917K(2059008K), 0.0253589 secs] [Times: user=0.03 sys=0.03, real=0.02 secs]
    [125] ms
    Loading [ThreadManager]... [32] ms
    Loading [ClassLoaderManager]... [31] ms
    Loading [ClusterManager]... [485] ms
    Loading [LockingManager]... [63] ms
    Loading [ConfigurationManager]... [1624] ms
    Loading [CacheManager]... [141] ms
    Loading [DatabaseManager]... [547] ms
    Loading [SessionManager]... [515] ms
    Loading [LicensingManager]... [32] ms
    Loading [ServiceManager]...
    Initialize components for : 94 ms.
    Resolve components for : 31 ms.
    Load components for 969 ms.
    Loading services.
    Calculate startup service set for 266 ms.
      Service [tc~je~content~classification~handler] started. [16] ms / [0] CPU ms
      Service [tc~je~sca~ws.plugin] started. [16] ms / [0] CPU ms
      Service [engine.lm.log.facade] started. [62] ms / [0] CPU ms
      Service [engine.dsr.facade] started. [62] ms / [0] CPU ms
      Service [webservices] started. [62] ms / [0] CPU ms
      Service [tc~je~security~api] started. [62] ms / [0] CPU ms
      Service [tc~je~cross~api] started. [62] ms / [0] CPU ms
      Service [tc~je~mngt_model~srv] started. [62] ms / [0] CPU ms
      Service [r3startup] started. [62] ms / [0] CPU ms
      Service [security.destination.facade] started. [62] ms / [0] CPU ms
      Service [tc~esi~uddi~content~handler] started. [62] ms / [0] CPU ms
      Service [tc~je~sca~jco.plugin] started. [110] ms / [0] CPU ms
      Service [jmx_notification] started. [140] ms / [15] CPU ms
      Service [cluster] started. [125] ms / [0] CPU ms
      Service [runtimeinfo] started. [109] ms / [15] CPU ms
      Service [memory] started. [297] ms / [31] CPU ms
      Service [timeout] started. [297] ms / [15] CPU ms
      Service [userstore] started. [297] ms / [0] CPU ms
      Service [tc~sec~destinations~provider] started. [344] ms / [171] CPU ms
      Service [cross] start ================= ERROR =================
      CSN Component [BC-JAS-COR-RMT], DC Name [sap.com/cross]
    java.lang.NoSuchFieldError: ipaddress
    at com.sap.bc.proj.jstartup.fca.FCAProperties.init1(Native Method)
    at com.sap.bc.proj.jstartup.fca.FCAProperties.init(FCAProperties.java:54)
    at com.sap.engine.services.cross.fca.FCAConnectorImpl.<init>(FCAConnectorImpl.java:101)
    at com.sap.engine.services.cross.CrossFrame.start(CrossFrame.java:82)
    at com.sap.engine.core.service630.container.ServiceRunner.startFrame(ServiceRunner.java:165)
    at com.sap.engine.core.service630.container.ServiceRunner.startService(ServiceRunner.java:118)
    at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:65)
    at com.sap.engine.frame.core.thread.Task.run(Task.java:73)
    at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:178)
    at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:316)
    FATAL: Critical shutdown with exit code [2150] was requested due to [AS Java cannot be started; core service [cross] failed to start]
    Heap
    par new generation   reserved 419840K, committed 419840K, used 298078K [0x000000013fe70000, 0x0000000159870000, 0x0000000159870000)
      eden space 343552K,  84% used [0x000000013fe70000, 0x00000001518d3970, 0x0000000154df0000)
      from space 38144K,  23% used [0x0000000157330000, 0x0000000157be4038, 0x0000000159870000)
      to   space 38144K,   0% used [0x0000000154df0000, 0x0000000154df0000, 0x0000000157330000)
    concurrent mark-sweep generation reserved 1677312K, committed 1677312K, used 60K [0x0000000159870000, 0x00000001bfe70000, 0x00000001bfe70000)
    concurrent-mark-sweep perm gen reserved 1048576K, committed 1048576K, used 31907K [0x00000001bfe70000, 0x00000001ffe70000, 0x00000001ffe70000)
    stdout/stderr redirection
    node name   : server0
    host name   : INPUNEME01
    system name : ME2
    system nr.  : 00
    started at  : Thu Jul 17 00:10:46 2014
    JVMX version - Jun 22 2014 00:31:35 - 61_REL - optU - windows amd64 - 6 - bas2:220276 (mixed mode)
    (CompilerOracle read from file C:\usr\sap\ME2\J00\exe\sapjvm_6\jre\.hotspot_compiler)
    The active factory is : com.sap.engine.boot.loader.StandardClassLoaderFactory
    Class loading cache information loaded from package index [C:\usr\sap\ME2\J00\j2ee\cluster\bin\index.list]
    Reading manager properties from [kernelProperties.bin] file
       Checked the data for [16] ms
       Objects read for [188] ms
       Substituted the values for [78] ms
    Finished reading kernel objects for [266] ms
    Startup mode [NORMAL] and action [NONE] read
    AS Java version [7.31.3710.148365.20111012091351] is starting server process [ID3448650] on host [INPUNEME01.India.***.com] ...
    Loading [LogManager]... [109] ms
    Loading [PoolManager]... [0] ms
    Loading [ApplicationThreadManager]... 2.406: [GC2.406: [ParNew: 343552K->8913K(381696K), 0.0187920 secs] 343557K->8919K(2059008K), 0.0190498 secs] [Times: user=0.06 sys=0.00, real=0.02 secs]
    [141] ms
    Loading [ThreadManager]... [31] ms
    Loading [ClassLoaderManager]... [94] ms
    Loading [ClusterManager]... [454] ms
    Loading [LockingManager]... [47] ms
    Loading [ConfigurationManager]... [1578] ms
    Loading [CacheManager]... [78] ms
    Loading [DatabaseManager]... [344] ms
    Loading [SessionManager]... [296] ms
    Loading [LicensingManager]... [16] ms
    Loading [ServiceManager]...
    Initialize components for : 78 ms.
    Resolve components for : 16 ms.
    Load components for 703 ms.
    Loading services.
    Calculate startup service set for 172 ms.
      Service [webservices] started. [16] ms / [0] CPU ms
      Service [tc~esi~uddi~content~handler] started. [16] ms / [0] CPU ms
      Service [tc~je~content~classification~handler] started. [16] ms / [0] CPU ms
      Service [tc~je~sca~ws.plugin] started. [16] ms / [0] CPU ms
      Service [r3startup] started. [16] ms / [0] CPU ms
      Service [tc~je~cross~api] started. [31] ms / [0] CPU ms
      Service [tc~je~security~api] started. [47] ms / [0] CPU ms
      Service [engine.dsr.facade] started. [47] ms / [0] CPU ms
      Service [engine.lm.log.facade] started. [47] ms / [0] CPU ms
      Service [security.destination.facade] started. [47] ms / [0] CPU ms
      Service [tc~je~mngt_model~srv] started. [47] ms / [0] CPU ms
      Service [cluster] started. [62] ms / [15] CPU ms
      Service [tc~je~sca~jco.plugin] started. [62] ms / [0] CPU ms
      Service [jmx_notification] started. [46] ms / [0] CPU ms
      Service [runtimeinfo] started. [62] ms / [0] CPU ms
      Service [memory] started. [172] ms / [15] CPU ms
      Service [tc~sec~destinations~provider] started. [234] ms / [109] CPU ms
      Service [timeout] started. [266] ms / [31] CPU ms
      Service [log_configurator] started. [312] ms / [46] CPU ms
      Service [userstore] started. [312] ms / [31] CPU ms
      Service [cross] start ================= ERROR =================
      CSN Component [BC-JAS-COR-RMT], DC Name [sap.com/cross]
    java.lang.NoSuchFieldError: ipaddress
    at com.sap.bc.proj.jstartup.fca.FCAProperties.init1(Native Method)
    at com.sap.bc.proj.jstartup.fca.FCAProperties.init(FCAProperties.java:54)
    at com.sap.engine.services.cross.fca.FCAConnectorImpl.<init>(FCAConnectorImpl.java:101)
    at com.sap.engine.services.cross.CrossFrame.start(CrossFrame.java:82)
    at com.sap.engine.core.service630.container.ServiceRunner.startFrame(ServiceRunner.java:165)
    at com.sap.engine.core.service630.container.ServiceRunner.startService(ServiceRunner.java:118)
    at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:65)
    at com.sap.engine.frame.core.thread.Task.run(Task.java:73)
    at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:178)
    at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:316)
    FATAL: Critical shutdown with exit code [2150] was requested due to [AS Java cannot be started; core service [cross] failed to start]
    Heap
    par new generation   reserved 419840K, committed 419840K, used 298923K [0x000000013fe70000, 0x0000000159870000, 0x0000000159870000)
      eden space 343552K,  84% used [0x000000013fe70000, 0x00000001519a6a18, 0x0000000154df0000)
      from space 38144K,  23% used [0x0000000157330000, 0x0000000157be45b8, 0x0000000159870000)
      to   space 38144K,   0% used [0x0000000154df0000, 0x0000000154df0000, 0x0000000157330000)
    concurrent mark-sweep generation reserved 1677312K, committed 1677312K, used 60K [0x0000000159870000, 0x00000001bfe70000, 0x00000001bfe70000)
    concurrent-mark-sweep perm gen reserved 1048576K, committed 1048576K, used 31359K [0x00000001bfe70000, 0x00000001ffe70000, 0x00000001ffe70000)
      Service [locking] started. [47] ms / [0] CPU ms
    stdout/stderr redirection
    node name   : server0
    host name   : INPUNEME01
    system name : ME2
    system nr.  : 00
    started at  : Thu Jul 17 00:11:02 2014
    JVMX version - Jun 22 2014 00:31:35 - 61_REL - optU - windows amd64 - 6 - bas2:220276 (mixed mode)
    (CompilerOracle read from file C:\usr\sap\ME2\J00\exe\sapjvm_6\jre\.hotspot_compiler)
    The active factory is : com.sap.engine.boot.loader.StandardClassLoaderFactory
    Class loading cache information loaded from package index [C:\usr\sap\ME2\J00\j2ee\cluster\bin\index.list]
    Reading manager properties from [kernelProperties.bin] file
       Checked the data for [16] ms
       Objects read for [110] ms
       Substituted the values for [93] ms
    Finished reading kernel objects for [203] ms
    Startup mode [NORMAL] and action [NONE] read
    AS Java version [7.31.3710.148365.20111012091351] is starting server process [ID3448650] on host [INPUNEME01.India.***.com] ...
    Loading [LogManager]... [109] ms
    Loading [PoolManager]... [0] ms
    Loading [ApplicationThreadManager]... 2.297: [GC2.297: [ParNew: 343552K->9136K(381696K), 0.0230809 secs] 343557K->9142K(2059008K), 0.0233963 secs] [Times: user=0.06 sys=0.00, real=0.02 secs]
    [125] ms
    Loading [ThreadManager]... [31] ms
    Loading [ClassLoaderManager]... [16] ms
    Loading [ClusterManager]... [501] ms
    Loading [LockingManager]... [62] ms
    Loading [ConfigurationManager]... [1500] ms
    Loading [CacheManager]... [125] ms
    Loading [DatabaseManager]... [453] ms
    Loading [SessionManager]... [406] ms
    Loading [LicensingManager]... [32] ms
    Loading [ServiceManager]...
    Initialize components for : 110 ms.
    Resolve components for : 32 ms.
    Load components for 953 ms.
    Loading services.
    Calculate startup service set for 265 ms.
      Service [tc~je~security~api] started. [16] ms / [0] CPU ms
      Service [webservices] started. [16] ms / [15] CPU ms
      Service [engine.lm.log.facade] started. [0] ms / [0] CPU ms
      Service [tc~je~sca~ws.plugin] started. [0] ms / [0] CPU ms
      Service [engine.dsr.facade] started. [0] ms / [0] CPU ms
      Service [r3startup] started. [0] ms / [0] CPU ms
      Service [tc~je~cross~api] started. [0] ms / [0] CPU ms
      Service [security.destination.facade] started. [32] ms / [0] CPU ms
      Service [tc~esi~uddi~content~handler] started. [32] ms / [0] CPU ms
      Service [tc~je~content~classification~handler] started. [32] ms / [0] CPU ms
      Service [tc~je~mngt_model~srv] started. [32] ms / [0] CPU ms
      Service [tc~je~sca~jco.plugin] started. [47] ms / [15] CPU ms
      Service [jmx_notification] started. [125] ms / [31] CPU ms
      Service [runtimeinfo] started. [109] ms / [15] CPU ms
      Service [cluster] started. [109] ms / [0] CPU ms
      Service [userstore] started. [156] ms / [15] CPU ms
      Service [cross] start ================= ERROR =================
      CSN Component [BC-JAS-COR-RMT], DC Name [sap.com/cross]
    java.lang.NoSuchFieldError: ipaddress
    at com.sap.bc.proj.jstartup.fca.FCAProperties.init1(Native Method)
    at com.sap.bc.proj.jstartup.fca.FCAProperties.init(FCAProperties.java:54)
    at com.sap.engine.services.cross.fca.FCAConnectorImpl.<init>(FCAConnectorImpl.java:101)
    at com.sap.engine.services.cross.CrossFrame.start(CrossFrame.java:82)
    at com.sap.engine.core.service630.container.ServiceRunner.startFrame(ServiceRunner.java:165)
    at com.sap.engine.core.service630.container.ServiceRunner.startService(ServiceRunner.java:118)
    at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:65)
    at com.sap.engine.frame.core.thread.Task.run(Task.java:73)
    at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:178)
    at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:316)
      Service [timeout] started. [235] ms / [31] CPU ms
    FATAL: Critical shutdown with exit code [2150] was requested due to [AS Java cannot be started; core service [cross] failed to start]
    Heap
    par new generation   reserved 419840K, committed 419840K, used 275035K [0x000000013fe70000, 0x0000000159870000, 0x0000000159870000)
      eden space 343552K,  77% used [0x000000013fe70000, 0x000000015021acd0, 0x0000000154df0000)
      from space 38144K,  23% used [0x0000000157330000, 0x0000000157c1c238, 0x0000000159870000)
      to   space 38144K,   0% used [0x0000000154df0000, 0x0000000154df0000, 0x0000000157330000)
    concurrent mark-sweep generation reserved 1677312K, committed 1677312K, used 59K [0x0000000159870000, 0x00000001bfe70000, 0x00000001bfe70000)
    concurrent-mark-sweep perm gen reserved 1048576K, committed 1048576K, used 29998K [0x00000001bfe70000, 0x00000001ffe70000, 0x00000001ffe70000)
      Service [memory] started. [312] ms / [46] CPU ms
    stdout/stderr redirection
    node name   : server0
    host name   : INPUNEME01
    system name : ME2
    system nr.  : 00
    started at  : Thu Jul 17 00:11:18 2014
    JVMX version - Jun 22 2014 00:31:35 - 61_REL - optU - windows amd64 - 6 - bas2:220276 (mixed mode)
    (CompilerOracle read from file C:\usr\sap\ME2\J00\exe\sapjvm_6\jre\.hotspot_compiler)
    The active factory is : com.sap.engine.boot.loader.StandardClassLoaderFactory
    Class loading cache information loaded from package index [C:\usr\sap\ME2\J00\j2ee\cluster\bin\index.list]
    Reading manager properties from [kernelProperties.bin] file
       Checked the data for [15] ms
       Objects read for [109] ms
       Substituted the values for [94] ms
    Finished reading kernel objects for [203] ms
    Startup mode [NORMAL] and action [NONE] read
    AS Java version [7.31.3710.148365.20111012091351] is starting server process [ID3448650] on host [INPUNEME01.India.***.com] ...
    Loading [LogManager]... [94] ms
    Loading [PoolManager]... [16] ms
    Loading [ApplicationThreadManager]... 2.267: [GC2.268: [ParNew: 343552K->9051K(381696K), 0.0218818 secs] 343557K->9057K(2059008K), 0.0221899 secs] [Times: user=0.06 sys=0.00, real=0.02 secs]
    [156] ms
    Loading [ThreadManager]... [31] ms
    Loading [ClassLoaderManager]... [16] ms
    Loading [ClusterManager]... [485] ms
    Loading [LockingManager]... [62] ms
    Loading [ConfigurationManager]... [1297] ms
    Loading [CacheManager]... [141] ms
    Loading [DatabaseManager]... [437] ms
    Loading [SessionManager]... [406] ms
    Loading [LicensingManager]... [16] ms
    Loading [ServiceManager]...
    Initialize components for : 110 ms.
    Resolve components for : 31 ms.
    Load components for 953 ms.
    Loading services.
    Calculate startup service set for 265 ms.
      Service [engine.lm.log.facade] started. [16] ms / [0] CPU ms
      Service [tc~esi~uddi~content~handler] started. [16] ms / [0] CPU ms
      Service [tc~je~mngt_model~srv] started. [16] ms / [0] CPU ms
      Service [webservices] started. [16] ms / [0] CPU ms
      Service [engine.dsr.facade] started. [16] ms / [0] CPU ms
      Service [tc~je~cross~api] started. [16] ms / [0] CPU ms
      Service [r3startup] started. [32] ms / [0] CPU ms
      Service [tc~je~security~api] started. [32] ms / [0] CPU ms
      Service [security.destination.facade] started. [32] ms / [0] CPU ms
      Service [tc~je~content~classification~handler] started. [16] ms / [0] CPU ms
      Service [tc~je~sca~ws.plugin] started. [16] ms / [0] CPU ms
      Service [runtimeinfo] started. [47] ms / [15] CPU ms
      Service [tc~je~sca~jco.plugin] started. [47] ms / [0] CPU ms
      Service [jmx_notification] started. [63] ms / [0] CPU ms
      Service [cluster] started. [47] ms / [15] CPU ms
      Service [timeout] started. [172] ms / [93] CPU ms
      Service [userstore] started. [140] ms / [31] CPU ms
      Service [memory] started. [172] ms / [15] CPU ms
      Service [cross] start ================= ERROR =================
      CSN Component [BC-JAS-COR-RMT], DC Name [sap.com/cross]
    java.lang.NoSuchFieldError: ipaddress
    at com.sap.bc.proj.jstartup.fca.FCAProperties.init1(Native Method)
    at com.sap.bc.proj.jstartup.fca.FCAProperties.init(FCAProperties.java:54)
    at com.sap.engine.services.cross.fca.FCAConnectorImpl.<init>(FCAConnectorImpl.java:101)
    at com.sap.engine.services.cross.CrossFrame.start(CrossFrame.java:82)
    at com.sap.engine.core.service630.container.ServiceRunner.startFrame(ServiceRunner.java:165)
    at com.sap.engine.core.service630.container.ServiceRunner.startService(ServiceRunner.java:118)
    at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:65)
    at com.sap.engine.frame.core.thread.Task.run(Task.java:73)
    at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:178)
    at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:316)
    FATAL: Critical shutdown with exit code [2150] was requested due to [AS Java cannot be started; core service [cross] failed to start]
    Heap
    par new generation   reserved 419840K, committed 419840K, used 277992K [0x000000013fe70000, 0x0000000159870000, 0x0000000159870000)
      eden space 343552K,  78% used [0x000000013fe70000, 0x0000000150513298, 0x0000000154df0000)
      from space 38144K,  23% used [0x0000000157330000, 0x0000000157c06fd0, 0x0000000159870000)
      to   space 38144K,   0% used [0x0000000154df0000, 0x0000000154df0000, 0x0000000157330000)
    concurrent mark-sweep generation reserved 1677312K, committed 1677312K, used 59K [0x0000000159870000, 0x00000001bfe70000, 0x00000001bfe70000)
    concurrent-mark-sweep perm gen reserved 1048576K, committed 1048576K, used 30982K [0x00000001bfe70000, 0x00000001ffe70000, 0x00000001ffe70000)
    Thanks and Regards,
    Muddassar Khan

    Hi Muddassar,
    Hope you are doing good.
    A new note has been released exclusively for this issue. Please see:
    note 1937296 - SUM fails at start-shadow-instance-dm step. This is not
    an issue with the SCAs and more with the kernel employed.
    You will need to make sure that you are on the latest kernel so that
    this can be resolved.
    The below links will help you if there are any queries with the
    kernel update procedure
    SAP Note No. 1636252 - Installing a 7.20 kernel in SAP Web AS
                           7.00/7.01/7.10/7.11
    SAP Note No. 1629598 - SAP Kernel 720 will replace older
                           kernel versions
    SAP Note No. 19466   - Downloading SAP kernel patches
    Also check:
    <http://scn.sap.com/docs/DOC-1206>
    (for Manual Kernel Upgrade)
    and
    <http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/11219>
    (for kernel upgrade using JSPM)
    Thank you and have a nice day!
    Kind Regards,
    Hemanth

  • Any Program to connect JAVA for DB from SAP

    Any Program to connect JAVA for DB from SAP,
    Rather than JCO Is there any other option,
    Please tell that option ,
    and how to do that,
    thank you,
    Regards.
    Jagrut BharatKumar Shukla

    Hello Al Mamun,
    SM59 is for RFC (remote function call).
    If you are looking for ODBC-like connection, would you consider Tcode DBCO, then use native ABAP code to connect to the remote SQL server?
    Best regards,
    Victor

  • No connection to database, session terminated

    hi all,
    we are facing a oracle  db problem, when we start database, SAP on Solaris 5.10. after some time error comes from sap Gui
    No connection to database, session terminated
    when we checked db , database was shutdown.
    error in Alter_SID.log
    Errors in file /oracle/DEV/saptrace/background/dev_smon_16314.trc:
    ORA-00600: internal error code, arguments: [4137], [], [], [], [], [], [], []
    Wed May 19 18:45:12 2010
    ORACLE Instance DEV (pid = 9) - Error 600 encountered while recovering transaction (9, 27).
    Wed May 19 18:45:12 2010
    Errors in file /oracle/DEV/saptrace/background/dev_smon_16314.trc:
    ORA-00600: internal error code, arguments: [4137], [], [], [], [], [], [], []
    plz guide
    Imran

    Hi,
    What is your database release ?
    You can try first shutdown the database if it is in mount state. Then restart the complete system.
    If the problem remains same..
    Please check the below notes: (and the notes suggested in the below notes)
    [Note 658744 - Composite SAP Note: ORA-00600|https://service.sap.com/sap/support/notes/658744]
    Regards.
    Rajesh Narkhede

  • Connecting: java.sql.SQLException: Protocol violation.

    Hi,
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import java.text.*;
    import java.util.*;
    import java.lang.*;
    public class FruitTest {
    String url = "jdbc:oracle:thin:sys/jame@(DESCRIPTION=(ADDRESS_LIST =(ADDRESS =(COMMUNITY =
    tcp.insee.fr)(PROTOCOL = TCP)(Host = 10.20.108.3)(Port = 1521)))(CONNECT_DATA = (SID = ORA817)))";
    /** Get the table and print all the values. */
    public void Affiche() {
    try {
    // Load database driver if not already loaded.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    // Establish network connection to database.
    Connection connection =
    DriverManager.getConnection(url);
    // Look up info about the database as a whole.
    DatabaseMetaData dbMetaData = connection.getMetaData();
    Statement statement = connection.createStatement();
    String query = "SELECT * FROM ebru2w.mystats";
    // Send query to database and store results.
    ResultSet resultSet = statement.executeQuery(query);
    while(resultSet.next()) {
    System.out.println(resultSet.getString(1) + " " + resultSet.getString(2) + " " +
    resultSet.getString(3)); }
    } catch(ClassNotFoundException cnfe) {
    System.err.println("Error loading driver: " + cnfe);
    } catch(SQLException sqle) {
    System.err.println("Error connecting: " + sqle);
    public static void main(String[] args) {
    FruitTest moObj = new FruitTest();
    moObj.Affiche();
    I have one program written in java in the following above and i receive the following error when i execute the class file under the command line( java FruitTest ): connecting: java.sql.SQLException: Protocol violation.
    Can anyone help me ?
    Thanks in advance

    Try this way:
    String strURL = "jdbc:oracle:kprb:@localhost:1521:" + strSID;
    where strSID = your SID.
    This is the best way to connect to Oracle on the back end as the KPRB driver is built in and gives you native speed (according to Oracle)
    That's how I do it.

  • Best way to connect java app to multiple databases?

    I'm working on my first commercial application, and I want it to be as flexible as possible, meaning I want it to be able to connect to a wide range of databases, as the customer chooses. I'm wondering what the best way is to accomplish this, I don't really want to have to buy a commercial license for third party ODBC drivers, any one have some good comments on this?

    You have two fundamental options:
    Use an O/R mapping tool like: Hibernate, EJB BMP, JDO, etc.
    Develop your own using JDBCIf you opt for the former, you should ask youself, "What value do i add? Or should I simply use these technologies?" The advantages are that dozens of other developers, going down similar routes, have faced the obstracles you will face and more. The disadvantage is that none of these developers has actually faced your specific problem. This is not to say that the solution does not already exist. The efficacy of this methodology will be how closely the general solution fits with your own (and since many problems have the same challenges, this will often be true).
    If you opt for the latter, you will have both an opportunity and a pitfall. The precise, business issue your current project addresses has many things both in common with other projects and also a handful of unique challenges. The hard part is determining whether this challenge actually differs in some fundamental way, or whether you have discerned some fault or opportunity in your methodology compared to standard (or even cutting-edge) practices.
    In reality, the challenge of "connecting to numerous, heterogenous (and probably vaprous) database systems" has long been addressed. Addressed, but perhaps not solved. If your goal is to develop a class library, for personal or consulting use, or to increase your understanding of the O/R boundary and best practices to obviate it, then my best advice is to read existing literature, and give it your all. There is no right answer here, and building on an existing experience of failure and success is indispensible.
    If your aim is to solve the O/R mapping challenge, or to suppant JDBC BMP, Hibernate or JDO, then my hat is off to you. We are all eagerly awaiting that day. (Sadly, after much effort, it has not yet arrived).
    So, can you connect Java to multiple databases, and even a diverse array of RDBMS vendors? Of course! But what will you do with those conections?
    - Saish

  • Connect java to php web page

    Hello...
    I am new in this forum, so I am sorry if I post my question in wrong place.
    I have php web page and want to call my java classes i.e connect java to php. My java code will read from file some info. then will organize these info. finally, the java will write the organized info. in file, the php will display the content of the file.
    can help me please to achieve this goal...
    thanks in advance
    ibtesam saleh

    I do not how to use JPoller, put it looks very advanced.
    Or you can use a simple code in (java/perl/c/what so every u know)
    void main(){
    while (true) {
    checkDirectoryAndReadNewCommandsAndWriteNewOutputs();
    Thread.sleep(waitTime);
    }and put your program on your windows/linux startUp
    Or you can learn using sockets in java and write your own html service with port 80 (I did some experiments)
    Or you can try to use WebService example from Netbeans program (I tried it worked for me)
    Or you can learn J2EE (I have never find the time to look at)
    Or ... many ideas, to time :)

  • Can' t connect Java with MySQL

    My goal is to connect Java with MySQL. I found many solutions on Internet, but I always get the same mistake:
    SQLException: No suitable driver
    SQLState: 08001
    VendorError: 0MySQL works fine alone or with php.Only thing left me to think is that the installed versions are not compatible for this mysql-connector-java-5.0.4
    I don't believe that could be a reason.
    Installed versions are:
    Apache Tomcat 5.5.20 Server
    Apache HTTP Server 2.2.4
    PHP 5.2.0
    MySQL 5.2
    jre 1.5.0_11
    jdk1.5.0_11
    Apache Tomacat JK2 connector Version: 1.2.20 File Name: mod_jk-apache-2.2.3.so
    mysql-connector-java-5.0.4
    I also set connector in class path: C:\mysql-connector-java-5.0.4;C:\mysql-connector-java-5.0.4\mysql-connector-java-5.0.4-bin.jar;C:\mysql-connector-java-5.0.4\src\com\mysql\jdbc
    For installation I used manulas from:
    http://apacheguide.org/jsp.php
    http://doc.51windows.net/mysql/?url=/MySQL/ch23s03.html
    Here is also a test code in java:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
       public class Connect
           public static void main (String[] args)
               Connection conn = null;
               try {
        conn =
           DriverManager.getConnection("jdbc:mysql://localhost/first_test" +
                                       "user=monty&password=greatsqldb");
        // Do something with the Connection
    } catch (SQLException ex) {
        // handle any errors
        System.out.println("SQLException: " + ex.getMessage());
        System.out.println("SQLState: " + ex.getSQLState());
        System.out.println("VendorError: " + ex.getErrorCode());
       }i'm desperate, please help or tell me someone who'll know the answer.
    Thank You in advance

    hey buddy .. it seems yr code is wrong .. in getconnection () method u should also specify the port ,which u r not doing ...
    the default port for MySQL is 3306 ... see below i am giving you a sample code ... its working fine .. and dont forget to put the MySQL driver jar path in to classpath and also copy the jar into common/lib folder of your tomcat ....
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class MySQLConnectionTest {
         public static void main(String[] args) {
    new MySQLConnectionTest().connTest();
    public void connTest() {
              String tableName = "portfolio"; //change as per setting
              String hostName = "10.81.9.39"; // please change for the target database ip or hostname
              String dbPort = "3306"; //change if not using the default
              String dbName = "tradingsystem"; //change as per the given DB name
              String username = "root"; //change as per setting
              String password = "password"; //change as per setting
              System.out.println("before try");
              Double data=0.0;
         Double data1=0.0;
              try {
    Class.forName("org.gjt.mm.mysql.Driver");
                   System.out.println("before driver manager");
    Connection conn = DriverManager.getConnection("jdbc:mysql://"+hostName+":"+dbPort+"/"+dbName, username, password);
    String query1 = "select * from "+tableName+" where User_id='trader1' and Stock_Type='Equity'";
    System.out.println("quesry1="+query1);
    Statement stmt = conn.createStatement();
    ResultSet rs1 = stmt.executeQuery(query1);
    while(rs1.next())
         System.out.println("hiiiiii for rs1");
         System.out.println(rs1);
         Quantity=(Integer)rs1.getObject(5);
         MarketPrice=(Double) rs1.getObject(8);
         data=Quantity*MarketPrice;
         data1+=data;
         System.out.println("data1="+data1);
         i=0;
    rs1.close();
    stmt.close();
    conn.close();
    } catch (ClassNotFoundException e) {
    e.printStackTrace(System.err);
    } catch (SQLException e) {
    e.printStackTrace(System.err);
    i hope it will work for u...
    cheers,

  • BAPI step by step to connect JAVA for catsdb table

    BAPI step by step to connect JAVA for catsdb table,
    Points will be rewarded,
    full points with example of catsdb table in bapi for JCO JAVA
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi,
    Check the thread..
    https://forums.sdn.sap.com/click.jspa?searchID=3587428&messageID=3647918
    Regards,
    Omkar.

  • NullPointerException at com.sun.jndi.ldap.Connection.run(Connection.java:52

    We are using the Sun jndi 1.2.1 files from a Java client to
    access the IBM SecureWay Directory 3.2 server. Our test case is
    retrieving entries using the ctx.getAttributes (String, String[])
    method. Occasionally we are receiving the following error.
    java.lang.NullPointerException
    at com.sun.jndi.ldap.Connection.run(Connection.java:525)
    at java.lang.Thread.run(Thread.java:481)
    The java.lang.NullPointerException is coming from the Sun JNDI file.
    Our program is not catching this exception.
    Has anyone seen this problem before and have any ideas on how this can be resolved?

    Download and use LDAP 1.2.3 or JDK 1.3.1.
    The problem should go away.

  • How to connect Java and Microsoft SQL Server 2000

    hi,
    could anyone please teach me how to connect Java and SQL Sever 2000?? if possible could you guys provide me with an example??? i could hardly find any relevant resources about it...
    Thanks ~!

    thanks for the information...
    by the way hv any working module on it?? i'm new to
    both Java and Microsoft SQL Server... Thanks againFirst things first... you should read this:
    http://java.sun.com/docs/books/tutorial/jdbc/
    This is microsofts official JDBC Driver: http://www.microsoft.com/sql/downloads/jdbcregister.asp
    Install it and the documentation has some usage examples

  • An error occured when connecting java with Ms Access

    Hello Everybody
    I am a new developer in java and want to connect java with Microsoft Access
    i am using JCreator LE
    My code is to insert 3 records for 3 members and then save them in DB and retrieve the information
    Here is the code
    import java.sql.*;
    public class Project3 {
        public static void main(String[] args) {
             try {
                  System.out.println("Beginning Connection");
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                String accessFileName = "Information";
                String connURL = "jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ="+accessFileName+".mdb;PWD=";
                Connection con = DriverManager.getConnection( connURL ,"","");
                Statement stmt = con.createStatement();
                System.out.println("Connection done successfully");
                stmt.execute("Create table Member(Name String,ID Integer)");
                stmt.execute("insert into Member values ('Joe','1234')");
                stmt.execute(" select * from Member");
                ResultSet rs=stmt.getResultSet();
                if (rs != null)
                     while (rs.next()){
                          System.out.println("Name: "+rs.getString("Name")+ "ID: " + rs.getString("ID"));
                stmt.close();
                con.close();
                catch (Exception e) {
                System.out.println("An error Occurred in Connecting with the DB " );
    }and the error is
    Beginning Connection
    Connection done successfully
    An error Occurred in Connecting with the DB
    it didn't insert information in the DB

    Well, thank u i have traced the error and fx it
    but
    how to modify the code and keep the user entering 3 values and search for the entered values??
    Here is the correct code
    import java.sql.*;
    public class Project3 {
        public static void main(String[] args) {
             try {
                  System.out.println("Beginning Connection");
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                String accessFileName = "jdbc:odbc:Project";
                String connURL = "jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ="+accessFileName+".mdb;PWD=";
                Connection con = DriverManager.getConnection( accessFileName);
                Statement stmt = con.createStatement();
                System.out.println("Connection done successfully");
                stmt.execute("Create table Member(Name String,ID Integer)");
                stmt.execute("insert into Member values ('Joe','1234')");
                stmt.execute(" select * from Member");
                ResultSet rs=stmt.getResultSet();
                if (rs != null)
                     while (rs.next()){
                          System.out.println("Name: "+rs.getString("Name")+ "ID: " + rs.getString("ID"));
                stmt.close();
                con.close();
                catch (Exception err) {err.printStackTrace();}
    }

  • Solaris specific cmake files missing in XMP toolkit

    XMP_Config.cmake references Solaris specific files:
            execute_process(COMMAND "uname" OUTPUT_VARIABLE OSNAME)
            string(TOUPPER "${OSNAME}" OSNAME)
            if ( ${OSNAME} MATCHES SUNOS)
                execute_process(COMMAND "uname" "-p" OUTPUT_VARIABLE PLATFORM_SUNOS_ARCH)
                string(TOUPPER "${PLATFORM_SUNOS_ARCH}" PLATFORM_SUNOS_ARCH)
                if ( ${PLATFORM_SUNOS_ARCH} MATCHES SPARC)
             include(${XMP_ROOT}/build/XMP_sunos_sparc.cmake)
                else()
             include(${XMP_ROOT}/build/XMP_sunos_intel.cmake)
                endif()
            else()
         include(${XMP_ROOT}/build/XMP_Linux.cmake)
            endif()
    However, these files do not exist in the build directory (or anywhere in the package).
    I am trying to get this compiled on Solaris, so this is causing me grief.
    Where can I get these files?

    Hi Bejhan,
        XMP SDK is not supported on Solaris platform. In past we provided support for Solaris and by mistake this code was left in SDK. I can help you to build the xmptoolkit for Solaris but you have to do some more work on your side to get it done. Again, you may face crashes on SPARC Solaris due to endian (big & little).
       Please follow the following steps in order to build it on Solaris
      1. Go to the build/shared directory
      2. Create a copy SharedConfig_Linux.cmake and name it SharedConfig_sunos_sparc.cmake OR SharedConfig_sunos_intel.cmake depends whether you are using SPARC or intel processor.
      3. Make some changes in newly created cmake files
         a. set XMP_PLATFORM_FOLDER to intelsolaris<_x64> or sparcsolaris<_x64> (depending upon 32/64 bit machine. for 64-bit machine add _x64 suffix)
         b. Set XMP_GCC_PATH=<gcc path>
         c. Set XMP_GCC_LIBPATH=<gcc libpath>
    4. Make a copy of ToolchainRelEng.cmake to ToolchainRelEng_sunos_<intel/sparc>.cmake and fix the gcc path's
    Hope this will help you.
    -Sunil

  • Unable to connect java to mysql

    I have installed mysql on my linux machine (i didnt modify any default configuration settings, just using the default settings). And in my lan, from another machine in windows from my java code i am trying to connect to mysql of linux, but donno why i get connection refused error. Can someone help me to figure what the steps i am missing or need to do?

    Thanks for your reply. I do not have any network managers. I have installed mysql on my linux machine and also started mysql. Now in remote machine i have downloaded mysql-connector-java-5.0.4-bin.jar file and using this jar file my java code is trying open a connection to mysql.
              try {
                   Class.forName("com.mysql.jdbc.Driver");
              }catch(Exception ce) {ce.printStackTrace();}
              try {
                   Connection conn = DriverManager.getConnection("jdbc:mysql://192.168.20.160:3306/mysql","root","new_password");192.168.20.160 is the linux machine where mysql is running.
    But of no use, i get connection refused error. following is stacktrace
    SQLException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection refused: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection refused: connect
         at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
         at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
         at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
         at java.sql.DriverManager.getConnection(DriverManager.java:525)
         at java.sql.DriverManager.getConnection(DriverManager.java:171)
         at TestDriver.main(TestDriver.java:11)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 63 ms ago.
    SQLState: 08S01
    VendorError: 0

Maybe you are looking for

  • Help usb capture decives that work with FME ?

    I have tried both the Dazzle dvd 100 and the pinnacle PCTV HD pro stick and neither of them work properly, mostly give video but no audio. has anyone tested and got a usb capture device working with media encoder? if so what device and how

  • DMS Config Document

    Hi Friends, I would like to have DMS Config Document / Process Flow documents etc. , can anybody send the same to my following email id or give me link Points will be rewarded Rgds, Vikas

  • Regarding AUTOCAD interface

    Hello Frds, I'm working for a real estate project where i have excel sheet data of AUTOCAD and i need to convert that in to SAP/ABAP with an interface. How i can do it. PLZ help me with the tips THANKS in advance.

  • Why is IMAQ USB Snap.vi constantly giving out a 32-bit image?

    Hi. I'm using some USB cameras (uEye) with Direct Show. I use the IMAQ USB camera tools (with Labview 7.1, Vision 7.1.1) as in the examples. In particular I'm working in the snap mode. I create an U8 image (IMAQ Create) which I use as input to IMAQ U

  • Shipping Points

    Hi, I have around 240 shipping points where i need to assign MANUALLY only factory calender ZB and move to Quality. Is there any other way we can upload the calender to all these ship points at one step,like LSMW or MASS? if so, please let me know th