ResulSet,SQLException problem

I have an error in my result set. Here is the code:
String query="select name,password from\'table name'\"+"where name like username and"+"where password like password";
ResultSet rs=stmt.executeQuery(query);
while(rs.next()){
String uname=rs.getString(2);
String pword=rs.getString(3);
}}catch(SQlException em){"incorrect name and password "+em.getMessage);
Username and password are entered via JOptionPane, 2 and 3 reprsent the columns in the table for username and password respectively. What I am trying to accomplish is of course to access the database only if the username and password match. Here is my error from the catch block:
"too few parameters- expected 1"
Help please! Thank you.

There is a mispalling error:
String query="select name,password from\'table name\'"+"where name like username and"+"where password like password";
If you want o access the database only if the usename and password match you just need one query
Select name, password form\'table name\'"+"where name = "+user.name+" and password = "+user.password
Try dis may work...

Similar Messages

  • Driver database SQLException problems

    Hello all,
    i have problems with a java-tutorial "JDBC Basics". It seems that i didn't undertand some/much parts of the tutorial. I tried the sample code "CreateCoffees.java" (the code is below) but i get errors(see below) by runnig the class-file. I am new to data base and not sure if i need to load the divers (per software) or if my problem is in the code. May i can just say what i don't understand.
    0) Do i need to ad some jar-files to the classpath,like driverclasses?(my system win 98/java 1.4)
    1) Do i need an existing database(where can i get one), or does my code produce it?
    2) If i declare the name of the datasource, where does java search for it?
    3) I have problems with two line in the code
    line 17: Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    line 26: con = DriverManager.getConnection(url, "myLogin", "myPassword");
    Is it important to use a special driver/driverclassname (in my example)?
    If i have now database where does the ("myLogin", "myPassword") goes to?
    I don't know where i should cut my problems in smaler parts.
    Thanks for any help.
    Richard
    Code:
    import java.sql.*;
    public class CreateCoffees {
        public static void main(String args[]) {
            String url = "jdbc:odbc:myDataSource";
            Connection con;
            String createString;
            createString = "create table COFFEES " +
                                "(COF_NAME VARCHAR(32), " +
                                "SUP_ID INTEGER, " +
                                "PRICE FLOAT, " +
                                "SALES INTEGER, " +
                                "TOTAL INTEGER)";
            Statement stmt;
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                System.out.println("test1");
            } catch(java.lang.ClassNotFoundException e) {
                System.err.print("ClassNotFoundException: ");
                System.err.println(e.getMessage());
            try {
                 System.out.println("test2");
                con = DriverManager.getConnection(url, "myLogin", "myPassword");
                stmt = con.createStatement();
                stmt.executeUpdate(createString);
                stmt.close();
                con.close();
            } catch(SQLException ex) {
                System.err.println("SQLException: " + ex.getMessage());
    }error:
    C:\Vogtmann\java\aewcode\datenbank>java CreateCoffees
    test1
    test2
    SQLException: [Microsoft][ODBC Driver Manager] Datenquellenname nicht gefunden und kein Standardtreiber angegeben

    Hello vadim,
    and thanks for your answer.
    Try to use datasources(ODBC) tool
    in the system tools to describe data
    source(driver connection to the database in file).Sorry, i can't understand what it meens. I am trying under System/ODBC-database(32-bit) to do something but don't know how to hanlde this microsoft-window.
    Does somebody can lead my through that miracle-window, or does somebody know a description with example?
    thats what i tried:
    open:System/ODBC-database(32-bit)
    file-dns:add
    chose-driver:?(i tried SQL server and ODBC oracle)
    window say than no connection possile
    Well i keep on trying.
    Richard

  • Problem in connecting to times ten from jsp

    Hi sir,
    I am trying to connect with timesten from jsp. But am getting following Exception.
    SQLException: Problems with loading native library/missing methods: no ttJdbcCS70 in java.library.path
    I am using myeclipse 8.6 ide. I have diployed my project in myeclipse tomcat server.
    Please help me in resolving this problem.
    Follosing is my code.
    display.jsp:
    <%@page import="com.tbss.RealTimeDAO,com.tbss.RealTimeCallReport,java.util.*"%>
    <%
    RealTimeDAO rdao=new RealTimeDAO();
    List<RealTimeCallReport> list=rdao.getRecords();
    pageContext.setAttribute("list",list);
    out.print("list"+list+"\n");
    Iterator<RealTimeCallReport> i=list.iterator();
    while(i.hasNext()){
    RealTimeCallReport rp=i.next();
    out.println(rp.getCompaignID()+"\t"+rp.getConnectedPhone()+"\t"+rp.getRecordID()+"\t"+rp.getSessionDuration()+"<br/>");
    %>
    RealTimeDAO.java
    public class RealTimeDAO {
    public List<RealTimeCallReport> getRecords(){
    List<RealTimeCallReport> list=new ArrayList<RealTimeCallReport>();
    try {
    // create the TimesTen data source and set the connection URL
    TimesTenDataSource ttds = new TimesTenDataSource();
    ttds.setUrl("jdbc:timesten:client:dsn=ttc1;UID=ttsa;PWD=abc123");
    // connect to the TimesTen database
    TimesTenConnection ttcon = (TimesTenConnection) ttds.getConnection();
    // create and execute the statement
    Statement stmt = ttcon.createStatement();
    ResultSet rset = stmt.executeQuery("select * from REAL_TIME_CALL_REPORT");
    // process the result set
    while(rset.next()) {
    RealTimeCallReport rp=new RealTimeCallReport();
    rp.setCompaignID(rset.getLong("CAMPAIGN_ID"));
    rp.setConnectedPhone(rset.getLong("CONNECTEDPHONE"));
    rp.setRecordID(rset.getLong("RECORD_ID"));
    rp.setSessionDuration(rset.getString("SESSION_DURATION"));
    rp.setSessionID(rset.getString("SESSION_ID"));
    list.add(rp);
    return list;
    } catch(SQLException e) {
    e.printStackTrace();
    return null;
    }

    The driver requires a shared library (nothing to do with java itself.)
    The shared library is not in the shared library path. The error suggests that the OS is Windows which means that the PATH (env variable) of the executable must have the directory of the shared library in it.

  • How to resolve "Failed to load TTSQLDB JDBC driver" problem

    Hi,
    I installed timesten112140.sparc64.tar on solaris m/c.
    Details of solaris m/c are
    SunOS pun-ldom-rds70 5.10 Generic_139555-08 sun4v sparc SUNW,T5240
    I am getting below mentioned error when trying connecting to the database through java process.
    ERROR: failed to load TTSQLDB JDBC driver.
    java.sql.SQLException: Problems with loading native library/missing methods: /op
    t/TimesTen/ttsolaris21/lib/libttJdbc.so: ld.so.1: java: fatal: /opt/TimesTen/tts
    olaris21/lib/libttJdbc.so: wrong ELF class: ELFCLASS64 (Possible cause: architec
    ture word width mismatch)
    at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:
    1753)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:349)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:205)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:207)
    at CreateConnectionDemo.createConnection(CreateConnectionDemo.java:43)
    at CreateConnectionDemo.<clinit>(CreateConnectionDemo.java:26)
    Exception in thread "main" java.lang.NullPointerException
    at CreateConnectionDemo.closeConnection(CreateConnectionDemo.java:69)
    at CreateConnectionDemo.main(CreateConnectionDemo.java:62)

    You are trying to open a direct mode connection to 64-bit TimesTen from a JVM running in 32-bit mode. This is not possible. Run the JVM in 64-bit mode instead and thsi issue will be resolved.
    Chris

  • Problems with loading native library/missing methods: no ttJdbcCS1121

    Hi guys,
    Im getting this problem in glassfish 2.1, but in glassfish 3 or in tomcat, i dont get this problem. (Windows)
    Any thoughts?
    java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbcCS1121 in java.library.path
    at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1750)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:305)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:161)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at com.summitinvt.mdaq.db.handler.DBConnector.getConnection(DBConnector.java:108)
    at com.summitinvt.mdaq.db.handler.DBConnector.initiateConnection(DBConnector.java:101)
    at com.summitinvt.mdaq.db.handler.DBConnector.<init>(DBConnector.java:34)
    at com.summitinvt.mdaq.db.handler.DBConnector.<init>(DBConnector.java:14)
    at com.summitinvt.mdaq.db.handler.DBConnector$DBConnectorUtil.<clinit>(DBConnector.java:24)
    at com.summitinvt.mdaq.db.handler.DBConnector.getInstance(DBConnector.java:28)
    at com.summitinvt.mdaq.rats.server.CommunicatorImpl.getPnLByCurrency(CommunicatorImpl.java:1074)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:207)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:243)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:382)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    regards
    John

    A similar problem was reported before on this Forum - see
    Re: not able create connection to timesten
    checking the Release Notes I can see 11.2.1.8.0 has been tested against Glassfish 3 but I
    can't see any mention about Glassfish 2 in the v7 or v11 Release Notes (albeit only on a quick
    search).
    In my full install on XP, ttJdbcCS1121.dll is in C:\TimesTen\tt1121_32\bin

  • Errors in Timesten Client on windows 64 bit

    Hi ,
    I am installing Times-ten Client on 64 but windows machine.It is installed successfully.
    The ODBC connection is also done successfully with Timesten Server.
    Now i am trying to up my appication with Timesten URL .
    i have change required JDBC url and Driver with timesten string.
    while Up the appication
    i am getting below errors :
    2013-05-29 12:23:08,635 [main] [TRACE] [ CM_SERCONF ] : org.jboss.util.NestedSQLException: Unable to get managed connection for OfflineDS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for OfflineDS)
    kindly suggest me how i can resolve this

    Following sample java program which is connecting to Times ten
    import java.sql.*;
    public class oracletest {
    public static void main(String[] args) {
    // TODO Auto-generated method stub
         try {
              Class.forName("com.timesten.jdbc.TimesTenDriver");
    String serverName="192.168.1.196";
    String user="scott";
    String password="tiger";
    String SID="ttocsdev";
    String URL="jdbc:timesten:client:dsn=ttocsdev";
    Connection conn=DriverManager.getConnection(URL, user, password);
    String SQL="select ddf.bankid hbankid,gb.strbatchcustom2 BANKNAME, ddf.jrxmlfile, ddf.dbview, ddf.format, ddf.strcustom1 CSVDELIMITER, ddf.exportfilepath from TBLTGENERATEDBATCH gb , tbltdirectdebitfileextension ddf where gb.strbatchcustom3 = ddf.bankid and gb.generatedbatchid='BCH000000003'";
    Statement stat=conn.createStatement();
    ResultSet rs=stat.executeQuery(SQL);
    while (rs.next()){
         String strcontent=rs.getString("hbankid");
    System.out.println(strcontent);
                   stat.close();
                   conn.close();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    Errors
    java.sql.SQLException: Problems with loading native library/missing methods: C:\TimesTen\tt1122_64\bin\ttJdbcCS1122.dll: Can't find dependent libraries
    at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1794)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:303)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:159)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at oracletest.main(oracletest.java:26)

  • Timesten Datasource configuration on WebSphere

    Hi,
    I have created a timesten datasource...and I was able to connect to oracle database by ttisql command.
    Now I am trying to configure datasource on websphere for usage of the timesten datasource by an application...
    After I configure everything on Websphere according to timesten documentation...I get the below error when I do a test connection from WebSphere Admin Console...
    Test connection failed for data source bridgesDS on server brg-tt-intAS at node hco431brgeda002ANode01 with the following exception: java.lang.Exception: java.sql.SQLException: Problems with loading native library/missing methods: /opt/TimesTen/tt70/lib/libttJdbc.so: ld.so.1: java: fatal: libtten.so: open failed: No such file or directoryDSRA0010E: SQL State = null, Error Code = 0. View JVM logs for further details.
    I have made sure that libttJdbc and libtten.so are available in the above path...but I seem to be getting the error still...
    Any help on this would be appreciated...thanks

    hi Chris,
    Here is the output of ttversion command
    # ./ttversion
    TimesTen Release 7.0.5.0.0 (32 bit Solaris) (tt70:17000) 2008-04-04T01:33:06Z
    Instance admin: root
    Instance home directory: /opt/TimesTen/tt70
    Daemon home directory: /var/TimesTen/tt70
    Access control enabled.
    Here is the output, when i run TTJdbcExamples redirected to a text file...
    # java TTJdbcExamples ttdemo > /tmp/timesten.txt
    java.lang.ClassNotFoundException: com.timesten.jdbc.TimesTenDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at TTJdbcExamples.loadDriver(TTJdbcExamples.java:485)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:447)
    at TTJdbcExamples.main(TTJdbcExamples.java:313)
    java.lang.ClassNotFoundException: com.timesten.jdbc.TimesTenDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at TTJdbcExamples.loadDriver(TTJdbcExamples.java:485)
    at TTJdbcExamples.connectAndDisconnect(TTJdbcExamples.java:502)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:449)
    at TTJdbcExamples.main(TTJdbcExamples.java:313)
    ----- SQL Error -----
    Error Message: No suitable driver
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:545)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at TTJdbcExamples.connectAndDisconnect(TTJdbcExamples.java:510)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:449)
    at TTJdbcExamples.main(TTJdbcExamples.java:313)
    SQL State: 08001
    Native Error Code: 0
    java.lang.ClassNotFoundException: com.timesten.jdbc.TimesTenDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at TTJdbcExamples.loadDriver(TTJdbcExamples.java:485)
    at TTJdbcExamples.elementaryOperations(TTJdbcExamples.java:552)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:451)
    at TTJdbcExamples.main(TTJdbcExamples.java:313)
    ----- SQL Error -----
    Error Message: No suitable driver
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:545)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at TTJdbcExamples.elementaryOperations(TTJdbcExamples.java:560)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:451)
    at TTJdbcExamples.main(TTJdbcExamples.java:313)
    SQL State: 08001
    Native Error Code: 0
    java.lang.ClassNotFoundException: com.timesten.jdbc.TimesTenDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at TTJdbcExamples.loadDriver(TTJdbcExamples.java:485)
    at TTJdbcExamples.changeQueryPlan(TTJdbcExamples.java:720)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:453)
    at TTJdbcExamples.main(TTJdbcExamples.java:313)
    ----- SQL Error -----
    Error Message: No suitable driver
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:545)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at TTJdbcExamples.changeQueryPlan(TTJdbcExamples.java:726)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:453)
    at TTJdbcExamples.main(TTJdbcExamples.java:313)
    SQL State: 08001
    Native Error Code: 0
    java.lang.ClassNotFoundException: com.timesten.jdbc.TimesTenDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at TTJdbcExamples.loadDriver(TTJdbcExamples.java:485)
    at TTJdbcExamples.batchExecution(TTJdbcExamples.java:917)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:455)
    at TTJdbcExamples.main(TTJdbcExamples.java:313)
    ----- SQL Error -----
    Error Message: No suitable driver
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:545)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at TTJdbcExamples.batchExecution(TTJdbcExamples.java:923)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:455)
    at TTJdbcExamples.main(TTJdbcExamples.java:313)
    SQL State: 08001
    Native Error Code: 0
    Contents inside the text file
    TTJdbcExamples.connectAndDisconnect()
    TTJdbcExamples.loadDriver()
    Open a connection.
    TTJdbcExamples.elementaryOperations()
    TTJdbcExamples.loadDriver()
    Open a connection.
    Change and Print a Query Plan
    TTJdbcExamples.loadDriver()
    Open a connection.
    Execute Statement and PreparedStatement Batch Updates
    TTJdbcExamples.loadDriver()
    Open a connection.
    Done.
    thanks...
    Rakesh

  • No ttJdbc in java.library.path

    Hi,
    I am getting following error while starting JBOSS which is pointing to timesten
    (java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbc in java.library.path)
    I have set LD_LIBRARY_PATH
    /u01/app/oracle/product/10.2.0/db_1/lib:/usr/lib:/home/timesten/TimesTen/tt70/lib/
    JBOSS is installed using timesten user only.
    ttjdbc5.jar and ttjdbc6.jar and classes15.jar and classes16.jar have been copied to JBOSS/lib and JBOSS/server/default/lib
    Can anyone guide me?
    Thanks in advance,
    Pankti

    This is complaining about not being able to find the shared library libttJdbc.so which is to be found in &lt;TT_HOME&gt;/lib. Normally this would be found via LD_LIBRARY_PATH but it maybe that JBOSS uses something else (perhaps java.library.path?).
    Chris

  • Java6 and tt70, no ttJdbcCS in java.library.path

    hi,
    javac Test.java is ok.
    But when I run the command:
    java -Djava.library.path=/itf1/ocstt/TimesTen/tt70/lib Test
    an exception occurred:
    java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbcCS in java.library.path
    I had included the tt70's lib in the LD_LIBRARY_PATH according to the java_dev.pdf.
    My env:
    HP-UX itf1 B.11.31 U ia64, JAVA_HOME=/opt/java6
    Any help is appreciated.
    regards,
    Sunny

    Hi, Ionut,
    Thank you very much for your response.
    There is no problem for a CS connection with a remote TT data store. Like the informations below:
    itf1:[itf1/bea]$ ttisqlcs mmdb_cs
    Copyright (c) 1996-2008, Oracle. All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
    All commands must end with a semicolon character.
    connect "DSN=mmdb_cs";
    Enter password for 'bea':
    itf1:[itf1/bea]$ echo $LD_LIBRARY_PATH
    /oracle/app/oracle/product/10.2.0/lib:/oracle/app/oracle/product/10.2.0/network/lib:/usr/lib:/usr/ccs/lib:/usr/local/lib:/itf1/ocstt/TimesTen/tt70/lib:/itf1/bea/tuxedo8.1/lib:/oracle/app/oracle/product/10.2.0/lib
    I also try :
    java -cp .:/itf1/ocstt/TimesTen/tt70/lib/classes6.jar Test
    java -cp .:/itf1/ocstt/TimesTen/tt70/lib/classes16.jar Test
    java -cp .:/itf1/ocstt/TimesTen/tt70/lib/ttjdbc6.jar Test
    The same exception occurred.
    I wonder if there is a compatible problem between java6 and tt70.
    Best regards,
    Sunny
    Edited by: user10914679 on 2010-1-27 上午3:47

  • No Instant Client 10.2 for Mac PPC?

    I'll skip the rant about there not being an Oracle Instant Client for Intel Mac since that appears to have been covered in a previous thread.
    But where's the 10.2 instant client for PPC Macs? All other platforms (at least the ones I care about) have 10.2 but Mac is stuck at 10.1. When I link against the 10.1 library, I get the following unresolved externals:
    __ZTIN6oracle4occi12SQLExceptionE
    __ZTIN6oracle4occi7PObjectE
    Please tell me there's a 10.2 available for Mac, even if it's only PPC. Maybe somebody just forgot to update the links on the download site?

    hi there. i've got (almost) the same problem on my mac ppc (darwin kernel version 8.10.0) with g++ 4.0.0, but i only have an unresolved __ZTIN6oracle4occi12SQLExceptionE.
    there is a workaround for the SQLException problem. as SQLException extends std::exception you can use
    try {
    catch(std::exception& exception) {
    int oraCode(exception.getErrorCode());
    std::string oraMessage(exception.getMessage());
    // do whatever you like with oraCode and oraMessage
    instead of
    try {
    catch(oracle::occi::SQLException& exception) {
    int oraCode(exception.getErrorCode());
    std::string oraMessage(exception.getMessage());
    // do whatever you like with oraCode and oraMessage
    throughout your code, which will not require
    __ZTIN6oracle4occi12SQLExceptionE to be resolved (or generated).
    as i mentioned before, i haven't come across the PObject problem. what compiler are you using (i suppose g++ 4.0.0)? what are your compiler and linker flags?
    best wishes from hamburg, matt

  • Load ENOEXEC

    apologizing,I have got an error like this:
    java.sql.SQLException: Problems with loading native library/missing methods: /oracle/TimesTen/tt70/lib/libttJdbc.so: load ENOEXEC on shared library(s) /oracle/TimesTen/tt70/lib/libttJdbc.so
    at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1715)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:275)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:140)
    at java.sql.DriverManager.getConnection(DriverManager.java:559)
    at java.sql.DriverManager.getConnection(DriverManager.java:211)
    at TTJdbcExamples.batchExecution(TTJdbcExamples.java:966)
    at TTJdbcExamples.runExamples(TTJdbcExamples.java:498)
    at TTJdbcExamples.main(TTJdbcExamples.java:356)
    SQL State: null
    Native Error Code: 0
    please give me some idea,thanks in advance!

    This is an O/S error indicating that the JVM is unable to load the TimesTen shared library libttJDbc.so. This could be a permissions problem or something else. For example, if this is AIX then this can occur if all other necessary shared libraries needed to resolve all external references are not locatable via the normal library search rules.
    What O/S is this? What does you environemnt look like (output of 'env' command)? What are the JVM search paths for native code libraries?
    Chris

  • Java.sql.SQLException: No suitable driver problem

    Hello all.
    Firstly, i am new to programming java apps that connect to SQL databases.
    I have set up a MySQL server on my computer, which i can successfully access through my command prompt on my pc (so i know its up and running). Now im trying to create a simple java program which connects to the sql database, and simply lists the contents of the table in question. However, when running this program i recieve this exception:
    java.sql.SQLException: No suitable driver
    I have thoroughly researched this problem on the internet, with many people saying that i have not installed the j/connector driver correctly. My j/connecter driver file is in C:\Program Files\JAVASQL\mysql-connector-java-3.0.17-ga-bin.jar . My Environmental Variable CLASSPATH in windows reads: ".;C:\Program Files\Java\jre1.5.0_03\lib\ext\QTJava.zip; C:\Program Files\JAVASQL\mysql-connector-java-3.0.17-ga-bin.jar", so i am pretty sure i have done everything correctly with reguards to installing the connector.
    My program code is as follows:
       import java.sql.*;
        class TestSqlConnect
           public static void main (String[] args)
             try
                Connection sqlConnection = DriverManager.getConnection("jdbc:mysql://127.0.0.1/myDatabaseName","root","mypassword");
                Statement sqlStatement = sqlConnection.createStatement();
                ResultSet sqlResult = sqlStatement.executeQuery("SELECT * FROM Rooms");
                while (sqlResult.next())
                   System.out.println(sqlResult.getString("name"));
                sqlStatement.close();
                 catch (Exception e)
                   System.out.println(e.toString());
       }Note i have also tried the url "jdbc:mysql://localhost/myDatabaseName" and still get the same problem.
    Any help would be greatly appreciated. cheers.

    jazza_guy wrote:
    Ok problem solved! Im gonna post the answer as whilst trying to find the answer myself i found so many people had this problem... yet noone could seem to find an asnwer.Nonsense. Lots of people find an answer to this problem. You're the one having the problem.
    Altho i did have my connector class in the CLASSPATH, this was not enough..Wrong. You think you had the driver class in your CLASSPATH, but you did not. You don't understand CLASSPATH.
    The file needs to be copied into the main_java_folder/jdk/jre/lib/ext folder... and that seemed to do the trick..That might "work", but it's absolutely the wrong thing to do.
    %

  • WLI problem when processing a high number of records - SQLException: Data e

    Hi
    I'm having some trouble with a process in WLI when processing a high number of records from a table. I'm using WLI 8.1.6 and Oracle 9.2.
    The exception I'm getting is:
    javax.ejb.EJBException: nested exception is: java.sql.SQLException: Data exception -- Data -- Input Data length 1.050.060 is greater from the length 1.048.576 specified in create table.
    I think the problem is not with the table because it's pretty simple. I'll describe the steps in the JPD below.
    1) A DBControl checks to see if the table has records with a specific value in a column.
    select IND_PROCESSADO from VW_EAI_INET_ESTOQUE where IND_PROCESSADO = 'N'
    2) If there is one or more records, we update the column to another value (in other DBControl)
    update VW_EAI_INET_ESTOQUE  set IND_PROCESSADO = 'E' where IND_PROCESSADO = 'N'
    3) We then start a transaction with following steps:
    3.1) A DBControl queries for records in a specific condition
    select
    COD_DEPOSITO AS codDeposito,
    COD_SKU_INTERNO AS codSkuInterno,
    QTD_ESTOQUE AS qtdEstoque,
    IND_ESTOQUE_VIRTUAL AS indEstoqueVirtual,
    IND_PRE_VENDA AS indPreVenda,
    QTD_DIAS_ENTREGA AS qtdDiasEntrega,
    DAT_EXPEDICAO_PRE_VENDA AS dataExpedicaoPreVenda,
    DAT_INICIO AS dataInicio,
    DAT_FIM AS dataFim,
    IND_PROCESSADO AS indProcessado
    from VW_EAI_INET_ESTOQUE
    where IND_PROCESSADO = 'E'
    3.2) We transform all the records found to and XML message (Xquery)
    3.3) We update again update the same column as #2 to other value.
    update VW_EAI_INET_ESTOQUE set  IND_PROCESSADO = 'S'   where IND_PROCESSADO = 'E'.
    4) The process ends.
    When the table has few records under the specified condition, the process works fine. But if we test it with 25000 records, the process fails with the exception below. Sometimes in the step 3.1 and other times in the step 3.3.
    Can someone help me please?
    Exception:
    <A message was unable to be delivered from a WLW Message Queue.
    Attempting to deliver the onAsyncFailure event>
    <23/07/2007 14h33min22s BRT> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction
    Xid=BEA1-00424A48977240214FD8(12106298),Status=Rolled back. [Reason=javax.ejb.EJBException: nested
    exception is: java.sql.SQLException: Data exception -- Data -- Input Data length 1.050.060 is greater from the length  1.048.576 specified in create table.],numRepliesOwedMe=0,numRepliesOwedOthers= 0,seconds since begin=118,seconds left=59,XAServerResourceInfo[JMS_cgJMSStore]=(ServerResourceInfo[JMS_cgJMSStore]=(state=rolledback,assigned=cgServer),xar=JMS_cgJMSStore,re-Registered =
    false),XAServ erResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=
    (state=rolledback,assigned=cgServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@d38a58,re-Registered =false),XAServerResourceInfo[CPCasaeVideoWISDesenv]=
    (ServerResourceInfo[CPCasaeVideoWISDesenv]=(state=rolledback,assigned=cgServer),xar=CPCasaeVideoWISDesenv,re-Registered = false),SCInfo[integrationCV+cgServer]=(state=rolledback),
    properties=({weblogic.jdbc=t3://10.15.81.48:7001, START_AND_END_THREAD_EQUAL=false}),
    local properties=({weblogic.jdbc.jta.CPCasaeVideoWISDesenv=weblogic.jdbc.wrapper.TxInfo@9c7831, modifiedListeners=[weblogic.ejb20.internal.TxManager$TxListener@9c2dc7]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=
    (CoordinatorURL=cgServer+10.15.81.48:7001+integrationCV+t3+,
    XAResources={JMS_FileStore, weblogic.jdbc.wrapper.JTSXAResourceImpl, JMS_cgJMSStore, CPCasaeVideoWISDesenv},NonXAResources={})],CoordinatorURL=cgServer+10.15.81.48:7001+integrationCV+t3+): javax.ejb.EJBException: nested exception is: java.sql.SQLException: Data exception -- Data -- Input Data length 1.050.060 is greater from the length 1.048.576 specified in create table.
            at com.bea.wlw.runtime.core.bean.BMPContainerBean.ejbStore(BMPContainerBean.java:1844)
            at com.bea.wli.bpm.runtime.ProcessContainerBean.ejbStore(ProcessContainerBean.java:227)
            at com.bea.wli.bpm.runtime.ProcessContainerBean.ejbStore(ProcessContainerBean.java:197)
            at com.bea.wlwgen.PersistentContainer_7e2d44_Impl.ejbStore(PersistentContainer_7e2d44_Impl.java:149)
            at weblogic.ejb20.manager.ExclusiveEntityManager.beforeCompletion(ExclusiveEntityManager.java:593)
            at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:744)
            at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1069)
            at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:118)
            at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1202)
            at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:2007)
            at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:257)
            at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:228)
            at weblogic.ejb20.internal.MDListener.execute(MDListener.java:430)
            at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:333)
            at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:298)
            at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2698)
            at weblogic.jms.client.JMSSession.execute(JMSSession.java:2610)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Caused by: javax.ejb.EJBException: nested exception is: java.sql.SQLException: Data exception -- Data -- Input Data length 1.050.060 is greater from the length 1.048.576 specified in create table.
            at com.bea.wlw.runtime.core.bean.BMPContainerBean.doUpdate(BMPContainerBean.java:2021)
            at com.bea.wlw.runtime.core.bean.BMPContainerBean.ejbStore(BMPContainerBean.java:1828)
            ... 18 more

    Hi Lucas,
    Following is the information regarding the issue you are getting and might help you to resolve the issue.
    ADAPT00519195- Too many selected values (LOV0001) - Select Query Result operand
    For XIR2 Fixed Details-Rejected as this is by design
    I have found that this is a limitation by design and when the values exceed 18000 we get this error in BO.
    There is no fix for this issue, as itu2019s by design. The product always behaved in this manner.
    Also an ER (ADAPT00754295) for this issue has already been raised.
    Unfortunately, we cannot confirm if and when this Enhancement Request will be taken on by the developers.
    A dedicated team reviews all ERs on a regular basis for technical and commercial feasibility and whether or not the functionality is consistent with our product direction. Unfortunately we cannot presently advise on a timeframe for the inclusion of any ER to our product suite.
    The product group will then review the request and determine whether or not the functionality/feature will be included in a future release.
    Currently I can only suggest that you check the release notes in the ReadMe documents of future service packs, as it will be listed there once the ER has been included
    The only workaround which I can suggest for now is:
    Workaround 1:
    Test the issue by keep the value of MAX_Inlist_values parameter to 256 on designer level.
    Workaround 2:
    The best solution is to combine 'n' queries via a UNION. You should first highlight the first 99 or so entries from the LOV list box and then combine this query with a second one that selects the remaining LOV choices.
    Using UNION between queries; which is the only possible workaround
    Please do let me know if you have any queries related to the same.
    Regards,
    Sarbhjeet Kaur

  • SQLException: Access not allowed (problem with ACL)

    Hi, I'm getting the following error when I start my Weblogic (7.0) server.
    java.sql.SQLException: weblogic.common.ResourceException: Access not allowed
    I followed these steps to Provide the necessary ACl permisiions:
    1.     Compatibility Security => ACLs
    Create a new ACL:
    name : weblogic.jdbc.connectionPool.yourPoolname
    permission : admin
    group : Administrators
    2. Create a new Connection Pool:
    ACL Name : weblogic.jdbc.connectionPool.yourPoolname
    In 'Target' tab, choose server and click the Apply button.
    I even checked fileRealm.properties, the user admin123 (the user name with which I start the server), is included in all the connectionpool ACL lists. I restarted the server to pick the new changes but it still gives the same errors.
    Please help,
    Thanks

    You need to create the correct ACL for the DataSource following this procedure in the Administration Console:
    1. Compatibility Security => ACLs
    Create a new ACL:
    name : weblogic.jdbc.connectionPool.yourPoolname
    permission : admin
    group : Administrators
    2. Compatibility => click Refresh button
    3. Services => JDBC => Connection Pool
    Create a new Connection Pool:
    ACL Name : weblogic.jdbc.connectionPool.yourPoolname
    In 'Target' tab, choose server and click the Apply button.
    4. Services => JDBC => Data Sources
    You can create a new Data Source using this connection pool successfully
    Regards,
    Prasanna Yalam

  • SQLException :Too many client tasks problem

    Hi,
    In my Standalone Java Swing application, iam using connections to the MS-Access Database using Connection pooling..Iam initializing around 10 connections. After executing, performing some operations on application, after sometime...i get the SQL Exception Too many client tasks exception..
    I have checked my programs..iam closing all my result set and prepared statements..
    Where am i going wrong?
    Can anybody pls advice me to solve this problem?
    Regards,
    SRhodes.

    remember access has a max number of connection to handle which you are not closing. you close only resultset and statements
    ivo

Maybe you are looking for

  • Crystal layout previews fine in Crystal, but not in SAP.

    Hi, I've built a simple report in Crystal based upon the Goods Receipt Header and Goods Receipt Rows Table. I've included the DocKey@ paremeter I've set the correct select record: {OPDN.DocEntry} = {?DocKey@} When I preview the report in Crystal, Cry

  • SPUM4 not doing anything

    Hi, I'm doing an upgrade from 46C to ECC6, switching to unicode from a MDMP system. I've finished the prepare and I'm trying to run SPUM4. I've initialized the language list, all the tables are in initial status. When I select a group of tables and s

  • What is the best way to move tablespace

    i have to move one big tablespace (with 130-140 datafiles) from one instance to another (it's oracle 10.2.0.0.4), so what is the best way to do it?

  • UUP in 8.1

    IS uup still exist in 8.1? And does anyone have any experience actually using UUP in high volume sites?

  • Dynamic cfinput error

    Trying to dynamically insert a <cfinput tag with Javascript. But I'm getting the following message even though I'm insert the tag inside of the <cfform tag. Code works fine with <input. Any work arounds? Suggestions? Hacks? Thanks. Error message: Err