Topic
2 replies Latest Post - ‏2010-06-02T03:45:54Z by larryp7639
fdelaval
fdelaval
1 Post
ACCEPTED ANSWER

Pinned topic JDBC connection error on SUN OS using JNI implementation

‏2010-04-08T16:51:14Z |
I have a problem with a connection using the Informix JDBC with a JNI client which launchs a JVM on a sparc SUN OS.
A pure java client using this jar is able to connect to the Database(same DataSource properties).
The database can be installed on the same box or distant.

Environment :
SunOS 5.10
The JRE 1.5.0 (1.5.0_19-b02) and 1.6.0 have been tested
and the last JDBC JDBC.3.50.JC6W1 has also been tested.

The JNI and pure java clients work well on IBM AIX.

I have added the following paramaters to the DataSource properties :
IfxIFX_LOCK_MODE_WAIT = 65
IfxINFORMIXCONTIME = 10
IfxINFORMIXCONRETRY = 10
IfxSQLIDEBUG = "/sqlidebug"

There is no other connection at this database.
The Database is configured with the ontlitctp and had been tested also with onsoctcp.

<Message>Fail to allocate connection - STATE:08004-CODE:-908</Message>
<ExceptionMessage>com.informix.asf.IfxASFException: Attempt to connect to database server (STELINK_PROD) failed.</ExceptionMessage>
<StackTrace>java.sql.SQLException: com.informix.asf.IfxASFException: Attempt to connect to database server (STELINK_PROD) failed.
at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java:1319)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.informix.jdbcx.IfxDataSource.getSqliConnection(IfxDataSource.java:190)
at com.informix.jdbcx.IfxDataSource.getConnection(IfxDataSource.java:106)
at com.sterci.stg.fix.store.JdbcMessageStoreUtil.isConnectionAvailable(JdbcMessageStoreUtil.java:468)
at com.sterci.stg.fix.store.JdbcMessageStoreFactory.<init>(JdbcMessageStoreFactory.java:113)
at com.sterci.stg.fix.initiator.FixInitiator.init(FixInitiator.java:413)
Caused by: com.informix.asf.IfxASFException: Attempt to connect to database server (STELINK_PROD) failed.
at com.informix.util.IfxErrMsg.getLocIfxASFException(IfxErrMsg.java:810)
at com.informix.asf.Connection.establishConnection(Connection.java:1646)
at com.informix.asf.Connection.<init>(Connection.java:279)
at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java:956)
... 9 more

With sqliprint, I have the following print of a sqlidebug binary file :

SQLIDBG Version 1

C->S (374) Time: 2010-04-08 18:06:43.44900

ERROR: Invalid msg type: 373 (0x175). Reset Message to skip forward to next packet!
On the JVM side, I have also add -Djava.net.preferIPv4Stack=true

I do not have other idea to find out this behaviour. Do you have already encountered a similar issue ? or have an idea to continue the investigation ?
Updated on 2010-06-02T03:45:54Z at 2010-06-02T03:45:54Z by larryp7639
  • ishields
    ishields
    988 Posts
    ACCEPTED ANSWER

    Re: JDBC connection error on SUN OS using JNI implementation

    ‏2010-04-08T17:35:09Z  in response to fdelaval
    This forum is for general IBM software questions for Linux on x86 platform, not Sun OS on Sparc. For Informix help try the IDS Developer and User Forum.

    Ian Shields
  • larryp7639
    larryp7639
    3 Posts
    ACCEPTED ANSWER

    Re: JDBC connection error on SUN OS using JNI implementation

    ‏2010-06-02T03:45:54Z  in response to fdelaval
    Great post! It's very nice. Thank you so much for your post.

    Edited by: ishields on Jun 1, 2010 11:45 PM to remove unrelated trailer URL.
    Updated on 2010-06-02T03:45:54Z at 2010-06-02T03:45:54Z by larryp7639