\t problem with int

I have a question about the \t escape sequence. I am still learning but I can get it to work just fine in literal strings then when I try to use it with an int I keep getting illegal character \92. Here is what I am trying to do
class Display
public static void main(String args[])
int x = 5;
System.out.println("Number\tIts Double\tIts Triple");
System.out.println(x\t(x*2)\t(x*3);
x = x + 1;
System.out.println(x\t(x*2)\t(x*3);
So I am trying to a x, x's and x's triple to print but keep getting illegal character \92 coming up when I go to compile. Please help me figure this problem out as I have tried everything I can think of. Thanks for your help in advance

System.out.println(x\t(x*2)\t(x*3);WFT? \t only has meaning within a String!
try something like this
System.out.println("x\t(x*2)\t(x*3) = "+x+"\t("+(x*2)+")\t("+(x*3));

Similar Messages

  • Programming problems with INT / FLOAT

    I got a problem with datatypes float and int.
    I'm just developing a c-program on HP-UX with the gcc-compiler. 'cause i have not ever been done an ORACLE-access before, i has started with the "cdemo2.c" - example from the oracle-demo-dircetory in version 8.0.4.
    in the DB there's a column with NUMBER-TYPE, but when i call the oci-function (or what ever it is) "odescr()", the variable "scale" (which is supposed to differentiate between FLOAT_TYPE and INT_TYPE) always is set to "0". this variable should be set to anything else but "0" if a FLOAT_TYPE is detected, but it isn't.
    what I do wrong ???
    How can I know the exact datatype, when a NUMBER_TYPE in the DB appears ???
    if there is a better way to realize an oracle-access in C, please don't wait to tell it to me
    many thanks
    null

    You basically got it. Another approach is to always work on the rightmost digit; that way you'll always be dividing, mod'ing, or multiplying by 10.
    You don't need to know the length of anything to use a for loop. Remember that a for loop has 4 parts: the initialization, the conditional, the "update", and the body. (There are probably more correct names for these that I can't recall right now.) The conditional and the update tend to be length checks and increments only because for loops are commonly used over arrays or strings, but they don't have to be.
    Another hint: how do you know when you're done pulling the digits out of the source number? What is the value of the source number when you're done?

  • Quering Problem With Int

    my jsp file is :
    <jsp:useBean id="user" class="com.mycompany.DelData" scope="page"/>
    <HTML>
    <BODY>
    <b>
    Your Data Deleted<BR>
    <% user.del(); %>
    </BODY>
    </HTML> And the DelData.java file is:
    package com.mycompany;
    import java.sql.*;
    public class DelData {
    public void del() {
    try{
    Class.forName("oracle.jdbc.OracleDriver");
    Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@.......:o9ir2","user1", "user1");
    Statement stmt = conn.createStatement();
    PreparedStatement p_stmt = null;
    int num = 1010;
    p_stmt = conn.prepareStatement("delete from trainee where univ_reg = 1011");
    int rs = p_stmt.executeUpdate();
    p_stmt.close();
    conn.close();
    } catch (Exception e) {
    System.err.println("Got an exception! " + e);
    System.err.println(e.getMessage());
    } I am able to delete string value but not able to delete integer values
    also while quering if i use string as a condition it executing but not in the case of int.
    I had also try this with PreparedStatement But Same result.
    Help Me !!!
    Its working with string values but not with integer values

    int num = 1010;
    p_stmt = conn.prepareStatement("delete from trainee where univ_reg =?);
    p_stmt.setInt(1,num);
    int updateCount = p_stmt.executeUpdate();

  • Problem with String to Int conversion

    Dear Friends,
    Problem with String to Int conversion
    I am having a column where most of the values are numeric. Only 4 values are non numeric.
    I have replaces those non numeric values to numeric in order to maintain the data type.
    CASE Grade.Grade  WHEN 'E4' THEN '24'  WHEN 'E3' THEN '23'  WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade  END
    This comes the result as down
    Grade
    _0_
    _1_
    _10_
    _11_
    _12_
    _13_
    _14_
    _15_
    _16_
    _17_
    _18_
    _19_
    _2_
    _20_
    _21_
    _22_
    _23_
    _24_
    _3_
    _4_
    _5_
    _6_
    _7_
    _8_
    _9_
    Refresh
    Now I want to convert this value to numeric and do some calculation
    So I changed the formula as below
    cast (CASE Grade.Grade  WHEN 'E4' THEN '24'  WHEN 'E3' THEN '23'  WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade  END as INT)
    Now I get the following error
    View Display Error
    _     Odbc driver returned an error (SQLExecDirectW)._
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    _State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1722, message: ORA-01722: invalid number at OCI call OCIStmtFetch. [nQSError: 17012] Bulk fetch failed. (HY000)_
    SQL Issued: SELECT cast ( CASE Grade.Grade WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade END as Int) saw0 FROM "Human Capital - Manpower Costing" WHERE LENGTH(CASE Grade.Grade WHEN 'E1' THEN '20' WHEN 'E2' THEN '21' WHEN 'E3' THEN '22' WHEN 'E4' THEN '23' ELSE Grade.Grade END) > 0 ORDER BY saw_0_
    Refresh
    Could anybody help me
    Regards
    Mustafa
    Edited by: Musnet on Jun 29, 2010 5:42 AM
    Edited by: Musnet on Jun 29, 2010 6:48 AM

    Dear Kart,
    This give me another hint, Yes you are right. There was one row which returns neither blank nor any value.
    I have done the code like following and it works fine
    Thanks again for your support
    Regards
    Code: cast (CASE (CASE WHEN Length(Grade.Grade)=0 THEN '--' ELSE Grade.Grade END) WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' when '--' then '-1' ELSE Grade.Grade END as Int)

  • I have a problem when using Google Maps, at some point my computer blanks the window and says there's a problem with display drivers, and it has recovered,but it doesn't. Problem doesn't happen with Int Explorrer, so I do not believe it is the computer

    When using google maps through Firefox, after asking for a place which is not the general North America section which routinely comes up, the firefox screen goes white, with a narrow banner at the top. A message appears in the lower right corner which says something about display drivers having had a problem, but now have recovered. However the display doesn't recover and the banner message is that Firefox is not responding. When I go to restart Firefox if I go to the restore point, the page is still frozen out.
    I do not believe it is a problem with my computer because it doesn't happen if I use I.E. to go to google maps, then G-maps works normally.
    This phenomenon did not happen before the latest upgrade to either Google or Firefox. I have used Fiefox for a number of years and also Google Maps on previous computers and on this one, and not had this before.
    This is a relatively young computer (Asus EeSlate 121) less than a year old. I have used Firefox since I bought it and until recently had no problem with Google Maps.

    I solved it myself, after the "note" which came back from FF/Mozilla just as I finished my message, commenting on what it was that my system had , I wnnt back to check my plug-ins etc. I downloaded the latest Java, BOTH 32bit AND 64 bit versions and latest Firefox.
    Now all is working.
    Thanks,
    B.

  • Problem to download i called the support Adobe and after a while he said he had problem with his int

    problem with his internetand shut down the contakt
    After that I can not come in to my adobeconto on my other computer ?????

    Once again
    I can nor download my PHCC
    The cod say no
    When I phone Krishnan S on support he suddenly say he got problem with his internet and cannot go on phone later
    After that talk I can not come in in the computer I tryid to download from and that computer I had contakt with Krishnan
    What is the problem?

  • I had a problem with my WRT54GS not connecting to my inte...

    I had a problem with my WRT54GS not connecting to my internet until I cloned my old routers mac address. I was using a BEFW11S4 which was bullet proof and worked for several years until I changed to Wireless G. Upon purchasing the WRT54GS and setting up all parameters exactly like I had before I could not make any connections, wireless or otherwise until I cloned my mac address to the same address as my previous router. Apparently my ISP had that mac address registered and would not properly perform DHCP even though all other paremeters were correct. I read lots of messages here on line with issues with the WRT54GS connecting and this fixed my problem outright. If you upgrade from a previous generation router (Linksys or otherwise apparently) copy your old routers mac address and clone it to your new router and you should be able to connect. This fixed my problem after several hours and days of troubleshooting. Good Luck Karnage

    As an alternative to using MAC address cloning, you can phone your ISP, tell them you have a new router, and tell them to reset their system to accept the MAC address of your new router.   This way, you won't have to remember the old MAC address, in the event that you need to reset your router to factory defaults.

  • Problem with threads running javaw

    Hi,
    Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
    troy.

    troy,
    Try and post a minimum code sample of your app which
    does not work.
    When using javaw, make sure you redirect the standard
    error and standard output streams to file.
    Graeme.Hi Graeme,
    I dont understand what you mean by redirection to file? some of my code below.
    The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
    public class Server{
    ServerSocket aServerSocket;
    Socket dianosticsSocket;
    Socket nPortExpress;
    ClientListener aClientListener;
    LinkedList queue = new LinkedList();
    int port = 0;
    int clientPort = 0;
    String clientName = null;
    boolean serverAlive = true;
    * Server constructor generates a server
    * Socket and then starts a client threads.
    * @param aPort      socket port of local machine.
    public Server(int aPort, String aClientName, int aClientPort){
    port = aPort;
    clientName = aClientName;
    clientPort = aClientPort;
    try{
    // create a new thread
    aServerSocket = new ServerSocket(port) ;
    // connect to the nPortExpress
    aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
    // aClientListener.setDaemon(true);
    aClientListener.start();
    // start a dianostic port
    DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
    // System.out.println("Server is running on port " + port + "...");
    // System.out.println("Connect to nPort");
    catch(Exception e)
    // System.out.println("ERROR: Server port " + port + " not available");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
    serverAlive = false;
    System.exit(1);
    while(serverAlive&&aClientListener.hostSocket.isConnected()){
    try{
    // connect the client
    Socket aClient = aServerSocket.accept();
    //System.out.println("open client connection");
    //System.out.println("client local: "+ aClient.getLocalAddress().toString());
    // System.out.println("client localport: "+ aClient.getLocalPort());
    // System.out.println("client : "+ aClient.getInetAddress().toString());
    // System.out.println("client port: "+ aClient.getLocalPort());
    // make a new client thread
    ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
    // start thread
    clientThread.start();
    catch(Exception e)
    //System.out.println("ERROR: Client connection failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
    }// end while
    } // end constructor Server
    void serverExit(){
         JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
         System.exit(1);
    }// end class Server
    *** connect to another server
    public class ClientListener extends Thread{
    InetAddress hostName;
    int hostPort;
    Socket hostSocket;
    BufferedReader in;
    PrintWriter out;
    boolean loggedIn;
    LinkedList queue;      // reference to Server queue
    Server serverRef; // reference to main server
    * ClientListener connects to the host server.
    * @param aHostName is the name of the host eg server name or IP address.
    * @param aHostPort is a port number of the host.
    * @param aLoginName is the users login name.
    public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer)      // reference to Server queue)
    hostName = aHostName;
    hostPort = aHostPort;
    queue = aQueue;
    serverRef = aServer;      
    // connect to the server
    try{
    hostSocket = new Socket(hostName, hostPort);
    catch(IOException e){
    //System.out.println("ERROR: Connection Host Failed");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);     
    System.exit(0);
    } // end constructor ClientListener
    ** multi client connection server
    ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
    queue = aQueue;
    addToQueue(this);
    client = aSocket;
    clientRef = aClientListener;
    aDiagnostic = diagnostics;
    } // end constructor ClientWorker
    * run method is the main loop of the server program
    * in change of handle new client connection as well
    * as handle all messages and errors.
    public void run(){
    boolean alive = true;
    String aSubString = "";
    in = null;
    out = null;
    loginName = "";
    loggedIn = false;
    while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
    if(aDiagnostic){
    out.println("WELCOME to diagnostics");
    broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    out.println("WELCOME to Troy's Server");
    broadCastDia("Connect : client "+client.getInetAddress().toString());
         out.flush();
    String line;
    while(((line = in.readLine())!= null)){
    StringTokenizer aStringToken = new StringTokenizer(line, " ");
    if(!aDiagnostic){
    broadCastDia(line);
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    else{
    if(line.equals("GETIPS"))
    getIPs();
    else{
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    } // end while
    catch(Exception e){
    // System.out.println("ERROR:Client Connection reset");
                             JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);     
    try{
    if(aDiagnostic){
    broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    broadCastDia("Disconnect : client "+client.getInetAddress().toString());
         out.flush();
    // close the buffers and connection;
    in.close();
    out.close();
    client.close();
    // System.out.println("out");
    // remove from list
    removeThreadQueue(this);
    alive = false;
    catch(Exception e){
    // System.out.println("ERROR: Client Connection reset failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);     
    }// end while
    } // end method run
    * method run - Generates io stream for communicating with the server and
    * starts the client gui. Run also parses the input commands from the server.
    public void run(){
    boolean alive = true;
    try{
    // begin to life the gui
    // aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
    // aGuiClient.show();
    in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
    while (alive && hostSocket.isConnected()){
    String line;
    while(((line = in.readLine())!= null)){
    System.out.println(line);
    broadCast(line);
    } // end while
    } // end while
    catch(Exception e){
    //     System.out.println("ERRORa Connection to host reset");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
    try{
    hostSocket.close();
         }catch(Exception a){
         JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
    alive = false;
    System.exit(1);
    } // end method run

  • Problem with setContentPane() in JFrame class

    I recently discovered a problem with the setContentPane method in the JFrame class. When I use setContentPane(Container ..), the previously existing contentPane remains in the stack. I have tried nullifying getContentPane(), and all manner of things, but, each time I use setContentPane, I have another instance of a JPanel in the stack.
    I'm using code similar to setContentPane(new CustomJPanel()); and each time the user changes screens, and a similar call to that is made, the old CustomJPanel instance remains in the stack. Can anyone suggest a way around this? On their own the panels do not take up very much memory, but after several hours of usage, they will build up.

    I tried what you suggested; it only resulted in a huge performance decrease. The problem with memory allocation is still there.
    Here is the method I use to switch screens in my app:
    public static void changeScreen (JPanel panel){
              try{
                   appFrame.setTitle("Wordinary : \""+getTitle()+"\"");
                   appFrame.setContentPane(panel);
                   appFrame.setSize(appFrame.getContentPane().getPreferredSize());     
                   appFrame.getContentPane().setBackground(backColour);
                   for (int i = 0; i < appFrame.getContentPane().getComponents().length; i++)
                        appFrame.getContentPane().getComponents().setForeground(textColour);
                   //System.out.println("Background colour set to "+backColour+" text colour set to "+textColour);
                   appFrame.validate();
              catch (Exception e){
                   //System.out.println("change");
                   e.printStackTrace();
    And it is called like this:
    changeScreen(new AddWordPanel());The instantiation of the new instance is what is causing the memory problems, but I can't think of a way around it.

  • Problem with JFrame and busy/wait Cursor

    Hi -- I'm trying to set a JFrame's cursor to be the busy cursor,
    for the duration of some operation (usually just a few seconds).
    I can get it to work in some situations, but not others.
    Timing does seem to be an issue.
    There are thousands of posts on the BugParade, but
    in general Sun indicates this is not a bug. I just need
    a work-around.
    I've written a test program below to demonstrate the problem.
    I have the problem on Solaris, running with both J2SE 1.3 and 1.4.
    I have not tested on Windows yet.
    When you run the following code, three JFrames will be opened,
    each with the same 5 buttons. The first "F1" listens to its own
    buttons, and works fine. The other two (F2 and F3) listen
    to each other's buttons.
    The "BUSY" button simply sets the cursor on its listener
    to the busy cursor. The "DONE" button sets it to the
    default cursor. These work fine.
    The "SLEEP" button sets the cursor, sleeps for 3 seconds,
    and sets it back. This does not work.
    The "INVOKE LATER" button does the same thing,
    except is uses invokeLater to sleep and set the
    cursor back. This also does not work.
    The "DELAY" button sleeps for 3 seconds (giving you
    time to move the mouse into the other (listerner's)
    window, and then it behaves just like the "SLEEP"
    button. This works.
    Any ideas would be appreciated, thanks.
    -J
    import java.awt.BorderLayout;
    import java.awt.Cursor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class BusyFrameTest implements ActionListener
    private static Cursor busy = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR);
    private static Cursor done = Cursor.getDefaultCursor();
    JFrame frame;
    JButton[] buttons;
    public BusyFrameTest (String title)
    frame = new JFrame (title);
    buttons = new JButton[5];
    buttons[0] = new JButton ("BUSY");
    buttons[1] = new JButton ("DONE");
    buttons[2] = new JButton ("SLEEP");
    buttons[3] = new JButton ("INVOKE LATER");
    buttons[4] = new JButton ("DELAY");
    JPanel buttonPanel = new JPanel();
    for (int i = 0; i < buttons.length; i++)
    buttonPanel.add (buttons);
    frame.getContentPane().add (buttonPanel);
    frame.pack();
    frame.setVisible (true);
    public void addListeners (ActionListener listener)
    for (int i = 0; i < buttons.length; i++)
    buttons[i].addActionListener (listener);
    public void actionPerformed (ActionEvent e)
    System.out.print (frame.getTitle() + ": " + e.getActionCommand());
    if (e.getActionCommand().equals ("BUSY"))
    frame.setCursor (busy);
    else if (e.getActionCommand().equals ("DONE"))
    frame.setCursor (done);
    else if (e.getActionCommand().equals ("SLEEP"))
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    else if (e.getActionCommand().equals ("INVOKE LATER"))
    frame.setCursor (busy);
    SwingUtilities.invokeLater (thread);
    else if (e.getActionCommand().equals ("DELAY"))
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    System.out.println();
    Runnable thread = new Runnable()
    public void run()
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.println (" finished");
    public static void main (String[] args)
    BusyFrameTest f1 = new BusyFrameTest ("F1");
    f1.addListeners (f1);
    BusyFrameTest f2 = new BusyFrameTest ("F2");
    BusyFrameTest f3 = new BusyFrameTest ("F3");
    f2.addListeners (f3); // 2 listens to 3
    f3.addListeners (f2); // 3 listens to 2

    I've had the same problems with cursors and repaints in a swing application, and I was thinking of if I could use invokeLater, but I never got that far with it.
    I still believe you would need a thread for the time consuming task, and that invokeLater is something you only need to use in a thread different from the event thread.

  • Studio 12.1 Performace Analyzer 7.7 problem, with 'er_print' utility.

    I am having a minor but nagging problem with a regression in the ‘er_print’ utility of the Sun Performance Analyzer suite bundled in Studio 12. is there maybe a patch available or in the works?
    I have not had any success in finding a resolution by searching the open literature…
    The issue is that the ‘callers-callees’ listing only dumps functions in alphabetical order, ignoring the sort order specified by ‘sort’. This is a regression from the Performance Analyzer (7.4) behavior from Sun Studio 10. We only recently jumped to studio 12.1.
    This functionality is documented here: http://docs.sun.com/app/docs/doc/821-0304/afaid?a=view (as well as many other references). To quote:
    “callers-callees
    Print the callers-callees panel for each of the functions, in the order specified by the function sort metric (sort)."
    I use a script input to er_print that in the past analyzed the top ‘N’ functions sorted on inclusive thread time. Now I have to be sure to dump ALL functions and need a third-party search tool to find that information in the resulting report.
    Has anyone heard of this problem or are there Performance Analyzer patch(es) available. I saw some for 7.6 and another for unspecified but have not seen this problem in patch notices.
    Thanks.
    Regards,
    Steve

    Nik, thanks for taking a look. We can't go to 12.2 because we're a software developer and we'll lose our binary compatibility with the release we've been building for the last few months. I'm a systems guy and will paste in a developer's example below.
    Note Marc's url shows a 12.1 Performance Analyzer patch 142369-01 we have not yet installed. The patch notice description doesn't show much. I'll pass on patch info to remote user/developer.
    Developer example:
    I use a script input to er_print that in the past analyzed the top ‘N’ functions sorted on inclusive thread time. Now I have to be sure to dump ALL functions and need a third-party search tool to find that information in the resulting report.
    Here’s a shortened (only 4) example of the behavior I’m seeing… the focus of the functions in callers-callees are NOT those of the functions determined by the sort metric.
    = = = =
    sysun046% er_print /scratch/test.4.er
    /scratch/test.4.er: Experiment has warnings, see header for details
    (/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) sort i.total
    Current Sort Metric: Inclusive Total Thread Time ( i.total )
    (/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) cmetrics a.total:e.user:i.user:e.total:i.total
    Current caller-callee metrics: a.total:e.user:i.user:e.total:i.total:name
    Current caller-callee sort metric: Attributed Total Thread Time ( a.total )
    (/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) limit 4
    (/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) sample_select 22-53
    Exp Sel Total
    === ===== =====
    1 22-53 57
    (/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) functions
    Functions sorted by metric: Inclusive Total Thread Time
    Excl. Incl. Incl. Total Name
    User CPU User CPU Thread
    sec. sec. sec.
    26.015 26.015 113.530 <Total>
    0. 26.015 113.530 ACE_Task_Base::svc_run(void*)
    0. 26.015 113.530 ACE_Thread_Adapter::invoke()
    0. 26.015 113.530 ORB_Task::svc()
    (/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) callers-callees
    Functions sorted by metric: Inclusive Total Thread Time
    Callers and callees sorted by metric: Attributed Total Thread Time
    Attr. Total Excl. Incl. Excl. Total Incl. Total Name
    Thread User CPU User CPU Thread Thread
    sec. sec. sec. sec. sec.
    113.530 26.015 26.015 113.530 113.530 *<Total>
    113.530 0. 26.015 0. 113.530 lwpstart
    Attr. Total Excl. Incl. Excl. Total Incl. Total Name
    Thread User CPU User CPU Thread Thread
    sec. sec. sec. sec. sec.
    0.010 0. 0.010 0. 0.010 ACE_Message_Block::clone(unsigned long)const
    0. 0. 0.010 0. 0.010 *ACE_Data_Block::clone(unsigned long)const
    0.010 0.398 0.398 0.398 0.398 memcpy
    Attr. Total Excl. Incl. Excl. Total Incl. Total Name
    Thread User CPU User CPU Thread Thread
    sec. sec. sec. sec. sec.
    0.001 0. 0.003 0. 0.011 ACE_Select_Reactor_T<ACE_Select_Reactor_Token_T<ACE_Token> >::resume_handler(int)
    0.001 0.001 0.001 0.001 0.001 *ACE_Guard<ACE_Select_Reactor_Token_T<ACE_Token> >::release()
    Attr. Total Excl. Incl. Excl. Total Incl. Total Name
    Thread User CPU User CPU Thread Thread
    sec. sec. sec. sec. sec.
    0.010 0. 0.010 0. 0.010 TAO_Synch_Queued_Message::clone(ACE_Allocator*)
    0. 0. 0.010 0. 0.010 *ACE_Message_Block::clone(unsigned long)const
    0.010 0. 0.010 0. 0.010 ACE_Data_Block::clone(unsigned long)const
    = = = = =
    Nik, thanks for taking a look.
    Steve

  • IDES installation problem with DDIC password

    Hello everybody,
    After hours of searching and trying..
    I have here a problem during a local installation of IDES ECC 6.0 on Windows Server 2008 with MAXDB. The installation stops in phase 27 of 29 u201Ccheck DDIC passwordu201D - test logon to SAP system failed, with the error message FRF-00007 "Unable to open RFC connection" in sapinst.
    The MMC shows in the process list that the following processes stands oon "green": igswd, mag_Server and disp+work are running. The message of servers connection is OK, acts dialogue queue time is 0.00 sec.
    I have already searched the forum, but I am not able to logon as user SAP* with u201C060. u2026u201D or as user DDIC with the password u201C199. u2026u201D to change the DDIC password to my password set during the installation (transaction -S000 / SU01). The login fails over the MMC as well as over the SAP GUI 7.10. I have tried this on the client 000, 001 and 800. The error message is u201CSAP Logon Failed - connection closed without message (CM_NO_DATA_RECEIVEDu201D). The SAP GUI gets down with "Work process restartet, session terminated".
    What can help to solve the problem? Can it be a problem with the ms loop adaptor? Which static address IP must assign to the loop adaptor? Did i have to update the kernel of the data bank or is this not necessary? Can the information from dev_w help?
    Can this link help me: BI 7.0 Installed but errored out during DDIC password check !!!!!!!
    Thanks in advance
    Lenvy
    Edited by: Lenvy Gee on Sep 6, 2009 2:30 AM
    Edited by: Lenvy Gee on Sep 6, 2009 2:34 AM

    Good Morning everybody,
    I started a next try, the mmc is running on green, the login starts up and......failed.
    So the network setting seems to be correct.
    The log files included following:
    ..........................................(just the last lines).............................

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Server BASIS_A23_00 on host BASED (wp 0)
    M  *  ERROR       ThSigHandler: signal
    M  *
    M  *  TIME        Mon Nov 26 08:06:26 2009
    M  *  RELEASE     700
    M  *  COMPONENT   Taskhandler
    M  *  VERSION     1
    M  *  RC          11
    M  *  MODULE      thxxhead.c
    M  *  LINE        10688
    M  *  COUNTER     1
    M  *
    M  *****************************************************************************

    M  PfStatDisconnect: disconnect statistics
    M  Entering TH_CALLHOOKS
    M  ThCallHooks: call hook >SAP-Trace buffer write< for event BEFORE_DUMP
    M  TrThHookFunc: called for WP dump
    M  ThCallHooks: call hook >ThrSaveSPAFields< for event BEFORE_DUMP
    M  ThrSaveSPAFields: save spa fields
    M  Entering ThSetStatError
    M  ThIErrHandle: incomplete previous roll out, do a full roll out
    M  ThRollOut: roll out T17/U25/M0/I0 (level=7, short_roll_out=0)
    M  ThRollOut: call rrol_out (1)
    M  ThRollOut: act roll state = DP_ROLLED_OUT
    M  ThRollOut: roll level <> 0, don't call ab_rollout
    M  ThRollOut: full roll out of U25 M0 I0 (Level 7) ok
    M  ThIErrHandle: prv_action of W0: 0x8
    M  ThCallDbBreak: use db_sqlbreak
    C  CANCEL rejected, because there is no SQL statement active
    M  ThIErrHandle: don't try rollback again
    M  ThIErrHandle: call ThrCoreInfo
    A  TH VERBOSE LEVEL FULL
    A  ** RABAX: level LEV_RX_PXA_RELEASE_MTX entered.
    A  ** RABAX: level LEV_RX_PXA_RELEASE_MTX completed.
    A  ** RABAX: level LEV_RX_COVERAGE_ANALYSER entered.
    A  ** RABAX: level LEV_RX_COVERAGE_ANALYSER completed.
    A  ** RABAX: level LEV_RX_ROLLBACK entered.
    A  ** RABAX: level LEV_RX_ROLLBACK completed.
    A  ** RABAX: level LEV_RX_DB_ALIVE entered.
    A  ** RABAX: level LEV_RX_DB_ALIVE completed.
    A  ** RABAX: level LEV_RX_HOOKS entered.
    A  ** RABAX: level LEV_RX_HOOKS completed.
    A  ** RABAX: level LEV_RX_STANDARD entered.
    A  ** RABAX: level LEV_RX_STANDARD completed.
    A  ** RABAX: level LEV_RX_STOR_VALUES entered.
    A  ** RABAX: level LEV_RX_STOR_VALUES completed.
    A  ** RABAX: level LEV_RX_C_STACK entered.
    A  ** RABAX: level LEV_RX_C_STACK completed.
    A  ** RABAX: level LEV_RX_MEMO_CHECK entered.
    A  ** RABAX: level LEV_RX_MEMO_CHECK completed.
    A  ** RABAX: level LEV_RX_AFTER_MEMO_CHECK entered.
    A  ** RABAX: level LEV_RX_AFTER_MEMO_CHECK completed.
    A  ** RABAX: level LEV_RX_INTERFACES entered.
    A  ** RABAX: level LEV_RX_INTERFACES completed.
    A  ** RABAX: level LEV_RX_GET_MESS entered.
    A  ** RABAX: level LEV_RX_GET_MESS completed.
    A  ** RABAX: level LEV_RX_INIT_SNAP entered.
    A  ** RABAX: level LEV_RX_INIT_SNAP completed.
    A  ** RABAX: level LEV_RX_WRITE_SYSLOG entered.
    A  ** RABAX: level LEV_RX_WRITE_SYSLOG completed.
    A  ** RABAX: level LEV_RX_WRITE_SNAP entered.
    M  ThContextId: context_id = >0001700020019C010D31F2D5BD12D1714B103838<
    M  ThContextId: context_id_uuid = {29019C01-7F24-F235-BD12-D1714B103838}
    M  ThGetTransId2: got trans id (spa) >29019C017F24F239BD12D1714B103838< (32)
    A  ** RABAX: level LEV_SN_END completed.
    A  ** RABAX: level LEV_RX_SET_ALERT entered.
    A  ** RABAX: level LEV_RX_SET_ALERT completed.
    A  ** RABAX: level LEV_RX_COMMIT entered.
    A  ** RABAX: level LEV_RX_COMMIT completed.
    A  ** RABAX: level LEV_RX_SNAP_SYSLOG entered.
    A  ** RABAX: level LEV_RX_SNAP_SYSLOG completed.
    A  ** RABAX: level LEV_RX_RESET_PROGS entered.
    A  ** RABAX: level LEV_RX_RESET_PROGS completed.
    A  ** RABAX: level LEV_RX_STDERR entered.
    A  ** RABAX: level LEV_RX_STDERR completed.
    A  ** RABAX: level LEV_RX_RFC_ERROR entered.
    A  ** RABAX: level LEV_RX_RFC_ERROR completed.
    A  ** RABAX: level LEV_RX_RFC_CLOSE entered.
    A  ** RABAX: level LEV_RX_RFC_CLOSE completed.
    A  ** RABAX: level LEV_RX_IMC_ERROR entered.
    A  ** RABAX: level LEV_RX_IMC_ERROR completed.
    A  ** RABAX: level LEV_RX_DATASET_CLOSE entered.
    A  ** RABAX: level LEV_RX_DATASET_CLOSE completed.
    A  ** RABAX: level LEV_RX_RESET_SHMLOCKS entered.
    A  ** RABAX: level LEV_RX_RESET_SHMLOCKS completed.
    A  ** RABAX: level LEV_RX_ERROR_SAVE entered.
    A  ** RABAX: level LEV_RX_ERROR_SAVE completed.
    A  ** RABAX: level LEV_RX_ERROR_TPDA entered.
    A  ** RABAX: level LEV_RX_ERROR_TPDA completed.
    A  ** RABAX: level LEV_RX_PXA_RELEASE_RUDI entered.
    A  ** RABAX: level LEV_RX_PXA_RELEASE_RUDI completed.
    A  ** RABAX: level LEV_RX_LIVE_CACHE_CLEANUP entered.
    M  RmCleanUpResources3: hdr/tbl/ext_tbl/free/keep = 000000000F67D3C8/0000000000000000/0/0/1
    M  RmCleanUpResources3: no resources registered
    A  ** RABAX: level LEV_RX_LIVE_CACHE_CLEANUP completed.
    A  ** RABAX: level LEV_RX_END entered.
    A  ** RABAX: level LEV_RX_END completed.
    A  ** RABAX: end RX_RETURN
    M  ThIErrHandle: ThrCoreInfo o.k.
    M  ThIErrHandle: Entering ThReplyToMsg
    M  ThIErrHandle: Entering ThErrHdlUser
    M  ThErrHdlUser: set th_errno (11)
    M  ThErrHdlUser: save context
    M  ThEmContextDetach2: detach T17/M0 from em memory (em_hdl=0, force=0)
    M  ThEmContextDetach2: reset local em info
    B  Disconnecting from ALL connections:
    B  Wp  Hdl ConName          ConId     ConState     TX  PRM RCT TIM MAX OPT Date     Time   DBHost         
    B  000 000 R/3              000000000 ACTIVE       YES YES NO  000 255 255 20401126 080533 BASIS          
    C  Disconnecting from connection 0 ...
    C  Now I'm disconnected from SAP DB
    B  Disconnected from connection 0
    B  statistics db_con_commit (com_total=4, com_tx=0)
    B  statistics db_con_rollback (roll_total=1, roll_tx=0)
    M  ***LOG Q02=> wp_halt, WPStop (Workproc 0 816) [dpnttool.c   327]
    M  return from clean-up function ...
    and:
    trc file: "dev_disp", trc level: 1, release: "700"
    sysno      00
    sid        A23
    systemid   562 (PC with Windows NT)
    relno      7000
    patchlevel 0
    patchno    144
    intno      20050900
    make:      multithreaded, Unicode, 64 bit, optimized
    pid        2928
    Mon Nov 26 08:03:01 2009
    kernel runs with dp version 232000(ext=109000) (@(#) DPLIB-INT-VERSION-232000-UC)
    length of sys_adm_ext is 576 bytes
    SWITCH TRC-HIDE on ***
    ***LOG Q00=> DpSapEnvInit, DPStart (00 2928) [dpxxdisp.c   1243]
         shared lib "dw_xml.dll" version 144 successfully loaded
         shared lib "dw_xtc.dll" version 144 successfully loaded
         shared lib "dw_stl.dll" version 144 successfully loaded
         shared lib "dw_gui.dll" version 144 successfully loaded
         shared lib "dw_mdm.dll" version 144 successfully loaded
    rdisp/softcancel_sequence :  -> 0,5,-1
    use internal message server connection to port 3900
    Mon Nov 26 08:03:10 2040
    WARNING => DpNetCheck: NiAddrToHost(1.0.0.0) took 9 seconds
    ***LOG GZZ=> 1 possible network problems detected - check tracefile and adjust the DNS settings [dpxxtool2.c  5371]
    MtxInit: 30000 0 0
    DpSysAdmExtInit: ABAP is active
    DpSysAdmExtInit: VMC (JAVA VM in WP) is not active
    DpIPCInit2: start server >BASIS_I23_00                            <
    DpShMCreate: sizeof(wp_adm)          25168     (1480)
    DpShMCreate: sizeof(tm_adm)          5652128     (28120)
    DpShMCreate: sizeof(wp_ca_adm)          24000     (80)
    DpShMCreate: sizeof(appc_ca_adm)     8000     (80)
    DpCommTableSize: max/headSize/ftSize/tableSize=500/16/552064/552080
    DpShMCreate: sizeof(comm_adm)          552080     (1088)
    DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
    DpShMCreate: sizeof(slock_adm)          0     (104)
    DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    DpShMCreate: sizeof(file_adm)          0     (72)
    DpShMCreate: sizeof(vmc_adm)          0     (1864)
    DpShMCreate: sizeof(wall_adm)          (41664/36752/64/192)
    DpShMCreate: sizeof(gw_adm)     48
    DpShMCreate: SHM_DP_ADM_KEY          (addr: 000000000D800050, size: 6348592)
    DpShMCreate: allocated sys_adm at 000000000D800050
    DpShMCreate: allocated wp_adm at 000000000D802150
    DpShMCreate: allocated tm_adm_list at 000000000D8083A0
    DpShMCreate: allocated tm_adm at 000000000D808400
    DpShMCreate: allocated wp_ca_adm at 000000000DD6C2A0
    DpShMCreate: allocated appc_ca_adm at 000000000DD72060
    DpShMCreate: allocated comm_adm at 000000000DD73FA0
    DpShMCreate: system runs without slock table
    DpShMCreate: system runs without file table
    DpShMCreate: allocated vmc_adm_list at 000000000DDFAC30
    DpShMCreate: allocated gw_adm at 000000000DDFACB0
    DpShMCreate: system runs without vmc_adm
    DpShMCreate: allocated ca_info at 000000000DDFACE0
    DpShMCreate: allocated wall_adm at 000000000DDFACF0
    MBUF state OFF
    DpCommInitTable: init table for 500 entries
    ThTaskStatus: rdisp/reset_online_during_debug 0
    EmInit: MmSetImplementation( 2 ).
    MM global diagnostic options set: 0
    <ES> client 0 initializing ....
    <ES> InitFreeList
    <ES> block size is 4096 kByte.
    <ES> Info: em/initial_size_MB( 4093MB) not multiple of em/blocksize_KB( 4096KB)
    <ES> Info: em/initial_size_MB rounded up to 4096MB
    Using implementation view
    <EsNT> Using memory model view.
    <EsNT> Memory Reset disabled as NT default
    <ES> 1023 blocks reserved for free list.
    ES initialized.
    rdisp/http_min_wait_dia_wp : 1 -> 1
    ***LOG CPS=> DpLoopInit, ICU ( 3.0 3.0 4.0.1) [dpxxdisp.c   1633]
    ***LOG Q0K=> DpMsAttach, mscon ( BASIS) [dpxxdisp.c   11822]
    DpStartStopMsg: send start message (myname is >BASIS_I23_00                            <)
    DpStartStopMsg: start msg sent
    CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
    CCMS: Initalizing shared memory of size 60000000 for monitoring segment.
    Mon Nov 26 08:03:11 2040
    CCMS: start to initalize 3.X shared alert area (first segment).
    DpMsgAdmin: Set release to 7000, patchlevel 0
    MBUF state PREPARED
    MBUF component UP
    DpMBufHwIdSet: set Hardware-ID
    ***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c   1050]
    DpMsgAdmin: Set patchno for this platform to 144
    Release check o.K.
    Mon Nov 26 08:03:17 2040
    MBUF state ACTIVE
    DpModState: change server state from STARTING to ACTIVE
    Mon Nov 26 08:04:26 2040
    SoftCancel request for T17 U18 M0 received from IC_MAN
    SoftCancel request for T19 U20 M0 received from IC_MAN
    ERROR => DpWpKill(3092, SIGUSR2) failed [dpxxtool.c   2496]
    Mon Nov 26 08:04:30 2040
    ERROR => DpHdlDeadWp: W0 (pid 3200) died [dpxxdisp.c   14532]
    Mon Nov 26 08:04:31 2040
    ERROR => DpHdlDeadWp: W1 (pid 3220) died [dpxxdisp.c   14532]
    DpHdlDeadWp: restart wp (pid=3092) automatically
    ERROR => DpHdlDeadWp: W3 (pid 3296) died [dpxxdisp.c   14532]
    DpHdlDeadWp: restart wp (pid=3268) automatically
    ERROR => DpHdlDeadWp: W10 (pid 2032) died [dpxxdisp.c   14532]
    ERROR => DpHdlDeadWp: W15 (pid 3312) died [dpxxdisp.c   14532]
    Mon Nov 26 08:04:45 2040
    ERROR => DpRqCheck: mode 0 in status CANCEL [dpxxdisp.c   6971]
    Mon Nov 26 08:05:10 2040
    ERROR => DpHdlDeadWp: W4 (pid 3260) died [dpxxdisp.c   14532]
    Mon Nov 26 08:05:30 2040
    ERROR => DpHdlDeadWp: W0 (pid 3788) died [dpxxdisp.c   14532]
    ERROR => DpHdlDeadWp: W1 (pid 2108) died [dpxxdisp.c   14532]
    ERROR => DpHdlDeadWp: W6 (pid 3108) died [dpxxdisp.c   14532]
    ERROR => DpHdlDeadWp: W15 (pid 464) died [dpxxdisp.c   14532]
    Mon Nov 26 08:05:33 2040
    ERROR => DpRqCheck: mode 0 in status CANCEL [dpxxdisp.c   6971]
    The kernel is not patched. I just (try) to install the kernel files from the sap market place
    IDES download destination. The install kernel file was: 51033508_7 - NW7 SR3 Kernel 7.00 for Windows / LNX X86_X64. I got an update / upgrade file, which is called: 51033508_8 - NW7 SR3 Kernel .... Upg ABAP.
    Can anybody give me an adwise by reading those logfiles? Is the file ok for updating the kernel?
    How do I upgrade the kernel by having no .exe - file?  May the installation go on after patching the kernel?
    Thanks you really much
    Lenvy

  • Java API, problem with secondary keys using multi key creator

    Hi,
    I'm developing an application that inserts a few 100k or so records into a Queue DB, then access them using one of four Hash SecondaryDatabases. Three of these secondary dbs use a SecondaryMultiKeyCreator to generate the keys, and one uses a SecondaryKeyCreator. As a test, I'm trying to iterate through each secondary key. When trying to iterate through the keys of any of the secondary databases that use a SecondaryMultiKeyCreator, I have problems. I'm attempting to iterate through the keys by:
    1: creating a StoredMap of the SecondaryDatabase
    2: getting a StoredKeySet from said map
    3: getting a StoredIterator on said StoredKeySet
    4: iterate
    The first call to StoredIterator.next() fails at my key binding (TupleBinding) because it is only receiving 2 bytes of data for the key, when it should be getting more, so an Exception is thrown. I suspected a problem with my SecondaryMultiKeyCreator, so I added some debug code to check the size of the DatabaseEntries it creates immediately before adding them to the results key Set. It checks out right. I also checked my key binding like so:
    1: use binding to convert the key object to a DatabaseEntry
    2: use binding to convert the created DatabaseEntry back to a key object
    3: check to see if the old object contains the same data as the new one
    Everything checked out ok.
    What it boils down to is this: my key creator is adding DatabaseEntries of the correct size to the results set, but when the keys are being read back later on, my key binding is only receiving 2 bytes of data. For the one SecondaryDatabase that doesn't use a SecondaryMultiKeyCreator, but just a SecondaryKeyCreator, there are no issues and I am able to iterate through its secondary keys as expected.
    EDIT: New discovery: if I only add ONE DatabaseEntry to the results set in my SecondaryMultiKeyCreator, I am able to iterate through the keys as I would like to.
    Any ideas or suggestions?
    Thank you for your attention,
    -Justin
    Message was edited by:
    Steamroller

    Hi Justin,
    Sorry about the delayed response here. I have created a patch that resolves the problem.
    If you apply the patch to your 4.6.21 source tree, and then rebuild Berkeley DB, the improper behavior should be resolved.
    Regards,
    Alex
    diff -rc db/db_am.c db/db_am.c
    *** db/db_am.c     Thu Jun 14 04:21:30 2007
    --- db/db_am.c     Fri Jun 13 11:20:28 2008
    *** 331,338 ****
           F_SET(dbc, DBC_TRANSIENT);
    !      switch (flags) {
    !      case DB_APPEND:
                 * If there is an append callback, the value stored in
                 * data->data may be replaced and then freed.  To avoid
    --- 331,337 ----
           F_SET(dbc, DBC_TRANSIENT);
    !       if (flags == DB_APPEND && LIST_FIRST(&dbp->s_secondaries) == NULL) {
                 * If there is an append callback, the value stored in
                 * data->data may be replaced and then freed.  To avoid
    *** 367,388 ****
    -            * Secondary indices:  since we've returned zero from an append
    -            * function, we've just put a record, and done so outside
    -            * __dbc_put.  We know we're not a secondary-- the interface
    -            * prevents puts on them--but we may be a primary.  If so,
    -            * update our secondary indices appropriately.
    -            * If the application is managing this key's data, we need a
    -            * copy of it here.  It will be freed in __db_put_pp.
    -           DB_ASSERT(dbenv, !F_ISSET(dbp, DB_AM_SECONDARY));
    -           if (LIST_FIRST(&dbp->s_secondaries) != NULL &&
    -               (ret = __dbt_usercopy(dbenv, key)) == 0)
    -                ret = __db_append_primary(dbc, key, &tdata);
                 * The append callback, if one exists, may have allocated
                 * a new tdata.data buffer.  If so, free it.
    --- 366,371 ----
    *** 390,401 ****
                /* No need for a cursor put;  we're done. */
                goto done;
    !      default:
    !           /* Fall through to normal cursor put. */
    !           break;
    !      if (ret == 0)
                ret = __dbc_put(dbc,
                    key, data, flags == 0 ? DB_KEYLAST : flags);
    --- 373,379 ----
                /* No need for a cursor put;  we're done. */
                goto done;
    !      } else
                ret = __dbc_put(dbc,
                    key, data, flags == 0 ? DB_KEYLAST : flags);
    diff -rc db/db_cam.c db/db_cam.c
    *** db/db_cam.c     Tue Jun  5 21:46:24 2007
    --- db/db_cam.c     Thu Jun 12 16:41:29 2008
    *** 899,905 ****
           DB_ENV *dbenv;
           DB dbp, sdbp;
           DBC dbc_n, oldopd, opd, sdbc, *pdbc;
    !      DBT olddata, oldpkey, newdata, pkey, temppkey, tempskey;
           DBT all_skeys, skeyp, *tskeyp;
           db_pgno_t pgno;
           int cmp, have_oldrec, ispartial, nodel, re_pad, ret, s_count, t_ret;
    --- 899,905 ----
           DB_ENV *dbenv;
           DB dbp, sdbp;
           DBC dbc_n, oldopd, opd, sdbc, *pdbc;
    !      DBT olddata, oldpkey, newdata, pkey, temppkey, tempskey, tdata;
           DBT all_skeys, skeyp, *tskeyp;
           db_pgno_t pgno;
           int cmp, have_oldrec, ispartial, nodel, re_pad, ret, s_count, t_ret;
    *** 1019,1026 ****
            * should have been caught by the checking routine, but
            * add a sprinkling of paranoia.
    !      DB_ASSERT(dbenv, flags == DB_CURRENT || flags == DB_KEYFIRST ||
    !            flags == DB_KEYLAST || flags == DB_NOOVERWRITE);
            * We'll want to use DB_RMW in a few places, but it's only legal
    --- 1019,1027 ----
            * should have been caught by the checking routine, but
            * add a sprinkling of paranoia.
    !       DB_ASSERT(dbenv, flags == DB_APPEND || flags == DB_CURRENT ||
    !             flags == DB_KEYFIRST || flags == DB_KEYLAST ||
    !             flags == DB_NOOVERWRITE);
            * We'll want to use DB_RMW in a few places, but it's only legal
    *** 1048,1053 ****
    --- 1049,1107 ----
                     goto err;
                have_oldrec = 1; /* We've looked for the old record. */
    +      } else if (flags == DB_APPEND) {
    +           /*
    +            * With DB_APPEND, we need to do the insert to populate the
    +            * key value. So we swap the 'normal' order of updating
    +            * secondary / verifying foreign databases and inserting.
    +            *
    +            * If there is an append callback, the value stored in
    +            * data->data may be replaced and then freed.  To avoid
    +            * passing a freed pointer back to the user, just operate
    +            * on a copy of the data DBT.
    +            */
    +           tdata = *data;
    +           /*
    +            * If this cursor is going to be closed immediately, we don't
    +            * need to take precautions to clean it up on error.
    +            */
    +           if (F_ISSET(dbc_arg, DBC_TRANSIENT))
    +                dbc_n = dbc_arg;
    +           else if ((ret = __dbc_idup(dbc_arg, &dbc_n, 0)) != 0)
    +                goto err;
    +
    +           pgno = PGNO_INVALID;
    +
    +           /*
    +            * Append isn't a normal put operation;  call the appropriate
    +            * access method's append function.
    +            */
    +           switch (dbp->type) {
    +           case DB_QUEUE:
    +                if ((ret = __qam_append(dbc_n, key, &tdata)) != 0)
    +                     goto err;
    +                break;
    +           case DB_RECNO:
    +                if ((ret = __ram_append(dbc_n, key, &tdata)) != 0)
    +                     goto err;
    +                break;
    +           default:
    +                /* The interface should prevent this. */
    +                DB_ASSERT(dbenv,
    +                    dbp->type == DB_QUEUE || dbp->type == DB_RECNO);
    +
    +                ret = __db_ferr(dbenv, "DBC->put", 0);
    +                goto err;
    +           }
    +           /*
    +            * The append callback, if one exists, may have allocated
    +            * a new tdata.data buffer.  If so, free it.
    +            */
    +           FREE_IF_NEEDED(dbenv, &tdata);
    +           pkey.data = key->data;
    +           pkey.size = key->size;
    +           /* An append cannot be replacing an existing item. */
    +           nodel = 1;
           } else {
                /* Set pkey so we can use &pkey everywhere instead of key.  */
                pkey.data = key->data;
    *** 1400,1405 ****
    --- 1454,1465 ----
      skip_s_update:
    +       * If this is an append operation, the insert was done prior to the
    +       * secondary updates, so we are finished.
    +       */
    +      if (flags == DB_APPEND)
    +           goto done;
    +      /*
            * If we have an off-page duplicates cursor, and the operation applies
            * to it, perform the operation.  Duplicate the cursor and call the
            * underlying function.

  • Problems with inserting elements into vectors

    Hi,
    I have a problem with the setElementAt() method for vectors.
    I want to initialise a vector that is same size as a previous vector declared in my program and insert float 0.0 in all the positions.
    The code below is a for loop to do just this where count is the size of the previous vector.
    for(int i=0;i<count; i++)
                   vLargest.setElementAt(zero,i);
              }i have declared zero as a float
    float zero = 0.0f;
    the error that i'm getting is that it that the vector cannot be applied to a float.
    Can anybody tell me what i'm doing wrong?
    Thanks

    Yes you need to store Objects in your Vector not primitives.
    float is not an Object it is a primitive. But Float is an object.

  • Problem with ArrayList

    Hello,
    I am having a problem with a program I am trying to write. The idea of the program is to:
    A) read a list of movies list from a text file
    B) create an object for each movie using the information from the text file
    C) place the objects into an arrayList
    My problem is that when I check my arrayList it seems to only contain multiple copies of the first movie read from the text file. Here is my code
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.io.FileOutputStream;
    import java.io.FileNotFoundException;
    import java.util.ArrayList;
    public class MovieReader
         PrintWriter outputStream = null;
         public void readFile()
              try
                      BufferedReader in = new BufferedReader(new FileReader("movie.txt"));
                      String str;
                      while ((str = in.readLine()) != null)
                           process(str);
                      in.close();
              catch (IOException e)
                  e.printStackTrace();
         ArrayList <ValidMovie> movieList = new ArrayList<ValidMovie>();
         private void process(String line)
              String[] array = line.split("\t");
              int i = 0;
              for ( i = 0; i < array.length; i++)
                   String tempTitle = array[0];
                   String tempYear = array [1];
                   String tempRating = array [2];
                   String tempFormat = array [3];
                   ValidMovie uuj = new ValidMovie(tempTitle, tempYear, tempRating, tempFormat);
                   movieList.add(uuj);
              System.out.println("item at index 1 is:   " + movieList.get(1));
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         private void writeFile(String [] arrayL)
              String [] arrayWrite = arrayL;
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
    //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
         public static void main(String[] args)
              MovieReader mv = new MovieReader();
              mv.readFile();
    //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    }This is the code that creates an object for each movie:
    import java.io.Serializable;
    public class ValidMovie implements Serializable
         private String title;
         private String year;
         private String rating;
         private String format;
         public ValidMovie()
         public ValidMovie(String tTitle, String tYear, String tRating, String tFormat)
              title = tTitle;
              year = tYear;
              rating = tRating;
              format = tFormat;
         //Getters for title, year, rating and format
         public String getTitle ()
              return title;
         public String getYear ()
              return year;
         public String getRating ()
              return rating;
         public String getFormat ()
              return format;
         public String toString ()
              return title + "\t" + year + "\t" + rating + "\t" + format;
    }The following is what I have in the movie.txt file:
    Bamboozled     2000     2     DVD
    What Lies Beneath     2000     1.5     DVD
    Beneath the Planet of the Apes     1970     1     DVD
    You Can Count On Me     2000     3.5     Theater
    And finally this is the result when I run the code:
    item at index 1 is: Bamboozled     2000     2     DVD
    item at index 1 is: Bamboozled     2000     2     DVD
    item at index 1 is: Bamboozled     2000     2     DVD
    item at index 1 is: Bamboozled     2000     2     DVD
    I am sure that it is something simple that I am overlooking but I cannot figure it out. When I change the index in the code:
    System.out.println("item at index 1 is:   " + movieList.get(1));to 0 or 2 or 3 then result is the same, it will just show the first movie in the text file. Any help would be greatly appreciated. Thanks

    Thanks for the reply, it helped but I am now getting 4 of each of the movies after adding you suggestion. This is much better now I just need to figure out why the loop is causing the extra copies. Thanks again :)
    Item 0: Bamboozled     2000     2     DVD
    Item 1: Bamboozled     2000     2     DVD
    Item 2: Bamboozled     2000     2     DVD
    Item 3: Bamboozled     2000     2     DVD
    Item 4: What Lies Beneath     2000     1.5     DVD
    Item 5: What Lies Beneath     2000     1.5     DVD
    Item 6: What Lies Beneath     2000     1.5     DVD
    Item 7: What Lies Beneath     2000     1.5     DVD
    Item 8: Beneath the Planet of the Apes     1970     1     DVD
    Item 9: Beneath the Planet of the Apes     1970     1     DVD
    Item 10: Beneath the Planet of the Apes     1970     1     DVD
    Item 11: Beneath the Planet of the Apes     1970     1     DVD
    Item 12: You Can Count On Me     2000     3.5     Theater
    Item 13: You Can Count On Me     2000     3.5     Theater
    Item 14: You Can Count On Me     2000     3.5     Theater
    Item 15: You Can Count On Me     2000     3.5     Theater

Maybe you are looking for

  • Wi-Fi Proxy settings work in Safari, but not recognised by other apps?

    Hi all, At home, my iPod Touch (gen two, Firmware 2.2.1) connects fine to our wireless router and all applications (e.g. Safari, Tap Tap Revenge 2 etc) can access the internet. We have no proxy setting at home.. Then, at uni we use special "manual ht

  • How to set an icon for a JLabel with Advanced Synth

    Hello, Do you know how to define an icon for a JLabel components with Advanced Synth (with a XML file) ? I have tried this : <style id="jLabelNotes">         <imageIcon id="iconNotes" path="images/note.png" />         <property key="Label.icon" value

  • Advanced tutorial 3.0 : Error 403 when executing own PL/SQL procedure

    Hello, Advanced tutorial 3.0 Chap 9 : Upload and download Files in an application. As written, I have created the procedure "download_my_file" to download a file content from a custom table.... Granted the execute on download_my_file to public ==> OK

  • OOBE Error When installing CS6 on Mac. Cannot open Media DB

    So i am trying to install CC on a mac 10.10 OS, and when i run the install package, it runs the startup scripts, then flashes to validating install and them come up with a error that the installtion has failed Looking at the logs is says ERROR  OOBE 

  • Console Authentication Failed

    I'm trying to set up reverse console access in the lab; AUX port on router R1 is connected to Console port on switch SW1. On R1 I have the following configuration; aaa new-model aaa authentication login default group tacacs+ local aaa authentication