Problem executing main method with wrong connection to DB data

Hi,
I'm executing my 2 projects in the same application with wrong DB-connection data.
When i execute one of the projects, i get one only Window having this text:
+(oracle.jbo.DMLException) JBO-26061: Error al abrir la conexión JDBC.+
That's exactly what i wanted, but when i execute the other project i get this window, but also 20 windos or so having the following text:
+(oracle.jbo.JboException) JBO-29000: Se ha obtenido una excepción inesperada: java.lang.NullPointerException, mensaje=null+
In both projects the exception ocurrs in the same line: panelBinding.refreshControl(). They have exactly the same code in main class, so i don't understand why in one project i get the only window i want (the one saying JDBC conection is wrong) and in the other one i get round 20 more.
Why is this happening?
Thanks in advance. Pablo.
Edited by: user9937041 on 25-may-2011 1:34

Maybe important: in the database navigator, when a introduce a right user, but a wrong password, in project 2 the database user account gets locked. This doesn't happen in project 1.
Any idea??
Edited by: user9937041 on 25-may-2011 2:10

Similar Messages

  • Problem in calling method with object in another class

    Hi All,
    Please tell me the solution, I have problem in calling a method I am posting the code also
    First Program:-
    import java.io.*;
    public class One
    public One()
    System.out.println("One:Object created");
    public void display()
    System.out.println("One:executing the display method");
    static
    System.out.println("One:executing the static block");
    Second Program:-
    import java.io.*;
    public class Two
    public Two()
    System.out.println("Two:Object created");
    public static void main(String arg[])throws Exception
    System.out.println("Two:executing the main method");
    System.out.println("Two:loading the class and creating the object::One");
    Object o=Class.forName("One").newInstance();
    System.out.println(o);
    o.display(); //displaying error here in compile time.
    static
    System.out.println("Two:executing the static block");
    waiting for your answer,
    thanks in advance,bye.

    Hi All,
    Please tell me the solution, I have problem in
    calling a method I am posting the code also
    First Program:-
    import java.io.*;
    public class One
    public One()
    System.out.println("One:Object created");
    public void display()
    System.out.println("One:executing the display
    method");
    static
    System.out.println("One:executing the static
    block");
    Second Program:-
    import java.io.*;
    public class Two
    public Two()
    System.out.println("Two:Object created");
    public static void main(String arg[])throws
    Exception
    System.out.println("Two:executing the main
    method");
    System.out.println("Two:loading the class and
    creating the object::One");
    Object o=Class.forName("One").newInstance();
    System.out.println(o);
    o.display(); //displaying error here in compile
    time.
    static
    System.out.println("Two:executing the static
    block");
    waiting for your answer,
    hanks in advance,bye.the line
    o.display()
    could be written as
    ((One)o).display();

  • Problem executing a query with AND and OR statements

    I have no idea what is the correct way to implement this part. If the user enters more than one keyword. Then I need to check it using the clause WHERE and AND in my sql statements. Obviously, the attempt I make below does not work. Here is the code, I appreciate the help:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class simpleTest {
        public static void main(String[] args) throws IOException {
                int rows = 0;
                int count = 0;
                int i = 0;
                String[] wordList = new String[50];
                BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            try {
                Class.forName("com.mysql.jdbc.Driver").newInstance();
            } catch (Exception ex) {System.out.println("No driver");}
         try {
                Connection conn =
              DriverManager.getConnection("jdbc:mysql://localhost/cop4610webs",
              "root", "anatoly");
                // Do something with the Connection
                System.out.println("Enter a string: ");           
                String word = reader.readLine();
                StringTokenizer words = new StringTokenizer(word);
                while(words.hasMoreTokens())
                   wordList[count++] = words.nextToken();
                System.out.println("Enter the logic");
                String logic = reader.readLine();
                Statement stmt = null;
             ResultSet rs = null;
                 stmt = conn.createStatement();
                if(logic.equalsIgnoreCase("exact"))
                 rs = stmt.executeQuery("SELECT pageName FROM pages WHERE pageContent ='"+word+"'");
                 ResultSetMetaData metaData = rs.getMetaData();
                 System.out.println("Results of SELECT");
                rs.last(); //move to last row
                rows = rs.getRow(); //check rows returned
                System.out.println(rows);
                rs.beforeFirst(); //move back to beginning
                if(rows != 0)
                rs.next();
                 System.out.println(rs.getObject(1) );
                while ( rs.next() ) {
                   System.out.println(rs.getObject(1) );
                else
                      if(logic.equalsIgnoreCase("all"))
               while(i < count)
                 rs = stmt.executeQuery("SELECT pageName FROM pages WHERE pageContent ='"+wordList[i]+"'" + "AND" +"'"+wordList[i+1]+"'");
               i++;
                 System.out.println("Results of SELECT");
                rs.last(); //move to last row
                rows = rs.getRow(); //check rows returned
                System.out.println(rows);
                rs.beforeFirst(); //move back to beginning
                if(rows != 0)
                rs.next();
                 System.out.println(rs.getObject(1) );
                while ( rs.next() ) {
                   System.out.println(rs.getObject(1) );
                rs.close();
                 } catch (SQLException ex) { // handle any errors
                System.out.println("SQLException: " + ex.getMessage());
                System.out.println("SQLState: " + ex.getSQLState());
                System.out.println("VendorError: " + ex.getErrorCode());
    }

    rs = stmt.executeQuery("SELECT pageName FROM pages WHERE pageContent ='"+wordList[i]+"'" + "AND" +"'"+wordList[i+1]+"'");should be:
    rs = stmt.executeQuery("SELECT pageName FROM pages WHERE pageContent ='"+wordList[i]+"'" + " AND " +"'"+wordList[i+1]+"'");(spaces around the "and")

  • Building a method with more than one result data

    Hi, everyone:
    I'm a little shy to ask this question, however, it's been hanging in my mind for so long, so I think I'd rather make a confession on it. You may laugh at me if you want, I'm ready for that, but I more look forward to that someone can really give me the light, or even the link, or some hint....
    For your ease of reading, I give the question first, and my whole story behind:
    When I need a method which can provide more than one result( in other words, multiple outputs), how can I do it in Java? As I know, either you pass and object, or the result of the function is an object will do , for the object contains the datas you want, but that means your needs for those data have to be defined in object format in advance, won't that be inconvinient? Or Java has a better solution for that?
    //And here's the whole story....
    I began my career as a programmer by starting with LabVIEW, it's a graphical programming language made by National Instrument, and it's powerful on DAQ, and industrial field. One of the most important issues on design is to devide your system into multiple functions( in its own term: subVI), I think it's just like applying structured analysis method.
    When we dealing with functions in LabVIEW, a programmer can define his own function with mulitiple inputs and outputs, for example, I can design a function called SumAndDevide, which accepts two input ( two variables to be summed and devided) and gives two results( result of summing and that of deviding).
    The methodology has its power, at least it provide the functional decomposition, and you can compose a suitable solution in certain circumstance even they are not the smallest unit function. And testing is easy. It affects me so large that I look the trail of it when I come to other programming languages. In COBOL( well, that is a VERY old COBOL version ), I was scared to find there is no protection to the inner data on the performed sections, while making a outside subroutine to be called is cubersome and really a hard work. When I came to Delphi, I knew that using the result of a function cannot satisfy me, for it give only one output, even you can define it as variant, but I think it's vague to realize. So I use the difference of called by value and called by reference to handle the problem, that is: a value parameter for the input, and a variable paramter for the output.
    Well, when I came to Java, I am stunned again, now there is no passing by reference mechanism in Java, otherwise you have to pass it as an object, but that means when you need multiple outputs, the output has to be defined in object form in advance. And that will be very inconvinient!! I tried to find some solutions, but I can't. So is there any way that in Java you can define a method with multiple output? or Java handles the problem in totally different way?
    Any comments will be appreciated!!
    Thanks!!
    aQunx from Taiwan

    You missed the most common OO solution - separation of concerns and implementation hiding.
    If you have a function which returns a string, that is one method of the object that provides the service.
    If you have a function which returns a real, that is a different method of the object.
    If both functions require common code, move that into a private method which is called by both. If the method is costly, cache the result.
    eg an aerodynamics properties class, which could be done as a multivalued return of (lift, drag), refactored to independent lift() and drag() methods, which delegate to an interpolate() method, which caches the interpolated value and uses mach, pressureHeight and _alpha to determine whether it should recalculate:  /**
       * Calculates the aerodynamic drag force at a given mach, alpha and pressure height.
      public double drag (final double aMach, final double aPressureHeight, final double aAlpha) {
        interpolate(aMach, aPressureHeight, aAlpha);
        return _drag;
       * Calculates the aerodynamic lift force at a given mach, alpha and pressure height.
      public double lift (final double aMach, final double aPressureHeight, final double aAlpha) {
        interpolate(aMach, aPressureHeight, aAlpha);
        return _lift;
      private void interpolate (final double aMach, final double aPressureHeight, final double aAlpha) {
        if (aMach != _mach) {
          setMach(aMach);
          _pressureHeight = Double.NaN;
        if (aPressureHeight != _pressureHeight) {
          setPressureHeight(aPressureHeight);
          _alpha = Double.NaN;
        if (aAlpha != _alpha) {
          setAlpha(aAlpha);
    ... actual interpolation happens in the private setXXX methods.

  • Problem executing RMI Methods Netbeans

    Hi everyone!
    I�m using a system Servlet+applet that communicate by RMI with Netbeans.
    The remote object, the stub and the binding are correctly created at the servlet. At the applet the reference to the remote object is ok too.
    The problem appears when I invoke a method in the remote object from the applet.
    The message the Java console throws:
    RemoteException  en soloEscribe()
    java.security.AccessControlException: access denied (java.net.SocketPermission 192.168.1.100:1079 connect,resolve)
    soloEscribe() is the method in the remote object.
    I�m running everything locally, and I have granted allPermissions at the java.policy.
    Hope someone can help!
    Edited by: SnowyC on May 18, 2008 11:31 AM

    and one more thing I added following lines
    Context rootContext=(Context)initialNamingContext.lookup("");
    System.out.println("The Look up suceeded");
    to see whether it is able to look up the root context or not.
    I saw that it is suceeded in finding the root context and print the message also , but again failed to rebind the object .thrwing following exception
    java -classpath . -Djava.naming.factory.ini
    tial=com.sun.jndi.cosnaming.CNCtxFactory -Djava.naming.provider.url=iiop://local
    host:1050 Registry
    Inside Constructor
    The Look up suceeded
    java.lang.IllegalArgumentException: Only instances of org.omg.CORBA.Object can b
    e bound
    at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(Unknown Source)
    at com.sun.jndi.cosnaming.CNCtx.rebind(Unknown Source)
    at com.sun.jndi.cosnaming.CNCtx.rebind(Unknown Source)
    at javax.naming.InitialContext.rebind(Unknown Source)
    at Registry.main(Registry.java:30

  • Problem referencing to methods with generic type parameters

    Assuming I have an interface like to following:
    public interface Test <T> {
    void test ( T arg0 );
    void test ( T arg0, Object arg1 );
    I would like to reference to both "test"-methods using "{@link #test(T)}" and "{@link #test(T,Object)}".But this generates an error telling me "test(T)" and "test(T,Object)" cannot be found.
    Changing T to Object in the documentation works and has as interesing effect. The generated link text is "test(Object)" but the generated link is "test(T)".
    Am I somehow wrong? Or is this a known issue? And is there a workaround other than using "Object" instead of "T"?

    Hi,
    I bumped into the same problem when documenting a generic.
    After quite a while of search your posting led me to the solution.
    My code goes something like this:
    public class SomeIterator<E> implements Iterator<E> {
      public SomeIterator(E[] structToIterate) {
    }When I tried to use @see or @link with the constructor Javadoc never found it.
    After I changed the documentation code to
    @see #SomeIterator(Object[])it worked.
    Since both taglets offer the use of a label, one can easily use these to produce comments that look correct:
    @see #SomeIterator(Object[]) SomeIterator(E[])CU
    Froestel

  • LDAP list of DB Services contains duplicate name, with wrong connect detail

    Sqldeveloper 2.1.1.64 (running on Vista, or Linux)
    Using LDAP to define a db connection, connection to the ldap server is successful and returns a list of ~360 database entries.
    Within this list 2 database names appear twice with the next db name is missing. Of concern is the connection details supplied with the database
    are for the next (omitted) db!
    The work around is to use the basic connection type when defining the 4 databases.
    Is this a known problem ? Is there a fix available ?

    Mugunthan
    Yes we have applied 11i.AZ.H.2. I am getting several errors still that we trying to resolve
    One of them is
    ===========>>>
    Uploading snapshot to central instance failed, with 3 different messages
    Error: An invalid status '-1' was passed to fnd_concurrent.set_completion_status. The valid statuses are: 'NORMAL', 'WARNING', 'ERROR'FND     at oracle.apps.az.r12.util.XmlTransmorpher.<init>(XmlTransmorpher.java:301)
         at oracle.apps.az.r12.extractor.cpserver.APIExtractor.insertGenericSelectionSet(APIExtractor.java:231)
    please assist.
    regards
    girish

  • Problems after sleep mode with wifi connection

    I got my first iMac the other week but i keep having problems after it has gone into Sleep Mode.
    Once i log back in to use my iMac again i can't seem to go online  =and have lost connectivity with emails etc.  Its showing that i'm still connected to my wifi and the only way to fix it is to restart.
    I have already connect chat support about this and the made me reset my PRAM and reset the systems management controller (SMC)
    Does anyone have any ideas??

    Personally I don't let the computer sleep, I set the display to sleep. This has the same net effect and in the 8+ years I have been using OS X I have never had a problem. Set the Computer's sleep setting to Never and set the display sleep to the amount of time you had the computer sleep set at. 
    However if you want to try with computer sleep instead of display sleep check if the wake for network access box is checked. If it already is they your issue is likely somewhere else.

  • Problems executing batch input with call transaction

    When I execute BI with Call transaction the fields disabled are enabled and I do not know why. How to resolve it? I do not want them to be enabled

    Can you provide us the BI Program name and Transaction Code???
    Regards
    Eswar

  • Add a Data Action to Execute a Method - Problem

    Hi,
    I'm working with JDeveloper 10.1.3 - JSP,Struts and ADF BC.
    I have a method that retruns 2 values (audit(Number,Number)) and exposed the Service Metod, but now I need to add a Data Action to Execute that method.
    I already add an Data Action icon to my Page Flow Diagram but what do I need to do next?
    Can anyone help me? Any ideias?
    Thanks,
    Micaela

    Hi Shay,
    I have one problem because how can I create a JSP Page to display Method Results in JDeveloper10.1.3???
    I already created another page and tried to Drag and Drop my Method from Data Control Palette, but I only have the choice to create a button and I would like to see the result.
    Adding a c:out tag to the JSP page.
    Can you help me with this problem??
    Thanks,
    Micaela

  • Problem calling a method which takes a parameter from a table

    Hi guys,
    I'm very new to jsf and hope you can help me out.
    On my page i'm generating a list, which is working fine. now i want to add some commandLinks to the list entries. on click, i want to execute a bean method, which takes a parameter from the list, generates a picture and displays it on my page.
    here's a piece of code thats already working:
    <rich:dataTable var="data" value="#{pathwayBean.orgList}">
    <rich:columnGroup>     
            <rich:column>     
               <h:outputText value="#{data.name}" />
         </rich:column>
    </rich:columnGroup>
    </rich:dataTable>now, i want to replace the outputText with a commandLink, and execute a method with {data.id} as parameter. Unfortunately, the commandLink property "action" can only call bean methods with no parameter, or is that wrong?
    Thanks in advance,
    Alex

    use actionlistener.
    here a typical code that works fine for me:
    (JSF 1.2)
    //Java
    private Integer selectedItemId=null;
         public void selectItem(ActionEvent event) {
              // Find the UIParameter component by expression
              UIParameter component = (UIParameter) event.getComponent().findComponent("itemId");
              // parse the value of the UIParameter component
              try {
                   selectedItemId = Integer.parseInt(component.getValue().toString());
                   // find itemBean here using selectedItemId
              } catch (Exception e) {
                   logger.error(e, e);
              logger.info(" +++ selectedItemId =" + selectedItemId);
         public String viewItem() {
                 //create view beans here
                 return "itemView";//return appropriate view.
    //JSF
    <h:column>
                             <h:commandLink     id="View"
                                                 action="#{itemListBean.viewItem}"
                                                       actionListener="#{itemListBean.selectItem}">
                                  <h:outputText value="select"/>
                                  <f:param id="itemId" name="itemId" value="#{itemBean.id}"/>
                             </h:commandLink>
                     </h:column>

  • Multiple queries with 1 connection

    Can I execute multiple queries with one connection?
    //Example -
    <%
    String firstconn;
    Class.forName("org.gjt.mm.mysql.Driver");
    // create connection string
    firstconn = "jdbc:mysql://localhost/profile?user=mark&password=mstringham";
    // pass database parameters to JDBC driver
    Connection aConn = DriverManager.getConnection(firstconn);
    // query statement
    Statement firstSQLStatement = aConn.createStatement();
    String firstquery = "UPDATE auth_users SET last_log='" + rightnow + "'WHERE name='" + username + "' ";
    // get result code
    int firstSQLStatus = firstSQLStatement.executeUpdate(firstquery);
    // close connection
    firstSQLStatement.close();
    %>     
    Now, instead of building a new connection for each query, can I use the same connection info for another query?
    if so - how do you do this?
    thanks for any help.
    Mark

    Create multiple statement objects from your connection. It's a good idea to close these in a finally block after you're done with them
    Connection conn = null;
    Statement stmt1 = null;
    Statement stmt2 = null;
    try {
        conn = DriverManager.getConnection();
        stmt1 = conn.createStatement();
        // some sql here
        stmt2 = conn.createStatement();
        // some more sql here
    } finally {
        if ( stmt1 != null ) stmt1.close();
        if ( stmt2 != null ) stmt2.close();

  • Error when I am executing any method in shopping cart

    Dear All ,
    I am getting following error when I am executing any method in shopping cart.
    *"No data found for contact person 0000000244 . Inform system administration . "*
    Please Can you help me with this error .

    Your error states:
    !syParameterNotFound,dDocTitle
    Can you confirm that your profile includes all required data, specifically, the dDocTitle? Fix this issue, then re-check your logs. if there are other missing required parameters, fix each one.
    Eventually, you should have a successful check-in.
    Hope this helps,
    -ryan

  • Multiple main methods

    Can we have more than one main method in a class/in various classes?if not why? and if yes then is that possible to call main() method with some other object nam,,,,say for eg...j.main()?
    As I'm new to java if anybody can explain me using an example as applicable it would be a better understanding for me over the concept

    It's not necessary to have main in a class and it's also ok to have main in multiple classes.
    You can also have multiple methods named 'main' in a class ( confusing, but legal ) as long as they follow the rules for overloading.
    The entry point for a Java program has to be a method with the signature
    public static void main ( String [] args )If you don't have this, you can't run that class. If you do, you can.
    The method has to be public because it will be called by the OS. It also has to be static since the object will not be instantiated till later; the runtime environment needs to be able to call the method without having to instantiate an object. The String array as parameter is to allow passing of command line arguments to the class.
    EDIT: A little slow there.
    Edited by: nogoodatcoding on Oct 16, 2007 5:48 PM

  • Calculator: having problem with main method

    This is a program that converts Infix expression to Postfix and evaluates it.I used eclipse to run this.
    In my main method, how do i get it to loop? when the user still wants to input another expression? i just can't seem to figure this out.
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    public class Calculator {
         private static Stack operators = new Stack();
         private static Stack operands = new Stack();
         private static int precedence( char operator ) {
              if (operator == '+' || operator == '-' )
                 return 1;
              else if (operator == '*' || operator == '/' || operator == '%')
                  return 2;
              return 0;
         private static String convertToPostfix( String infix ) {
         StringTokenizer input = new StringTokenizer( infix );
         String symbol;
         String postfix = "";     
         while (input.hasMoreTokens()) {          
             symbol = input.nextToken();     
              if (Character.isDigit(symbol.charAt(0))){
                  postfix = postfix + " " + (Integer.parseInt(symbol));     
              }else if (symbol.equals("(")){ 
                   Character isOperator = new Character('(');
                   operators.push( isOperator );
              }else if (symbol.equals(")")) {
                   while (((Character)operators.peek()).charValue() != '(') {
                       postfix = postfix + " " + operators.pop();
                   }operators.pop();
              } else {
                   while (!operators.empty() && !(operators.peek()).equals("(") && precedence(symbol.charAt(0)) <= precedence(((Character)operators.peek()).charValue()))
                        postfix = postfix + " " + operators.pop();
                        Character isOperator = new Character(symbol.charAt(0));
                        operators.push( isOperator );
              while (!operators.empty())
                   postfix = postfix + " " + operators.pop();
                        return postfix;
         private static int evaluate( String postfix ) {
         StringTokenizer input2 = new StringTokenizer( postfix );
         int value;
         String symbol;
         while (input2.hasMoreTokens()) {
             symbol = input2.nextToken();
              if (Character.isDigit(symbol.charAt(0))) {
                  Integer isOperand = new Integer(Integer.parseInt(symbol));
                   operands.push( isOperand );
              }else{
                   int op2 = ((Integer)operands.pop()).intValue();
                   int op1 = ((Integer)operands.pop()).intValue();
                   int result = 0;
                        switch(symbol.charAt(0)){
                             case '*': result = op1 * op2;
                                            break;
                             case '+': result = op1 + op2;
                                            break;
                             case '-': result = op1 - op2;
                                            break;
                             case '/': result = op1 / op2;
                                            break;
                             case '%': result = op1 % op2;
                                            break;
                        Integer isOperand = new Integer(result);
                        operands.push( isOperand );
              value = ((Integer)operands.pop()).intValue();
              return value;
         public static void main(String args[]) throws IOException {
                     JOptionPane.showMessageDialog(null,  "Hello user! I hope you have a wonderful time using the
                        calculator.  = ]"  , "Welcome", JOptionPane.PLAIN_MESSAGE);     
                  JOptionPane.showMessageDialog(null,  "Note: Enter Infix expressions with spaces in between.",
                        "Welcome", JOptionPane.PLAIN_MESSAGE);
                  String infix = JOptionPane.showInputDialog("Enter Mathematical Expression Here: ");
                  String output = "The expression in Postfix is: " +  convertToPostfix(infix);
                  JOptionPane.showMessageDialog(null, output);
                  String answer = "The answer to the equation:  " + evaluate(convertToPostfix(infix));
                  JOptionPane.showMessageDialog(null, answer);
                       String options[] = {"Yes","No",}
                   int option = JOptionPane.showOptionDialog(null,"Do you want evaluate an expression?", "Calculator",  
                       JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null,options,options[0]); 
                  JOptionPane.showMessageDialog(null,  "Thank you for using the calculator.\n Have a nice day!  = ]");
    }

    Can probably be done better...
    boolean stop = false;
    while(!stop) {
    //your optionpanes..
         if(option == 0) {
              stop = true;
    }Also, your yes/no optionpane could be exchanged to:
    int option = JOptionPane.showConfirmDialog(null,"Do you want evaluate an expression?", "Calculator", JOptionPane.YES_NO_OPTION);Edited by: prigas on Sep 20, 2008 12:04 PM

Maybe you are looking for

  • Error while executing in the DB adapter

    hi When i register some service in the ESB console. i get this error when the Db adpater try executing the stored procedure. stored procedure is not getting executed through the DB adapter, but when it is checked individually it works. but in the ESB

  • Sales analysis(amt wise)

    hi,     can i do a sales analysis( selection criteria as amountwise). regards, Vignesh

  • BI publisher installation on Windows 2008 64bit sever

    Hello, everyone I need simple installation direction about BI Publisher version 11.1.1.3 onto Windows 2008 64 bit server with Oracle 11g database and Apex 4.0. More I read the installation, more I am confused. The document ID: E10539-01 is very confu

  • HT202667 I am trying to make one of my secondary emails my primary and remove my current primary.

    I am trying to make one of my secondary emails my primary and remove my current primary as I am going to be closing my current primary soon to tidy up all email correspondence. The system seems to remember my secondary after I delete it and try to as

  • Audigy SE Issues -- Startup probl

    Hey all - I just recently built a new system and carried over my Audigy SE from my last build to this one. Now, don't know if its a combination of all the new equipment, or the Audigy SE card itself, but for the last two days, I'd been running into p