Strange SQLException : column not found

Hello All,
I have seen many users facing the error : java.sql.SQLException : column not found. I have the same problem, although my case doesnot match with theirs.
I have a Base DAO class which establishes the connection with database in MySQL.I have no problem in establishing the connection. I have a extended DAO class for accessing the table 'product' in the database. I have a method in the extended class that retrieves the products under a category.
public ResultSet getProducts(String categoryName) {
          Connection con = super.getConnection();
          String query = "SELECT * FROM product WHERE sectionId = \'" + categoryName + "\'";
          System.out.println("Query = " + query);
          try {
               Statement stmt = con.createStatement();
               ResultSet rs = stmt.executeQuery(query);               
               return rs;
          } catch (Exception e) {
               System.out.println("Unable to retrieve products for category " + categoryName);
               e.printStackTrace();
          return null;
     }There is a helper method that displays the contents of the ResultSet. I have a main method that calls the above function and everything works fine.
Now coming to strange part !!! The same function displays an error "java.sql.SQLException : Column not found" when called using Struts Action Object.
The Struts Action object calls a Service method (ProductService.java) which then calls the above extended DAO class to retrieve sub categories and products of a category. I am using a similar select query for retrieving the sub categories and it works fine.
I am pretty sure that I am using the correct field name. Any help would be a help for me....
Thanks,
Praveen.

Couldn't you rephrase your SQL query to
SELECT column1, column2 ..... columnN FROM product WHERE sectionId = ?(i.e., enumerate the columns instead of relying on the "*" syntax)
use a PreparedStatement
use stmt.setString(1, categoryName)
and get the columns by number (starting from column 1)?
Sometimes the error "column not found" is really the case of the column being not found, because the version of the table that your DBA has installed in the DB has not the column that you expect to find in the table...

Similar Messages

  • Column Not found error while trying to access databse through JSP+Java Bean

    I am trying to acees MS Access 2003 db through JSP using Tomcat 5.0.28.The code for accessing the databse is incorporated in the bean.The jsp only calls the particular method of the bean .
    Code for Java Bean:
    package ActiveViewer;
    import java.sql.*;
    import java.util.*;
    public class CompanyBean
    Connection con;
    ResultSet rs=null;
    Statement st;
         public CompanyBean(){}
         public void connect()
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Here4");
    con=DriverManager.getConnection("jdbc:odbc:activeviewer","","");
         System.out.println("Here1");
         catch (ClassNotFoundException e)
         System.out.println("Could not locate driver.");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
         catch (Exception e)
    System.out.println("An unknown Exception has occured :: "+e);
         e.printStackTrace();
    public void disconnect()
         try
         if (con!=null)
    con.close();
         catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
    public ResultSet select(String username)
    if(con!=null)
         try
    st=con.createStatement();
         rs=st.executeQuery("select * from company where username='" + username + "'");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
    catch (Exception e)
    System.out.println("An Exception has occured while retrieving :: "+e);
    e.printStackTrace();
    else
    System.out.println("Connection to database was lost.");
    return rs;
    The code for JSP that uses the above bean is:
    <%@ page language="java" import="java.sql.*,ActiveViewer.* " contentType="text/html"%>
    <jsp:useBean id="conn" scope="session" class="ActiveViewer.CompanyBean" />
    <html>
    <body>
    <% String username=request.getParameter("username");
    String password=request.getParameter("password");
    System.out.println("username:"+username);
    System.out.println("password:"+password);
    conn.connect();
    ResultSet rs=conn.select(username);
    System.out.println("Below select ");
    while (rs.next())
    String dbusername=rs.getString("username");
         String dbpassword=rs.getString("password");
         if(dbusername.equals(username) && dbpassword.equals (password))
    { %> out.println("OK");
              <% }
    else { %>Invalid Username and / or Password.
    <br>Clickhere to go back to Login Page.
    <% }
    } %>
    </body>
    </html>
    I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Column not found
    though the database is not int he same folder as the jsp, the DSN is set correctly to pint to the db location.The jsp does print in stdout file:
    Here4 (from connect method above)
    Here 1 (from connect method above)
    Below Select (from jsp)
    This means that the jsp does connect to db but it gives the above error.Also the field name also matches that in the database and data is present in the db too.
    All other things like creating package for bean,incorporating the packakage are done.
    Can someone please help me with their precious advice?

    U're getting this error because there is no field called 'password' in ur database, the field in ur database is named 'cpassword' and not 'password'. So change the statement rs.getString("password"); to rs.getString("cpassword");

  • Column Not found error while trying to access database through JSP+Java Bea

    I am trying to access MS Access 2003 db through JSP using Tomcat 5.0.28.The code for accessing the database is incorporated in the bean.The JSP only calls the particular method of the bean .
    Code for Java Bean:
    package ActiveViewer;
    import java.sql.*;
    import java.util.*;
    public class CompanyBean
    Connection con;
    ResultSet rs=null;
    Statement st;
    public CompanyBean(){}
    public void connect()
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Here4");
    con=DriverManager.getConnection("jdbc:odbc:activeviewer","","");
    System.out.println("Here1");
    catch (ClassNotFoundException e)
    System.out.println("Could not locate driver.");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
    e.printStackTrace();
    catch (Exception e)
    System.out.println("An unknown Exception has occured :: "+e);
    e.printStackTrace();
    public void disconnect()
    try
    if (con!=null)
    con.close();
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
    e.printStackTrace();
    public ResultSet select(String username)
    if(con!=null)
    try
    st=con.createStatement();
    rs=st.executeQuery("select * from company where username='" + username + "'");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
    e.printStackTrace();
    catch (Exception e)
    System.out.println("An Exception has occured while retrieving :: "+e);
    e.printStackTrace();
    else
    System.out.println("Connection to database was lost.");
    return rs;
    The code for JSP that uses the above bean is:
    <%@ page language="java" import="java.sql.*,ActiveViewer.* " contentType="text/html"%>
    <jsp:useBean id="conn" scope="session" class="ActiveViewer.CompanyBean" />
    <html>
    <body>
    <% String username=request.getParameter("username");
    String password=request.getParameter("password");
    System.out.println("username:"+username);
    System.out.println("password:"+password);
    conn.connect();
    ResultSet rs=conn.select(username);
    System.out.println("Below select ");
    while (rs.next())
    String dbusername=rs.getString("username");
    String dbpassword=rs.getString("password");
    if(dbusername.equals(username) && dbpassword.equals (password))
    { %> out.println("OK");
    <% }
    else { %>Invalid Username and / or Password.
    <br>Clickhere to go back to Login Page.
    <% }
    } %>
    </body>
    </html>
    I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Column not found
    though the database is not int he same folder as the jsp, the DSN is set correctly to pint to the db location.The jsp does print in stdout file:
    Here4 (from connect method above)
    Here 1 (from connect method above)
    Below Select (from jsp)
    This means that the jsp does connect to db but it gives the above error.Also the field name also matches that in the database and data is present in the db too.
    All other things like creating package for bean in WEB-INF/classes,incorporating the packakage are done.
    Can someone please help me with their precious advice?

    Hi, I too have a problem with an SQL exception, the message is Column not found.
    I'm using the sun jdbc odbc driver with access.
    the first few lines of the stack trace are
    sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1852)
    sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:603)
    net.homeip.sdaniels.MemberBean.ejbFindByUnamePwd(MemberBean.java:127)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    I am of course sure that the column does infact exist. I can insert into the column no problems. the sql looks like this:
    SELECT * FROM Members WHERE uName ='Stewart' AND encPwd='�F2C�3����h�1Y�'
    Can any one tell me if there is a common cause to this problem?
    Thanks

  • Column not found error while populatin a oracle table with ODI USer

    Hi,
    I am trying to populate a column in a oracle table with the ODI USER name using the function getUser("USER_NAME") in the Mapping column of the Interface, But the interface throwhing an error *Column not found : Supervisor in Statement [Select......]*. but it's working fine with getUser("I_USER') the column is populating the user identifier.
    can any one help me out why user is not populating.
    Thanks

    Enclose the call to the getUser api inside single quotes
    '<%=getUser("USER_NAME")%>'ID being a number can be used directly but USER_NAME returns a string that needs to be quoted

  • External Table error: KUP-04043: table column not found in external source

    I am trying to get the syntaxc correct for an external table.
    I keep getting this error:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04043: table column not found in external source: SITE
    29913. 00000 - "error in executing %s callout"
    *Cause:    The execution of the specified callout caused an error.
    *Action:   Examine the error messages take appropriate action.
    Data looks like: (some of one of many files, where the character field widths are variable)
    ZZ,ANYOLDDATA,77777,25002000,201103,12,555.555,11.222
    ZZ,ANYOLDDATA,77777,25002300,201103,34,602.162,8.777
    ZZ,ANYOLDDATA,77777,25002400,201103,12,319.127,9.666
    ZZ,OTHERDATA,77121,55069600,201103,34,25.544,1.332
    ZZ,OTHERDATAS,77122,55069600,201103,22, 1.011,0.293
    External table def I have:
    CREATE TABLE MY_INPUT (
    FIRST_CODE VARCHAR2(10),
    SECOND_CODE VARCHAR2(20),
    MY_NUMBER VARCHAR2(20),
    THIRD_CODE VARCHAR2(20),
    YEARMO VARCHAR2(6),
    N NUMBER,
    MEAN NUMBER,
    SD NUMBER
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY INPUT_DIR
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline
    BADFILE INPUT_LOGDIR:'bad.bad'
    LOGFILE INPUT_LOGDIR:'log.log'
    DISCARDFILE INPUT_LOGDIR:'discards.log'
    fields terminated by ',' LRTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    ( THIRD_CODE,N,MEAN,SD) )
    LOCATION ( 'myfile.rpt')
    NOPARALLEL
    REJECT LIMIT UNLIMITED;
    I have the directories INPUT_DIR and INPUT_LOGDIR defined, and read/write access granted to the user who creates the table and tried to query from it.
    I have tried various combinations of VARCHAR2 lengths and NUMBER vs VARCHAR2 for some of the numeric fields.
    I am not getting any Bad, Log or Discard files.
    I can do a GET from the SQL prompt, and see the data:
    SQL> GET 'C:\temp\input_dir'myfile.rpt'
    and I see the data.
    Windows 7
    Oracle 11.2
    I am not positive of the newline record delimiter - these files are generated by an automated system. Probably generated on a UNIX machine.
    Any suggestions on what to try would be helpful.
    KUP-04043 error message says to check the syntax .. .I am running out of thigns to check.
    Thank you - Karen

    And the get ( I created the sanitized file, so we have a real working, failing, santiized example):
    SQL> get c:\Inputfiles\myfile.rpt
    1 ZZ,ANYOLDDATA,77777,25002000,201103,12,555.555,11.222
    2 ZZ,ANYOLDDATA,77777,25002300,201103,34,602.162,8.777
    3 ZZ,ANYOLDDATA,77777,25002400,201103,12,319.127,9.666
    4 ZZ,OTHERDATA,77121,55069600,201103,34,25.544,1.332
    5* ZZ,OTHERDATAS,77122,55069600,201103,22, 1.011,0.293
    So the full series is:
    CREATE DIRECTORY INPUT_DIR AS 'C:\InputFiles';
    -- grant READ and WRITE
    GRANT READ ON DIRECTORY INPUT_DIR TO ILQC;
    GRANT WRITE ON DIRECTORY INPUT_DIR TO ILQC;
    -- As SYS, create the bad/log/discard directory:
    CREATE DIRECTORY LOGDIR AS 'C:\InputFiles\Logs';
    -- grant READ and WRITE
    GRANT READ ON DIRECTORY LOGDIR TO ILQC;
    GRANT WRITE ON DIRECTORY LOGDIR TO ILQC;
    CREATE TABLE MY_INPUT (
    FIRST_CODE VARCHAR2(10),
    SECOND_CODE VARCHAR2(20),
    MY_NUMBER VARCHAR2(20),
    THIRD_CODE VARCHAR2(20),
    YEARMO VARCHAR2(6),
    N NUMBER,
    MEAN NUMBER,
    SD NUMBER
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY INPUT_DIR
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline
    BADFILE INPUT_LOGDIR:'bad.bad'
    LOGFILE INPUT_LOGDIR:'log.log'
    DISCARDFILE INPUT_LOGDIR:'discards.log'
    fields terminated by ',' LRTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    ( THIRD_CODE,N,MEAN,SD) )
    LOCATION ( 'myfile.rpt')
    NOPARALLEL
    REJECT LIMIT UNLIMITED;
    SELECT * FROM my_input;
    and GET is as above.

  • Column not found error in SelectQueryModel.executeSelect()

    Greetings,
    I'm posting this question to verify whether this is the intended JATO
    behavior or I am doing something wrong.
    I have a SelectQueryModel (e.g. Model1) based on a SQL query:
    select A, B from ...
    before executing the model I add a where criterion:
    addUserWhereCriterion(C,"=","123")
    the FIELD_SCHEMA in Model1 includes field descriptors for A, B, and C
    upon executeSelect(null) I get the exception "Column not found". I
    found out the positionResultSet() in
    com.iplanet.jato.model.sql.ResultSetModelBase fetches all the values
    from the ResultSet based on the field definitions in FIELD_SCHEMA. I
    don't have the column 'C' in the SQL SELECT clause above and thus got
    the exception. Removing 'C' from the FIELD_SCHEMA does not allow me
    to add a user where clause.
    Is there a proper way to define a SelectQueryModel where some fields
    are for WHERE clause specification only and are not included in the
    result set?
    Thanks
    --haim

    Varun,
    1:Have you imported new column in to universe?
    2:If Imported the new column into universe then refresh the table in the universe.
    3:After refresh implement all you business like joints,context,class etc .
    4:Perform integration check.
    5:Create a simple query and check results.
    6:Once the results are satisfactory
    7:Then export
    Thanks,
    Yuagndhar

  • SQLException Instance not found

    I have a web application (JRun) that uses JDBC to connect to a SQL Server 2000 database. During times of heavy volume I get a SQL Exception* stating that the instance on the server is not found. The instance does exist and on a normal day it connects flawlessly hundreds of times.
    Anyone know what could be the cause of this?
    Thanks for the help,
    Matt
    * Instance 'MyServer' on host 'MyInstance' not found. (jdbc:inetdae7:MyServer\MyInstance?database=MyDatabase)

    I am afraid I can't help you there.
    But good luck.

  • Field column not found in the ALV Report

    Hello all,
    Sorry my problem is not solved.It is in hidden fields under the column set and it needs to be come
    under displayed column for ever in the similar way the other fields like Bill to # , VAT registration number, company code etc. are getting dispalyed.
    Thank you,
    Sirisha

    Snippet of the code
    perform append_new_fieldcat USING:
    'NAME1' 'TYPE_ALV' SPACE space 'Bill-To Name'
      space space SPACE CHANGING ct_fieldcat.
    FORM append_new_fieldcat
    USING       l_fieldname   TYPE slis_fieldcat_alv-fieldname
                l_ref_tabname TYPE slis_fieldcat_alv-ref_tabname
                l_ref_fieldname TYPE slis_fieldcat_alv-ref_fieldname
                l_cfieldname  TYPE slis_fieldcat_alv-cfieldname
                L_seltext TYPE SLIS_FIELDCAT_ALV-seltext_l
                l_no_out      TYPE slis_fieldcat_alv-no_out
                l_no_zero     TYPE slis_fieldcat_alv-no_zero
                l_do_sum      TYPE slis_fieldcat_alv-do_sum
      CHANGING  p_lt_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: l_fieldcat TYPE slis_fieldcat_alv.        "Field string
      l_fieldcat-fieldname      = l_fieldname.
      l_fieldcat-ref_tabname    = l_ref_tabname.
      l_fieldcat-ref_fieldname  = l_ref_fieldname.
      l_fieldcat-cfieldname     = l_cfieldname.
      l_fieldcat-no_out         = l_no_out.
      l_fieldcat-no_zero        = l_no_zero.
      l_fieldcat-do_sum         = l_do_sum.
      if not l_seltext is initial.
        move l_seltext to l_fieldcat-seltext_l.
        move l_seltext to l_fieldcat-seltext_m.
        move l_seltext to l_fieldcat-seltext_s.
        MOVE 'L' TO   L_FIELDCAt-ddictxt.
      endif.
      APPEND l_fieldcat TO p_lt_fieldcat.
    ENDFORM.                    " append_new_fieldcat

  • Column not found problem

    Hello All, I created a query, I've checked all my columns in the database multiple times but I keep getting this error.
    can someone help me with this please
    This is my Query and statement around it.
    <% ResultSet rsMaxFaqs = dbTeam.execSQL("SELECT max(faqID), Question, Answer FROM tblFAQS GROUP BY Question, Answer");
    int i = rsMaxFaqs.getInt("faqID");
    out.println("<td><a href=\"editfaqs.jsp?faqID=" + i + "\"><b>Edit</b></a></td>");
    out.println("<td><a href=\"deletefaqs.jsp?faqID=" + i + "\"><b>Delete</b></a></td>");
    out.println("<td>" + i + "</td>");
    out.println("<td>"+ rsMaxFaqs.getString("Question")+ "</td>");
    out.println("<td>" + rsMaxFaqs.getString("Answer") + "</td></tr>");
    %>

    try
    <% ResultSet rsMaxFaqs = dbTeam.execSQL("SELECT max(faqID) faqID, Question, Answer FROM tblFAQS GROUP BY Question, Answer");
    Hello All, I created a query, I've checked all my
    columns in the database multiple times but I keep
    getting this error.
    can someone help me with this please
    This is my Query and statement around it.
    <% ResultSet rsMaxFaqs = dbTeam.execSQL("SELECT
    max(faqID), Question, Answer FROM tblFAQS GROUP BY
    Question, Answer");
    int i = rsMaxFaqs.getInt("faqID");
    out.println("<td><a href=\"editfaqs.jsp?faqID=" + i +
    "\"><b>Edit</b></a></td>");
    out.println("<td><a href=\"deletefaqs.jsp?faqID=" + i
    + "\"><b>Delete</b></a></td>");
    out.println("<td>" + i + "</td>");
    out.println("<td>"+ rsMaxFaqs.getString("Question")+
    "</td>");
    out.println("<td>" + rsMaxFaqs.getString("Answer") +
    "</td></tr>");
    %>

  • The columns not appear

    Here i want to get the columns names in the table "employee" in my database so i used databaseMetaData.getColumns(); but give me this error:
    java.sql.SQLException: Column not found
    at sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1850)
    why this ?
    code:
    import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.DriverManager; import java.sql.ResultSet; public class ColumnNamesTest {     private static final String DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";     private static final String DRIVER_URL = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};" +             "Dbq=D:\\my _works\\my_works_2010\\JDBC-work\\employeedb\\Database2.mdb";     public ColumnNamesTest() {         Connection connection = null;         //  Statement statement = null;         ResultSet resultSet = null;         try {             Class.forName(DRIVER);             connection = DriverManager.getConnection(DRIVER_URL);             DatabaseMetaData databaseMetaData = connection.getMetaData();             resultSet = databaseMetaData.getColumns(null, null, "Employee", null);             while (resultSet.next()) {                 String colName = resultSet.getString("Column Names");                 System.out.println(colName);             }         } catch (Exception e) {             e.printStackTrace();         }     }     public static void main(String[] args) {         new ColumnNamesTest();     } }
    Thanks

    A combination of this
    getColumnsResultSet getColumns(String catalog,
    String schemaPattern,
    String tableNamePattern,
    String columnNamePattern)
    throws SQLException
    Retrieves a description of table columns available in the specified catalog.
    Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_CAT,TABLE_SCHEM, TABLE_NAME, and ORDINAL_POSITION.
    Each column description has the following columns:
    1. TABLE_CAT String => table catalog (may be null)
    2. TABLE_SCHEM String => table schema (may be null)
    3. TABLE_NAME String => table name
    4. COLUMN_NAME String => column name
    5. DATA_TYPE int => SQL type from java.sql.Types
    6. TYPE_NAME String => Data source dependent type name, for a UDT the type name is fully qualified
    ...>
    And this
    getStringString getString(int columnIndex)
    throws SQLException
    Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
    >
    Learn to use the API docs.

  • Java.sql.SQLExcepton: Blob not found

    I'm working with IDS7.3 Informix Database on Unix,
    jdk1.3, jdbc2.10, Jakarta-Tomcat Webserver 3.x.
    When I want to select content from BYTE type
    (content is Word document) in database
    with code line: rset.getBytes(1);
    I got next exception:
    java.sql.SQLException: Blob not found
         at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:308)
         at com.informix.jdbc.IfxResultSet.blobCheck(IfxResultSet.java:1548)
         at com.informix.jdbc.IfxResultSet.getBytes(IfxResultSet.java:1042)
         at com.informix.jdbc.IfxResultSet.getBytes(IfxResultSet.java:1057)
         at com.mis.upravljanjedokumentima.MISDocument.preuzmiDokumenteZaQuery(MISDocument.java:2235)
         at Web.administration.jsp.d_00025kumenti._0002fWeb_0002fadministration_0002fjsp_0002fdokumenti_0002fNaslovnaStranaDokumentiView_0002ejspNaslovnaStranaDokumentiView_jsp_0._jspService(_0002fWeb_0002fadministration_0002fjsp_0002fdokumenti_0002fNaslovnaStranaDokumentiView_0002ejspNaslovnaStranaDokumentiView_jsp_0.java:162)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
         at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
         at java.lang.Thread.run(Unknown Source)
    What is wrong!???
    Thanks

    Make sure it isn't NULL. When you create the record, make sure you are setting that field to empty_blob().

  • ODI XML interface failed due to Table not found.

    Hi,
    ODI interface from xml file to DB failed with "-22 : S0002 : java.sql.SQLException: Table not found: INDIVIDUAL"
    getting successfull connection in Topology but interface is not working.this interface is running in Prod from more tahn an year.
    Thanks,
    RK

    There can be many reasons for this. Obviously something changed in Production.
    What do you see in the agent logs ? Was the agent restarted recently ? Was the XML driver updated ? Was version of Java upgraded ?
    And interface would not be something that you would have deployed in production - it would be scenario ! right ?

  • Tutorial that worked now complains "user not found"

    Hi, again.
    Sorry for another "newbie" problem, but the tutorial database that was
    running last night (thank you, Marc and Stephen) now gives the following
    error at "Run":
    891 INFO [main] kodo.jdbc.JDBC - Using dictionary class
    "kodo.jdbc.sql.HSQLDictionary".
    1344 INFO [main] kodo.MetaData - Parsing metadata resource
    "file:/C:/MBower/MyDocuments/src/eclipse_workspace/PetShop/Animal.mapping".
    kodo.util.DataStoreException: User not found: SA
         at
    kodo.jdbc.sql.DBDictionary.newDataStoreException(DBDictionary.java:3084)
         at
    kodo.jdbc.sql.HSQLDictionary.newDataStoreException(HSQLDictionary.java:188)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:77)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:43)
         at
    kodo.jdbc.schema.LazySchemaFactory.findTable(LazySchemaFactory.java:159)
         at
    kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:168)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
         at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
         at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
         at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
         at PetShop.<init>(PetShop.java:46)
         at PetShop.main(PetShop.java:179)
    NestedThrowablesStackTrace:
    java.sql.SQLException: User not found: SA
         at org.hsqldb.Trace.getError(Trace.java:226)
         at org.hsqldb.Trace.error(Trace.java:290)
         at org.hsqldb.UserManager.get(UserManager.java:309)
         at org.hsqldb.UserManager.getUser(UserManager.java:250)
         at org.hsqldb.Database.connect(Database.java:278)
         at org.hsqldb.jdbcConnection.openStandalone(jdbcConnection.java:2860)
         at org.hsqldb.jdbcConnection.<init>(jdbcConnection.java:2428)
         at org.hsqldb.jdbcDriver.connect(jdbcDriver.java:176)
         at
    com.solarmetric.jdbc.PoolingDataSource.newConnection(PoolingDataSource.java:348)
         at
    com.solarmetric.jdbc.ConnectionPoolImpl.makeConnection(ConnectionPoolImpl.java:392)
         at
    com.solarmetric.jdbc.ConnectionPoolImpl.getConnection(ConnectionPoolImpl.java:242)
         at
    com.solarmetric.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:257)
         at
    com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:131)
         at
    com.solarmetric.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:81)
         at
    com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:131)
         at
    kodo.jdbc.schema.DataSourceFactory$DefaultsDataSource.getConnection(DataSourceFactory.java:329)
         at
    kodo.jdbc.schema.LazySchemaFactory.findTable(LazySchemaFactory.java:129)
         at
    kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:168)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
         at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
         at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
         at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
         at PetShop.<init>(PetShop.java:46)
         at PetShop.main(PetShop.java:179)
    Did running the program last night change something that prevents it from
    running now? Is there something different that needs to be done to get a
    running program to run subsequently?
    Mark

    Hi, Patrick.
    Thank you for your help! I deleted the database files, ran the mapping
    tool, and the tutorial ran. Great! Then, I added an animal and a price,
    hit "Create" and saw that my input was added to the list. I then exited
    the application (by hitting the "X" in the upper right) and tried to run
    the tutorial again; I wanted to see that the data I had entered would load
    up. I got the same error as before:
    906 INFO [main] kodo.jdbc.JDBC - Using dictionary class
    "kodo.jdbc.sql.HSQLDictionary".
    1359 INFO [main] kodo.MetaData - Parsing metadata resource
    "file:/C:/MBower/MyDocuments/src/eclipse_workspace/PetShop/Animal.mapping".
    kodo.util.DataStoreException: User not found: SA
         at
    kodo.jdbc.sql.DBDictionary.newDataStoreException(DBDictionary.java:3084)
         at
    kodo.jdbc.sql.HSQLDictionary.newDataStoreException(HSQLDictionary.java:188)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:77)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:43)
         at
    kodo.jdbc.schema.LazySchemaFactory.findTable(LazySchemaFactory.java:159)
         at
    kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:168)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
         at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
         at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
         at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
         at PetShop.<init>(PetShop.java:46)
         at PetShop.main(PetShop.java:179)
    NestedThrowablesStackTrace:
    java.sql.SQLException: User not found: SA
         at org.hsqldb.Trace.getError(Trace.java:226)
         at org.hsqldb.Trace.error(Trace.java:290)
         at org.hsqldb.UserManager.get(UserManager.java:309)
         at org.hsqldb.UserManager.getUser(UserManager.java:250)
         at org.hsqldb.Database.connect(Database.java:278)
         at org.hsqldb.jdbcConnection.openStandalone(jdbcConnection.java:2860)
         at org.hsqldb.jdbcConnection.<init>(jdbcConnection.java:2428)
         at org.hsqldb.jdbcDriver.connect(jdbcDriver.java:176)
         at
    com.solarmetric.jdbc.PoolingDataSource.newConnection(PoolingDataSource.java:348)
         at
    com.solarmetric.jdbc.ConnectionPoolImpl.makeConnection(ConnectionPoolImpl.java:392)
         at
    com.solarmetric.jdbc.ConnectionPoolImpl.getConnection(ConnectionPoolImpl.java:242)
         at
    com.solarmetric.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:257)
         at
    com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:131)
         at
    com.solarmetric.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:81)
         at
    com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:131)
         at
    kodo.jdbc.schema.DataSourceFactory$DefaultsDataSource.getConnection(DataSourceFactory.java:329)
         at
    kodo.jdbc.schema.LazySchemaFactory.findTable(LazySchemaFactory.java:129)
         at
    kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:168)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
         at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
         at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
         at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
         at PetShop.<init>(PetShop.java:46)
         at PetShop.main(PetShop.java:179)
    If I try to run the Mapping Tool on "Animal.jdo", again (I'm just guessing
    here that I need to point things in the correct direction), I get an error:
    <error>-An error occurred running MappingTool
         kodo.util.DataStoreException: The database is already in use by another
    process
    <info>-Done.
    Thank you, again, for any assistance! I have no doubt that this problem
    is unique to my setup, so I doubt that much learned here will be of use to
    others. Sorry,
    Mark
    Patrick Linskey wrote:
    Mark Bower wrote:
    Did running the program last night change something that prevents it from
    running now? Is there something different that needs to be done to get a
    running program to run subsequently?
    Are you maybe in a different directory than you were in when you ran the
    tutorial before? HSQL is a file-based database; the default
    configurations for the tutorial list relative paths for the files that
    it uses.
    Also, maybe one of the files exists, but its contents were deleted?
    I'd suggest removing the tutorial database files, and running
    mappingtool again to get to a clean state.
    -Patrick

  • Table not found error

    Hi all
    I am trying to access tables in SQL server 2000 , from my stateless session bean. The connection s successfull. But i get the following error : please help.
    04:53:19,562 INFO [STDOUT] Error !!java.sql.SQLException: Table not found i
    n statement [select role from login]
    04:53:19,625 INFO [CachedConnectionManager] Closing a connection for you. Plea
    se close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@ada795
    java.lang.Throwable: STACKTRACE
    at org.jboss.resource.connectionmanager.CachedConnectionManager.register
    Connection(CachedConnectionManager.java:290)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
    onnection(BaseConnectionManager2.java:400)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
    nManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
    at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
    erDataSource.java:88)
    at mfEJB.mfBean.DBConnection(Unknown Source)
    at mfEJB.mfBean.getrole(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
    tatelessSessionContainer.java:237)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
    ke(CachedConnectionInterceptor.java:158)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
    elessSessionInstanceInterceptor.java:169)
    at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpoint
    Interceptor.java:64)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
    Interceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
    rceptor.java:121)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
    torCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
    81)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
    java:168)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
    ryFinderInterceptor.java:136)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:6
    48)
    at org.jboss.ejb.Container.invoke(Container.java:954)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
    er.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
    java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(Loca
    lInvoker.java:169)
    at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
    at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerIntercepto
    r.java:206)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
    a:192)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
    java:61)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:7
    0)
    at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessi
    onInterceptor.java:112)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
    at $Proxy104.getrole(Unknown Source)
    at org.apache.jsp.logincheck_jsp._jspService(logincheck_jsp.java:57)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
    .java:332)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
    14)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
    lter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:178)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
    yAssociationValve.java:175)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
    e.java:74)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
    a:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
    rocessConnection(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
    int.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
    kerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)
    Here is the code :
    Connection con=null;
         public Connection DBConnection()
              try
              /*Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   String sourceURL = new String("jdbc:microsoft:sqlserver://localhost:1433;database=mfdb;selectMethod=cursor");//user=sa;password=tina");
    con = DriverManager.getConnection(sourceURL,"sa","tina");
                        InitialContext ct=new InitialContext();
              DataSource ds=(DataSource)ct.lookup("java:comp/env/jdbc/microfinance");
              con=ds.getConnection();
              catch(Exception e)
                   System.out.println("Error in connection!!!"+ e);
              return con;
    public int getrole(String luname,String lpass)
    int role=0;
    try
         con=DBConnection();
         if (con != null)
              System.out.println("hi tina !!!");
         Statement pst1 = null;
         String str = "select role from login where userid='" + luname + "' and password='" + lpass + "'";
         pst1=con.createStatement();
                   ResultSet rs=pst1.executeQuery(str);
                   while(rs.next())
                   role=rs.getInt(1);
         catch(Exception e)
         System.out.println("Error !!" + e);
         return role;
    I am able to get the results from the table with another java program. What change should i make when using a statless session bean?
    Thanks in advance

    I am working on SSAS i developed an datacube and deployed succesfully but when i call that SSAS through my SSIS it says that some table is not
    found but the table exist in my SSAS module.
    All things are working fine previous days suddenly this hapened kindly help me in this issue.
    You must understand that there is no concept of tables in SSAS and there is nothing called as a SSAS module. It is called SSAS cubes which has dimensions and facts. What went wrong? What process is scheduled on the SSASA objects?
    Please vote as helpful or mark as answer, if it helps
    Cheers, Raunak | t: @raunakjhawar |
    My Blog

  • Count(*) returns 'Column 'Count' not found' SQLException

    I am trying to get the count from a table using the following:
    String query = "SELECT COUNT(*) FROM myTable;"
    I know that the connection is open and working because I am getting back an SQLException:
    'Column 'Count' not found' .
    The same command works fine at the command line. I would be grateful for any suggestions as to why JDBC sends my app searching for a field named count in my table whereas the command line returns the expected number.
    Thanks.

    Found the problem, which is mainly my own stupidity . Is it one of Murphy's laws that the quickest way to find the solution to a problem if first embarrass yourself by asking foolish questions? Sorry to have bothered anyone.

Maybe you are looking for