Building a linked list

Hi, Im having some trouble and was wondering if anyone could figure this out. I need to read in integers to build a linked list, but stuck on what to do after I read in a integer. Any help would be much appreciated!
class lp
    public int first;
    public lp next;
    public lp(int first1, lp next1)
      first = first1; //first item in list
      next = next1; //next item in list
  public static void main(String[] args)
    int n = 0;
    Scanner sc = new Scanner(System.in);
    while(n!=-1)
    System.out.println("input: ");
    n = sc.nextInt();
    lp l = new lp(n,null); //I tried this but I get a error nonstatic variable this cannot be ref from a static context
}Edited by: jennahogan1 on Aug 14, 2008 6:15 AM

jennahogan1 wrote:
A linked list is a series of nodes with an item(int, string, double, etc) and a reference to the next node in the listRight, it is a data structure as you described. Next question (which has already been asked), "Are you trying to create your own data structure or are you allowed to use Java's?"

Similar Messages

  • How to inlcude POWL in Page builder as link list for already existing powl link list

    Hi All,
    I got a requirement to display POWL query as Link List in a Page Builder. But I have to add this POWL Link List to already existing set of Link Lists.
    The below are already existing ones. I want to add my custom POWL to the below list.
    Can any one please help me to achieve this requirement.
    Thanks in Advance.
    Thanks,
    Srikanth Pullela

    Hi Srikanth,
    I not understood properly ur requirement.
    You  want to add a custom POWL query in an existing POWL application?
    Go to POWL_COCKPIT, Select your POWL_APPLICATION.
    Create POWL query.
    And While Registering the Query just mention the category in whcih you want it to display.

  • Link list help

    Hi, I am implementing a graph for my Java project and part of the coding requires link list for the edges.
    I wrote the code, but I just don't understand why it does not function the way like it is in C++.
    Bascilly, I have trouble adding data into a linklist
    My codes are as follows:
    public int insertLink(String fCity, String tCity, int distance)
         int location = find(fCity);
         if(location == -1)
              return -1;
         else
         insertNode(new Link(tCity,distance), location);
         return 0;     
    private void insertNode(Link node, int index)
              Link head = vertex[index].head;
              while(head != null)
                   head = head.next;
              head = node;
    This is to add stuff to the list, but for some reason, when i try to display the data, i keep getting null. somehow when
    head = node
    head = new Link(data, data);
    the head points to somwhere else, and not refer to the linklist vertex[index].head anymore...
    Here is my code to display my data:
    public void printVertex()
         for(int i = 0; i < vertex.length; i++)
              if(vertex[i] != null)
                   System.out.print(vertex[i]+" --");
                   Link node = vertex.head;
                   while(node != null)
              System.out.print(node.toCity+","+node.distance+"--");
                             node = node.next;
                   System.out.println();
    Am i doing something wrong so my linklist isn't implement correct?
    THank you.

    Hi, the "fix" for head.next != null didn't work
    private void insertNode(Link node, int index)
              Link head = vertex[index].head;
              while(head != null)
                   head = head.next;
              head = node;
              System.out.println(head.toCity+","+head.distance);
              System.out.println(vertex[index].head.toCity+","+vertex[index].head.distance);
         }basiclly. When i do System.out.println(head.toCity+","+head.distance);, it can display data
    but System.out.println(vertex[index].head.toCity+","+vertex[index].head.distance);
    it throow null's error.
    Btw, yes , i know Java have build in Link list, but unfortunately, my professor likes to reinvent the wheel and want us to do everything from scratch...
    So any other help will be useful, thank you.

  • Display a Linked List ADT in JTree ?

    Most of the Swing examples that I have noticed for building a JTree have used many different ADTs, but I haven't noticed any examples to use a JTree to display a linked list (not necessarily the LinkedList class though). I was studying Data Structures & Algorithms, and the majority of the examples for Binary Trees, Red-Black Trees, and 2-3-4 Trees use a form of a linked list to connect all of the nodes together.
    Isn't it, or should it, be possible to use a JTree to display a linked list ADT ? Or am I missing something somewhere ?

    Maybe, if you only had a reference to one other node in the object that is being linked together.
    What if there was a node object that contained three references ?
    nextNode
    prevNode
    subNode

  • Linked lists problem -- help needed

    Hello again. I've got yet another problem in my C++ course that stems from my use of a Mac instead of Windows. I'm going to install Parallels so I can get Windows on my MacBook and install Visual Studio this week so that I don't have to deal with these discrepancies anymore, but in the meanwhile, I'm having a problem here that I don't know how to resolve. To be clear, I've spent a lot of time trying to work this out myself, so I'm not just throwing this up here to have you guys do the work for me -- I'm really stuck here, and am coming here as a last resort, so I'll be very, very appreciative for any help that anyone can offer.
    In my C++ course, we are on a chapter about linked lists, and the professor has given us a template to make the linked lists work. It comes in three files (a header, a source file, and a main source file). I've made some adjustments -- the original files the professor provided brought up 36 errors and a handful of warnings, but I altered the #include directives and got it down to 2 errors. The problematic part of the code (the part that contains the two errors) is in one of the function definitions, print_list(), in the source file. That function definition is shown below, and I've marked the two statements that have the errors using comments that say exactly what the errors say in my Xcode window under those two statements. If you want to see the entire template, I've pasted the full code from all three files at the bottom of this post, but for now, here is the function definition (in the source file) that contains the part of the code with the errors:
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    As you can see, the problem is with the two statements that contain the 'setw' function. Can anyone help me figure out how to get this template working and get by these two errors? I don't know enough about linked lists to know what I can and can't mess with here to get it working. The professor recommended that I try using 'printf' instead of 'cout' for those two statements, but I don't know how to achieve the same effect (how to do whatever 'setw' does) using 'printf'. Can anyone please help me get this template working? Thank you very, very much.
    For reference, here is the full code from all three files that make up the template:
    linkedlist.h (header file):
    #ifndef LINKED_LINKED_H
    #define LINKED_LINKED_H
    struct NODE
    string name;
    int test_grade;
    NODE * link;
    class Linked_List
    public:
    Linked_List();
    void insert(string n, int score);
    void remove(string target);
    void print_list();
    private:
    bool isEmpty();
    NODE *FRONT_ptr, *REAR_ptr, *CURSOR, *INSERT, *PREVIOUS_ptr;
    #endif
    linkedlist.cpp (source file):
    #include <iostream>
    using namespace std;
    #include "linkedlist.h"
    LinkedList::LinkedList()
    FRONT_ptr = NULL;
    REAR_ptr = NULL;
    PREVIOUS_ptr = NULL;
    CURSOR = NULL;
    void Linked_List::insert(string n, int score)
    INSERT = new NODE;
    if(isEmpty()) // first item in List
    // collect information into INSERT NODE
    INSERT-> name = n;
    // must use strcpy to assign strings
    INSERT -> test_grade = score;
    INSERT -> link = NULL;
    FRONT_ptr = INSERT;
    REAR_ptr = INSERT;
    else // else what?? When would this happen??
    // collect information into INSERT NODE
    INSERT-> name = n; // must use strcpy to assign strings
    INSERT -> test_grade = score;
    REAR_ptr -> link = INSERT;
    INSERT -> link = NULL;
    REAR_ptr = INSERT;
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    void Linked_List::remove(string target)
    // 3 possible places that NODES can be removed from in the Linked List
    // FRONT
    // MIDDLE
    // REAR
    // all 3 condition need to be covered and coded
    // use Trasversing to find TARGET
    PREVIOUS_ptr = NULL;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    if(CURSOR->name == target) // match
    { break; } // function will still continue, CURSOR will
    // mark NODE to be removed
    else
    { PREVIOUS_ptr = CURSOR; } // PREVIOUS marks what NODE CURSOR is marking
    // JUST before CURSOR is about to move to the next NODE
    if(CURSOR == NULL) // never found a match
    { return; }
    else
    // check each condition FRONT, REAR and MIDDLE
    if(CURSOR == FRONT_ptr)
    // TARGET node was the first in the list
    FRONT_ptr = FRONT_ptr -> link; // moves FRONT_ptr up one node
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    }// why no need for PREVIOUS??
    else if (CURSOR == REAR_ptr) // TARGET node was the last in the list
    { // will need PREVIOUS for this one
    PREVIOUS_ptr -> link = NULL; // since this node will become the last in the list
    REAR_ptr = PREVIOUS_ptr; // = REAR_ptr; // moves REAR_ptr into correct position in list
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    else // TARGET node was the middle of the list
    { // will need PREVIOUS also for this one
    PREVIOUS_ptr -> link = CURSOR-> link; // moves PREV nodes' link to point where CURSOR nodes' points
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    bool Linked_List::isEmpty()
    if ((FRONT_ptr == NULL) && (REAR_ptr == NULL))
    { return true; }
    else
    { return false;}
    llmain.cpp (main source file):
    #include <iostream>
    #include <string>
    #include <iomanip>
    using namespace std;
    #include "linkedlist.h"
    int main()
    Linked_List one;
    one.insert("Angela", 261);
    one.insert("Jack", 20);
    one.insert("Peter", 120);
    one.insert("Chris", 270);
    one.print_list();
    one.remove("Jack");
    one.print_list();
    one.remove("Angela");
    one.print_list();
    one.remove("Chris");
    one.print_list();
    return 0;

    setw is the equivalent of the field width value in printf. In your code, the printf version would look like:
    printf("%8s", CURSOR->name.c_str());
    I much prefer printf over any I/O formatting in C++. See the printf man page for more information. I recommend using Bwana: http://www.bruji.com/bwana/
    I do think it is a good idea to verify your code on the platform it will be tested against. That means Visual Studio. However, you don't want to use Visual Studio. As you have found out, it gets people into too many bad habits. Linux is much the same way. Both development platforms are designed to build anything, whether or not it is syntactically correct. Both GNU and Microsoft have a long history of changing the language standards just to suit themselves.
    I don't know what level you are in the class, but I have a few tips for you. I'll phrase them so that they answers are a good exercise for the student
    * Look into const-correctness.
    * You don't need to compare a bool to 1. You can just use bool. Plus, any integer or pointer type has an implicit cast to bool.
    * Don't reuse your CURSOR pointer as a temporary index. Create a new pointer inside the for loop.
    * In C++, a struct is the same thing as a class, with all of its members public by default. You can create constructors and member functions in a struct.
    * Optimize your function arguments. Pass by const reference instead of by copy. You will need to use pass by copy at a later date, but don't worry about that now.
    * Look into initializer lists.
    * In C++ NULL and 0 are always the same.
    * Return the result of an expression instead of true or false. Technically this isn't officially Return Value Optimization, but it is a good habit.
    Of course, get it running first, then make it fancy.

  • Remove element in linked list linked list

    here's my codes
    public class Student
        private String name, matric;
        public Student(){}
        public Student( String name, String matric)
           this.name = name;
           this.matric = matric;
         public String getName()
         { return name;}
         public void setName(String name)
         { this.name = name;}
         public String getMatric()
         { return matric;}
         public void setMatric( String matric)
         { this.matric = matric;}
         public String toString()
            return "Name: " + name + ", Matric no: " + matric + "\n";   
        }// end student classthe link list class
    public class LinkedList extends java.util.LinkedList
        // instance variables - replace the example below with your own
        private ListNode firstNode;
        private ListNode lastNode;
        private ListNode currNode;
        private String name;
         * Constructor for objects of class LinkedList
        public LinkedList(String s)
            name = s;
            firstNode = lastNode = currNode = null;
        public LinkedList() {this("list");}
        public synchronized void insertAtFront(Object insertItem) {
            if (isEmpty())
                firstNode = lastNode = new ListNode(insertItem);
            else
                firstNode = new ListNode(insertItem, firstNode);
        public synchronized void insertAtBack(Object insertItem) {
            if (isEmpty())
                firstNode = lastNode = new ListNode(insertItem);
            else
                lastNode = lastNode.next = new ListNode(insertItem);
        public synchronized Object removeFromFront() throws EmptyListException {
            Object removeItem = null;
            if (isEmpty())
                throw new EmptyListException(name);
                removeItem = firstNode.data;
                if (firstNode.equals(lastNode))
                    firstNode = lastNode = null;
                else
                    firstNode = firstNode.next;
                return removeItem;    
        public synchronized Object removeFromBack() throws EmptyListException {
            Object removeItem = null;
            if (isEmpty()) throw new EmptyListException(name);
            removeItem = lastNode.data;
            if (firstNode.equals(lastNode))
                firstNode = lastNode = null;
            else {
                ListNode current = firstNode;
                while (current.next != null)
                    current = current.next;
                lastNode = current;
                current.next = null;
            return removeItem;
        public synchronized boolean isEmpty()
        { return firstNode == null;}
        public synchronized Object getFirst() {
            if (isEmpty())
                return null;
               else {
                    currNode = firstNode;
                    return currNode.data;
        public synchronized Object getNext() {
            if (currNode != lastNode) {
                currNode = currNode.next;
                return currNode.data;
            else
                return null;
        public synchronized String print() {
            String out = "";
            if (isEmpty()) {
                out = "Empty "+ name;
            out = "The "+ name+ " is:\n";
            ListNode current = firstNode;
            while (current != null) {
                out += ""+ current.data.toString();
                current = current.next;
            return out;
        public synchronized Object getLast() {
            if (isEmpty())
                return null;
            else {
                currNode = lastNode;
                return currNode.data;
    }// end LinkedListand the application class
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    public class StudentAppLL
        public static void main(String[] args) throws IOException {
            LinkedList std = new LinkedList();
            BufferedReader br = new BufferedReader(new FileReader("studentIn.txt"));
            PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("studentOut.txt")));
            String line = br.readLine();
            while (line != null) {
                StringTokenizer tk = new StringTokenizer(line);
                while (tk.hasMoreTokens()) {
                    String n = tk.nextToken();
                    String m = tk.nextToken();
                    Student a = new Student(n, m);
                    std.insertAtFront(a);
                    line = br.readLine();
            std.print();
            System.out.print(std.getFirst());
            Student data = (Student)std.getFirst();
            String matric;
            String nm = "Zaki";
            while (data != null) {
                if (data.getName().equalsIgnoreCase(nm)) {
                    System.out.print(data.getName()+ " ada\n");
                    //std.re
                    data = (Student)std.getNext();  
            Student b = new Student("Umar","2004163943");
            std.insertAtBack(b);
            String name = "", matric = "", s = "";
            boolean stop = false;
            int size = std.size();
            JOptionPane.showMessageDialog(null, size);
            s = JOptionPane.showInputDialog("A: Add Student\nR: Remove Student" +
                                           "\nV: View Sorted Student List\nS: Stop ");
            while(!stop){
                if (s.equalsIgnoreCase("A")){
                    name = JOptionPane.showInputDialog("Enter student name: ");
                    matric = JOptionPane.showInputDialog("Matric number: ");
                    Student student = new Student(name, matric);
                    std.insertAtBack(student);
                    s = JOptionPane.showInputDialog("A: Add Student\nR: Remove Student" +
                                           "\nV: View Sorted Student List\nS: Stop ");
                else if (s.equalsIgnoreCase("R")){
                    Student data = (Student)std.getFirst();
                    Student first = (Student)std.getFirst();
                    Student last = (Student)std.getLast();
                    JOptionPane.showMessageDialog(null, "First: "+ first+ "\nLast: "+ last);
                    String ns = JOptionPane.showInputDialog("Enter the student's name");
                    while (data != null) {
                        // buang kalau pd bhgn dpn
                        if (data.getName().equalsIgnoreCase(ns) && ns.equalsIgnoreCase(first.getName())) {
                            JOptionPane.showMessageDialog(null, first.getName());
                            JOptionPane.showMessageDialog(null, data.getName()+ " kena buang");
                            //std.removeFromFront();
                            std.remove(data);
                            s = JOptionPane.showInputDialog("A: Add Student\nR: Remove Student" +
                                           "\nV: View Sorted Student List\nS: Stop ");                                       
                         if (data.getName().equalsIgnoreCase(ns) && ns.equalsIgnoreCase(last.getName())) {
                            std.removeFromBack();
                            JOptionPane.showMessageDialog(null, data.getName()+ " kena buang");
                             s = JOptionPane.showInputDialog("A: Add Student\nR: Remove Student" +
                                           "\nV: View Sorted Student List\nS: Stop ");
                         data = (Student)std.getNext();  
                    }// habis while loop
                // keluar jika pilih 's'
                else if (s.equalsIgnoreCase("S")){ stop = true;}
                else { JOptionPane.showMessageDialog(null, "Wrong input"); }                    
            JOptionPane.showMessageDialog(null, std.print());
            br.close();
            pw.close();
        }// end main class
    }and here's the studentIn.txt data
    Ahmad 2004199877
    Hanif 2005378219
    Zaki 2004456790
    how can i do it? i mean to remove other than first element?
    Message was edited by:
    ikki_72

    > public class LinkedList extends java.util.LinkedList
    // instance variables - replace the example below with your own
    private ListNode firstNode;
    private ListNode lastNode;
    private ListNode currNode;
    private String name;
    [ ... ]Eeeeeeeeeew! Don't do that ever again! A java.util.LinkedList is very
    well capable of managing a linked list (it is a linked list after all).
    Either build your own linked list mechanics or use a LinkedList as
    one of the member variables of your class, but please don't do this.
    kind regards,
    Jos ( ... that was scary ... )

  • Linked Lists

    I am trying to create a linked list with an object called ClassID But I am confused on the constructor. Could someone point me in teh right direction. this is what i got:
    import java.io.*
    public class Link
         public ClassID id;
         public Link next;
    public Link(ClassID id)
         id = new ClassID(id);
         

    Sorry, after rereading your initial post a third time, I see there is more to what you are asking and displaying than is easily discernable.
    I am assuming you mant the linked list wis of type ClassId, if ClassId was actually meant to be the data objects stored in the list then you must give your Linked List a new name, so say ClassLl. If this is the case replace ClassId with ClassLl in my example below.
    First, when you are using a constructor you don't really want to pass in "id"s and you definitely don't need "next". This is because the purpose of the constructor is to build a new linked list, and id and next should never be used in making a new linked list. The ClassId object if you have to create your own linked list without using the collections libraries should have a id and next field, but they should not be necessary for the constructor. The id, next, and ClassId if it is meant to be the data stored all should only come into play in methods manipulating the linked list.
    At most, you may have an already cronstructed linked list that you plan to pass to the linked list, but there is never a reason to pass id or next to a constructor.
    so
    public class List
         public ClassID id = new ClassId(); //or = new LinkedList() if allowed
            public List()  //there is no preexisting linkedlist being passed in
         public List(ClassID inID)  //inId is a linkedlist
              id = inID;
    }In short, worry about setting up your linked list before you start trying to fill it with stuff.

  • Help with Library link lists ..

    Hi ,
    I am working with Scott Mazur on a incorporating 8.1.7 in our code bace for our next product release. I am having problems with defining the library link list needed for builds. In the documentation it makes referance to $ORACLE_HOME/precomp/demo/proc which I cannot find. I have installed the 8.1.7 on 3 platforms (Solaris, AIX and NT ) and none of the system have this information. Can you please point me to where I may find some help in this area. We are in a critical path right now so I would appreciate any help you could give me. The sooner the better.
    Thank you for your time and help ,
    Cheryl Pollock
    Lockheed Martin Global Telecommunications .
    Formtek
    Pittsburgh office .
    (412) 937-4970
    null

    You actually shouldn't try to get the library link lists directly. Rather, you should use the $ORACLE_HOME/rdbms/demo/demo_rdbms.mk makefile like this:
    make -f $ORACLE_HOME/rdbms/demo/demo_rdbms.mk build EXE=yourexecutable OBJS="object list"
    where yourexecutable is the name for your executable and the OBJS= includes a quoted list of all your object and library files.
    null

  • Help on resetting my own linked list.

    I got a Binary tree project, but to get things started, i decided to put all the elements into a LinkedList first.
    Anyway, it seems i forgot how to go back to the root of my linkedList. I can traverse through the LinkedList, but it seems that whenever I try to call it again, it's already at the end of the List. My linkedList consist of a Integer, and a the next Node is called "left" atm.
    Here's my code:
    class MyTree { //class definition
         class Node {
              int data;
              Node left;
              Node right;
    private Node root;
    private int [] rdata;
    Node m = new Node();
    BufferedReader in;
       public void generate(int n, int range){
              Random r = new Random();
              rdata  = new int[n];
                      for (int i = 0; i<n; i++) {
                            rdata[i] = r.nextInt(range);
              Node b = new Node();
              for (int j = 0; j<n; j++){ 
                   b.data = rdata[j];
                   m.left = b;
                   m = m.left;
                   System.out.println("m.data " + m.data);
                   Now whenever I try to call it back again, It would only print the last integer in the LinkedList, so I had to use an array to set it up it again basically.
         public void show() {
                   Node b = new Node();
                   for (int j = 0; j<rdata.length; j++){ 
                   b.data = rdata[j];
                   m.left = b;
                   m = m.left;
                   System.out.println("m.data " + m.data);
         }I'll like to traverse through the list again without setting up the linked list every time.
    Thanks in Advance.
    Message was edited by:
    Vertix
    Message was edited by:
    Vertix
    Message was edited by:
    Vertix
    Message was edited by:
    Vertix
    Message was edited by:
    Vertix

    Well, I tried to remove Node b, and just use the Node
    m to set up my LinkedList.[ code snipped ]
    But it's giving NullPointerExceptions everytime I try to run it. I already
    created a Node m at the begging, so I don't see where it's getting the
    nullpointer.That's not how you should create that list. You need a new node per
    element in the rdata[] array. There are two possible states:
    1) there isn't a list yet, i.e. the 'root' element equals null
    2) there's a list already and 'm' points to the last element of the list.
    This is how you do it:m= root; // both are null; see 1)
    for (int i= 0; i < rdata.length; i++) { // build the list
       Node b= new Node(); // build a new node
       b.data= rdata;
    if (root == null) // first list element?
    root= b;
    else // no, hookup to last element
    m.left= b;
    m= b; // m points to last element
    kind regards,
    Jos

  • *** glibc detected *** corrupted double-linked list: 0x004ec848 ***

    hi,
    I am using Berkeley DB database and facing a problem while retrieving records. After building database i'm retrieving records from that database.After retrieving some records it gives the error as
    *** glibc detected *** corrupted double-linked list: 0x004ec848 *** Aborted. What can i do solve this problem.
    Thank you,
    ravi

    Hi Ravi,
    Have you googled for the error message? What are the results?
    A good thing to do is to provide me a test program and more details about your operating system environment. Also, try to update your glibc version.
    Regards,
    Bogdan Coman

  • *** glibc detected *** corrupted double-linked list: 0x0027f878 ***

    users are getting this error
    {noformat}*** glibc detected *** corrupted double-linked list: 0x0027f878 ***{noformat}{noformat} {noformat}
    what could the issue for above error,
    in concurrent reqest out put,
    Apps:12i
    os: Linux

    Sawwan,
    Request language is :
    AMERICAN
    Request territory is :
    AMERICA
    Previous NLS_LANG Environment Variable was :
    AMERICAN_AMERICA.WE8ISO8859P15
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    AMERICAN_AMERICA.WE8ISO8859P15
    stat_low = 6
    stat_high = 0
    emsg:was terminated by signal 6
    Enter Password:
    *** glibc detected *** corrupted double-linked list: 0x0027f878 ***
    Report Builder: Release 10.1.2.0.2 - Production on Wed Mar 18 09:02:51 2009
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Reset original NLS_LANG in environment as :
    AMERICAN_AMERICA.WE8ISO8859P15
    Program was terminated by signal 6
    Concurrent Manager encountered an error while running Oracle*Report for your concurrent request xxxxxxx

  • Report Builder 3 linked report parameters not working

    Hi,
    I have an issue with Report Builder and linking to a report.
    I have a Matrix report with two Row Groups of Area and Sub Area. It simply shows a total by area and subarea of our property stock.
    I have a detail report that I want to link to. I want the matrix to work that when you click on either the area or the sub area it shows you those properties on a separate report.
    On my detail report I have created two parameters. One called area_parameter and one called subarea_parameter. These are then added to the filter od the dataset.
    On the matrix report – on the subarea total  - I have an action to open the detail report when area_parameter = Area and subarea_parameter = subarea. That works perfectly.
    The issue I have when I add an action to area. I have just placed area_parameter = Area in the action and I keep getting an error –
    The ‘subarea_parameter’ parameter is missing a value.
    What do I need to do to get this to work. As I’m only clicking on the Area, the Sub Area shouldn’t matter?
    I’m lost at how to get this to work. Is there a way round this.
    Both report have the same shared dataset

    Hi ikilledbill,
    According to your description, there is a matrix with two row groups: Area and Sub Area. You want to jump to detail report when you click either the area or the sub area. It works fine when you click sub area, but when you add Go to report action to area,
    the error occurred.
    When we click area, we could not pass values of sub area to detail report by design. As a workaround, we can set default values for subarea parameter. For detail information, please refer to the following steps:
    Create a dataset for subarea parameter.
    Right-click subarea parameter and open Parameter Properties dialog box.
    Type name and prompt, select Allow multiple values check box.
    Click Default Values in left pane, select Get values from the query, then select dataset and value field from drop down list, then click OK.
    Right-click area and click Text Box Properties.
    Click Action in left pane, select Go to report and select a subreport from drop down list.
    Click Add button to add parameter to run the detail report.
    The following screenshot is for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Strange error message - linked lists (again)

    I have to keep at this linked list thing if I'm ever going to really understand it!!
    I have created a method to create a linked list via user input. I'm receiving only one strange ERROR, which states:
    "This method must return a result of of type ListADT.Node."
    And I have just started building my class ListADT...
    class ListADT{
    public Node createList(int aNumber){     // THIS IS WHERE THE ERROR POINTS
          * integer variable aNumber is the length of the list user wishes to create.
         Scanner console = new Scanner(System.in);
         int number;                    // declare variable number as an integer.
         Node newNode = new Node();          // declare and initialize newNode.
         Node first = new Node();          // declare and initialize first.
         Node last = new Node();               // delcare and initizlize last.
         try
              for(int i = 0; i <= aNumber; i++){               // for loop to enter numbers to build list.
              System.out.println("Please enter an integer: ");     // prompt user.
              number = console.nextInt();                    // assign user input to variable number.
              newNode.info = number;          // assign number to newNode;
              if(first == null){               // checks to see if Node first is a null value.
                   first = newNode;          // if true, then this node is the first and last node in the list.
                   last = newNode;
              else{                              // if first is not null, then newNode is placed at the end of the list.
                   last.link = newNode;
                   last = newNode;
              return first;
         catch (InputMismatchException imeRef)     //Catches non-integer values
              System.out.println("You entered a non-Integer! " + imeRef.toString());     //Prints error message

    Now why can't the error messages help
    out a little more? I would have never guessed that
    there was a problem with the catch block not
    returning anything!!The message was pretty informative -- it told you what was wrong. If the compiler could be so smart as to be able to tell you exactly what to fix, then the compiler would be able to write code all by itself -- and then you'd be out of a job.

  • After Delete in Linked list...unable to display the linked list

    Hi...i know that there is an implementation of the class Linked Link but i am required to show how the linked list works in this case for my project...please help...
    Yes..I tried to delete some objects in a linked list but after that i am not able to display the objects that were already in the linked list properly and instead it throws an NullPointerException.
    Below shows the relevant coding for deleting and listing the linked list...
    public Node remove(Comparator comparer) throws Exception {
         boolean found = false;
         Node prevnode = head;          //the node before the nextnode
         Node deletedNode = null;     //node deleted...
         //get next node and apply removal criteria
         for(Node nextnode = head.getNextNode(); nextnode != null; nextnode = nextnode.getNextNode()) {
              if(comparer.equals(nextnode)) {
                   found = true;
                   //remove the next node from the list and return it
                   prevnode.setNextNode(nextnode.getNextNode());
                   nextnode.setNextNode(null);
                   deletedNode = nextnode;
                   count = count - 1;
                   break;
         if (found) return deletedNode;
         else throw new Exception ("Not found !!!");
    public Object[] list() {
         //code to gather information into object array
         Node node;
         Object[] nodes = new Object[count];
         node = head.getNextNode();
         for (int i=0; i<count; i++) {
              nodes[i] = node.getInformation();  // this is the line that cause runtime error after deleting...but before deleting, it works without problem.
              node = node.getNextNode();
         return nodes;
    }Please help me in figuring out what went wrong with that line...so far i really can't see any problem with it but it still throws a NullPointerException
    Thanks

    OK -- I've had a cup and my systems are coming back on line...
    The problem looks to be the way that you are handling the pointer to the previous node in your deletion code. Essentially, that is not getting incremented along with the nextNode -- it is always pointing to head. So when you find the node to delete then the line
       prevnode.setNextNode(nextnode.getNextNode());will set the nextNode for head to be null in certain situations (like if you are removing the tail, for instance).
    Then when you try to print out the list, the first call you make is
    node = head.getNextNode();Which has been set to null, so you get an NPE when you try to access the information.
    Nothing like my favorite alkaloid to help things along on a Monday morning...
    - N

  • Problem with Queue and linked list

    Hi... i've got an assignment it start like this.
    You are required to write a complete console program in java includin main() to demonstrate the following:
    Data Structure: Queue, Priority Queue
    Object Involved: Linked-List, PrintJob
    Operations Involved:
    1. insert
    2. remove
    3. reset
    4. search
    Dats all... I've been given this much information... Can any1 try to help me please... How to make a start??? And wat does the print job means???
    Can any1 tell me wat am supposed to do...

    Hi,
    Why don't you start your demo like this?
    import java.io.IOException;
    public class Demo {
         public Demo() {
         public void startDemo() throws IOException {
              do {
                   System.out.println("String Console Demo ");
                   System.out.println("\t" + "1. Queue Demo");
                   System.out.println("\t" + "2. PriorityQueue Demo");
                   System.out.println("\t" + "3. LinkedList Demo");
                   System.out.println("\t" + "4. PrintJob Demo");
                   System.out.println("Please choose one option");
                   choice = (char) System.in.read();
                   showDemo(choice);
              } while (choice < '1' || choice > '4');
         public void showDemo(char ch) {
              switch (ch) {
              case '1':
                   System.out.println("You have chosen Queue Demo ");
                   showOperations();
                   break;
              case '2':
                   System.out.println("You have chosen Priority Queue Demo ");
                   showOperations();
                   break;
              case '3':
                   System.out.println("You have chosen LinkedList Demo ");
                   showOperations();
                   break;
              case '4':
                   System.out.println("You have chosen Print Job Demo ");
                   showOperations();
                   break;
         private void showOperations() {
              System.out.println("Please choose any operations ");
              System.out.println("\t" + "1. Insert ");
              System.out.println("\t" + "2. Remove ");
              System.out.println("\t" + "3. Reset ");
              System.out.println("\t" + "4. search ");
         public static void main(String[] args) throws IOException {
              Demo demo = new Demo();
              demo.startDemo();
         private char choice;
    Write a separate classes for the data structures show the initial elements and call the methods based on the operations then show the result.
    Thanks

Maybe you are looking for

  • Variable screen performance in report

    In my project we are having  somany master data objects, we have to find the performance of selection screen ,earlier we have only display as selection screen  as key now according to our client requirment we are providing both key and text in sleect

  • Creating Sales Order using inbound IDOC

    hi, Using test tool WE19 if i create sales order in foregound no error occurs and order is created successfully but if i try to create in backgound it gives error "No batch input data for screen SAPMSSY0 0120". please suggest a way out .

  • Accounts being created for internet fraud.

    Dear Skype Users! The group of people using English and German languages for the creation of internet-sending-money fraud has been discovered working actively in Skype accounts. The signs of these people are constantly being renovated profiles of US

  • Production order mass updation of components

    Dear Friends, My production order is created and partially confirmed, and now i want to directly insert some 100 components in components overview of CO02 screen. please suggest any mass insertion or uploadinding method exists. Or if any BAPI exists

  • App won't run outside of the netbeans ide

    I created a very simple app using the netbeans ide I made a jframe that when the button is pressed displays text, it works when I select "run file" however when it is built into a .jar it doesn't run, I think it might be because the main is empty and