Cannot read multiple resultsets from transaction datasource

I get a SQL exception "This object was closed() and cannot be used anymore."
when I try to access the first row of the second result set from a stored procedure.
This occurs when the code is running within an EJB using a transaction-capable
datasource hooked to a connection pool that uses the MSSQLSERVERv7 JDriver
to talk to SQL Server 7.0.
I noted that the resultset class used is weblogic.jdbc20.rmi.SerialResultSet.
The error occurs during the resultSet.next() call even though the resultset is
not null and getUpdateCount() returns -1.
However, the same code works correctly when run in a simple main() procedure from
the DOS command line, connecting directly to the database using only the classes
supplied with the JDriver product. The resultset class used in this case is
weblogic.jdbc.mssqlserver4.TdsResultSet.
The stored procedure is very simple, it just has two lines: SELECT 'Hello' and
SELECT 'World'. The Java code follows.
<PRE>
// ... code to get the connection ...
CallableStatement callableStatement = connection.prepareCall("{CALL spTest}");
callableStatement.execute();
ResultSet resultSet = callableStatement.getResultSet();
if ((resultSet != null) && resultSet.next())
System.out.println("Row from first result set:" + resultSet.getString(1));
callableStatement.getMoreResults();
resultSet = callableStatement.getResultSet();
if ((resultSet != null) && resultSet.next()) // this call to next() throws the
exception
System.out.println("Row from second result set:" + resultSet.getString(1));
resultSet.close();
callableStatement.close();
connection.close();
</PRE>
I am running WL5.10sp11 with mssqlserver4v70sp11 on NT4.0sp6a and JDK1.3.0_02
(HotSpot Client VM).
Regards,
Tom B.

Tom Bechtold wrote:
>
Joe,
Here is the debug messages and trace with your diagnostic jar.
I hope this helps - Tom
we got Hello
java.sql.SQLException: java.lang.Exception: ResultSet originally closed at:
at weblogic.jdbcbase.mssqlserver4.TdsResultSet.close(TdsResultSet.java,
Compiled Code)
at java.lang.Exception.<init>(Unknown Source)
at weblogic.jdbcbase.mssqlserver4.TdsResultSet.close(TdsResultSet.java,
Compiled Code)
at weblogic.jdbcbase.jts.ResultSet.close(ResultSet.java:260)
at weblogic.jdbc20.rmi.internal.ResultSetImpl.close(ResultSetImpl.java:53)
at weblogic.jdbc20.rmi.SerialResultSet.close(SerialResultSet.java:54)
... rest of EJB call stack ...Hi. I do want to see the whole stack trace please, and also the EJB code.
thanks,
Joe
>
Joseph Weinstein <[email protected]> wrote:
Tom Bechtold wrote:
Hi Joe,
I pasted your sample program into my bean and ran it under
WL510sp11 and JDriver 5.1.0sp11, and it did exhibit the error
as my code did.
But it runs fine under WL510sp10 with JDriver 5.1.0sp11.
Thanks for your great support,
TomYou're very welcome. Please take the attached jar file, and add it
at the front of the server's weblogic.classpath, by editting the
startWebLogic script, and let me know what happens. This jar contains
the ResultSet class, with a hack to remember where it was closed, and
print that out if/when it is closed a second time.
Joe
Joseph Weinstein <[email protected]> wrote:
Tom Bechtold wrote:
A follow-on note: when I back out to Service Pack 10, the problem
is
not there,
so it seems that it is an issue with Service Pack 11.
- Tom Bechtold
"Tom Bechtold" <[email protected]> wrote:
I get a SQL exception "This object was closed() and cannot be used
anymore."
when I try to access the first row of the second result set from
a
stored
procedure.
This occurs when the code is running within an EJB using a transaction-capable
datasource hooked to a connection pool that uses the MSSQLSERVERv7JDriver
to talk to SQL Server 7.0.
I noted that the resultset class used is weblogic.jdbc20.rmi.SerialResultSet.
The error occurs during the resultSet.next() call even though theresultset
is not null and getUpdateCount() returns -1.Hi. You say that getUpdateCount() returns -1. I don't see that inthe
code you sent,
so you probably just gave us a representative sample of the code you
run. I did
runs uch code with the driver alone, and it works as you say. I will
see if I can
set up a server to do this via a DataSource, but in case anyone wants
to help/race with
me :-), here's simple code to run. If you convert it to a DataSource
connection,
and it behaves differently, I'll send you a diagnostic class to seewhat's
up...
Joe
Connection connection = null;
try
Properties properties = new Properties();
properties.put("user", "sa");
properties.put("password", "");
Driver d = (Driver)Class.forName("weblogic.jdbc.mssqlserver4.Driver").newInstance();
connection = d.connect("jdbc:weblogic:mssqlserver4:JOE:1433",
properties);
// or get connection from DataSource...
Statement statement = connection.createStatement();
try {
statement.execute("drop procedure bla");
} catch (Exception e){}
statement.execute("create procedure bla as select 'Hello
' select 'world'");
CallableStatement c = connection.prepareCall("{ call bla()
c.execute();
ResultSet resultset = c.getResultSet();
while(resultset.next())
System.out.println("we got " + resultset.getString(1));
resultset.close();
c.getMoreResults();
resultset = c.getResultSet();
while(resultset.next())
System.out.println("we got " + resultset.getString(1));
resultset.close();
catch(SQLException exception1)
exception1.printStackTrace();
finally
try { connection.close();} catch(Exception ex) {}
However, the same code works correctly when run in a simple main()procedure
from the DOS command line, connecting directly to the database
using
only
the classes supplied with the JDriver product. The resultset classused in this
case
is weblogic.jdbc.mssqlserver4.TdsResultSet.
The stored procedure is very simple, it just has two lines: SELECT
'Hello'
and SELECT 'World'. The Java code follows.
// ... code to get the connection ...
CallableStatement callableStatement = connection.prepareCall("{CALLspTest}");
callableStatement.execute();
ResultSet resultSet = callableStatement.getResultSet();
if ((resultSet != null) && resultSet.next())
System.out.println("Row from first result set:" + resultSet.getString(1));
callableStatement.getMoreResults();
resultSet = callableStatement.getResultSet();
if ((resultSet != null) && resultSet.next()) // this call to next()throws the
exception
System.out.println("Row from second result set:" + resultSet.getString(1));
resultSet.close();
callableStatement.close();
connection.close();
I am running WL5.10sp11 with mssqlserver4v70sp11 on NT4.0sp6a and
JDK1.3.0_02
(HotSpot Client VM).
Regards,
Tom B.--
B.E.A. is now hiring! (12/14/01) If interested send a resume to [email protected]
DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco,
CA
E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
SOFTWARE ENGINEER (DBA) Liberty Corner,
NJ
SENIOR WEB DEVELOPER San Jose,CA
SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTHCAROLINA
San Jose, CA
SR. PRODUCT MANAGER Bellevue,WA
SR. WEB DESIGNER San Jose,CA
Channel Marketing Manager - EMEA Region London, GBR
DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose,CA
SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose,CA
E-COMMERCE INTEGRATION ARCHITECT San Jose,CA
QUALITY ASSURANCE ENGINEER Redmond, WA
Services Development Manager (Business Development Manager - Services)
Paris, FRA; Munich, DEU
SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
E-Marketing Programs Specialist EMEA London, GBR
BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose,CA
MANAGER, E-SALES Plano, TX--
B.E.A. is now hiring! (12/14/01) If interested send a resume to [email protected]
DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco,
CA
E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
SOFTWARE ENGINEER (DBA) Liberty Corner,
NJ
SENIOR WEB DEVELOPER San Jose, CA
SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTH CAROLINA
San Jose, CA
SR. PRODUCT MANAGER Bellevue, WA
SR. WEB DESIGNER San Jose, CA
Channel Marketing Manager - EMEA Region London, GBR
DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
QUALITY ASSURANCE ENGINEER Redmond, WA
Services Development Manager (Business Development Manager - Services)
Paris, FRA; Munich, DEU
SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
E-Marketing Programs Specialist EMEA London, GBR
BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
MANAGER, E-SALES Plano, TX
B.E.A. is now hiring! (12/14/01) If interested send a resume to [email protected]
DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco, CA
E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
SOFTWARE ENGINEER (DBA) Liberty Corner, NJ
SENIOR WEB DEVELOPER San Jose, CA
SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTH CAROLINA San Jose, CA
SR. PRODUCT MANAGER Bellevue, WA
SR. WEB DESIGNER San Jose, CA
Channel Marketing Manager - EMEA Region London, GBR
DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
QUALITY ASSURANCE ENGINEER Redmond, WA
Services Development Manager (Business Development Manager - Services) Paris, FRA; Munich, DEU
SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
E-Marketing Programs Specialist EMEA London, GBR
BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
MANAGER, E-SALES Plano, TX

Similar Messages

  • Message Driven Bean reading multiple times from a jms queue

    Hi,
    I am facing a strange problem with my message driven bean. Its configured to read message from a jms queue. But sometimes it read the same message multiple times from the jms queue.
    We are using weblogic server 8.1 sp5.
    Please find below our descriptor files
    ejb-jar.xml  
    <ejb-jar>  
      <display-name>ClarifyCRM_Process_Manager_13.1</display-name>  
      <enterprise-beans>  
        <session>  
          <display-name>ProcessManager</display-name>  
          <ejb-name>ProcessManager</ejb-name>  
          <home>com.clarify.procmgr.ejb.ProcessManagerHome</home>  
          <remote>com.clarify.procmgr.ejb.ProcessManagerRemote</remote>  
          <ejb-class>com.clarify.procmgr.ejb.ProcessManagerEJB</ejb-class>  
          <session-type>Stateless</session-type>  
          <transaction-type>Container</transaction-type>  
        </session>  
        <message-driven>  
          <display-name>ProcessManagerListener</display-name>  
          <ejb-name>ProcessManagerListener</ejb-name>  
          <ejb-class>com.clarify.procmgr.ejb.ProcessManagerMDB</ejb-class>  
          <transaction-type>Bean</transaction-type>  
          <acknowledge-mode>Auto-acknowledge</acknowledge-mode>  
          <message-driven-destination>  
            <destination-type>javax.jms.Queue</destination-type>  
          </message-driven-destination>  
        </message-driven>  
      </enterprise-beans>  
      <assembly-descriptor>  
        <container-transaction>  
          <method>  
            <ejb-name>ProcessManager</ejb-name>  
            <method-name>*</method-name>  
          </method>  
          <trans-attribute>Required</trans-attribute>  
        </container-transaction>  
      </assembly-descriptor>  
    </ejb-jar>  
    weblogic-ejb-jar.xml  
    <weblogic-ejb-jar>  
      <weblogic-enterprise-bean>  
        <ejb-name>ProcessManager</ejb-name>  
        <stateless-session-descriptor>  
          <pool>  
            <max-beans-in-free-pool>100</max-beans-in-free-pool>  
            <initial-beans-in-free-pool>10</initial-beans-in-free-pool>  
          </pool>  
        </stateless-session-descriptor>  
        <enable-call-by-reference>False</enable-call-by-reference>  
        <jndi-name>ProcessManagerHome</jndi-name>  
        <dispatch-policy>PMExecuteQueue</dispatch-policy>  
        <remote-client-timeout>0</remote-client-timeout>  
      </weblogic-enterprise-bean>  
      <weblogic-enterprise-bean>  
        <ejb-name>ProcessManagerListener</ejb-name>  
        <message-driven-descriptor>  
          <pool>  
            <max-beans-in-free-pool>100</max-beans-in-free-pool>  
            <initial-beans-in-free-pool>10</initial-beans-in-free-pool>  
          </pool>  
          <destination-jndi-name>clarify.procmgr.jms.queue.Execution</destination-jndi-name>  
          <connection-factory-jndi-name>clarify.procmgr.jms.factories.ExecConnection</connection-factory-jndi-name>  
        </message-driven-descriptor>  
        <enable-call-by-reference>True</enable-call-by-reference>  
        <dispatch-policy>PMListenerExecuteQueue</dispatch-policy>  
        <remote-client-timeout>0</remote-client-timeout>  
      </weblogic-enterprise-bean>  
    </weblogic-ejb-jar>   The MDB is sometimes reading multiple times from clarify.procmgr.jms.queue.Execution
    Also i would like to add here that the connection factory we are using clarify.procmgr.jms.factories.ExecConnection is having the following properties
    ServerAffinity Enabled=true
    XA connection factory enabled=false.
    Please help me out here!!

    Maybe, your MDB "sometimes" throws an Exception in onMessage.
    Check if this happens when you set <max-beans-in-free-pool>1</max-beans-in-free-pool>.

  • Hello MacBook Pro Musicians- I cannot read sheet music from the ipad. It is too small. I want to connect a large monitor, hopefully wirelessly to my 13 inch macbook pro. what would I need to connect ? Any suggestions on how to keep monitor from falling?

    Hello Macbook Pro Musicians--I cannot read sheet music from my 13" macbook or from an IPad. The print is too small for these aging eyes! So I need to get a large monitor to attach to the Macbook.  I want the monitor to be connected wirelessly or using a blue tooth.  This will eliminate alot of potential mishaps
    when playing out.  Also I am having a time figuring out how I am going to safely keep the monitor on somekind of music stand without falling!!!  Can anyone help me with this?

    Hi Julius,
    As you can see in my profile section, my MBP is older by 5 years, 2GB RAM and with regards to question 1 (Q1), has no problems with having all those programs open at the same time with the possible exception of Photoshop since I use Gimp instead. With twice the RAM and much overall much better specs, Photoshop shouldn't be an issue. But you listed some other activities that might need that additional RAM. But the advise most give is to not get it from Apple but from a third party.
    Q5 - I always get Apple Care. Only had to use it once but it paid for itself that one time.
    Sorry, can't help you much with the questions you really want answered since I won't have a new MBP until (hopefully) next week but for Q4, I believe it depends on the peripheral. My current monitors are too old to allow them to be hooked up in a chain. Supposedly, if the monitors do have the ports, you could via the MBP Thunderbolt port. The speeds are also dependent upon the peripheral. If the external hard drive is using a USB 2 port, you are limited by that speed (480 Mb/s). If it has a Thunderbolt port, then from what I understand, we, my friend, are in for some great times because I believe your RAM will have the ability to access data as fast as it can take it at 10Gb/s (and if will need those kinds of speeds, the 8GB of RAM may be the way to go). The Thunderbolt demos on YouTube where they are accessing four video files from a Raid drive, then sending them back out via Final Cut Pro to a monitor are amazing. I'll probably never push this machine to anywhere near it's limits but I can't wait to see what others do.
    Peace,
    Jeremiah

  • Subprocess 33 was not successful. Master cannot read return value from S 33

    Hi All,
    We are on BI 7.0 SP 19.
    We have submitted a planning sequence in the background with automatic packaging.
    The planning sequence has two steps:
    Step 1. Z_PLNG_FUNCTION1
    Step 2. Z_PLNG_FUNCTION2
    As per automatic packaging, the system chose 0ACCOUNT for packaging.
    When submitted, each step has been submitted to 30 packages as 30 subprocesses.
    For Step 1, the log shows that All subprocesses  executed.
    For Step 2, the log shows that the subprocess 33 and 58 failed, which means subprocess #3, and # 28 for the step 2 as the subprocess is numbered in the log in combination with step 1.
    The messages in the log for the failed subprocesses are as follows:
    @5C\QError@     Subprocess 33 was not successful
    @5C\QError@     Master cannot read return value from subprocess 33
    @5C\QError@     Subprocess 58 was not successful
    @5C\QError@     Master cannot read return value from subprocess 58
    Our question is on how to find the exact cause of the subprocess failure.
    I tried to look for the details on the error messages, they have been not helpful.
    What is meant by 'Master cannot read return value from subprocess' and how to get the exact cause of the failure?
    Thanks in advance,
    Best Regards,
    - Shashi

    Shashi,
    implement the following notes and check again:1368659, 1525723, 1532061.
    Regards,
    Marc
    SAP Techology RIG

  • How to read multiple documents from a system directory?

    Hi,
    I'm trying to read multiple documents from a specific folder that contains pdfs, jpgs... the only activity I found is the Read Document, but this activity does not have the option to read all docs under my folder!.
    so any one can tell me if there is another activity can do it or is there any good solution to loop on the folder and read all the docs? any script will be helpful.
    Thanks
    Hussam

    Hi,
    After many hours of searching and readings, I found a solution, I do not know if it is the best, but  anyhow this is my solution:
    By using a service operation called "Find" from a service named "FileUtilsService", this operation will return a list of strings with the names of all files and/or directories under the path you want.
    Then by using the "Read Document"  I was able to get one file and store it in a dcoumnet variable, and by using a simple looping technique I got all  the files I want.
    hope this will help others
    Hussam

  • I cannot see existing DTP from RSA1 / Datasources.

    I cannot see existing DTP from RSA1 / Datasources menu.  I can only see the master data (text,attr,hier) loads.    To get to the DTP I must search under InfoProvider but that doesn't show everything that is in the system.  What role or security assignment do you think I am missing. My co-workers have the same SAP roles and can see the DTPs. Help! I need this info so I can guide Tech Support. Thanks for all your help in advance.

    Hi,
    You can find out your DTP in infoprovider tree as well.
    For that go to the data target for which this DTP is created.
    In case of master data onfo objects locate that info object in infoprovider tree.
    Drill it down then you can see its hierarchies, Attributes and Text as child nodes
    Drill down any of these to see transformations or transfer rules.
    Agan drill down the transformation to see the DTP.
    Note: There is no such security restriction by which you can not even see the DTP in RSA1 tree.
    - Geetanjali

  • FTP Adapter to read multiple files from a directory. Not through polling.

    Dear Friends,
    I would like to know is it possible to configure the FTP adapter in Oracle BPEL 10.1.3.4 to read multiple files (different names, same structure) from a given directory. I do not want the BPEL to do a polling. Instead when I submit the BPEL process it should read all files from the directory.
    I was looking at the option of Synchronous read but I am not able to specify wild card in the file name field. I do not know the file names at the time of reading.
    Thanks for your help!

    Hi,
    While you read the file, you can configure an adapter property in 'Receive'. This will store the filename, this filename can be used for sync read as the input parameter.
    1. Create a message type variable called 'fileheader'. This should be of type Inboundheader_msg (whatever relevant Receive activity).
    2. This variable will contain three parts - filename, FTPhost, FTPPort
    3. Copy this fileheader to 'Syncheader'.
    4. syncheader can be passed as an adapter proerty during sync read of the file.
    During Receive and Invoke, you need to navigate to 'Adapter' tab to choose the created message type variable.
    Let me know if you have further questions.
    regards,
    Rev

  • Multiple combobox from one datasource

    Hi all
    i have 5 combobox that all have data from one table but different values.
    sample for one combobox
    Private Sub ucitajobveznikpdv()
            Dim tabsyskonta = True
            Dim dt As New DataTable
            Dim ds As New DataSet
            ds.Tables.Add(dt)
            SQL.DodajParametre("@tabsyskonta", tabsyskonta)
            SQL.ParamQuery("SELECT Parametar + ' - ' + Naziv AS Opis, Parametar  FROM TabParamSys WHERE Tab_Partneri_PDV=@tabsyskonta ORDER BY Parametar")
            If SQL.SQLDS.Tables.Count > 0 Then
                cbPDVObveznik.DataSource = SQL.SQLDS.Tables(0)
                cbPDVObveznik.ValueMember = "Parametar"
                cbPDVObveznik.DisplayMember = "Opis"
                cbPDVObveznik.SelectedIndex = -1
                SQL.SQLDA.Fill(dt)
                Dim r As DataRow
                cbPDVObveznik.AutoCompleteCustomSource.Clear()
                For Each r In dt.Rows
                    cbPDVObveznik.AutoCompleteCustomSource.Add(r.Item("Opis").ToString)
                Next
            End If
        End Sub
    second sample
      Private Sub ucitajinopartner()
            Dim tabsyskonta = True
            Dim dt As New DataTable
            Dim ds As New DataSet
            ds.Tables.Add(dt)
            SQL.DodajParametre("@tabsyskonta", tabsyskonta)
            SQL.ParamQuery("SELECT Parametar + ' - ' + Naziv AS Opis, Parametar  FROM TabParamSys WHERE Tab_Partneri_InoPart=@tabsyskonta ORDER BY Parametar")
            If SQL.SQLDS.Tables.Count > 0 Then
                cbInoPartner.DataSource = SQL.SQLDS.Tables(0)
                cbInoPartner.ValueMember = "Parametar"
                cbInoPartner.DisplayMember = "Opis"
                cbInoPartner.SelectedIndex = -1
                SQL.SQLDA.Fill(dt)
                Dim r As DataRow
                cbInoPartner.AutoCompleteCustomSource.Clear()
                For Each r In dt.Rows
                    cbInoPartner.AutoCompleteCustomSource.Add(r.Item("Opis").ToString)
                Next
            End If
        End Sub
     and so on
    is it possible to select all data in one query and read for specific column condition and fill combobox with that data
    hope you can understand 
    sorry for my bad english 
    thanks

    Just connect to database and use a reader object, then in the loop you can decide what you want to add to each combobox. This way you  have full control on what you want to do:
    Dim query
    As
    String =
    "SELECT * FROM table WHERE company=" & company &
    " AND type=0"
    Try
    Using cn
    As
    New
    OdbcConnection(invoiceDataSourceString)
    'Connect to correct database server
    cn.Open()
    Using cmd
    As
    New
    OdbcCommand(query, cn)
    Dim reader
    As
    OdbcDataReader
    reader = cmd.ExecuteReader
    Do
    While reader.Read
    'Set vars from database
    count = reader("count")
    Loop
    reader.Close()
    End
    Using
    cn.Close()
    cn.Dispose()
    End
    Using
    Catch e
    As
    OdbcException
    dbaseError(e, invoiceDataSourceString, query)
    Catch ex
    As
    Exception
    If debug
    Then MsgBox(ex.Message)
    End
    Try

  • Hello experts, I cannot see existing DTP from RSA1 / Datasources.

    I cannot see existing DTP only the loads from RSA1 / Datasources.  I can see some of the DTP when I search under InfoProvider but I need to see everything.  What role or security assignment do you think I am missing.  My co-worker have the same SAP roles and can see the DTPs.  Help!  I need this info so I can guide Tech Support.  Thanks for all your help in advance.

    Hi,
    Welcome to the forum. This is not the forum for you. It is for SAP Business One users only.
    Please close your thread. You may check this: /message/9665646#9665646 [original link is broken] and post your question there.
    Thanks,
    Gordon

  • Cannot read the output from windows command.

    Hello
    I have the following classes
    package cmd;
    import java.io.IOException;
    public class CMD {
        public CMD(){
            ProcessBuilder pb = new ProcessBuilder()
            .command("cmd.exe","/c","del *.*")
            .redirectErrorStream(false);
            Process p;
            try {
                p = pb.start();
                StreamGobbler errorGobbler = new StreamGobbler(p.getErrorStream(), "ERROR");
                // any output?
                StreamGobbler outputGobbler = new StreamGobbler(p.getInputStream(), "OUTPUT");
                // start gobblers
                outputGobbler.start();
                errorGobbler.start();
            } catch (IOException e) {
                // TODO Auto-generated catch block
            System.out.println("eee "+e.getMessage());;
        public static void main(String[] args) {
            System.out.println("x");
            new CMD();
            System.out.println("x");
    and
    package cmd;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    public class StreamGobbler extends Thread {
        InputStream is;
        String type;
        StreamGobbler(InputStream is, String type) {
            this.is = is;
            this.type = type;
        @Override
        public void run() {
            try {
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line = null;
                while ((line = br.readLine()) != null)
                    System.out.println(type + "> " + line);
            catch (IOException ioe) {
                ioe.printStackTrace();
    Please note that I cannot seee the output from wndows command : del *.* and the java class execution does not finished.
    I I will replace the above command with the dir command then the output of the command is visible.
    Would you give me a hint about how to modify the above clases in order to parse the output of the del *.* ?
    Please note that the above example is important because I am developping a tool and it is mandatory for that tool to parse the output from a windows batch command.
    Best regards,

    Please note that I cannot seee the output from wndows command : del *.* and the java class execution does not finished.
    I I will replace the above command with the dir command then the output of the command is visible.
    Would you give me a hint about how to modify the above clases in order to parse the output of the del *.* ?
    No - but I will give you a hint about ProcessBuilder and how to develop software properly.
    Hint #1: Don't try to automate something that you don't know, or understand, how to do manually.
    a. Do you know how to execute 'del *.*' manually in a command window?
    b. Did you try that manually to see what happens?
    My guess is 'no'. If you had you would know that the response to a 'del *.*' command is going to be this:
    Are you sure (Y/N)?
    And your 'java class execution' doesn't finish because the 'del' command is waiting for you to answer that question.
    Hint #2: Don't try to use ProcessBuilder for an application that requires console input unless you first know how to provide that console input via your Java code.
    Your code will wait forever since it does NOT answer that question.
    Search the net and The Java Tutorials and  you can find examples of executing command line utilities. Then try those examples first and make sure that:
    1. They work for you
    2. You understand HOW they work
    Then you can modify those examples to do what you want to do.

  • Cannot read backup file from PC on Mac

    I am trying to move my Photoshop Elements 9 catalog from my PC to my Mac.
    I have backed up the catalog to an external HDD but when I connect it to the Mac I can see the folder but I cannot open it. The backup is big, over 200GB, could this be the problem? I have several other backups on the same HDD but the MAC cannot read any of them.
    I can open the folders without any problem on a PC.
    I took the HDD to a Mac "Genius Bar" and they could not open the folders on their Mac either and had no idea what could be causing the problem.
    I had no problem migrating to the Mac about a year ago when I first got it, but I suppose the backup would have been smaller then.
    Has anybody got any idea what the problem could be

    In the Backup folder, there is a Backup.tly file which needs to be specifically seleted while restoring the backup. So while you go for File >Restore catalog > try to choose All files from the format dropdown to see this tly file.
    Thanks
    Andaleeb

  • I cannot read a video from icloud

    Hi,
    I use ICLOUD with an IPAD, IPHONE and a PC WINDOWS
    I cannot read video (built with IPHONE) from ICLOUD, I see the video file with my IPAD or with my IPHONE but when I click on it, the video does not start.(it is always in a loading phase); I have not this problem when I read this video with ma windows PC that I connect on ICLOUD;
    could you help me
    THANKS
    Michel

    Can you please tell what the error message says?

  • How to read multiple voltages from DAQ at same time?

      Hello all,
      I am attempting to read multiple voltage inputs to my USB-6008 DAQ but when I try to read a second voltage, I get an error saying "Erorr 50103 the resource is reserved." Someone in another thread said:
    "The reserved resource is your DAQ board. You should not be using two separate simultaneous tasks for the same DAQ board. You should use a single task with two channels configured."
    So I made multiple channels in one task, but I don't want to read all the channels at once. Is there a way to specify which channel of the task to read? Or is it not possible to acquire multiple voltages from the DAQ at all?
    So the question boils down to: if you have 3 different voltage inputs into your DAQ, all corresponding to different components, is there a way to be tracking and reading all of them at the same time?
    Thanks a lot

    shahidi124 wrote:
      Hello all,
      I am attempting to read multiple voltage inputs to my USB-6008 DAQ but when I try to read a second voltage, I get an error saying "Erorr 50103 the resource is reserved." Someone in another thread said:
    "The reserved resource is your DAQ board. You should not be using two separate simultaneous tasks for the same DAQ board. You should use a single task with two channels configured."
    So I made multiple channels in one task, but I don't want to read all the channels at once. Is there a way to specify which channel of the task to read? Or is it not possible to acquire multiple voltages from the DAQ at all?
    So the question boils down to: if you have 3 different voltage inputs into your DAQ, all corresponding to different components, is there a way to be tracking and reading all of them at the same time?
    Thanks a lot
    I don't understand your question.  You made a task to read all the channels at once, but you do not want to read all the channels at once?  And you want to track and read all the channels at the same time?
    You need to explain it a little bit better and add some code of what you have done so far.  A task will read all the channels in the task and give you the results so you can track them.  So I am confused.

  • Data loads into multiple InfoObjects from 0EHS_PHRASE_TEXT DataSource.

    Dear Experts,
    I am working on SAP HCM-BW 7.0 Implementation and am trying to load data into 8 different InfoObjects (Texts) through 0EHS_PHRASE_TEXT (Phrases) extractor.
    There are many InfoPackages in place created during the previous project loading into different set of Standard BCT InfoObjects.
    After migrating the 0EHS_PHRASE_TEXT DataSource from 3.x to 7.0 version, I have created different InfoObjects with Transformations and DTPs upon business requirements to load them. The relevant data is available in 0EHS_PHRASE_TEXT when checked in Extractor Checker (RSA3). However, when I create InfoPackages to load these different InfoObjects, I don't see the Data Targets listed and it makes sense since the data is first loaded into PSA and then will be loaded into Data Targets (in this case InfoObjects with Text) using DTPs.
    My concern is... when I create a Process Chain to load Master Data into these Objects, the following action is happening:
    1. Load 10 Records into PSA and then into InfoObject A. All 10 Records are loaded into A.
    2. Load 5 Records into PSA and then into InfoObject B. Previous 10 + New 5 Records are loaded into B.
    3. and it continues... for 8 InfoObjects.
    My question is... is there are way that I can see the corresponding Data Target tab in InfoPackages so the Data is immediately picked from PSA of 0EHS_PHRASE_TEXT DataSource and then loaded into the corresponding InfoObjects.
    Or should I make use of Transfer Rules by Re-storing the 0EHS_PHRASE_TEXT DataSource from 7.0 to 3.x version...!!
    Your help is much appreciated.
    Thanks,
    Chandu

    Hi Andreas
    Thanks for replying and sorry for the confusion.
    The extractor is delivering 10 and then 5 because of different selection parameters in the InfoPackage "selecting" which InfoObject I wish to load the texts for.
    Your understanding of my requirements is correct.
    Could you please elaborate Option 1 bit more..!
    Regarding your Option 2, I don't want the DTPs to extract directly in full from the datasource because by doing so, all the data apart from the relevant data is also loaded into each and every InfoObject. And I don't want that to happen. I want to load only relevant data into respective InfoObjects from the PSA using DTPs.
    I have tried to setup filters in DTPs with different Selection Parameters and tried to load relevant InfoObjects. For example, I am trying to load ZEHS_SUBS InfoObject with EHS_INJ_SUB_SUBSTANCE as the Selection Parameter. There are 54 records in both Source System and PSA for this parameter.
    And the request is showing 54 in Transferred Records but only the very last 1 in Added Records. When I check in the Target (ZEHS_SUBS) InfoObject, it is showing only 1 Record. I have tried many combinations. They are:
    1. Loaded only EHS_INJ_SUB_SUBSTANCE data from Source System into PSA and then tried to execute the relevant DTP.
    2. Checked the 'Do Not Extract from PSA but Access Data Source (for Small Amounts of Data) and tried it.
    3. Tried with both Delta and Full Extraction Mode.
    4. Set Filter on Single Value as 'EHS_INJ_SUB_SUBSTANCE' to extract this data only.
    5. Set Filter Excluding all the other Single Values.
    6. Checked the 'Handle Duplicate Record Keys'.
    Still only the last 1 records out of 54 is showing up in the Target InfoObject.
    Please let me know if you have any idea as to why this is happening so.
    Thanks for your time.
    Chandu

  • I cannot delete multiple entries from table

    Hi
    i am trying to delete multiple entries from table while keeping some data.
    for example I have the following table
    Plant                            Item
    US101                         777
    US101                         888
    US101                         999
    US101                         666
    I want to keep the  rows where the item is 777 and 888 for plant US101 and keep delete the rest data
    I wrote the following code
    Delete source_package where Plant = 'US101' and Item NE '777' or '888'.
    but all the rows get deleted.
    I tried deleting single row and it worked.
    Delete source_package where Plant = 'US101' and Item NE '777' .
    How can I delete multiple rows.
    thanks

    Hi Bhat Vaidya,
    Plz refer the following code.. IT will solve ur problem..
    REPORT  ZSDN_TEST.
    data: BEGIN OF it_data OCCURS 10,
            plant(4),
            item_num TYPE string,
          END OF it_data.
    data: str type string.
    data: it_final like it_data OCCURS 10 WITH HEADER LINE.
    it_data-plant = 'US01'. it_Data-item_num = 777.  append it_data.
    it_data-plant = 'US01'. it_Data-item_num = 888.  append it_data.
    it_data-plant = 'US01'. it_Data-item_num = 999.  append it_data.
    it_data-plant = 'US01'. it_Data-item_num = 666.  append it_data.
    delete it_data where plant = 'US01' and item_num ne 777 and item_num ne 888.
    LOOP AT it_data.
    write:it_data-plant,it_data-item_num.
    skip.
    ENDLOOP.
    Regards,
    Apoorv

Maybe you are looking for

  • Create a SUS purchase order locally in SRM

    Hi guys we run a SRM 5.0 with SUS installed. I tried to create a PO locally as Purchaser with transaction type "SUPO SUS Purchase Order". It now says that "transaction type SUPO must not be used for object type BUS2201". Does my error belong to (1) I

  • Thumbnails in timeline

    What happened to the thumbnails in my timeline. Oddly, I have the media, but the thumbnail says media offline?!?

  • AS3 Flash Chat(-IRC) Module

    Over the past I had create in AS2 a chat application, where after a registration the users could enter the application and talk together like an IRC application. Still it was very novice, as I used a mySQL database to keep the messages, and I was upd

  • Problems with Preconfigured MI Client

    Hello! I need to preconfigure a MI Client (MobileEngine.conf). I'm using MI 70 SP 12 Patch 2. I unpacked all the files from NWM_JSP_WIN32_uncomp.sda and the installation is working. but after installation the client won't start. When I'm using the se

  • 64 bits OS compatibility ?

    Hi, I´m running Photoshop CS3 Extended on a Quadcore with 4 giga of Ram. Windows XP is 64 (I think it´s a problem). I´m having a problem... Photoshop is very slow... very very slow when comparated to my old pc that was a XP 32 bits and 2 giga of ram.