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

  • SEARCH
  • Home
  • 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 (java) code that creates and populates tables in a derby database, using
I have some Java code that is throwing out of memory exceptions after running
I have a java code that looks like this: //UI thread //Some code Job
We have a system that has some Bash scripts running besides Java code. Since
I'm using Zend_Search_Lucene, the PHP port of Java Lucene. I currently have some code
I have a Java client that connects to a C++ server using TCP Sockets
I have a desktop app in Java that connects to a MySql database through
I have some Java code that determines the namespace of the root-level element of
I have a DBAdmin class that connects to the database, and then some other
I have a java swing App that connects to a remote Unix box using

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.