JDBC connection over IPv6

Hi
I have an MS SQL Server 2005 Database Server and a Client computer on two different subnets.
There is also a DNS Server, which contains both an IPv4 (A) and IPv6 (AAAA) DNS record for the Database Server.
I've disabled IPv4 routing between the two subnets so that the Database Server is only accessible by IPv6 from the Client computer.
I am then unable to connect to the Database Server from the Client using JDBC.
I have tried increasing the loginTimeout in the JDBC connection string, but this doesn't appear to make any difference.
I get a java.net.ConnectException in about 20 seconds.
If I remove the IPv4 (A) record of the Database Server from the DNS Server, the JDBC connection then succeeds.
Does JDBC iterate over all the possible addresses of the Database Server?
Is the loginTimeout the correct parameter to try to increase, to allow it to iterate over the possible addresses?
There is a similar problem with MS SQL Client - see http://msdn.microsoft.com/en-us/library/ms378428(SQL.90).aspx
But increasing the connection timeout allows a successful connection.
Thanks
Alain

jschell wrote:
ahkal01 wrote:
Alain: A machine may have multiple IPv6 addresses, as well as an IPv4 address.
You may not be able to get to the machine via all the addresses, depending on the network route.
If a driver gives up on the first DNS lookup (which probably will be the IPv4 address), it'll never try the IPv6 addresses. However that is NOT what you are testing.
As described in your first post there is a route. Routing works if the final location is found. After that a refused connection is a refused connection.
Alain: In my test, IPv4 routing is disabled between the two subnets. So there is no IPv4 routing between the two machines, only IPv6.
>
But even so, to me it is still two different IP addresses. Just as if you try to create your own replication by having two database servers on different IPv4 addresses. If the client is supposed to be using one address then the DNS should be set up that way.
Or use the address. Because the point is not the IP address, the point is the DNS look up.
Alain: With IPv6, it is common for computers to be assigned more than one address for routing under different hierarchies.
If you're saying that the DNS lookup should be set up to return only one IP address to client computers trying to connect to the DB Server, DNS will need to be set up differently depending on where the client computer is.
>
Again looking at it from the point of someone developing a driver the only option I would allow is that one might be able to specify a configuration value that says to try a IPv6 address first. That would be in the driver, not JDBC. So you can look to your driver for that.
There is a similar problem with MS SQL Client - see http://msdn.microsoft.com/en-us/library/ms378428(SQL.90).aspx
But increasing the connection timeout allows a successful connection.
I do not see anywhere in that link that it claims that the setup you are using would work Alain: apologies. It was the wrong url link.
I meant, http://blogs.msdn.com/sql_protocols/archive/2005/10/12/480192.aspx.The scenario there is SQL Server is configured to listen only on IPv6 addresses and disable all IPv4 addresses so that only IPv6 connection can be accepted. The workaround is to specify the IPv6 address of the target machine explicitly to force SNI to use IPv6 connection directly or to use longer timeout value. I don't see that in that blog.
It says that if you have addresses that some different behavior might result. It specifically refers to using an IPv4 address (not DNS) and failing on that and then attempting to use a IPv6 address (again not a DNS) and even in that case it might fail.
Alain: The blog is talking about a hostname resolving into multiple addresses. I quote from the blog, with bold for emphasis,
"In most cases, the connection string does not need to be modified if the <servername> is specified using server hostname or FQDN (Full Qualified Domain Name). If the server machine has dual-stack, *its hostname or FQDN will be resolved into multiple IP addresses*, including at lease one IPv4 address and multiple IPv6 addresses. *And SNI will attempt to establish connections using these IP addresses in order and use the first connection that succeeds*. IPv4 addresses are attempted first if both IPv4 and IPv6 addresses are present. This logic is transparent to the users of ODBC, OLEDB or ADO.NET.
And it doesn't say anything about that some clients already do this but merely that they can.
Alain: SNI does, from the quote above. A test also shows that it does try all the addresses that DNS returns, with the caveat that the connection timeout has to be increased.
Unfortunately it looks like the MS JDBC driver doesn't do likewise.
Myself I don't really consider that a valid option for most use cases for drivers. If I have a data center then I am not normally going to be using both types of addresses. And if I am both will work. And if there are variation in subnets then I would expect that if DNS is in use then it would be set up to correctly represent that.Thanks for your input on this thread. Much appreciated.

Similar Messages

  • JDBC-Connection in SQL-Developer via Connection-Manager gives ORA-12529

    Hi !
    This is a followup of this Thread: https://community.oracle.com/thread/3568462
    I have the same problem but I have ConnectionManager 11g (11.2.0.1.0) , which doesn't know the setting for AUTHENTICATION_LEVEL=0
    And I have to use JDBC, so the OCI/Thick-driver is no option for me.
    The same error is raised when I use JDBC with Eclipse,...
    SQL-Plus over the Connection-Manager works without any problems.
    The ruleset of my cman.ora is:
    (rule_list=
        (rule=
           (src=*)(dst=*)(srv=*)(act=accept)
           (action_list=(aut=off)(moct=0)(mct=0)(mit=0)(conn_stats=on))
    The error is:
    Listener refused the connection with the following error:
    ORA-12529, TNS:connect request rejected based on current filtering rules
    Anyone got jdbc-connections over ConnectionManager 11g+ running?
    Charly

    Using Windows XP/Vista...
    After testing in our environment, it appears that SQL Developer 1.5.1 (5440) does in fact ignore the TNS_ADMIN environment variable and ONLY looks in the Oracle Home directory (network/admin). We define a central network location for our tnsnames file and have the tns_admin setup to point there instead of locally for our users.
    When selecting to add a new connection (in 1.5.1, it works in previously releases... meaning 1.2.something) and selecting TNS, the drop-down remains empty. However, if I exit SQL Developer and then copy the tnsnames file to the local network/admin directory I can then re-launch SQL Developer and the drop-down is populated. Exiting SQL Developer again, deleting the local copy of tnsnames, and then launching SQL Developer yet again results in the drop-down being empty.
    All other Oracle-related applications function as expected (as they have for years) using the TNS_ADMIN environment variable.
    Any suggestions/ideas?

  • Jdbc connectivity for mssql 2008 in ipv6

    trying to connect to mssql server 2008 in a machine enabled for ipv6 using the following code :
    Connection c = null; String url = "jdbc:sqlserver://;servername=fe80::21a:4bff:fecf:dfe5%4;port=1433;DatabaseName=mssql;selectMethod=cursor;"; String userid = "xxx"; String password = "xxx"; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); try { c = DriverManager.getConnection(url, userid, password); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }
    but getting the error:
    com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.NoRouteToHostException: No route to host: connect at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:185) at ConnectDB.main(ConnectDB.java:84)
    what is the problem.can any one please suggest me how to connect to mssql using ipv6..
    Thanks in advance...
    Edited by: 789764353 on Sep 7, 2009 4:20 AM

    I guess you must have seen this. But, just in case.
    [Creating a Valid Connection String Using TCP/IP|http://msdn.microsoft.com/en-us/library/ms191260.aspx]
    Also,
    SQL Server and SQL Server Native Client fully support both Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). When Windows is configured with IPv6 SQL Server, components automatically recognize the existence of IPv6. No special SQL Server configuration is necessary.[Connecting Using IPv6|http://msdn.microsoft.com/en-us/library/ms345359.aspx]

  • JDBC connection pool failures when used by JMS stores

              We are using WebLogic 6.1 sp2. We defined a separate connection pool for use by
              a JMS Store.
              <JDBCConnectionPool Name="sybaseJMSPool"
              Targets="cluster00"
              InitialCapacity="2"
              MaxCapacity="10"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;charset=utf8"
              URL="jdbc:sybase:Tds:@jms.db.host@/@jms.db.name@"/>
              (note that the @xxx@ string are replaced by actual values).
              We are using Sybase Jconnect 5.5 to a Sybase ASE 12.5 database.
              We deployed this configuration on a number of environments (testing, staging,
              ..). The actual hardware and network configuration is different for the different
              system, but the WebLogic domain stays the same regarding this issue.
              On the test system we frequently get the following exceptions:
              <Aug 13, 2002 1:56:04 PM CEST> <Alert> <JMS> <www00-test> <node00>
              <ExecuteThread: '6' for queue: 'JMS.TimerClientPool'> <> <> <040048>
              <JMSServer "JMSServer00", store failure while writing message for topic
              OrderChangeTopic, java.io.IOException: JMS JDBC store, connection pool =
              <sybaseJMSPool>, prefix = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              .>
              java.io.IOException: JMS JDBC store, connection pool = <sybaseJMSPool>, prefix
              = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              at weblogic.jms.store.JDBCIOStream.throwIOException
              (JDBCIOStream.java:1213)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1256)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Before that this message appeared:
              <Aug 13, 2002 11:31:16 AM CEST> <Error> <ConnectionManager> <www00-test>
              <node00> <ExecuteThread: '26' for queue: 'default'> <> <> <000000>
              <Closing: 'weblogic.rjvm.t3.T3JVMConnection@795af6' because of: 'Server
              received a message over an uninitialized connection: 'JVMMessage from: 'null'
              to: '-4555218188801970213S:192.168.13.1:[7001,7001,7002,7002,7001,7002,-
              1]:ADIS:node00' cmd: 'CMD_REQUEST', QOS: '101', responseId: '1',
              invokableId: '287', flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev
              offset: '34'''>
              This problem did not occur on another system which was used during a 2 day stress
              testing session.
              It seems that the problem occurs after a period in which no user request where
              made. The user requests trigger EJB's that start sending JMS messages.
              When the problem occurs, the JMS messaging systems seems to lock up as no messages
              are received anymore by the different listeners (MDBs).
              Undeploying and redeploying the JBDC connection pool solves the problem. This
              solution is unacceptable in case of a production system.
              A similarly defined connection pool, which is used by the EJBs to make database
              connection, does not manifest this problem.
              <JDBCConnectionPool Name="sybasePool"
              Targets="cluster00"
              InitialCapacity="10"
              CapacityIncrement="5"
              MaxCapacity="50"
              PreparedStatementCacheSize="150"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;JCONNECT_VERSION=6;charset=utf8"
              URL="jdbc:sybase:Tds:@db.host@/@db.name@"/>
              The JDBC connection pool is used as follows by the JDBC store
              <JMSJDBCStore ConnectionPool="sybaseJMSPool" Name="JDBCStore00" PrefixName="JMS00"/>
              <JMSServer Name="JMSServer00" Store="JDBCStore00" Targets="node00">
              <JMSTopic JNDIName="ADIS.JMSError" JNDINameReplicated="false" Name="ErrorTopic"/>
              <JMSTopic JNDIName="ADIS.Status"
              Name="StatusTopic" RedeliveryDelayOverride="300000"/>
              <JMSTopic JNDIName="ADIS.OrderChange" JNDINameReplicated="false"
              Name="OrderChangeTopic" RedeliveryLimit="3"/>
              </JMSServer>
              Turning on the "Test Reserved Connection" with a appropriate test table does not
              help.
              Some sources on the internet tell us that JZ0C0 errors in the Jconnect driver
              can be related to network problems. Nevertheless the connection pool should be
              able to cope with this.
              Can you provide any solution for this ? Or give us hints what can cause the problem
              

    Zhenhao Qi wrote:
    thanks! Joe.
    The SQL statement itself can no longer be simplified, the long excuation time is due to the database size and complicated Select criteria. I can easily reproduce the problem by using this SQL. I tried "BEA's Oracle driver (Type 4): Version 8.1.7,9.0.1,9.2.0". the question can be dissect into 2 pieces:
    1) why the jdbc connection (using oracle.jdbc.OracleDriver) won't return anything if the SQL execution time > 5min, that is probably the Oracle's problem
    2) why the occupied connection pool won't release even I set "Statementtimeout=600", this is Weblogic's problem.
    ZhenhaoHi. Yes, (1) is oracle's problem. (2) may also be. The JDBC spec has very few
    allowances for one thread to interrupt a second thread's JDBC call. If we
    transmit your timeout request by calling setQueryTimeout() on the oracle
    statement, and if you have a weblogic-controlled transaction we call
    Statement.cancel() on any ongoing statement, we end up relying on whether
    the Oracle driver implements and responds to those calls.
    Are you doing weblogic-controlled transactions? Are you/can you
    call Statement.setQueryTimeout() on your statements, or are these
    generated JDBC queries?
    If you can duplicate the problem using the weblogic.jdbc.oracle.OracleDriver
    we have some other debug avenues. This would be good even if you really
    want to use the thin driver, because we will do the same JDBC calls to
    either driver, and the debug would prove (if) we set up a query timeout
    and if we call cancel(). If we do, then we can know that it is the Oracle
    driver failing in these regards.
    Joe

  • Randomly losing network connection over wireless

    Shortly after installing the 10.4.5 software update, my G4 iBook with built-in Airport Extreme card has been losing connection with increasing frequency. Built-in Ethernet use is unaffected. I'm calling this problem thrash-and-drop.
    1. When it's losing signal, processor activity goes through the roof. I had Activity Monitor running during a thrash-and-drop. kernel_task CPU consumption goes from under 1% before the event, to over 80% during the thrashing, and back under 1% after the thrashing stops. The activity is so bad the cursor can't be controlled: using the track pad sends the pointer all over the screen or nowhere at all.
    2. This has been observed to occur with two different wireless base stations: A Linksys WRT54G and an older SMC 802.11b router. Either router is within 10 feet of the computer. Only one is running at a time. There are no other base stations in range.
    3. Another iBook G4 (OS 10.3, Airport Extreme card (not built-in)), sitting next to it, shows no change and its wireless behavior is unaffected.
    Initially, this seemed more likely to happen when Safari was loading Flash-heavy pages. And after thrashing and dropping a connection, it was able to reconnect after either a reboot or a five minute sleep. Currently, it can't connect to a base station for more than a minute. Most recently, it thrashed and dropped while I was selecting the base station to use. This is true regardless of the application running. In fact, it will thrash-and-drop when there are no user applications running at all, after a fresh reboot.
    I've tried the following things to address the problem. None have affected the thrash-and-drop problem. Admittedly, most of this is random:
    1. Back up and delete network preferences in /Library/Preferences/SystemConfiguration
    2. Turn off IPv6 in System Preferences/Network
    3. Back up and delete network preferences in ~/Library/Preferences (com.apple.NetInfoManager.plist and com.apple.NetworkUtility.plist)
    Has anybody else seen this problem? I want to blame it on the 10.4.5 upgrade but I haven't seen anybody else complaining about 10.4.5 doing this to them. If there's something I can do to fix this in a software setting, I'd much prefer that to yet another roadtrip to the Apple store.
    1.33 GHz G4 iBook   Mac OS X (10.4.5)  

    Hi!
    I have the same problem of randomly losing network connection over wireless, though mine is hardly related to surfing.
    I have an external storage drive in which I use for backup of my stuff, and I access the drive via my modem, using the airport. Of late, I noticed that when copying files from my iBook to the external drive, the connection would suddenly drop before the transfer is completed. This began to occur with increasing frequency, particularly when transferring large files.
    I have since abandoned wireless connection, and reverted to my trusty cable. Still, I admit that I'm really curious about the cause of the apparent lack of reliability with my wireless connection. Has it something to do with the airport?
    1.33 GHz iBook G4   Mac OS X (10.4.5)   New to Mac, just switched from Windows 4 months ago.

  • Infinite loop - A stale JDBC connection was detected in the connection pool

    Hello.
    I have a simple JSP (no servlets) application with a single Fastlane Reader style view object to back it up. I'm deploying my application under OC4J 10g 9.0.4 using BC4J 9.0.3.11.50 (JDev 9.0.3.3) on RHEL 3.0, j2sdk1.4.2_03.
    I run with -Djbo.debugoutput=console
    Every so often, intermittently, and totally unpredictably, I see this on stdout for OC4J:
    03/12/23 07:42:07 [33326] A stale JDBC connection was detected in the connection pool
    03/12/23 07:42:07 [33327] Creating a new pool resource
    03/12/23 07:42:07 [33328] Trying connection/2: url='jdbc:oracle:thin:@somedb:1521:somedbsid' info='{user=someuser, password=somepass, dll=ocijdbc9, protocol=thin}' ...
    This message occurs over and over ultimately resulting in hundreds upon thousands of failed connections to the database. I have to forcibly restart OC4J to stop it.
    The weird thing about it is that it seems to only start doing this on one system (which is our internal deployment site); it works fine under an OC4J running in IDE or on a preproduction machine.
    Has anyone experienced this before - or at the very least, can clue me in on getting BC4J to be a little more verbose on the connection failure?
    Thanks and Happy Holidays,
    Sean

    Hi did you find an answer?
    if so, could you post it here?
    thanks

  • SQL Developer 3.1 JDBC connect to Teradata fail

    I have the 3.1 release of Oracle SQL developer. I have the JDBC drivers for Teradata. I am tyring to get it to connect but it is failing. The error is very nondescript and of not much benefit. When I create the connection and put in the host name, user ID, default db, and password and click Test I get:
    Status: Failure - Test failed: (null)
    Below is the detail.
    I put this same info into another SQL editor to test the drivers and it connected fine. So the driver and the info I am passing do not seem to be the problem.
    Is there any insight into this error. ( I did see a thread about turning off SSO, except it is already turned off so that is not my issue)
    Please help.
    java.lang.NullPointerException
         at com.teradata.tdgss.jtdgss.TdgssConfigApi.GetMechanisms(Unknown Source)
         at com.teradata.tdgss.jtdgss.TdgssManager.<init>(Unknown Source)
         at com.teradata.tdgss.jtdgss.TdgssManager.getInstance(Unknown Source)
         at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getGSSM(GenericTeraEncrypt.java:623)
         at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getConfig(GenericTeraEncrypt.java:641)
         at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getUserNameForOid(GenericTeraEncrypt.java:734)
         at com.teradata.jdbc.AuthMechanism.<init>(AuthMechanism.java:50)
         at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:121)
         at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:209)
         at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:30)
         at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructConnection(JDK6ConnectionFactory.java:22)
         at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:130)
         at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:120)
         at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:220)
         at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:153)
         at oracle.jdeveloper.db.adapter.AbstractConnectionCreator.getConnection(AbstractConnectionCreator.java:153)
         at oracle.dbtools.thirdparty.teradata.TeradataConnectionCreator.getConnection(TeradataConnectionCreator.java:31)
         at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:325)
         at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:254)
         at oracle.jdevimpl.db.adapter.CADatabaseFactory.createConnectionImpl(CADatabaseFactory.java:60)
         at oracle.javatools.db.DatabaseFactory.createConnection(DatabaseFactory.java:534)
         at oracle.javatools.db.DatabaseFactory.createDatabase(DatabaseFactory.java:208)
         at oracle.jdeveloper.db.DatabaseConnections.getDatabase(DatabaseConnections.java:607)
         at oracle.dbtools.raptor.utils.Connections$ConnectionInfo.getDatabase(Connections.java:156)
         at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:1043)
         at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:1024)
         at oracle.dbtools.raptor.navigator.DatabaseConnection.openConnectionImpl(DatabaseConnection.java:115)
         at oracle.dbtools.raptor.navigator.AbstractConnectionNode.getConnection(AbstractConnectionNode.java:30)
         at oracle.dbtools.raptor.navigator.ConnectionFilter.getFactory(ConnectionFilter.java:94)
         at oracle.dbtools.raptor.navigator.ConnectionFilter$1.doWork(ConnectionFilter.java:119)
         at oracle.dbtools.raptor.navigator.ConnectionFilter$1.doWork(ConnectionFilter.java:104)
         at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:515)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:662)

    Hi,
    I did a web search for TdgssConfigApi.GetMechanisms null pointer and got lots of hits, but couldn't find any one specific cause. Some had issues with the version of the driver, some with placement of jar files in the correct location (depending on the version, there are 2 or 3), others with the format of the jdbc connect string.
    Try searching for and reading over some of these. Perhaps you can determine if any match your situation.
    Good luck,
    Gary

  • JDBC connection error in Crystal Reporting through ESRI Dekho product

    Wow, I am so far out of my depth here I am not even sure I am in the correct forum.  I have recently started using the GIS software ESRI product Dekho (a web based browser basically) and the reporting tool is Crystal Reports.  The JDBC connection required for me to connect to data held in a corporate oracle db is failing with a driver error and I don't know how to troubleshoot it.  ESRI support seem to think it's a Crystal Reports issue.  If anyone has any idea what I am talking about please respond, including pointing me to a forum which might assist, if this one is not where I should be asking such a question.  Thanks in advance.

    Simon here from Esri Australia, I work in the support team for the Dekho product, that this client was having problems with.
    We established that our Dekho product was passing the relevant information over to Crystal and that Crystal was having issues connecting to a database due to an issue with Crystal not having the correct JBDC drivers installed.
    = Therefore we concluded that the client should get in touch with you to resolve these JDBC driver issues.
    The error in the report is:
    ['Failed to open the connection, Details:JDBC driver not found"|http://i7.photobucket.com/albums/y254/jak-c/Outlook1.jpg]
    We believe that the issue is specifically a Crystal Reports issue on connecting to an Oracle database. 
    If we take Dekho out of the equation, the issue is still apparent.
    We did some testing on Oracle XE and were able to get it to communicate with Crystal Reports ok.
    We had to make the following change:
    1. copied the database drivers from:
    C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib
    to
    C:\Program Files (x86)\Business Objects\Common\4.0\java\lib\external\
    2. Edit "C:\Program Files (x86)\Business Objects\Common\4.0\java\lib" to include the above JAR file into the classpath tag.
    We touch on this in [our own web-help|http://www.dekho.com.au/help/31/default.htm?turl=Documents%2Fconfigurecrystalreports.htm], although this is more specific to SQL Server.
    The client had problems setting up this Crystal Reports to Oracle link, due to drivers missing.
    Can you generate a support ticket for this client and assist her with getting CR drivers working with her version of Oracle?
    As a sidenote - Esri Australia is a distributor for Esri, and not sure if the OEM extends to us?
    We would like to get a better relationship with you on how to deal with Crystal related issues with our own product.
    For issues like the above, we would like to come up with a more efficient means for our clients to get resolutions to their issues, and if the issue stems to outside our product - a good process for our support team to log a ticket on behalf of our client and pass all the relevant info across, so that a solution can be resolved quickly.
    - Do you have a contact in Australia that we could talk to about this?
    Let me know if you need the clients contact details - I believe this is still an issue for her.

  • How to fix jdbc connection when  SQLstate 08S01

    I have an application that connects to and insert into a remote database which runs on a server I connect to over the internet. I tested it on local server (localhost) and it works fine, but when I put my server IP (72.52.155.111) or web domain I can' t connect. I'm not sure what should I write instead localhost: webdomain or something else ?
    Java code...
    conn =   DriverManager.getConnection("jdbc:mysql://72.52.155.111:3306/fritaor_apartmani" ,"fritaor_root","10000000");
    ...Error code:
    SQLException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection timed out: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection timed out: conne
    ct
            at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
    va:156)
            at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
            at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
            at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
            at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    :266)
            at java.sql.DriverManager.getConnection(Unknown Source)
            at java.sql.DriverManager.getConnection(Unknown Source)
            at Mysql.save(Mysql.java:57)
            at Contact.run(Contact.java:299)
            at Testing.main(Testing.java:21)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 47 ms ago.
    SQLState: 08S01
    VendorError: 0

    Try to connect to the server in another way (such as telnet). See if you can connect to port 3306. If not, the port is blocked or there's nobody listening (is there a mysql server running on the host?).

  • Windows 8.1 prefers IPv4 over IPv6

    Hi,
    I face a strange issue regarding IPv6 networking on Windows 8.1 Pro. My local network runs a router with router advertising daemon to announce fc00::/7 unique local address as well as global adresses. It also runs DHCPv6 to assign static unique local address.
    So all my machines in local LAN get multiple local IPv6 addresses:
    IPv6 DHCP lease in fc00::/7 network
    Auto-assigned IPv6 fc00::/7 address
    Temporary IPv6 fec00::/7 address
    Link-local IPv6 address in range fe80::64 network
    Temporary global unicast IPv6 2000::/3 address
    Link-local IPv6 fe80::/10 address
    DHCP-assigned 10.0.0.0/8 IPv4 address
    DNS servers: fc00::/7 IPv6 and 10.0.0.0/8 (same server with DNS listening on both interfaces)
    Gateway: Link-local IPv6 fe80::/10 address of router, 10.0.0.0/8 server (same host as IPv6 gateway)
    So far almost everything seems to work well:
    Can ping and connect to IPv6-enabled web-hosts
    ping www.google.com pings IPv6 interface on Google server
    However Windows 8.1 decides to connect on IPv4 only local servers. E.g. the local web-service. Issuing "ping local-server" pings IPv4 only as well as Internet Explorer or Firefox only connect on IPv4 to the web service. It's not a DNS issue as
    DNS resolves properly to link-local IPv6 address:
    nslookup local-server
    Server:  UnKnown
    Address:  fdea:....:....:....::6
    Name:    local-server.example.local
    Addresses:  fdea:....:....:....::6
              10.0.1.6
    Also using the IP address within the browser like http://[fdea:....:....:....::6]/ works just fine.
    Even more strange the same setup on Windows 7 Professional connects just fine to the same host on IPv6.
    I thought this might be an issue with prefix policies (see 'netsh interface ipv6 show prefixpolicies') which were changed from Windows 7 to Windows 8(.1). But I messed with the rules at no avail.
    Any explanation or hint what I am doing wrong or what has changed in Windows 8(.1) which makes Windows 8 prefer IPv4 over unique local fec0::/7 addresses?

    you can run ipconfig /all, and paste the result here
    Of course I can. See below. Note: I have removed static IPv6 site-local addresses (except the prefix).
    Windows IP Configuration
    Host Name . . . . . . . . . . . . : cyb64w8-hpnb
    Primary Dns Suffix . . . . . . . : cyberdyne.local
    Node Type . . . . . . . . . . . . : Hybrid
    IP Routing Enabled. . . . . . . . : No
    WINS Proxy Enabled. . . . . . . . : No
    DNS Suffix Search List. . . . . . : cyberdyne.local
    Ethernet adapter Ethernet:
    Connection-specific DNS Suffix . : cyberdyne.local
    Description . . . . . . . . . . . : Intel(R) 82566MM Gigabit Network Connection
    Physical Address. . . . . . . . . : 00-1A-4B-79-B0-18
    DHCP Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    IPv6 Address. . . . . . . . . . . : 2a02:120b:2c1a:9921:xxxx:xxxx:xxxx:xxxx(Preferred)
    IPv6 Address. . . . . . . . . . . : fdea:5b48:d4c1:1:xxxx:xxxx:xxxx:xxxx(Preferred)
    Temporary IPv6 Address. . . . . . : 2a02:120b:2c1a:9921:b961:891b:ca9a:57c4(Preferred)
    Temporary IPv6 Address. . . . . . : fdea:5b48:d4c1:1:b961:891b:ca9a:57c4(Preferred)
    Link-local IPv6 Address . . . . . : fe80::d22:54df:c40d:50b0%3(Preferred)
    IPv4 Address. . . . . . . . . . . : 10.0.1.186(Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Lease Obtained. . . . . . . . . . : Dienstag, 24. Dezember 2013 15:16:03
    Lease Expires . . . . . . . . . . : Donnerstag, 26. Dezember 2013 15:16:00
    Default Gateway . . . . . . . . . : fe80::21f:d0ff:fe59:1baf%3
    10.0.1.6
    DHCP Server . . . . . . . . . . . : 10.0.1.6
    DHCPv6 IAID . . . . . . . . . . . : 50338379
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-F3-54-E5-00-1A-4B-79-B0-18
    DNS Servers . . . . . . . . . . . : 10.0.1.6
    Primary WINS Server . . . . . . . : 10.0.1.6
    NetBIOS over Tcpip. . . . . . . . : Enabled
    Wireless LAN adapter Wi-Fi:
    Connection-specific DNS Suffix . : cyberdyne.local
    Description . . . . . . . . . . . : Intel(R) Wireless WiFi Link 4965AGN
    Physical Address. . . . . . . . . : 00-13-E8-E7-CD-41
    DHCP Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    IPv6 Address. . . . . . . . . . . : 2a02:120b:2c1a:9921:xxxx:xxxx:xxxx:xxxx(Preferred)
    IPv6 Address. . . . . . . . . . . : fdea:5b48:d4c1:1:xxxx:xxxx:xxxx:xxxx(Preferred)
    Lease Obtained. . . . . . . . . . : Dienstag, 24. Dezember 2013 15:15:59
    Lease Expires . . . . . . . . . . : Donnerstag, 16. Januar 2014 21:23:54
    IPv6 Address. . . . . . . . . . . : fdea:5b48:d4c1:1:448c:d39d:146a:8a10(Preferred)
    Temporary IPv6 Address. . . . . . : 2a02:120b:2c1a:9921:31a1:a957:a32a:3fd9(Preferred)
    Temporary IPv6 Address. . . . . . : fdea:5b48:d4c1:1:31a1:a957:a32a:3fd9(Preferred)
    Link-local IPv6 Address . . . . . : fe80::448c:d39d:146a:8a10%4(Preferred)
    IPv4 Address. . . . . . . . . . . : 10.0.1.210(Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Lease Obtained. . . . . . . . . . : Dienstag, 24. Dezember 2013 15:15:57
    Lease Expires . . . . . . . . . . : Donnerstag, 26. Dezember 2013 15:15:57
    Default Gateway . . . . . . . . . : fe80::21f:d0ff:fe59:1baf%4
    10.0.1.6
    DHCP Server . . . . . . . . . . . : 10.0.1.6
    DHCPv6 IAID . . . . . . . . . . . : 67113960
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-F3-54-E5-00-1A-4B-79-B0-18
    DNS Servers . . . . . . . . . . . : fdea:5b48:d4c1:1:1::6
    10.0.1.6
    Primary WINS Server . . . . . . . : 10.0.1.6
    NetBIOS over Tcpip. . . . . . . . : Enabled
    Connection-specific DNS Suffix Search List :
    cyberdyne.local
    Ethernet adapter Local Area Connection:
    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix . : cyberdyne.local
    Description . . . . . . . . . . . : TAP-Win32 Adapter V9
    Physical Address. . . . . . . . . : 00-FF-22-25-F2-4A
    DHCP Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    Tunnel adapter Teredo Tunneling Pseudo-Interface:
    Connection-specific DNS Suffix . :
    Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
    DHCP Enabled. . . . . . . . . . . : No
    Autoconfiguration Enabled . . . . : Yes
    IPv6 Address. . . . . . . . . . . : 2001:0:5ef5:79fb:e8:c8c:f5ff:fe45(Preferred)
    Link-local IPv6 Address . . . . . : fe80::e8:c8c:f5ff:fe45%6(Preferred)
    Default Gateway . . . . . . . . . :
    DHCPv6 IAID . . . . . . . . . . . : 218103808
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-F3-54-E5-00-1A-4B-79-B0-18
    NetBIOS over Tcpip. . . . . . . . : Disabled
    Tunnel adapter isatap.cyberdyne.local:
    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix . : cyberdyne.local
    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
    DHCP Enabled. . . . . . . . . . . : No
    Autoconfiguration Enabled . . . . : Yes

  • Compression via JDBC connection

    Hi,
    I am looking for alternatives or option using compression via JDBC thin or OCI connection. I am using JDK 1.6X on Sun platform and my Oracle Database version is 11.1.2.0. Is there any way to compress my data stream while connecting to JDBC connection ? I did tried knowledge base but didn't find a concrete answer from there?

    Mechanisms like that are always a trade off one which doesn't necessarily work over time.
    The problem is that one is trading CPU time for network bandwidth. And relation between those can vary greatly in a short amount of time.
    In terms of absolute performance the best way is to create a design that minimizes volume and size.

  • JDBC connect from remote computer fails

    Hi all,
    I have successfully installed the XE server and I can connect over JDBC from clients running locally on the machine where the XE server is installed.
    However when I try to connect from a remote computer using the same client I get an error saying: The Network Adapter could not establish the connection
    I can ping the machine with XE installed and all firewalls on the machines are turned off.
    Any ideas on the subject of JDBC remote connect to XE server? Or is it simply that it is not supported?
    Appreciate all the help I can get.
    Thanks,
    /Anders

    On my machine I have the listener bound to local interface.
    Listener.ora has hostname in it, and this is the listener status:
    As status shows the hostname is resolved to localhost, on this machine I am unable (with this configuration) to share the db to other machines (I do not have oracle client on my other pc, but telnet is unable to connect to port 1521).
    Changing hostname to ipaddres solves.
    [andrea@bones ~]$ lsnrctl status
    LSNRCTL for Linux: Version 10.2.0.1.0 - Beta on 15-DEC-2005 21:28:51
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bones)(PORT=1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Beta
    Start Date                15-DEC-2005 21:28:40
    Uptime                    0 days 0 hr. 0 min. 11 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Default Service           XE
    Listener Parameter File   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
    Listener Log File         /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "XE" has 1 instance(s).
      Instance "XE", status READY, has 1 handler(s) for this service...
    Service "XEXDB" has 1 instance(s).
      Instance "XE", status READY, has 1 handler(s) for this service...
    Service "XE_XPT" has 1 instance(s).
      Instance "XE", status READY, has 1 handler(s) for this service...
    The command completed successfully
    [andrea@bones ~]$

  • JDBC connection to 11g using DBCP connection pool

    Hi
    I am using 11g with Java6 using ojdbc6.jar, aqapi.jar and commons-dbcp-1.2.2.jar running in a Jboss4.3 app server. I have a strange problem in that when the app server is shutdown it then seems to take several minutes before it can be restarted because it cannot get the connections for the pool. If I leave it for 10 mins or so it will restart.
    Any help would be appreciated

    IPv6?
    If that is in play one can end up with retries attempted over IPv6, which then finally gives up and then switched to IPv4.
    You should be able to replicate via the following
    1. You MUST run as the same user as the app server
    2. Create a java console app that does nothing but a regular connect using the SAME connection string as the app server.
    3. Test it and time it.
    4. If that works ok then do the same thing with dbcp.

  • Connecting using IPv6?

    A while ago I posted a question about a problem I had using networked Eudora after upgrading to Tiger from Panther on machines on my network. See the quoted text below first...
    I have since found that the only mac on my network that still works using Tiger/network Eudora appears to connect to my 10.3.9 Server using afp and IPv6.
    So on the Tiger machines that don't work when I click on the mounted volume I get "Server: afp://192.168.254.100/Email_FS" which is just IPv4 and when I go to the Tiger machine that does work with Eudora and I click on the mounted volume to check how I've connected I get "Server:afp//[fe80:0000:0000:0000:0203:93ff:fe8d:68e4]:Email_FS"
    So - I've also tried connecting using IPv6 on the macs that don't work with Eudora - just going to Go -> Network and typing in the IPv6 address to connect to my server - and my mac won't connect that way. (Network preferences IPv6 is enabled)
    Anyone have any idea why one of my macs is connecting using IPv6?
    Anyone have any idea if this might be the cause of my problem?
    Anyone have any idea how I can force my other macs to connect using IPv6 to see if this is the solution to my Eudora problem?
    Thanks for your help as ever...
    Original Eudora question:
    I have just upgraded the system software on an iMac on my network to Tiger from Panther (to 10.4.8 from 10.3.9), and now my Eudora will not check mail - instead it gives an error message.
    The mac uses Eudora for mac 6.23 and OSX 10.4.8
    My Eudora folders (mail folders) are accessed over the network (mail folders and are on a volume of a MacOSX server 10.3.9), so that they are backed up and can be accessed from any machine. The settings are launched directly by double clicking on an alias to them from the dock.
    I have two other macs on the network using this arrangement of Tiger and Eudora 6.23 and they have no problems.
    However when I click on my settings file from this particular mac I get the following error message:
    44886+ 1(-5000)
    An Unknown Error Occurred (90:913)
    It is not possible to collect mail.
    And then I get a message that I cannot use background threading.
    I can see all of the existing mail - I just can't collect new mail or send mail.
    - Obviously there are no problems with the pop settings as I can use this settings file to check/send mail from any other machine on my network
    - However, on this particular machine I get this error regardless of which Eudora settings I try open and check mail for - including the ones that open successfully across the network from the other OSX 10.4 machines
    - I have also created a new settings file/Eudora Folder and copied this across to the network to see if that would open/check mail (it didn't)
    - I have also reinstalled Eudora from the .dmg file
    - I have run disk permissions on the Mac before and after running the OSX update
    - If I copy the settings across to the local hard drive, Eudora works OK - so it seems to be some network setting - although this machine has the same settings as the others (manual NAT IP address).
    - I've checked firewall settings, TCP/IP settings and the like to see if I can see any differences between the Tiger machine that will collect mail and the one that won't, but they appear to be configured in the same way
    - I've created a new user on the problematic mac and tried to launch from that - doesn't work either
    - I've tried throwing away network plist kind of files as well.
    Anyone help me out there?
    Thanks a million!

    Hi Jermy,
    Unlike in ipv4, in ipv6 a static route with only the egress interface should only be used on a point to point interface. This is because ipv4 has concept of proxy arp, which ipv6 doesn't have. For your config to work, you should add the next-hop ipv6 address to your static route as follow:
    router:
    ipv6 route ::/0 2001:610:1111::2
    switch:
    ipv6 route ::/0 2001:610:1000::2
    Hope this helps

  • JDBC CONNECTIONS RECURSIVE WAY

    JAVA DEVELOPER COMUNITY
    I request your help in the following topic,
    i am doing a java program that store a
    complete file system in an Oracle Database 11GR2.
    So i use a recursive algorithm to do that
    but i don't know how to handle the JDBC
    connections in order to not overload the total of
    physical connections available to the database.
    Thanks for your help.
    Regards from Colombia - South America
    JOHN JAIRO GOMEZ LAVERDE
    I am using the following code:
    import java.io.* ;
    import java.sql.*;
    import java.lang.String;
    import java.util.Date;
    import java.util.Calendar;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import oracle.jdbc.*;
    import oracle.jdbc.pool.*;
    import javax.naming.*;
    import javax.naming.spi.*;
    public class InsertArcDir
    public void AddFiles( File file )
    try
    Calendar fechamod=Calendar.getInstance();
    String SQL;
    PreparedStatement pstmt = null;
    java.util.Properties prop = new java.util.Properties();
    prop.setProperty("MinLimit", "2");
    prop.setProperty("MaxLimit", "10");
    OracleDataSource ods = new OracleDataSource();
    ods.setURL("jdbc:oracle:thin:@//oracle:1521/xe");
    ods.setUser("hr");
    ods.setPassword("hr");
    ods.setConnectionCachingEnabled(true);
    ods.setConnectionCacheProperties (prop);
    //ods.getConnectionCacheName();
    Connection conn = ods.getConnection ("hr","hr",prop);
    Statement stmt = conn.createStatement();
    fechamod.setTimeInMillis(file.lastModified());
    SQL="INSERT INTO tbarchivos(nombrearc,fechaarc,direcarc) VALUES(?,?,?)";
    pstmt = conn.prepareStatement(SQL);
    java.sql.Timestamp sqlDate = new java.sql.Timestamp(fechamod.getTimeInMillis());
    pstmt.setString(1, file.getName());
    pstmt.setTimestamp(2, sqlDate);
    pstmt.setString(3, file.getParent());
    pstmt.executeUpdate();
    stmt.close();
    conn.close();
    catch(Exception e)
    System.out.println("Exepcion"+e.getMessage());
    System.out.println("OTHER TEST");
    * Works on a single file system entry and
    * calls itself recursively if it turns out
    * to be a directory.
    * @param file A file or a directory to process
    public void traverse( File file )
    // Check if it is a directory
    if( file.isDirectory() )
    // Get a list of all the entries in the directory
    String entries[] = file.list() ;
    // Ensure that the list is not null
    if( entries != null )
    // Loop over all the entries
    for( String entry : entries )
    // Recursive call to traverse
    traverse( new File(file,entry) ) ;
    else
    if(file.isFile())
    InsertArcDir rta = new InsertArcDir() ;
    rta.AddFiles(file);
    else
    System.out.println("*** VALOR INCORRECTO ***");
    //try
    //stmt.close();
    //conn.close();
    //catch(Exception e)
    // System.out.println("Exepcion"+e.getMessage());
    * The program starts here.
    * @param args The arguments from the command line
    public static void main( String args[] )
    try
    java.util.Properties prop = new java.util.Properties();
    prop.setProperty("MinLimit", "2");
    prop.setProperty("MaxLimit", "10");
    OracleDataSource ods = new OracleDataSource();
    ods.setURL("jdbc:oracle:thin:@//oracle:1521/xe");
    ods.setUser("hr");
    ods.setPassword("hr");
    ods.setConnectionCachingEnabled(true);
    ods.setConnectionCacheProperties (prop);
    ods.setConnectionCacheName("ImplicitCache01");
    Connection conn = ods.getConnection ();
    conn.close();
    //Statement stmt = conn.createStatement();
    // Create an object of this class
    InsertArcDir rt = new InsertArcDir() ;
    if( args.length == 0 )
    // If there are no arguments, traverse the current directory
    rt.traverse( new File(".") ) ;
    else
    // Else process every argument sequentially
    for( String arg : args )
    rt.traverse( new File(arg) ) ;
    //stmt.close();
    //conn.close();
    catch(Exception e)
    System.out.println("Exepcion"+e.getMessage());
    *********************

    I will not comment on weather or not to use recursion. However, I suggest:
    This statement and its configuration should occur once in your program and not in a recursive function:
    OracleDataSource ods = new OracleDataSource();
    Assuming your using connection pooling, get a connection, use it, and close it as quickly as possible for each write to the database (not the best solution, but good enough for now until you read up on JDBC). Do not hold onto the connection for the duration of the application.
    Conection pooling is designed to allow you to get and close a connection with minimal performance loss. I suggest reading up on JDBC, or better yet reading a book on JDBC.

Maybe you are looking for