Numeric Overflow; nested exception is java.sql.SQLException: Numeric Overfl

Dear Team,
We are getting below errors in java,
SQL state [99999]; error code [17026]; Numeric Overflow; nested exception is java.sql.SQLException: Numeric Overflow
java.sql.SQLException: Numeric Overflow
at oracle.jdbc.driver.NumberCommonAccessor.throwOverflow(NumberCommonAccessor.java:4380)
at oracle.jdbc.driver.NumberCommonAccessor.getInt(NumberCommonAccessor.java:214)
at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:896)
at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:434)
Thanks,
selva
Edited by: SELVAPA on Apr 25, 2013 4:05 PM

>
at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:434)
>
That 'getInt' method returns a Java 'int'. It will attempt to convert the actual data value in the result set column to an int.
If the value is too large, too small or isn't even numeric you will get an exception.
Isolate the problem (e.g. by debugging) to the row giving the exception and then examine the actual data value. If you are using NetBeans (or other) you can use the 'getString' method to see what the value is that is causing the problem.
The actual 'solution' to the problem depends on your database, the table column definition and the business rules being implemented.
You table could contain 'dirty' data and contain values larger than you want to be stored.
Or your actual data could be correct and you are just using 'getInt' instead of 'getBigDecimal' or other method to get the value.
Don't apply a 'solution' until you actually know what the problem is and the proper solution to implement.

Similar Messages

  • Nested exception is java.sql.SQLException: ORA-01403: no data found

    i am using oracle9.1 and use odbc.
    any help is appreciated.
    Thanks,
    kk

    It will be great if you provide some more basic details like:
    What activity you was doing??
    How you are doing?
    Did you get this error earlier also??
    Where did you get this error?
    It looks like you are using some sort of cursor and not handling the exception properly.
    Daljit Singh
    Message was edited by:
    Daljit

  • Could not create pool connection. The DBMS driver exception was:java.sql.SQLException: ORA-01017: invalid username/password

    Could not create pool connection.The DBMS driver exception was:java.sql.SQLException:
    ORA-01017: invalid username/password
    Even though I could able to connect to Oracle database using correct userid,password
    and HostString using OracleClient, I couldnt able to do with connectionpool. Here
    is the error message..
    <Jan 21, 2003 2:27:50 AM PST> <Notice> <WebLogicServer> <Starting WebLogic Admin
    Server "examplesServer" for domain "examples">
    Starting Loading jDriver/Oracle .....
    ---------- LOGIN ERROR CODE: 1017
    ---------- LOGIN ERROR CODE: 1017
    <Jan 21, 2003 2:28:06 AM PST> <Error> <JDBC> <Cannot startup connection pool "or
    aclePool" weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: ORA-01017: invalid username/password; logon denied - (Obj
    ectel/********@ora8i)
    at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:164)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:112)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:193)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:134)
    at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
    cator.java:698)
    at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
    ava:282)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:623)
    at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:359)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
    at $Proxy45.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2761)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:370)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:160)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:359)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
    at $Proxy64.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
    .start(ApplicationManagerMBean_CachingStub.java:480)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1180)
    at weblogic.management.Admin.finish(Admin.java:590)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
    at weblogic.Server.main(Server.java:35)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:209)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:134)
    at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
    cator.java:698)
    at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
    ava:282)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:623)
    at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:359)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
    at $Proxy45.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2761)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:370)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:160)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:359)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
    at $Proxy64.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
    .start(ApplicationManagerMBean_CachingStub.java:480)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1180)
    at weblogic.management.Admin.finish(Admin.java:590)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
    at weblogic.Server.main(Server.java:35)
    >
    <Jan 21, 2003 2:28:14 AM PST> <Notice> <Management> <Application Poller started
    for development server.>
    <Jan 21, 2003 2:28:19 AM PST> <Notice> <WebLogicServer> <ListenThread listening
    on port 7001>
    <Jan 21, 2003 2:28:19 AM PST> <Notice> <WebLogicServer> <SSLListenThread listeni
    ng on port 7002>
    <Jan 21, 2003 2:28:20 AM PST> <Notice> <Management> <Starting discovery of Manag
    ed Server... This feature is on by default, you may turn this off by passing -Dw
    eblogic.management.discover=false>
    <Jan 21, 2003 2:28:20 AM PST> <Notice> <WebLogicServer> <Started WebLogic Admin
    Server "examplesServer" for domain "examples" running in Development Mode>

    URL=jdbc:weblogic:oracle:oracle8i(server)
    Driver Classname=weblogic.jdbc.oci.Driver
    AClname=weblogic.jdbc.connectionPool.oraclePool
    intialcapacity=1
    MaximumCapacity=10
    Capacity Increment=2
    Login Delay Seconds=1sec
    Refresh Period=15 Minutes
    Supports Local Transaction=No
    Allow Shrinking=No
    Shrink Period=15
    Prepared Statement Cache Size=10
    TargetServer=ExamplesServer
    Properties
    user=Objectel
    password=superman
    Test table=yes
    Test Reserved Connections=yes
    Test Released Connections=Yes
    I could able to connect to oracledataBase if I use
    user=scott
    password=tiger
    with any other database user Iam getting the following error
    Could not create pool connection. The DBMS driver exception was:java.sql.SQLException:
    ORA-01017: invalid username/password
    "Neo Gigs" <[email protected]> wrote:
    By end of the error you shown:
    <Jan 21, 2003 2:28:20 AM PST> <Notice> <WebLogicServer> <Started WebLogicAdmin
    Server "examplesServer" for domain "examples" running in DevelopmentMode>
    You are running the Examples application shipped with WLS, which I guest
    the
    correct DB to connect with is Cloudscape yet to Oracle, unless you make
    changes to the original ConnectionPool in the examples. Anyhow, please
    show
    us your configuration of the ConnectionPool used when this error pops.
    "Raj" <[email protected]> wrote in message
    news:[email protected]...
    Could not create pool connection.The DBMS driver exceptionwas:java.sql.SQLException:
    ORA-01017: invalid username/password
    Even though I could able to connect to Oracle database using correctuserid,password
    and HostString using OracleClient, I couldnt able to do withconnectionpool. Here
    is the error message..
    <Jan 21, 2003 2:27:50 AM PST> <Notice> <WebLogicServer> <Starting WebLogicAdmin
    Server "examplesServer" for domain "examples">
    Starting Loading jDriver/Oracle .....
    ---------- LOGIN ERROR CODE: 1017
    ---------- LOGIN ERROR CODE: 1017
    <Jan 21, 2003 2:28:06 AM PST> <Error> <JDBC> <Cannot startup connectionpool "or
    aclePool" weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: ORA-01017: invalid username/password; logondenied - (Obj
    ectel/********@ora8i)
    atweblogic.db.oci.OciConnection.getLDAException(OciConnection.java:164)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:112)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:193)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:134)
    atweblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
    cator.java:698)
    atweblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
    ava:282)
    atweblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:623)
    atweblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
    atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    atweblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    atweblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    atweblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    java:621)
    atweblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:359)
    atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
    atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
    at $Proxy45.updateDeployments(Unknown Source)
    atweblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2761)
    atweblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:370)
    atweblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:160)
    at java.lang.reflect.Method.invoke(Native Method)
    atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    java:621)
    atweblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:359)
    atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
    atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
    at $Proxy64.start(Unknown Source)
    atweblogic.management.configuration.ApplicationManagerMBean_CachingStub
    start(ApplicationManagerMBean_CachingStub.java:480)
    atweblogic.management.Admin.startApplicationManager(Admin.java:1180)
    at weblogic.management.Admin.finish(Admin.java:590)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
    at weblogic.Server.main(Server.java:35)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:209)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:134)
    atweblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
    cator.java:698)
    atweblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
    ava:282)
    atweblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:623)
    atweblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
    atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    atweblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    atweblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    atweblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    java:621)
    atweblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:359)
    atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
    atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
    at $Proxy45.updateDeployments(Unknown Source)
    atweblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2761)
    atweblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:370)
    atweblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:160)
    at java.lang.reflect.Method.invoke(Native Method)
    atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    java:621)
    atweblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:359)
    atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
    atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
    at $Proxy64.start(Unknown Source)
    atweblogic.management.configuration.ApplicationManagerMBean_CachingStub
    start(ApplicationManagerMBean_CachingStub.java:480)
    atweblogic.management.Admin.startApplicationManager(Admin.java:1180)
    at weblogic.management.Admin.finish(Admin.java:590)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
    at weblogic.Server.main(Server.java:35)
    >
    <Jan 21, 2003 2:28:14 AM PST> <Notice> <Management> <Application Pollerstarted
    for development server.>
    <Jan 21, 2003 2:28:19 AM PST> <Notice> <WebLogicServer> <ListenThreadlistening
    on port 7001>
    <Jan 21, 2003 2:28:19 AM PST> <Notice> <WebLogicServer> <SSLListenThreadlisteni
    ng on port 7002>
    <Jan 21, 2003 2:28:20 AM PST> <Notice> <Management> <Starting discoveryof
    Manag
    ed Server... This feature is on by default, you may turn this off bypassing -Dw
    eblogic.management.discover=false>
    <Jan 21, 2003 2:28:20 AM PST> <Notice> <WebLogicServer> <Started WebLogicAdmin
    Server "examplesServer" for domain "examples" running in DevelopmentMode>

  • Java.sql.SQLException: statement handle not executed

    hello,
    i am calling a stored procedure and its returns a REF CURSOR and i am getting intermittent exceptions below,
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
    and
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxxx_pkg(?,?,?)}]; SQL state [99999]; error code [17009]; Closed Statement; nested exception is java.sql.SQLException: Closed Statement
    any clue what could be the issue,
    Regards
    GG

    its pretty simple have a java class calling hibernateTemplate's findByNamedQueryAndNamedParam method by passing the procedure name and binding parameters/values, and here is the stack
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
    at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
    at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNamedParam(HibernateTemplate.java:1006)
    Caused by: java.sql.SQLException: statement handle not executed
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403)
    at oracle.jdbc.driver.T4CStatement.doDescribe(T4CStatement.java:701)
    at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3355)
    at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:2009)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:494)
    at org.hibernate.type.StringType.get(StringType.java:18)
    at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163)
    at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154)
    at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
    at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2091)
    at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
    at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
    at org.hibernate.loader.Loader.getRow(Loader.java:1206)
    at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
    at org.hibernate.loader.Loader.doQuery(Loader.java:701)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
    at org.hibernate.loader.Loader.doList(Loader.java:2217)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2108)
    at org.hibernate.loader.Loader.list(Loader.java:2103)
    at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
    at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1696)
    at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
    at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
    at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1015)
    at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)

  • ERROR:DBCP borrowObject failed: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection

    Does anyone know what this error means?I have already installed Analyzer 6.5 on Win NT, on locally installed Tomcat web server and the oracle 9i database is on a solaris box.I think the problem is it is not able to connect to the oracle repository but I don't know how to fix it. Thanks,Haroon

    Joe,
    It may happen during testOnReserve, too.
    Slava
    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]..
    That means the Oracle URL you supplied to the pool is incorrect forconnecting to the
    DBMS you want. If the same pool definition works sometimes and sometimesnot,
    then it's an oracle problem with rapid connection requests. Make the poolmake all it's
    connections at startup, by setting init=max, and this shouldn't happen.
    Joe
    Najib wrote:
    Hi,
    I am using a WebLogic Server 5.1. I created a connection pool to access
    Oracle DB 8.1.7. It works fine but some times i have this pb :
    Tue Apr 16 08:35:37 GMT 2002:<I> <JDBC Pool> Sleeping increateResource()
    SQLException Pool connect failed: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Io exception: The Network Adapter could notestablish the connection
    atoracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    atoracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    atoracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
    atoracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:260)
    atoracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    atoracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connection
    EnvFactory.java:164)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Connection
    EnvFactory.java:123)
    can some one help me please.
    thinx.

  • Java.sql.SQLException: Io exception: Connection Refused

    Hi,
    Got struck in this since yesterday. I am trying to connect to an Oracle server and the code is pretty much simple and am reproducing the relevant portion here.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = null;
    try {
    conn = DriverManager.getConnection("jdbc:oracle:thin:@host_IP:1521:****","****","****");
    } catch(Exception e) { System.out.println(e); }
    conn.setAutoCommit(true);
    Statement s = conn.createStatement();
    ResultSet rs;
    It gives me the following exception.
    >>
    java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12500)(ERROR_STACK=(ERROR=(CODE=12500)(EMFI=4))(ERROR=(CODE=12560)(EMFI=4))(ERROR=(CODE=530)(EMFI=4))(ERROR=(BUF='32-bit Windows Error: 2: No such file or directory'))))
    Exception in thread "main" java.lang.NullPointerException
    at Test.main(Test.java:17)
    <<
    The line 17 is actually the statement,
    conn.setAutoCommit(true);
    Any help is highly appreciated.
    Thanks,
    Baskaran

    Hi Baskaran
    Actually i had the same problem which you are currently facing.
    Iam on unix box and when i tried to connect to DB for the first time using the same code piece which you wrote i got the same error and after breaking my head i came to know that the Oracle_SID i gave is incorrect
    Please check these entries in your code
    conn = DriverManager.getConnection("jdbc:oracle:thin:@host_IP:1521:*DBUsername,DBPassword,Oracle_SID*);
    To know oracle SID on unix box type this command
    $ ps -ef|grep -i smon
    oracle 740 1 0 ������� ? 1:27 ora_smon_support
    oracle 29685 29681 0 17:24:47 pts/12 0:00 grep -i smon
    $ echo $ORACLE_SID
    support
    $
    On windows box logon to the Oracle Box (i.e., on which oracle is installed) and open the regedit and search for ORACLE_SID.
    Also make sure you give the correct oracleIPAddress, dbusername, dbpassword.
    Hope it will work fine.
    Regards,
    Imas

  • Java.sql.SQLException: Non supported character set: oracle-character-set-17

    Hi,
    i am trying to execute an Oracle procedure from JDBC. The procedure accepts a Nested table as an input parameter. Definition of the nested table is given below.
    Database – Oracle 10g.
    Application Server – JBOSS 4.2.1
    I get the following exception._
    java.sql.SQLException: Non supported character set: oracle-character-set-178
    at oracle.gss.util.NLSError.throwSQLException(NLSError.java:46)
    I.  JDBC  Code_
    Session s = HibernateUtil.getSession();
    Transaction tr = s.beginTransaction();
    con=s.connection();
    oraConn = (OracleConnection) con.getMetaData().getConnection();
    TableObject obj=new TableObject();
    obj.setId(new Integer(123));//Tested ok, stroing in DB
    obj.setDescr("test"); // this line throwing error
    obj.setCre_user(new Integer(456));
    obj.setUpd_user(new Integer(789));
    obj.setXfr_flag("Y");
    ArrayList al=new ArrayList();
    al.add(obj);
    Object[] objAray = al.toArray();
    ArrayDescriptor arrayDescriptor =ArrayDescriptor.createDescriptor("T_TEST_SYN", oraConn);
    ARRAY oracleArray = new ARRAY(arrayDescriptor, oraConn, objAray);
    cs = (OracleCallableStatement)oraConn.prepareCall("call PKG_OBJ_TEST.accept_ui_input(?) ");
    cs.setArray(1, oracleArray);
    cs.execute();
    tr.commit();
    public class TableObject implements SQLData{
    private String sql_type = "T_OBJ_TEST";
    private int id;
    private String descr;
    //private Date cre_date;
    private int cre_user;
    //private Date upd_date;
    private int upd_user;
    private String xfr_flag;
    public TableObject()
    public TableObject (int id,String descr,int cre_user,int upd_user,String xfr_flag)
    // this.sql_type = sql_type;
    this.id = id;
    this.descr = descr;
    // this.cre_date=cre_date;
    this.cre_user=cre_user;
    //this.upd_date=upd_date;
    this.upd_user=upd_user;
    this.xfr_flag=xfr_flag;
    public String getSQLTypeName() throws SQLException {
    return "T_OBJ_TEST";
    public void readSQL(SQLInput stream, String typeName) throws SQLException {
    //sql_type = typeName;
    id=stream.readInt();
    descr=stream.readString();
    //cre_date=stream.readDate();
    cre_user=stream.readInt();
    //upd_date=stream.readDate();
    upd_user=stream.readInt();
    xfr_flag=stream.readString();
    public void writeSQL(SQLOutput stream) throws SQLException {
    try {
    stream.writeInt(this.id);
    System.out.println("Iddddd");
    stream.writeString(this.descr);
    System.out.println("Desccccccccccccccc"+":"+descr);
    //stream.writeDate(cre_date);
    stream.writeInt(this.cre_user);
    System.out.println("userrrrrrrrrrrr");
    //stream.writeDate(upd_date);
    stream.writeInt(this.upd_user);
    System.out.println("upd uiserrrrrrrrrrr");
    stream.writeString(this.xfr_flag);
    System.out.println("flagggggggggggggggggggg"+xfr_flag);
    }catch (SQLException se) {
    System.out.println("Table object sql exception");
    se.printStackTrace();
    catch (Exception e) {
    System.out.println("Table object exception");
    * @return the id
    public int getId() {
    return id;
    * @param id the id to set
    public void setId(Object obj) {
    Integer iobj= (Integer)obj;
    this.id =iobj.intValue();
    * @return the descr
    public String getDescr() {
    System.out.println("getDescr "+descr);
    return descr;
    * @param descr the descr to set
    public void setDescr(Object obj) {
    System.out.println("setDescr "+obj);
    String sobj = (String)obj;
    this.descr=sobj.toString();
    System.out.println("setDescr "+obj);
    * @return the cre_user
    public int getCre_user() {
    return cre_user;
    * @param cre_user the cre_user to set
    public void setCre_user(Object obj) {
    Integer iobj=(Integer)obj;
    this.cre_user = iobj.intValue();
    * @return the upd_user
    public int getUpd_user() {
    return upd_user;
    * @param upd_user the upd_user to set
    public void setUpd_user(Object obj) {
    Integer iobj=(Integer)obj;
    this.upd_user = iobj.intValue();
    * @return the xfr_flag
    public String getXfr_flag() {
    return xfr_flag;
    * @param xfr_flag the xfr_flag to set
    public void setXfr_flag(Object obj) {
    this.xfr_flag = (String)xfr_flag;
    II.  Oracle database object details
    Details of Object and Nested table created in the database.
    T_TEST_SYN is a public synonym created for t_tab_obj_test
    CREATE OR REPLACE TYPE t_obj_test as object (
    id number(10),
    descr varchar2(100),
    --cre_date  date,
    cre_user number(10),
    --upd_date  date,
    upd_user number(10),
    xfr_flag varchar2(1),
    CONSTRUCTOR FUNCTION t_obj_test ( id IN NUMBER DEFAULT NULL,
    descr IN varchar2 default null,
    --cre_date  in date      default null,
    cre_user in number default null,
    --upd_date  in date      default null,
    upd_user in number default null,
    xfr_flag in varchar2 default null ) RETURN SELF AS RESULT ) ;
    CREATE OR REPLACE TYPE BODY t_obj_test as
    CONSTRUCTOR FUNCTION t_obj_test ( id IN NUMBER DEFAULT NULL,
    descr IN varchar2 default null,
    --cre_date  in date      default null,
    cre_user in number default null,
    --upd_date  in date      default null,
    upd_user in number default null,
    xfr_flag in varchar2 default null ) RETURN SELF AS RESULT IS
    BEGIN
    SELF.id := id ;
    SELF.descr := descr ;
    --SELF.cre_date  := cre_date ;
    SELF.cre_user := cre_user ;
    --SELF.upd_date  := cre_date ;
    SELF.upd_user := cre_user ;
    SELF.xfr_flag := xfr_flag ;
    RETURN ;
    END ;
    END ;
    CREATE OR REPLACE TYPE t_tab_obj_test AS TABLE OF t_obj_test ;
    CREATE OR REPLACE PACKAGE BODY PKG_OBJ_TEST AS
    PROCEDURE accept_ui_input ( p_tab_obj_test in T_TAB_OBJ_TEST ) IS
    BEGIN
    FOR row IN p_tab_obj_test.First .. p_tab_obj_test.LAST
    LOOP
    INSERT INTO OBJ_TEST ( ID,
    DESCR,
    CRE_DATE,
    CRE_USER,
    UPD_DATE,
    UPD_USER,
    XFR_FLAG )
    VALUES ( p_tab_obj_test(row).ID,
    p_tab_obj_test(row).DESCR,
    NULL,
    p_tab_obj_test(row).CRE_USER,
    NULL,
    p_tab_obj_test(row).UPD_USER,
    p_tab_obj_test(row).XFR_FLAG ) ;
    END LOOP ;
    COMMIT ;
    END accept_ui_input ;
    END PKG_OBJ_TEST;
    /

    Check your CLASSPATH enviroment variable. Try to add something like c:\Ora10g\jlib\orai18n.jar.
    From "JDBC Developer’s Guide and Reference":
    orai18n.jar
    Contains classes for globalization and multibyte character sets support
    This solved the same error in my case.

  • Java.sql.SQLException: No operations allowed after connection closed

    Hi all
    I was trying the jakarta DBCP pool for managing my connections to Mysql(4.0.17-standard ). I let tomcat to manage the pool by specifying datasource in server.xml and web.xml. Everything works fine if there are only a few transactions. But when the number of queries increse, I get an exception like
    java.sql.SQLException: No operations allowed after connection closed.
    Connection was closed explicitly by the application at the following location:
    ** BEGIN NESTED EXCEPTION **
    java.lang.Throwable
    STACKTRACE:
    java.lang.Throwable
            at com.mysql.jdbc.Connection.close(Connection.java:1061)
            at org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnec
    tion.java:124)
            at org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poola
    bleConnectionFactory.java:196)
            at org.apache.commons.pool.impl.GenericObjectPool.returnObject(Unknown S
    ource)
            at org.apache.commons.dbcp.AbandonedObjectPool.returnObject(AbandonedObj
    ectPool.java:140)
            at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.j
    ava:110)
    ......I then tried the Connecion Pool manually with DBCP to check it is a problm with tomcat or ont. Still the exception comes after a few transactions. I re-checked the code and I am closing all connections in finally block. I searched in net for a solution, but couldnt find any. Is that a problm with mysql? has anyone experienced it? Any help will be greatly appreciated
    thanks
    boolee

    Odd that Throwable is the exception logged. What does your finally block actually look like? As an experiment, what happens if you execute the following line of hypothetical code in your 'finally' block?
    finally {
      System.out.println(conn.getClass().getName());
    }- Saish

  • Java.sql.SQLException: Error while trying to retrieve text for error ORA-24

    Hi All,
    Am having serious problem with ORA-24327 and the behavior is very very unpredictable. I have couple of environment where the same error comes in different context. The recent one was surprising. I have describe bellow the environment configuration and the stack trace. The error which surprised me was when I use type � 3 driver while starting weblogic I get ORA �24327 but when I use Type �4 it starts properly. If you could kindly provide solution it would be great help. I would also appreciate if u can provide information which driver to use where performance is the major concern. I would also appreciate if u could provide feed-back from the industry about booth the driver. Apart from that I have couple have environment where it occurs when 10/12 user access simultaneously. All the open connection is closed in program properly still am getting the error.
    Thanks in anticipation.
    Cheers,
    Tapas
    Environment
    OS - SunOS 5.8 Generic_108528-07 sun4u sparc SUNW,Ultra-Enterprise
    JDK - Solaris VM (build Solaris_JDK_1.2.2_07, native threads, sunwjit)
    Weblogic - 5.1.0 Service Pack 9 04/05/2001 14:59:53 #105983
    Oracle � 8.1.6
    Delaying 10 seconds before making a beuatpool pool connection.
    Pool 1 (Type �3 )
    weblogic.jdbc.connectionPool.beuatpool=\
    url=jdbc:weblogic:oracle,\
    driver=weblogic.jdbc.oci.Driver,\
    loginDelaySecs=10,\
    initialCapacity=10,\
    maxCapacity=20,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=10,\
    refreshMinutes=10,\
    testTable=dual,\
    props=user=xxx;password=xxx;server=xxxx
    Pool 2(Type �4)
    weblogic.jdbc.connectionPool.thinPool=\
    url=jdbc:oracle:thin:@xxx:1521:xxx,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=1,\
    maxCapacity=10,\
    capacityIncrement=1,\
    allowShrinking=true,\
    shrinkPeriodMins=15,\
    refreshMinutes=15,\
    testTable=dual,\
    props=user=xxx;password=xxx;server=xxx:1521:xxx
    allow=everyone
    ---------- LOGIN ERROR CODE: 24327
    java.sql.SQLException: Error while trying to retrieve text for error ORA-24327 �
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:149)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:109)
    at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
    e)
    at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:330)
    at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)
    ---------- LOGIN ERROR CODE: 24327
    ---------- LOGIN ERROR CODE: 24327
    Fri Aug 31 00:57:22 GMT-05:00 2001:<I> <JDBC Pool> Sleeping in createResource()
    Fri Aug 31 00:57:23 GMT-05:00 2001:<E> <JDBC Pool> Failed to create connection p
    ool "beuatpool"
    weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Error while trying to retrieve text for error ORA-24327 -
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
    at java.sql.DriverManager.getConnection(Compiled Code)
    at java.sql.DriverManager.getConnection(DriverManager.java:137)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:172)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:109)
    at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
    e)
    at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:330)
    at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at weblogic.common.ResourceException.<init>(ResourceException.java:18)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:182)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:109)
    at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
    e)
    at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:330)
    at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at weblogic.common.ResourceException.<init>(ResourceException.java:18)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:125)
    at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
    e)
    at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:330)
    at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)

    Hi,
    I guess you can try some of these:
    - Make sure you're not missing an entry inside your tnsnames.ora file. Thin driver does not require the information inside that file, as opposed to Weblogic's OCI driver. If you are able to connect to the DB using a thin driver, then the problem is most probably (WL)driver-related.
    - Make sure you've properly configured the DB user / password inside your weblogic.properties (config.xml if WL6+).
    - Make sure you're able to access all drivers and classes required (PATH, CLASSPATH, etc...)
    - Make sure the OCI driver version you are using is fully compatible with the Oracle (server) version you are pointing to.
    - Try to access the DB user through some other client (for instance, SQLPlus*).
    Hope this is of some help,
    Freddy.

  • Java.sql.SQLException: Error accessing jdbc driver

    Hi,
    We are using WebLogic Server 7.0 as Application Server.
    We now create a connection pool named regPool and
    a Tx datasource named regDS.
    When we get the connection from the datasource, exception occurred.
    java.sql.SQLException: Error accessing jdbc driver: driverURL =
    jdbc:weblogic:pool:regPool, props = {enableTwoPhaseCommit=false,
    jdbcTxDataSource=true, connectionPoolID=regPool}
    at
    weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:323)
    at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:377)
    at weblogic.jdbc.jts.Driver.connect(Driver.java:129)
    at
    weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java
    :265)
    So I guess that why we can't use CMP for finding data. Here is the error when we call the finder.
    javax.ejb.FinderException: Exception in findAllEmr while preparing or
    executing statement: 'null'
    java.sql.SQLException: Cannot obtain connection after 30 seconds. ,
    Exception = Access not allowed
    java.sql.SQLException: Cannot obtain connection after 30 seconds. ,
    Exception = Access not allowed
    at
    weblogic.jdbc.jts.Connection.wrapAndThrowSQLException(Connection.java:694)
    According to the exception message, it looks
    like the connection fail between WLS and Oracle 9.2.
    Here is a scenario I think you should need to know.
    I change the table-name in the weblogic-cmp-rdbms-jar.xml
    to a name that doesn't exist in the database.
    Then, re-package the EJB, copy it to server and restart the server.
    A exception occurred that says the table doesn't exist.
    So, in this case, it looks like the datasource works and
    connection is fine.
    Any recommendation will be appreciated.
    Jimmy Chang

    Hi!
    I am a default user to the databse server. I connect to the database with '\' as the username and blank passoword(I mean with Network authentication may be).When I am trying to create connection using
    con = DriverManager.getConnection("jdbc:oracle:thin:@DRACINAL2:BSAJ", "/","" )
    it gives me followint error
    ava.sql.SQLException: Null user or password not supported in THIN driver
         void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
         void oracle.jdbc.dbaccess.DBError.throwSqlException(int, java.lang.Object)
         void oracle.jdbc.dbaccess.DBError.check_error(int)
         oracle.jdbc.dbaccess.DBConversion oracle.jdbc.ttc7.TTC7Protocol.logon(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
         void oracle.jdbc.driver.OracleConnection.<init>(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
         java.sql.Connection oracle.jdbc.driver.OracleDriver.getConnectionInstance(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
         java.sql.Connection oracle.jdbc.driver.OracleDriver.connect(java.lang.String, java.util.Properties)
         java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties, java.lang.ClassLoader)
         java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String)
         void textPack.GenTextFile.main(java.lang.String[])
    How should I go about it?
    Thanks for your help.
    -Sreekanth Varidhireddy

  • Java.sql.SQLException: Invalid precision value. Cannot be less than zero

    Hi,
    In my portlet application have several jsf tables which bind to several oracle tables. I have tested the portlet in pluto and tried to deploy it on liferay. However, I get an exception stating:
    java.sql.SQLException: Invalid precision value. Cann
    ot be less than zero
    What could this exception mean? Has anyone else encountered this?
    Marc
    P.S. The trace is shown below:
    Feb 6, 2007 12:34:56 AM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: java.sql.SQLException: Invalid precision value. Cann
    ot be less than zero
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Cach
    edRowSetDataProvider.java:343)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(Ca
    chedRowSetDataProvider.java:300)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(Cache
    dRowSetDataProvider.java:624)
    at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys(TableRowGroup.
    java:806)
    at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys(TableR
    owGroup.java:429)
    at com.sun.rave.web.ui.component.TableRowGroup.getRowCount(TableRowGroup
    .java:749)
    at com.sun.rave.web.ui.component.Table.getRowCount(Table.java:307)
    at com.sun.rave.web.ui.renderer.TableRenderer.renderTitle(TableRenderer.
    java:400)
    at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(TableRenderer.
    java:123)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.jav
    a:683)

    I've dug deeper into this problem and am able reproduce the error in the Pluto server. To reproduce this error, I modified my Oracle jdbc driver from the JSC embedded driver (smoracle.jar) to the Oracle native driver (ojdbc14.jar). Now, I am getting the exception in my Sun Application Server:
    What is the difference between ojdbc14.jar and smoracle.jar that could cause this problem? What can I do so that I can fix this problem for ojdbc14.jar?
    Thanks,
    Marc
    P.S.
    The problem is with the clob column (DOR_NOTE_TX). The stack trace is:
    [#|2007-02-06T09:00:53.663-0800|INFO|sun-appserver-pe8.2|javax.enterprise.system.stream.out|_ThreadID=16;|
    Reader executing query ps=0 SELECT DOR_NOTE_DT, DOR_NOTE_TX FROM DOR.DOR_NOTE_DATA WHERE DOR_NOTE_CD='SECURITY' AND TO_CHAR(DOR_Note_Dt, 'mm/dd/yyyy') = '02/05/2007'
    No Params|#]
    [#|2007-02-06T09:00:53.679-0800|WARNING|sun-appserver-pe8.2|javax.enterprise.system.stream.err|_ThreadID=16;|
    java.sql.SQLException: Invalid precision value. Cannot be less than zero
    Message was edited by:
    marcnikko

  • Java.sql.SQLException: ORA-01002: fetch out of sequence

    We are getting 'Fetch out of sequence' error whrn we try to execute a 'for update' query.
    We are first inserting values into the DLX_ASSET table and if there is image to be inserted the particualr row is fetched using the query. The insert query inserts values into the database.
    'SELECT HIGH_RES_IMAGE FROM DLX_ASSET WHERE ASSET_ID ="+assetId+ " FOR UPDATE'. While executing this query we are getting this exception. This is not happening when we are trying it from our local machine. But its happening everywhere else where its deployed.
    We are using Websphere Application Server 6 and Oracle 9i. We have set autommit to false before the method is called and are commiting the transaction only after the whole set of queries are executed.
    Please see below the code snippet,
                                  /* UPDATE HIGH RESOLUTION IMAGE INTO DLX_ASSET TABLE */
                                  logger.logInfo("inside IF condition ,,,,,,,,,,,"+assetId);
                                  String query ="SELECT HIGH_RES_IMAGE FROM DLX_ASSET WHERE ASSET_ID ="+assetId+ " FOR UPDATE ";
                                  logger.logInfo("QUERY is...."+query);
                                  logger.logInfo("Connection closed:"+ con.isClosed());
                                  psHighResObj =(OraclePreparedStatement) con.prepareStatement(query);
                                  logger.logInfo("inside updating high res AFTER prepare statement"+psHighResObj);
                                  rsHighRes = (OracleResultSet) psHighResObj.executeQuery();                              logger.logInfo("inside updating high res image 1");
                                  while (rsHighRes.next()) {
                                       logger.logInfo("inside while high res image 2");
                                       highResImg =(OrdImage)rsHighRes.getCustomDatum(1,OrdImage.getFactory());
                                       highResImg.loadDataFromInputStream(assetCustomTo.getHighResolutionImageIn());
                                       assetCustomTo.getHighResolutionImageIn().close();
                                       logger.logInfo("before update high res");
                                       UPDATE_QRY = "UPDATE DLX_ASSET SET HIGH_RES_IMAGE = ? WHERE ASSET_ID=" + assetId;
                                       stmt1 =(OraclePreparedStatement) con.prepareCall(UPDATE_QRY);
                                       highResImg.setSource(assetCustomTo.getHighresFileType(),"",assetCustomTo.getSys_file_name1());
                                       highResImg.setContentLength(Integer.parseInt(assetCustomTo.getHighresFileSize()));
                                       highResImg.setProperties();
                                       logger.logInfo(" after update query asset id: " + assetId);
                                       logger.logInfo(" query high res:: " + UPDATE_QRY);
                                       stmt1.setCustomDatum(1, highResImg);
                                       stmt1.execute();
                                       logger.logInfo("after update high res");
                                  //checking if thumbnail is present: if bulk upload thumb nail won't be present
    the exception is occuring in the line 'rsHighRes = (OracleResultSet) psHighResObj.executeQuery();'
    This is exception trace
    java.sql.SQLException: ORA-01002: fetch out of sequence
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java(Inlined Compiled Code))
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java(Compiled Code))
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java(Compiled Code))
    at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1198)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2400)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
    at com.deluxe.imax.dataaccess.impl.extended.TelevisionAssetCustomDAOImpl.createWebElectronicTrailersAsset(Unknown Source)
    at com.deluxe.imax.business.television.ejb.TelevisionFacadeJBean.createWebElectronicTrailersAsset(Unknown Source)
    at com.deluxe.imax.business.television.handler.TelevisionHandler.createWebElectronicTrailersAsset(Unknown Source)
    at com.deluxe.imax.business.television.action.WebNewAction.processExecute(Unknown Source)
    at com.deluxe.imax.business.framework.BaseAction.execute(Unknown Source)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1284)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1241)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136)
    at com.deluxe.imax.business.framework.security.SecurityFilter.doFilter(Unknown Source)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:671)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3003)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)
    at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1958)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:88)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.ja
    Please share your feedback.
    Thanks in advance!
    Edited by: Sanu Sasidharan on May 11, 2011 4:26 AM

    Hi Peter,
    We tried pointing to the same database from local as well as QA. Works from local but not from QA.
    assetId is the generated primary key in the same method.
    Yes the exception is thrown from execute statement itself. the logger put just after the execute is not coming.
    This is the method
    public boolean createWebElectronicTrailersAsset(TelevisionResultDTO[] teleResultDTO, OracleConnection con) throws DAOException {
              methodName ="createWebElectronicTrailersAsset(TelevisionResultDTO[] teleResultDTO,OracleConnection con) :: ";
              //Value to be returned by method
              boolean createInd = false;
              OraclePreparedStatement psHighResObj = null;
              OraclePreparedStatement psThumbnailObj = null;
              OracleResultSet rsHighRes = null;
              OracleResultSet rsThumbnail = null;
              PreparedStatement psmt = null;
              OraclePreparedStatement stmt1 = null;
              OraclePreparedStatement stmt2 = null;
              OrdImage highResImg = null;
              OrdImage thumbnailImg = null;
              ImaxGroupsTO groupsTO = null;
              try {
                   long tvAssetId = 0;
                   long assetId = 0;
                   long cst_dwnld_asset_id = 0;
                   AssetCustomTO assetCustomTo = null;
                   AssetCustomDownloadTO assetCustDwnldTO = null;
                   CustomTVAssetTO tvAssetTo = null;
                   String DLX_ASSET_QRY = "";
                   String UPDATE_QRY = "";
                   String DLX_ASSET_TV_QRY = "";
                   String DLX_CUSTOM_DOWNLOAD_ASSET = "";
                   int k = 1;
                   for (int iCount = 0; iCount < teleResultDTO.length; iCount++) {
                        tvAssetId = (int) OraclePKGenerator.getInstance().getKey(InternalConstants.TV_ASSET_SEQUENCE);
                        assetId =(long) OraclePKGenerator.getInstance().getKey(InternalConstants.ASSET_SEQUENCE);
                        assetCustomTo = teleResultDTO[iCount].getAssetCustomTO();
                        tvAssetTo = teleResultDTO[iCount].getTv_Asset();
                        groupsTO= teleResultDTO[iCount].getGroupsTO();
                        if (assetCustomTo.getHighResolutionImageIn() != null) {
                             DLX_ASSET_QRY ="INSERT INTO DLX_ASSET("
                                                      + "ASSET_ID,"
                                                      + "CREATED_BY,"
                                                      + "CREATED_DATE,"
                                                      + "REVISED_BY,"
                                                      + "REVISED_DATE,"
                                                      + "FILE_NAME,"
                                                      + "FILE_SIZE,"
                                                      + "FILE_TYPE,"
                                                      + "SYS_FILE_NAME,"
                                                      + "HIGH_RES_IMAGE,"
                                                      + "THUMBNAIL_IMAGE,"
                                                      + "ASSET_STATUS_ID,"
                                                      + "DMX_PART1_REF,"
                                                      + "DMX_PRODUCT_ID_REF,"
                                                      + "DMX_PRODUCT_DESC_REF,"
                                                      + "ASSET_AVAIL_1_IND,"
                                                      + "DMX_PART_2,"
                                                      + "DMX_PRODUCT_2,"
                                                      + "DMX_PRODUCT_DESC_2,"
                                                      + "ASSET_AVAIL_2_IND,"
                                                      + "EFFECTIVE_DATE,"
                                                      + "EXPIRATION_DATE,"
                                                      + "FILE_NAME1,"
                                                      + "SYS_FILE_NAME1,"
                                                      + "ASSET_TYPE_ID,"
                                                      + "MATERIALS_CATEGORY,"
                                                      + "PART_1_NOTES,"
                                                      + "PART_2_NOTES,"
                                                      + "PHY_ORDER_STATUS)"
                                                      + "VALUES (?,?,SYSDATE,?,SYSDATE,?,?,?,?,ORDSYS.ORDImage.init(),"
                                                      +" ORDSYS.ORDImage.init(),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                        }else if(){
    // condition if images are not uploaded
                             psmt = con.prepareStatement(DLX_ASSET_QRY);
                             k=1;
                             psmt.setLong(k++, assetId);
                             psmt.setString(k++, assetCustomTo.getCreated_by());
                             psmt.setString(k++, assetCustomTo.getRevised_by());
                             if(assetCustomTo.getAssetTextIn()!=null ){
                                  psmt.setString(k++, assetCustomTo.getFile_name());
                                  psmt.setString(k++, assetCustomTo.getFile_size());
                                  psmt.setString(k++, assetCustomTo.getFile_type());
                                  psmt.setString(k++, assetCustomTo.getSys_file_name());
                                  /* UPLOAD PREVIEW VIDEO FILE INTO FILE SYSTEM .....*/
                                  Util.upLoadFile(assetCustomTo.getAssetTextIn(),assetCustomTo.getSys_file_name());     
                             }else if(assetCustomTo.getAssetTextIn()==null && assetCustomTo.getSys_file_name() != null
                                            && assetCustomTo.getSys_file_name().trim().length() != 0){
                                       psmt.setString(k++, assetCustomTo.getFile_name());
                                       psmt.setString(k++, assetCustomTo.getFile_size());
                                       psmt.setString(k++, assetCustomTo.getFile_type());
                                       psmt.setString(k++, assetCustomTo.getSys_file_name());
                             } else{
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                             psmt.setLong(k++, assetCustomTo.getAsset_status_id());
                             if(assetCustomTo.getDmx_product_desc_1()!=null && assetCustomTo.getDmx_product_desc_1().trim().length()!=0){
                                  psmt.setLong(k++, assetCustomTo.getDmx_part_1());
                                  psmt.setLong(k++, assetCustomTo.getDmx_productId_1());
                                  psmt.setString(k++, assetCustomTo.getDmx_product_desc_1());
                                  psmt.setString(k++, assetCustomTo.getAsset_order_status_1());                    
                             }else{
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getDmx_product_desc_2()!=null && assetCustomTo.getDmx_product_desc_2().trim().length()!=0){
                                  psmt.setLong(k++, assetCustomTo.getDmx_part_2());
                                  psmt.setLong(k++, assetCustomTo.getDmx_productId_2());
                                  psmt.setString(k++, assetCustomTo.getDmx_product_desc_2());
                                  psmt.setString(k++, assetCustomTo.getAsset_order_status_2());                    
                             }else{
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getEffectiveDate()!=null){
                                  psmt.setTimestamp(k++, assetCustomTo.getEffectiveDate());
                             }else{
                                  psmt.setNull(k++,Types.TIMESTAMP);
                             if(assetCustomTo.getExpirationDate()!=null){
                                  psmt.setTimestamp(k++, assetCustomTo.getExpirationDate());     
                             }else{
                                  psmt.setNull(k++,Types.TIMESTAMP);
                             psmt.setString(k++, assetCustomTo.getHighresFileName());     
                             if(assetCustomTo.getSys_file_name1()!=null && assetCustomTo.getSys_file_name1().trim().length()!=0){
                                  psmt.setString(k++, assetCustomTo.getSys_file_name1());
                             }else{
                                  psmt.setNull(k++, Types.VARCHAR);
                             psmt.setLong(k++, assetCustomTo.getAsset_type_id());
                             psmt.setLong(k++, assetCustomTo.getMaterialCategory());
                             if(assetCustomTo.getPart_notes_1()!=null && assetCustomTo.getPart_notes_1().trim().length()!=0){
                                  psmt.setString(k++, assetCustomTo.getPart_notes_1());
                             }else{
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getPart_notes_2()!=null && assetCustomTo.getPart_notes_2().trim().length()!=0){
                                  psmt.setString(k++, assetCustomTo.getPart_notes_2());
                             }else{
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getDmx_product_desc_1()!=null){
                                  psmt.setLong(k++,assetCustomTo.getPhy_asset_status());     
                             }else{
                                  psmt.setNull(k++,Types.INTEGER);
                             psmt.execute();
                             if (assetCustomTo.getHighResolutionImageIn() != null) {
                                  /* UPDATE HIGH RESOLUTION IMAGE INTO DLX_ASSET TABLE */
                                  logger.logInfo("inside IF condition ,,,,,,,,,,,"+assetId);
                                  String query ="SELECT HIGH_RES_IMAGE FROM DLX_ASSET WHERE ASSET_ID ="+assetId+ " FOR UPDATE ";
                                  psHighResObj =(OraclePreparedStatement) con.prepareStatement(query);
                                  logger.logInfo("inside updating high res AFTER prepare statement"+psHighResObj);
                                  rsHighRes = (OracleResultSet) psHighResObj.executeQuery();
                                  while (rsHighRes.next()) {
                                       highResImg =(OrdImage)rsHighRes.getCustomDatum(1,OrdImage.getFactory());
                                       highResImg.loadDataFromInputStream(assetCustomTo.getHighResolutionImageIn());
                                       assetCustomTo.getHighResolutionImageIn().close();
                                       UPDATE_QRY = "UPDATE DLX_ASSET SET HIGH_RES_IMAGE = ? WHERE ASSET_ID=" + assetId;
                                       stmt1 =(OraclePreparedStatement) con.prepareCall(UPDATE_QRY);
                                       highResImg.setSource(assetCustomTo.getHighresFileType(),"",assetCustomTo.getSys_file_name1());
                                       highResImg.setContentLength(Integer.parseInt(assetCustomTo.getHighresFileSize()));
                                       highResImg.setProperties();
                                       stmt1.setCustomDatum(1, highResImg);
                                       stmt1.execute();
    The connection in the method is passed from the service layer.
    Thanks
    Edited by: Sanu Sasidharan on May 12, 2011 2:30 AM

  • Java.sql.SQLException: Invalid column name

    hi,
    i am using query with join and select column with different aliases,
    sqlQuery
    SELECT client_data.image as IMAGE, franchise.NAME, franchise.FRANCHISE_ID,
    cityH.city_name as h_city,
    cityO.city_name as o_city,
    cityT.city_name as t_city,
    countryH.country_name as h_country,
    countryO.country_name as o_country,
    countryT.country_name as t_country,
    client.* from client_data, city cityH, city cityT, city cityO, country countryH, country countryT, country countryO, client, franchise where
    cityH.id = client.home_city and
    cityT.id = client.temp_city and
    cityO.id = client.office_city and
    countryH.id = client.HOME_COUNTRY and
    countryO.id = client.office_country and
    countryT.id = client.TEMP_COUNTRY and
    franchise.franchise_id = client.franchise_id and client_data.client_id = client.id and client.id = ?
    while executing that query through JDBC, alias column are not in map like h_city, o_city, t_city are not accessible.
    System.out.println("h_city "+rowSet.getString("h_city"));
    the exception is java.sql.SQLException: Invalid column name.
    Kindly give you valuable comments for that..
    Regards,
    Kashif Bashir

    Hi Balus,
    i fixed it by editing jdbc.properties file like
    jdbc.url=jdbc:mysql://192.168.100.221:3306/myDb?useOldAliasMetadataBehavior=true
    they query is running and returning the whole column i use as allies like h_city (cityH.city_name as h_city).
    Thank for your interest.
    Kashif Bashir
    [email protected]

  • Toplink + Websphere : java.sql.SQLException: DSRA9420E:

    Hello,
    I 'm getting this exception on a Websphere environment using Toplink to access data base. I'm getting the connection from the database using a data source configured in the application server.
    Any help is welcome ...
    java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
    Caused by: java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
         at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reactivate(WSJdbcConnection.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code))
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java(Compiled Code))
         at oracle.toplink.queryframework.SQLCall.prepareStatement(SQLCall.java(Compiled Code))
         ... 60 more
    Caused by: com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
         at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reassociate(WSJdbcConnection.java(Compiled Code))
         at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.associateConnection(WSRdbManagedConnectionImpl.java(Compiled Code))
         at com.ibm.ejs.j2c.MCWrapper.associateConnection(MCWrapper.java(Compiled Code))
         at com.ibm.ejs.j2c.ConnectionManager.reassociateConnectionHandle(ConnectionManager.java(Compiled Code))
         at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))
         at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))

    you mean the WAS configuration for the data source ?
    toplink is configured so as to use the WAS datasource, and use external pooling.
    here is the complete stack trace :
    Caused by: Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.9) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Description de l'exception : java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
    Exception interne : java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
    Code d'erreur : 0
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java(Compiled Code))
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java(Compiled Code))
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java(Compiled Code))
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java(Compiled Code))
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java(Inlined Compiled Code))
         at oracle.toplink.internal.queryframework.CallQueryMechanism.selectOneRow(CallQueryMechanism.java(Compiled Code))
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java(Inlined Compiled Code))
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java(Compiled Code))
         at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java(Compiled Code))
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java(Compiled Code))
         at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java(Compiled Code))
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java(Inlined Compiled Code))
         at oracle.toplink.threetier.ServerSession.internalExecuteQuery(ServerSession.java(Inlined Compiled Code))
         at oracle.toplink.threetier.ClientSession.internalExecuteQuery(ClientSession.java(Compiled Code))
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java(Compiled Code))
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java(Compiled Code))
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java(Compiled Code))
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java(Inlined Compiled Code))
         at oracle.toplink.publicinterface.Session.readObject(Session.java(Compiled Code))
         ... 25 more
    Caused by: java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
         at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reactivate(WSJdbcConnection.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code))
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java(Compiled Code))
         at oracle.toplink.queryframework.SQLCall.prepareStatement(SQLCall.java(Compiled Code))
         ... 45 more
    Caused by: com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
         at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reassociate(WSJdbcConnection.java(Compiled Code))
         at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.associateConnection(WSRdbManagedConnectionImpl.java(Compiled Code))
         at com.ibm.ejs.j2c.MCWrapper.associateConnection(MCWrapper.java(Compiled Code))
         at com.ibm.ejs.j2c.ConnectionManager.reassociateConnectionHandle(ConnectionManager.java(Compiled Code))
         at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))
         at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))
         ... 50 more

  • Java.sql.SQLException: Fail to convert to internal representation:

    HI All,
    I have a procedure hich is taking the Varray ADDR_CONTACT_VA as input which is varray of object .
    ADDR_CONTACT_OBJ [] address = new ADDR_CONTACT_OBJ[20];
    address[0] = new ADDR_CONTACT_OBJ();
    address[0].setOpportunityId(26731);
    address[0].setAddr_ln_1("100, Street");
    address[0].setAddr_ln_2("Cast card Street");
    address[0].setAddr_ln_3("Cast card Street");
    address[0].setAddr_ln_4(null);
    address[0].setAddr_ln_5(null);
    address[0].setAddr_ln_6(null);
    address[0].setAddress_name("GVPN Testing");
    address[0].setAddressType("HQ");
    address[0].setCity("Mumbai");
    address[0].setContact_title("Mr.");
    address[0].setCountry("India");
    address[0].setEmail_contact_id(null);
    address[0].setName_contact_id(null);
    address[0].setOSO_Address_id(124959);
    address[0].setOso_contact_id(317694);
    address[0].setOso_party_site_id(69387);
    address[0].setPincode("470003");
    address[0].setState("Maharashtra");
    address[0].setContact_firstname("First");
    address[0].setContact_lastname("Last");
    address[0].setContact_email(null);
    address[0].setContact_phone_day("91-45234-4534556");
    address[0].setDay_phone_contact_id(287326);
    System.out.println("Vishwa3: after creating an y array");
    ArrayDescriptor desc1 = ArrayDescriptor.createDescriptor("ADDR_CONTACT_VA",nativeConnection);
    System.out.println("Vishwa4: after creating an y array");
    ARRAY input1 = new ARRAY(desc1,nativeConnection,address);
    System.out.println("Vishwa5: after creating an y array");
    %>
    <% proc_stmt = (OracleCallableStatement)nativeConnection.prepareCall("{ call DBP_UPDATE_STATUSCUSTOMER_DETAILS(?,?)}");
    proc_stmt.setArray(1,input1);
    proc_stmt.registerOutParameter(2,OracleTypes.CURSOR);
    System.out.println("Vishwa6: after creating an y array");
    %>
    <% proc_stmt.execute();
    ResultSet result =(ResultSet)proc_stmt.getObject(2);
    while(result!=null)
    System.out.println(result.getString(1));
    System.out.println(result.getString(2));
    System.out.println(result.getString(3));
    System.out.println(result.getString(4));
    System.out.println(result.getString(5));
    when i try to execute this procedure ai m gettin the exception like
    java.sql.SQLException: Fail to convert to internal representation: com.sy.vo.ADDR_CONTACT_OBJ@4a594a59_
    Please help me to resolve this probelm .it is verey verey urgrnt for me
    Thanks in Advance.....................
    Viswa

    First use code tags when posting code.
    Second you can't simply use a java object as an database array type. It certainly looks like you are doing that.

Maybe you are looking for

  • Issue in Multiple Payment Method - in  "F110 Parameters"

    Prob : Wehn I enter more than one payment method in Parameters in F110 only the 1st Payment method entered is saved. The other payment method gets deleted automatically. Following is already done : 1. All the payment methods entered in F110 Parameter

  • Focus lost in Oracle Application Server

    Dear All, We developed a custom system using Oracle Forms Developer 10.1.2.0.2. An Oracle Application Server 10g runs our forms. Users use it across the Internet using MS Internet Explorer 7. If a form contains 2 blocks and a user clicks the another

  • Configuring fbdev to use only one tty for display.

    Hi Friends. I use the  following command for playing videos at tty(I don't use X due to very low specs of my old pc): mplayer -vo fbdev2 -fs FILE but the problem is that the linux framebuffer displays the video on all the tty's. so, how can i confine

  • Configuration steps of UWL

    Hi, I need to configure uwl. Please define steps for configuration. I already checked all help.sap.com links but i could no able to understand that thing. Regards, Gurprit Bhatia Message was edited by:         GURPRIT BHATIA

  • The application server is down at this time

    I am getting the following error message when I try to access PeopleSoft via PIA: "The application server is down at this time. CHECK APPSERVER LOGS. THE SITE BOOTED WITH INTERNAL DEFAULT SETTINGS, BECAUSE OF: bea.jolt.ServiceException: Invalid Sessi