Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 686853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:04:00+00:00 2026-05-14T02:04:00+00:00

I have some Java code that connects to an Oracle database using DriverManager.getConnection(). It

  • 0

I have some Java code that connects to an Oracle database using DriverManager.getConnection(). It works just fine on my Windows XP machine. However, when running the same code on a Solaris machine, I get the following exception. Both machines can reach the database machine on the network. I have included the Oracle trace logs.

Mar 23, 2010 12:12:33 PM org.apache.commons.configuration.ConfigurationUtils locate
FINE: ConfigurationUtils.locate(): base is /users/theUser/ADCompare, name is props.txt
Mar 23, 2010 12:12:33 PM org.apache.commons.configuration.ConfigurationUtils locate
FINE: Loading configuration from the path /users/theUser/ADCompare/props.txt
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.OracleDriver connect
FINE: OracleDriver.connect(url=jdbc:oracle:thin:@//theServer:1521/theService, info)
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.OracleDriver connect
FINER: OracleDriver.connect() walletLocation:(null)
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.OracleDriver parseUrl
FINER: OracleDriver.parseUrl(url=jdbc:oracle:thin:@//theServer:1521/theService)
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.OracleDriver parseUrl
FINER: sub_sub_index=12, end=46, next_colon_index=16, user=17, slash=18, at_sign=17
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.OracleDriver parseUrl
FINER: OracleDriver.parseUrl(url):return
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.OracleDriver connect
FINER: user=theUser, password=******, database=//theServer:1521/theService, protocol=thin, prefetch=null, batch=null, accumulate batch result =true, remarks=null, synonyms=null
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.PhysicalConnection <init>
FINE: PhysicalConnection.PhysicalConnection(ur="jdbc:oracle:thin:@//theServer:1521/theService", us="theUser", p="******", db="//theServer:1521/theService", info)
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.PhysicalConnection <init>
FINEST: PhysicalConnection.PhysicalConnection() : connectionProperties={user=theUser, password=******, protocol=thin}
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.PhysicalConnection initialize
FINE: PhysicalConnection.initialize(ur="jdbc:oracle:thin:@//theServer:1521/theService", us="theUser", access)
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.PhysicalConnection initialize
FINE: PhysicalConnection.initialize(ur, us):return
Mar 23, 2010 12:12:33 PM oracle.jdbc.driver.PhysicalConnection needLine
FINE: PhysicalConnection.needLine()--no return
java.lang.ArrayIndexOutOfBoundsException: 31
        at oracle.net.nl.NVTokens.parseTokens(Unknown Source)
        at oracle.net.nl.NVFactory.createNVPair(Unknown Source)
        at oracle.net.nl.NLParamParser.addNLPListElement(Unknown Source)
        at oracle.net.nl.NLParamParser.initializeNlpa(Unknown Source)
        at oracle.net.nl.NLParamParser.<init>(Unknown Source)
        at oracle.net.resolver.TNSNamesNamingAdapter.loadFile(Unknown Source)
        at oracle.net.resolver.TNSNamesNamingAdapter.checkAndReload(Unknown Source)
        at oracle.net.resolver.TNSNamesNamingAdapter.resolve(Unknown Source)
        at oracle.net.resolver.NameResolver.resolveName(Unknown Source)
        at oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
        at oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
        at oracle.net.ns.NSProtocol.connect(Unknown Source)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1037)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:282)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:468)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:839)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:185)

The above exception is also thrown if I use OracleDataSource instead of the generic DriverManager.getConnection().

Any ideas on why the behavior is different in the different environments?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:04:00+00:00Added an answer on May 14, 2026 at 2:04 am

    It looks like there’s an error in TNSNAMES.ORA from the lines

    java.lang.ArrayIndexOutOfBoundsException: 31
            at oracle.net.nl.NVTokens.parseTokens(Unknown Source)
            ...
            at oracle.net.resolver.TNSNamesNamingAdapter.loadFile(Unknown Source)
    

    I’m not up on the oracle configuration from solaris, but assuming it’s similar to the win version, maybe you have an issue with the formatting of this file. Can you connect through a sqlplus console from that box?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some Java code that uses curly braces in two ways // Curly
I have a standalone Java app that has some licensing code that I want
I have to take over and improve/finish some code that transforms Java objects from
I have to ship some groovy code to some users that have only java
I have a DBAdmin class that connects to the database, and then some other
I have a java program that connects to a MySql database and it's working
Let's say I have some Java code: public class SomeClass { static { private
I have ported some LGPL code from Java to C#, which I plan to
Does anyone have a good solution for integrating some C# code into a java
I have some model objects I'm using in my Java client application. Later these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.