Questions about JDBC connection

We have an oracle database and several jsp pages which previously worked fine. Recently, problem happens when we are using a browser to load a jsp file with the lines of database query. We are using:
Linux kernal 2.4.2-2
Apache 1.3.12
Oracle8i Enterprise Edition Release 8.1.7.0.1
LSNRCTL for Linux: Version 8.1.7.0.0
We already startup the database, start the listener and the apache service. It seems whenever we are trying to open a jsp page with database query, it hangs at the line:
Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@"+dbname,dbuser,dbpasswd);
It has no problem to load the plain html file and the jsp file without dababase connection.
Does anyone have any clue what might be going on here?
Thanks!
-Juchang

Is the OCI dll in the PATH?
Obtain a connection with a data source instead of DriverManager.

Similar Messages

  • ####a question about jdbc driver

    A question about jdbc driver: for Oracle JDBC drivers which will not allow O/R
    tools to access columns over 4 kb. This affects some of the functionality of my
    application.A workaround is to use the my JDBC driver that acts as a wrapper to
    ensure that columns over 4 kb read and persist properly. my JDBC driver determines
    which actual driver to load based on the connection URL. If you pass in a URL
    that contains the string jdbc:oracle:thin, it will know to load oracle.jdbc.driver.OracleDriver.
    If the URL contains the string jdbc:db2, it will know to load COM.ibm.db2.jdbc.net.DB2Driver,
    and so on.
    now i have set CLASSPATH for my jdbc wapper,when I Creating and Configuring a
    JDBC Connection Pool,i have to input my driver name such com.lawrence.driver.....then
    i did,all
    is well,then i restart my WLS,when load config.xml,some errors such as "No registered
    driver accept URL:jdbc:oracle:thin:@localhost:1521:lawrence",if i set driver name
    is oracle.jdbc.driver.OracleDriver,all is good,no any errors.
    I find some questions like:
    1.for WLS8.1 ,it is only find some registed driver?
    2.why it cannot load my driver wapper when it is loading jdbc Connection Pool,but
    when the WLS start is finished, i Creating and Configuring a JDBC Connection Pool
    then it is right?

    my JDBC driver like this:
    public class myDriver implements Driver {
         public static String DB2_DRIVER = "COM.ibm.db2.jdbc.net.DB2Driver";
         public static String DB2_URL = "jdbc:db2:";
         public static String HYPERSONIC_DRIVER = "org.hsqldb.jdbcDriver";
         public static String HYPERSONIC_URL = "jdbc:hsqldb:";
         public static String MYSQL_DRIVER = "com.mysql.jdbc.Driver";
         public static String MYSQL_URL = "jdbc:mysql:";
         public static String ORACLE_DRIVER = "oracle.jdbc.driver.OracleDriver";
         public static String ORACLE_URL = "jdbc:oracle:";
         public static String POSTGRESQL_DRIVER = "org.postgresql.Driver";
         public static String POSTGRESQL_URL = "jdbc:postgresql:";
         public static String SQLSERVER_DRIVER =
              "com.microsoft.jdbc.sqlserver.SQLServerDriver";
         public static String SQLSERVER_URL = "jdbc:microsoft:";
         public boolean acceptsURL(String url) throws SQLException {
              return true;
         public synchronized Connection connect(String url, Properties props)
              throws SQLException {
              if (_driver == null) {
                   Class driverClass = null;
                   try {
                        if (url.startsWith(DB2_URL)) {
                             driverClass = Class.forName(DB2_DRIVER);
                        else if (url.startsWith(HYPERSONIC_URL)) {
                             driverClass = Class.forName(HYPERSONIC_DRIVER);
                        else if (url.startsWith(MYSQL_URL)) {
                             driverClass = Class.forName(MYSQL_DRIVER);
                        else if (url.startsWith(ORACLE_URL)) {
                             driverClass = Class.forName(ORACLE_DRIVER);
                        else if (url.startsWith(POSTGRESQL_URL)) {
                             driverClass = Class.forName(POSTGRESQL_DRIVER);
                        else if (url.startsWith(SQLSERVER_URL)) {
                             driverClass = Class.forName(SQLSERVER_DRIVER);
                        _driver = (Driver)driverClass.newInstance();
                   catch (Exception e) {
                        throw new SQLException(e.getMessage());
              Connection con = _driver.connect(url, props);
              return new myConnection(con);
         public int getMajorVersion() {
              return _driver.getMajorVersion();
         public int getMinorVersion() {
              return _driver.getMinorVersion();
         public DriverPropertyInfo[] getPropertyInfo(String url, Properties props)
              throws SQLException {
              return _driver.getPropertyInfo(url, props);
         public boolean jdbcCompliant() {
              return _driver.jdbcCompliant();
         private Driver _driver;

  • Audigy 2 ZS: questions about TAD connect

    <SPAN>The drivers for my motherboard?s onboard sound were causing problems, so I replaced the onboard sound with an Audigy 2 ZS card.<SPAN> It is fantastic!<SPAN> I am not having any problems, but there are some questions about its use the answers to which I have not been able to glean from the manual or the online knowledge base.<SPAN> Since my questions involve three different issues, I am making three different posts.<SPAN> I hope this doesn?t violate some kind of posting rule.<SPAN> If it does, I apologize.<SPAN> I certainly will appreciate any help anyone can give me.
    <SPAN><FONT color=#000000 size=3>I have a USR 2976 voice modem in a PCI slot next to my new Audigy 2 ZS card.<SPAN> The 2976 modem is very common; but since it is OEM, US Robotics? support consists essentially of acknowledging its existence.<SPAN> I would like to make a TAD connection between the sound card and modem in order to use the sound card in a speakerphone setup.<SPAN> The modem has only one side connector and it looks identical to the TAD connector on my Audigy 2ZS, but I don?t know its pinouts.<SPAN> (I found the Audigy card?s TAD pinouts online.) Since my optical dri'ves use digital audio extraction, I don?t need the CD audio cable that went from one optical dri've to the motherboard?s CD sound in connector; and I disconnected it.<SPAN> The CD audio cable fits only one way into both the sound card TAD connector and the modem?s similar 4-pin connector.<SPAN> Would I be safe in connecting the modem and sound card together using the CD audio cable even though I don?t know the modem?s pinouts for its connector?<SPAN> Are most modems consistent in this?
    <SPAN><FONT color=#000000 size=3>The CD cable is fairly long.<SPAN> I would need only a very sort cable to connect the two adjacent cards, but I have not been able to find a short one.<SPAN> Does anyone know a source or if there is a specific name for a short cable for this purpose?<SPAN> (I have had no luck googling ?TAD cable?.)

    BigBen,
    I'll answer your questions here point by point (for clarity).
    ) No, that won't be possible. A line input is only stereo, so all you'll receive signal-wise is just a stereo stream. You'll need a coaxial or optical input to get that signal to the card (only available on the Platinum dri'ves).
    2) In theory that could work, yes, the connections are there. That isn't something we would have tested (or support), though.
    Cat

  • Question about router connections

    Does a wireless router need to be connected to an external modem?  My modem is essentially a card in a box on the outside of my house, so connecting to it, other than through a wall outlet, is pretty much out of the question. 
    My connection goes from wall outlet directly to the ethernet port on my pc...am I even able to connect a wireless router?

    The wire that runs from your modem outside, to the outlet on your wall, apparently allows you to connect directly to your modem.
    Probably you can simply run a wire from your wall outlet to a wireless router.  However, before investing in a wireless router, I would suggest that you verify that this setup will work with your ISP (internet service provider).  Also, check your ISP's web site.  They have probably already posted directions on how to set up wireless with their system.

  • Question about JDBC in BlazeDS?

    stupid question: is their a JDBC driver already installed with BlazeDS? I am currently installing BlazeDS in tomcat. Do i need to install the connector j separately, or does this come with BlazeDS? thanks

    The turnkey install ships with samples that use the HyperSQL database. The JDBC driver for this databse can be found in tomcat\webapps\samples\WEB-INF\lib\hsqldb.jar. If you want to connect to a different database then you'll need to download and deploy the JDBC driver for that database.
    The non-turnkey install does not contain a JDBC driver.

  • Who can help me?I have a question about JDBC with SQL Server 2000.

    import java.sql.*;
    import java.util.*;
    public class sqltest{
    static public void main(String args[]){
    try{
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    }catch(Exception e){
    e.printStackTrace();
    return;
    try{
    Connection conn=DriverManager.getConnection("jdbc:microsoft:sqlserver://CE800:1181;UseDatabaseName=supermarket;user=sa;Password=");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select * from customers");
    while(rs.next()){
    System.out.println(rs.getString("username"));
    conn.close();
    }catch(Exception e){
    e.printStackTrace();
    return;
    when I run it,error occured:
    D:\MyJava\sql>java sqltest
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'customers'.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
    at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)
    at sqltest.main(sqltest.java:15)
    Please help me,thanks a lot!

    Your code seems ok, you probably end up in another Database than you expect.
    Not sure about the the UseDatabaseName=supermarket clause in your connection string.
    You can confirm that get a connection to another database by changing your query to:
    SELECT * FROM supermarket.dbo.customers
    if this works you probably get a connection to master and should look closer at the UseDatabaseName=supermarket clause.
    You did try to run the query in the Query Analyzer i take it?
    Rgds

  • A question about direct connect and getting emails on BB curve 8350i

    can someone please help me....I'm new to BB and I just purchased a curve 8350i. First question when I direct connect to someone after i'm done with the call, i always get a message about the call i just did. How do I stop from getting those annoying messages. Second question I have an email set up in my BB. Now everytime I get a email I get a copy in my message icon and my email icon, how do I stop from getting a copy of my email messages. I would appreciate if anyone can anwer my questions...Thank You

    1. no idea
    2. you can find answers for this all over the forums, it gets asked atleast once a day.
    the messages icon is a general incoming icon, all incoming messages go there, only item you can seperate from it are sms & mms texts.
    if you use txting, you can seperate sms from the msgs, then hide msgs. use email and sms icons
    when you delete your email from email icon it will automatically delete from msgs as well. its not actually 2 emails in 2 locations, its 2 locations pointing to the same email

  • Questions about JDBC-Drivers

    Hi,
    I'm working with JDBC-Drivers for the first time.
    How can I get detailed information about the database, subprotocol etc. the driver supports. In ODBC there exist some information functions like SQLGetInfo to explore drivers. But there seems to be no way to do this with JDBC.
    Can anybody give me some advice how to get this information ?
    J�rgen

    Hi,
    after instantiating an object implementing the Driver interface I want to know what database this driver works for. If possible, this should be done without connecting to the database. I supposed a driver should store such information in itself but there seems no way to get this information.
    The Driver interface declares a method 'getPropertyInfo' to extract information about the possible properties for this driver. Unfortunately I didn't found any description what lookup strings can be used.
    Do you know how to go on ?
    Thanks and regards
    Jugi

  • Question about JDBC and Oracle 10g AL32UTF8

    Hey all,
    Currently I have a Java program that uses lib: ojdbc14.zip. It works fine for our Oracle 10g database, but when we converted our character set to AL32UTF8, our program seems to have stopped working properly. For instance, I grab a count(*), to see how many rows an ID has in a table. Then I take that list and display and count(*) that are greater than 0. Well, my first getString works properly to generate the select count(*) statements for all the tables in the database. But then when I execute those select count(*) I can grab out the number greater than 0. That's column 1. Then the owner name is displayed in column 2. and the table name is displayed in column 3. When I do a getString(2) we only get the first letter (sometimes) of the owner of the table. Same with the table name.
    For instance, before AL32UTF8
    getString(2): SCOTT
    getString(3): PEOPLE
    After
    getString(2): S
    getString(3): P
    Now to open my connection I use:
    static Connection conn;
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection(connection_string, username, password);
    And to create query I use:
    Statement query_1 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    Any help will be greatly appreciated. Thanks
    Sincerely,
    Mel

    orkun wrote:
    I was wondering whether it was a correct way :
    -retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.Your question/problem statement is unclear, but just lookup the DAO pattern.
    Is there any better way I can speed up retrieving data from databse ?Performance is a matter of good code and datamodel and decent hardware.

  • Question about secuting connection to the database

    Hi.
    I need to fix an Oracle Consulting custom solution that became incompatible with the new version of the application.
    What's the catch:
    this solution is basically a SQL*Plus script that resides on the filesystem and performs a bunch of commands to generate and load data from Views.
    My difficulty with this is that one of those commands is a CONNECT.
    I'm concerned about the security implications of performing an "open connect" via SQL*Plus command like this.
    My questions are:
    1) Is there a way to secure the SQL*Plus session so that its commands are not visible via a Trace or something else?
    2) What's the best way for me to perform that CONNECT command in a secure way, so that the user and password do not become visible?
    Thank you.

    I do not see the problem.. SQL*Plus is a client like any other client. VB. Java. Delphi.
    Such clients will also make use of a connect string to Oracle. In some cases they will prompt for username and password from the end-user - assuming Oracle schema authentication is used. In many cases they will automatically (via an internal hardcoded connect string) connect to an app schema and then use a USERS table to authenticate the end-user (and thus not use Oracle security).
    The biggest concern in this case is making this connect string visible. EXEs and DDLs can be dumped and ASCII strings extracted - and with it, potentially hardcoded username and passwords.
    In case of a SQL*PLus script, this is in clear text in the actual script itself. But unlike a VB EXE that runs in the wild (on some client PC somewhere), I would assume that in your case this maintenance process runs from a secure o/s account on a server.
    In that case, all that is needed to revoke read/write access to that script from all other o/s users on that server.
    Of course, this assumes that the actual SQL*Plus script uses the CONNECT command and not the sqlplus command line - as command line switches are visible via process monitors.
    Another option is not to use Oracle schema authentication for that maintenance process, but o/s authentication. In which case only that o/s user can logon to that schema and execute code. Thus no username and password to protect as the o/s account itself provides the protection.

  • A question about JDBC and MySQL

    hello dear friends,ask a question:
    if in MySQL database, i have defined a clumon as TEXT data type.
    when i use JDBC, i use which kind of java data type to hold TEXT,
    i mean which getXXX() method i should use.
    is it possible i just use getObject() and cast it to a binarystream??
    thanks in advanced.

    use this:
    declare it 1st
    String x ="";
    then u can now get the value of the field...
    x = getString("<fieldName>");is there length limitation?
    for example, i want store a String which is got from a JTextArea, i also treat it as String and insert into the column with TEXT datatype like
    insert table_name (text_column) values( string_1)
    this works in JSP, should work in JAVA too...
    hope i helped... ^_^

  • Questions About Losing Connection

    Like other people I've noticed here, my WRTG45 v5 wireless router has recently started losing connection to the net multiple times a day. At first, we thought it was because our modem was old, so we bought a new one, but it didn't fix anything. So here are my questions:
    1. My dad seems to think that a configuration or setup CD (that we lost) is required to make the router work with the new modem. Is this true? I don't think so, but I have to ask just so I can get him to move on.
    2. I noticed in other posts here that programs like Bittorrent can cause the router to be overworked or whatever. This might explain our problem, as I use Bittorrent a lot (but not everytime the connection has dropped). If this is indeed the problem (or contributing to it), is there anyway to deal with it while still being able to use the program?
    For the first couple months, the router was working fine. Even with Bittorrent running a lot, and all the computers (2 wired, 1 wireless, and 1 wired X-Box) engaging in various activities on the net. So this is very puzzling to me.
    One more bit of information, I have given every computer a unique, static IP address. However, I noticed recently that when I look at the router configution after typing in its IP address in a web browser, that it is set to DHCP Enabled.
    Also, in the advanced TCP/IP settings for this connection, under the WNS tab, the NetBIOS setting is set to the default of using NetBIOS from the DCHP server.
    Since I am using static IP addresses, could these DHCP centered settings be causing problems? Although, even if they are, it still doesn't explain why the router was working fine months ago (unless someone changed stuff without my knowing).
    Anyway, any help at all would be appreciated.

    I assume you meant that you had a WRT54G v5 router.
    First of all, the setup CD is not required.  All router settings can be made by going to the router's web pages at 192.168.1.1
    It is possible that the static LAN IP addresses are causing your problem, if they were not set up correctly.  Linksys has a strict set of rules to follow regarding static LAN IP addresses.
    With Linksys routers, a fixed (static) LAN IP addresses must be assigned in the device that is using the address.  So you need to enter the fixed address in the computer or printer, not in the router.
    When using a Linksys router, any fixed LAN IP address must be outside the DHCP server range (typically 192.168.1.100 thru 192.168.1.149), and it cannot end in 0, 1,  or 255.
    Therefore any fixed LAN IP address would normally need to be in the range of
    192.168.1.2       thru 192.168.1.99  or
    192.168.1.150   thru 192.168.1.254
    assuming you are still using the default DHCP server range.
    Also, in the computer, when you set up a static LAN IP address, you would need to set the "Subnet mask" to 255.255.255.0  and the "Default Gateway" to 192.168.1.1
    It is also important that no two devices on your network be set to the same static LAN IP address.
    Check all of your static LAN IP addresses.  If you have violated any of the above rules for static LAN IP addresses, it could be the cause for your problem, and you should fix it before attempting any other router repairs or changes.
    You should leave the DHCP server turned on.  This way, if you have a visiting friend who you want to connect to your system, it will be easy to do.   Leaving the DHCP server turned on should not cause any problems, even if all your addresses are fixed.   In general, you should let the DHCP server assign all addresses, unless there is a specific reason to use a static address.  You can mix static and DHCP assigned addresses on the same LAN, as long as you follow the above rules for static addresses.
    Linksys routers have had problems when BitTorrent is used.  Your router has new firmware posted that should improve compatibility with BitTorrent.  It is firmware version 1.02.0   You will need to download and install this firmware (after fixing the static address problem, if any).  (Note:  When you update your firmware, you should use a computer that is wired to the router.  Also, when you do a firmware upgrade, turn off all other computers on your system, and unplug all other wires from the router.)   After you have installed the firmware, and powercycled the router, you will need to reset your router to factory defaults, then setup the router again from scratch.
    Message Edited by toomanydonuts on 04-12-200712:54 AM

  • WiSM Switch - Questions about Client Connections

    Hello!
    i?m planning a worst case scenario for a customer site. They got a couple of 6500?s with WiSM Modules installed. Now I?m sitting over a instruction of what to do when a WiSM breaks down and I got a few questions regarding the clients.
    In the case a Controller stops responding, the AP?s are automatically switched to the secondary Controllers. What happens when the Primary Controller returns - they automatically switch back, right? Is this automatic switch combined with a loss of wireless connectivity? (LWAPP tunnel gets torn down, and a new LWAPP connection must be established - that is basically the same if I restarted the AP, isn?t it? ) If so, how long does it take for the connectivity to return? Is it possible to manually do the switch to a later time (late in the evening..) to minimize the effects for the clients? The Goal is to keep the clients up and running, without termination of the wireless connection - if this is possible.

    Also, after checking my WLC's Controller->General config screen, you will find a parameter called "AP Fallback".
    It can be either "Enabled" or "disabled" and determines whether or not an access point that lost a primary controller connection automatically returns to service when the primary controller becomes functional again.
    I suppose that if you set this parameter to "Disabled" in the secondary controller, before activating the repaired/replaced primary controller that this would also accomplish what you want.
    It is not clear if the same setting would also need to be applied to the primary controller. You may need to test this aspect first to be sure.
    Presumably, you could then re-enable "AP fallback" when you are ready to force the LWAPs back to the primary.
    I hope this helps,
    - John

  • Uk Mac user. Questions about internet connection please!

    I own a Mac G4 800 Mhz tower.
    At present connect to the internet via ethernet to router.
    The past few days it has been running very slowly.
    Checked the Netgear router page where it states the incoming strength is approx 4MB.
    *+What can be done to help utillise the incoming speed please?+*
    *+What do I need to make the G4 cable free please?+*
    *+Is there a 3rd party version of the Airport card (if that is needed) please?+*
    Any help and advice gratefully received!

    What can be done to help utillise the incoming speed please?
    That depends where the slowdown is. The quickest way to cut this problem down to size is to find an Interactive Internet Speed Test online, and run it.
    If the measured speed (which is essentially download speed) is way too slow -- you need to complain to your ISP about it, and follow their suggestions.
    If the measured speed is reasonable, but your perception is that it is too slow, post information about what situations, using what browsers, are the worst offenders, and readers will take a run at advising you.
    I suggest you start a different thread with your inquiry about wireless equipment.

  • Question about "Easy Connect Naming"

    Good evening,
    My installation consists of 11gR2 where both host and client are on the same machine.
    I wanted to test the "Easy Connect Naming" functionality, to that end, I renamed tnsnames.ora and proceeded to connect using the following command:
    sqlplus sys/abc123@"Oracle2Day1.john.local/orcl.john.local:1521" as sysdbaas expected, the command was successful in connecting to the orcl instance.
    To ensure that everything was as expected, I also tried:
    sqlplus sys/abc123 as sysdbaUnexpectedly, this command also connected to the orcl instance.
    I expected it to fail since there is no tnsnames.ora and I did not specify the host and service names.
    The question is: why was the command sqlplus sys/abc123 as sysdba" successful given that there is no tnsnames.ora ?
    Thank you for your help,
    John.

    The question is: why was the command sqlplus sys/abc123 as sysdba" successful given that there is no tnsnames.ora ?Above only works when logged directly on to DB server, because this flavor of connection does not use SQL*Net; but uses BEQ protocol.

Maybe you are looking for

  • Error Posting IDOC: need help in understanding the following error

    Hi ALL Can you please, help me understand the following error encountered while the message was trying to post a IDOC. where SAP_050 is the RFC destination created to post IDOCs <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Call Ad

  • Lagging problem when connected to a Samsung Central Station 23"

    Hi, I bought myself a Macbook Air(Summer, 2011 Edition) about 3 months ago roughly, and I also bought myself a Samsung Central Station 23" which works just as a thunderbolt or cinema display but much cheaper and much elegant. It also sends audio sign

  • Can't create an instance

    I got the below error on Solaris 10. Do you have any ideas? # ./dsadm create /users/lab/dsee/dsins1 ld.so.1: dsadm: fatal: libsasl.so: version `SUNWprivate1.1' not found (required by file /users/lab/dsee/ds6/bin/../../dsee6/private/lib/libldap60.so)

  • Append to text file

    i'm trying to append some string to a file but it gives me error while compiling. here's my code: import java.io.FileOutputStream; import java.io.File; import java.io.IOException; import java.util.Calendar; import java.util.Date; import java.awt.*; i

  • Photoshop CS6 won't install

    I have put in the serial number and been signed in,  I selected Adobe Photoshop CS6 but when I click install, nothing happens.  Please advise.