This discussion is archived
9 Replies Latest reply: Jul 5, 2012 1:16 AM by ChrisJenkins RSS

No suitable driver found

936666 Newbie
Currently Being Moderated
Hi,
I am getting the below error when i try to connect

Version :TimesTen Release 11.2.2.2.0
OS:Win 2003 32 bit

     Connection conn = DriverManager.getConnection("jdbc:timesten:direct:dsn=my_ttdb;LockLevel=1");

and in the path
C:\TimesTen\tt1122_32\lib
there are 3 jar files

ttjdbc6.jar
ttjdbc5.jar
ucp.jar


Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:timesten:direct:dsn=my_ttdb;LockLevel=1
     at java.sql.DriverManager.getConnection(Unknown Source)
     at java.sql.DriverManager.getConnection(Unknown Source)
     at level1.main(level1.java:14)

The Class path is set as

C:\TimesTen\TT1122~1\lib\ttjdbc5.jar;C:\TimesTen\TT1122~1\lib\ttjdbc6.jar;

How to resolve it

Thanks!
  • 1. Re: No suitable driver found
    ChrisJenkins Guru
    Currently Being Moderated
    Does your code load the TimesTen driver using:

    Class.forName("com.timesten.jdbc.TimesTenDriver");

    before calling

    DriverManager.getConnection("jdbc:timesten:direct:dsn=my_ttdb;LockLevel=1");

    If not then you need to add that call.

    Chris
  • 2. Re: No suitable driver found
    936666 Newbie
    Currently Being Moderated
    I did not add Class.forName("com.timesten.jdbc.TimesTenDriver"); previously, after adding the code i am getting the error as

    Exception in thread "main" java.lang.ClassNotFoundException: com.timesten.jdbc.TimesTenDriver

    Below is the code

    import java.sql.*;

    public class Timesten
    {
    public static void main(String[] args) throws SQLException, ClassNotFoundException{

    Class.forName("com.timesten.jdbc.TimesTenDriver");
         Connection conn = DriverManager.getConnection("jdbc:timesten:direct:dsn=my_ttdb;LockLevel=1");
    try {
    System.out.print(" Hi TimesTen");
    conn.close();
    } catch (SQLException ex) {
         // "Handling errors"
         }
    }
    }

    Thanks!!
  • 3. Re: No suitable driver found
    ChrisJenkins Guru
    Currently Being Moderated
    This means that your CLASSPATH is not set properly or is not being picked up properly. Please double check that. Also, is this just pure Java (javac/java) or is this hosted in an appserver or some other framework? Appservers/frameworks usually do not pick up the CLASSPATH environment variable but instead have their own way to set CLASSPATH.

    Chris
  • 4. Re: No suitable driver found
    936666 Newbie
    Currently Being Moderated
    Hi Chris Thanks for the replay!

    I am able to work on it, i added Classpath and Path environmental variable it works fine.

    But i am getting error

    SQLException: java.sql.SQLException: [TimesTen][TimesTen 11.2.2.2.0 ODBC Driver][TimesTen]TT0802: Database permanent space exhausted -- file "blk.c", lineno 3450, procedure "sbBlkAlloc"

    This error occurs at the initial stage of configuration for me, i corrected by reducing Temp-size and perm-size of the database then i was able to load the data,where as now after populating some data's i am getting same error
    *SQLException: java.sql.SQLException: [TimesTen][TimesTen 11.2.2.2.0 ODBC Driver][TimesTen]TT0802: Database permanent space exhausted -- file "blk.c", lineno 3450, procedure "sbBlkAlloc"*

    what needs to be done , at present my Temp-size=64 and perm-size=100

    Perm-size is located at D drive which is having 100 GB
    Temp-size is located at E drive which is having 100 GB
    OS:Win 2003
    RAM:8GB

    What is the configuration i need to do,in-order to work on java and on TTISQL command

    I have gone the post of
    Cannot attach data store shared-memory segment using JDBC (TT0837)
    where it has been said as reduce the Temp-size and perm-size thats why i have reduced my current DSN in order to work on java,but if more and more data's are inserted into the database i am unable to proceed future

    Thanks!!!!
  • 5. Re: No suitable driver found
    ChrisJenkins Guru
    Currently Being Moderated
    TimesTen is an in-memory database. The operational database (i.e. all data stored in TimesTen) is permanenrtly held in physical memory while the database is operational. The amount of memory needed is approximately PermSize + TempSize + LogBufMB + ~20MB. These values are all parameters set in the DSN attributes for the database. The permanent region is the one tht holds all persistent data; tables, indexes, sequences etc. while the temporary region is used to hold temporary/non persistent data such as sort space, locks, materialised results etc.

    The message you are getting indicates that you have filled the permanent region so there is no room to add any addtional data. To resolve this you need to shutdown the database, increase PermSize, and then start the database up again. Note that the maximum size you can specify for PermSize + TempSize + LogBufMB is limited by (a) the amount of available physical memory installed in your machine and (b) on 32-bit platforms limitations due to 32-bit address space. On 32-bit Windows specifically you are unlikely to be able to use a PermSize much larger than 1 GB and possibly less (assuming that you have enough memory).

    For disk stirage, TimesTen persists data to disk using a combination of checkpoint files (2 * PermSize) and transaction log files (variable size depending on workload and other factors but normally at least 2*PermSize). By default these go into the same location (Datastore Path + Name parameter) but yoiu can (and should) place the log files on a different disk (Transaction Log Directory) to avoid I/O contention.

    Chris

    Edited by: ChrisJenkins on Jul 3, 2012 9:06 AM
  • 6. Re: No suitable driver found
    936666 Newbie
    Currently Being Moderated
    hi Chris,

    I am having the following things

    Perm-size is located at D drive which is having 100 GB
    Temp-size is located at E drive which is having 100 GB

    OS:Win 2003 & 32 bit
    RAM:8GB

    and how much can i specify for PermSize & TempSize for a DSN creation.


    Thanks!!
  • 7. Re: No suitable driver found
    jimtong - oracle Explorer
    Currently Being Moderated
    Hi,

    1) even if your RAM is 8 Gb, because you are using Windows 2003 32 bit, its actually limited to ~1.75 GB max shared memory.

    2) you wrote:
    Perm-size is located at D drive which is having 100 GB
    Temp-size is located at E drive which is having 100 GB

    a) there is no '-' in the dsn names for these,
    b) are you saying that is the disk space you set aside for perm and temp? or are is that what you were trying to use for permsize and tempsize values?
    if disk space then for disk space its roughly checkpoint files (2 * PermSize) lets say for D drive, for E drive we would want to put the checkpoint files there,
    which will be about 1gig each and really depends on how frequently you checkpoing, but 100 gb, means you can have 98 txn log files (+ the 2 we reserve as .res files)
    thre is actually no concept of temp space being written to disk, its only around in memory (unless a core dump is written to the disk).

    3) because you are limited to about 1.75 gb of shared memory by using a 32bit Windows.
    I would suggest you would use something like permsize=1024, tempsize=200 (note these settings take units in mb, not sure you saw this in our documentation)
    You could start with that and see if its sized well enough.


    Jim Tong
    TimesTen support

    Edited by: jtongtttechsupport on Jul 3, 2012 3:59 PM
  • 8. Re: No suitable driver found
    936666 Newbie
    Currently Being Moderated
    I) even if your RAM is 8 Gb, because you are using Windows 2003 32 bit, its actually limited to ~1.75 GB max shared memory.

    Why it is limited to 1.75 Gb of shared memory.

    II) Perm-size is located at D drive which is having 100 GB of free space in it
    Temp-size is located at E drive which is having 100 GB of free space in it

    I got the below error for my 4 dsn
    837: Cannot attach data store shared-memory segment, error 8
    703: Subdaemon connect to data store failed with error TT837

    getting the error as

    8521: Cannot attach PL/SQL shared memory; virtual memory at PLSQL_MEMORY_ADDRESS already in use by TimesTen

    III) I have created 4 dsn already and after i tried to connect the 5th one i am getting below error

    I have set the permsize=200, tempsize=50

    12701: DatabaseCharacterSet attribute required for data store creation. Refer to the TimesTen documentation for information on selecting a character set.
    The command failed.

    so i modified the permsize=1024, tempsize=200

    8521: Cannot attach PL/SQL shared memory; virtual memory at PLSQL_MEMORY_ADDRESS already in use by TimesTen

    but i am not working on any dns when i tried to connect this 5th dsn all the other 4 dsn are not in use ,there is no connection,all the applications are closed.

    Thanks!!
  • 9. Re: No suitable driver found
    ChrisJenkins Guru
    Currently Being Moderated
    32-bit Windows is limited at the system level to using no more than about 3.75 GB of RAM. Having 8 GB of RAM in a machien running 32-bit Windows is fairly pointless.

    A TimesTen datastore consists of a shared mapping backed by the paging file. If PL/SQL is in use then an additional mapping is needed for the use oof PL/SQL. The datastore mapping is of size (PermSize + TempSize + LogBufMB + ~20MB). The PL/SQL mapping (if used) is of a size determiend by the DSN attribute PL/SQL Memory Size; default is 32 MB.

    When a process connects to the datastore in direct mode, both these mappings have to be mapped into the process address space. The Timesten datastore mapping will be mapped at a 'system chosen' address while the PL/SQL mapping is mapped at a fixed address controlled by the DSN attribute PL/SQL Memory Address. In order to map these the process adress space must contain a free contiguous region large enough to contain the mapping and, in the case of the PL/SQL mapping, located at the specified address.

    If either of these mappings fails, then you will not be able to connect to the datastore (required address not free, no large enough contiguous region) then you will fail to connect to the datastore. The error message '8521: Cannot attach PL/SQL shared memory; virtual memory at PLSQL_MEMORY_ADDRESS already in use by TimesTen' means that a preocess has attempted to connect to two different TimesTen databases concurrently but both databases specify the same value for PL/SQL Memory Address and hence they clash. If a process will connect to multiple databases at the same tiem then you must be sure to set PL/SQL Memory Address and PL/SQL Memory Size so that the Pl/SQL regioins for each database do not overlap with each other.

    32-bit platforms are always a little challenging as the 32-bit address space is (a) limited (it is just 4 GB) and (b) is often 'clutterred' with many things such as DLLs/shared libraries etc. This is especially true on Windows 32-bit; the process memory map is a mess and there is often not a free region lkarger than around 1.7 GB, hence the limitation.

    32-bit is really considered 'legacy' now; you would be much better off using a 64-bit platform and 64-bit TimesTen especially if you are using Windows and need large databases or need to connect to multiple databases concurrently. You will likely find thsi very hard to achieve successfully using 32-bit Windows and 32-bit TimesTen.

    Chris

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points