Autocommit error

Hi
I am trying out the J2EE example with Kodo 3.0.1 and JBoss 3.2.3 and have
come across the following problem:
When I try to create an object in the Oracle 9.2 database, I get an
exception when Kodo tries to update a row of JDO_SEQUENCE. The exception is
kodo.util.FatalDataStoreException: Attempt to update the sequence table
"JDO_SEQUENCE" failed. The sequence table is typically created when you run
the mappingtools refresh action on any datastore identity class. If you have
not run the mappingtool but want to create the sequence table, run:
java kodo.jdbc.schema.DBSequenceFactory -action add
NestedThrowables:
java.sql.SQLException: You cannot set autocommit during a managed
transaction!
Caused by: java.sql.SQLException: You cannot set autocommit during a managed
transaction!
at
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoComm
it(BaseWrapperManagedConnection.java:440)
at
org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConne
ction.java:446)
at
com.solarmetric.jdbc.DelegatingConnection.setAutoCommit(DelegatingConnection
..java:170)
at
com.solarmetric.jdbc.DelegatingConnection.setAutoCommit(DelegatingConnection
..java:170)
at
com.solarmetric.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.se
tAutoCommit(ConfiguringConnectionDecorator.java:119)
at
kodo.jdbc.schema.DBSequenceFactory.getConnection(DBSequenceFactory.java:267)
at
kodo.jdbc.schema.DBSequenceFactory.updateSequence(DBSequenceFactory.java:351
Any idea what is wrong? My Kodo JCA deployment descriptor looks like this:
<connection-factories>
<tx-connection-factory>
<jndi-name>kodo</jndi-name>
<adapter-display-name>KodoJDO</adapter-display-name>
<!-- see: http://docs.solarmetric.com/ref_guide_conf.html -->
<!-- for a full list of available <config-property> elements -->
<config-property name="LicenseKey"
type="java.lang.String">xxx</config-property>
<config-property name="ConnectionFactoryName"
type="java.lang.String">java:/OracleDS</config-property>
<config-property name="TransactionMode"
type="java.lang.String">managed</config-property>
</tx-connection-factory>
</connection-factories>
and the Oracle descriptor like this
<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@eleanor:1521:ora</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>dummy</user-name>
<password>dummy</password>
</local-tx-datasource>
</datasources>
Thanks
Sven Erik

When using datasources, you should either specify a
ConnectionFactory2Name to point to a non-transactional datasource or set
the ConnectionFactory2Properties so that Kodo can create one. This is
so sequences will not be transactional in terms of the global context.
Sven Erik Knop wrote:
Hi
I am trying out the J2EE example with Kodo 3.0.1 and JBoss 3.2.3 and have
come across the following problem:
When I try to create an object in the Oracle 9.2 database, I get an
exception when Kodo tries to update a row of JDO_SEQUENCE. The exception is
kodo.util.FatalDataStoreException: Attempt to update the sequence table
"JDO_SEQUENCE" failed. The sequence table is typically created when you run
the mappingtools refresh action on any datastore identity class. If you have
not run the mappingtool but want to create the sequence table, run:
java kodo.jdbc.schema.DBSequenceFactory -action add
NestedThrowables:
java.sql.SQLException: You cannot set autocommit during a managed
transaction!
Caused by: java.sql.SQLException: You cannot set autocommit during a managed
transaction!
at
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoComm
it(BaseWrapperManagedConnection.java:440)
at
org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConne
ction.java:446)
at
com.solarmetric.jdbc.DelegatingConnection.setAutoCommit(DelegatingConnection
.java:170)
at
com.solarmetric.jdbc.DelegatingConnection.setAutoCommit(DelegatingConnection
.java:170)
at
com.solarmetric.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.se
tAutoCommit(ConfiguringConnectionDecorator.java:119)
at
kodo.jdbc.schema.DBSequenceFactory.getConnection(DBSequenceFactory.java:267)
at
kodo.jdbc.schema.DBSequenceFactory.updateSequence(DBSequenceFactory.java:351
Any idea what is wrong? My Kodo JCA deployment descriptor looks like this:
<connection-factories>
<tx-connection-factory>
<jndi-name>kodo</jndi-name>
<adapter-display-name>KodoJDO</adapter-display-name>
<!-- see: http://docs.solarmetric.com/ref_guide_conf.html -->
<!-- for a full list of available <config-property> elements -->
<config-property name="LicenseKey"
type="java.lang.String">xxx</config-property>
<config-property name="ConnectionFactoryName"
type="java.lang.String">java:/OracleDS</config-property>
<config-property name="TransactionMode"
type="java.lang.String">managed</config-property>
</tx-connection-factory>
</connection-factories>
and the Oracle descriptor like this
<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@eleanor:1521:ora</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>dummy</user-name>
<password>dummy</password>
</local-tx-datasource>
</datasources>
Thanks
Sven Erik
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com

Similar Messages

  • Reconnect policy with MySQL failing because of autoCommit error

    This related to this issue, but I didn't see any responses to it: Reconnecting a dead connection from a UnitOfWork commit - Autocommit error
    I'm testing with MySQL 4.1 and I have a reconnect policy that does the following (I believe this is a pretty standard approach):
    session.setExceptionHandler( new ExceptionHandler() {
    public Object handleException(RuntimeException exception) {
         if (exception instanceof DatabaseException) {          
    dbex.getAccessor().reestablishConnection(dbex.getSession());
    However, when it reestablishes the connection (and I have traced this and can verify that this code is executing and a reconnect is performed), I get the following error for any updates:
    Internal Exception: java.sql.SQLException: Can't call rollback when autocommit=trueError Code: 0
    at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:277)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicRollbackTransaction(DatabaseAccessor.java:1090)
    at oracle.toplink.internal.databaseaccess.DatasourceAccessor.rollbackTransaction(DatasourceAccessor.java:486)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.rollbackTransaction(DatabaseAccessor.java:1075)
    at oracle.toplink.publicinterface.Session.basicRollbackTransaction(Session.java:377)
    I only have this problem with the MySQL JDBC drivers. I can continue to read normally, but I can't perform any transactions.
    This isn't so much of a question about MySQL specifically, but rather a question about how reestablishConnection() connects to the database differently from my initial login using DatabaseLogin. Obviously, I don't have this error connecting normally. I only get it after a reconnect is applied.
    Specific questions are: Is there another handler I can add to ensure JDBC Connections returned by ServerSession are always setAutoCommit(false)? Am I reestablishing the JDBC connections incorrectly?
    Nate

    Nate,
    This does appear to be MySQL JDBC specific but is most likely related to a general issue.
    When the connection drops and you receive the notification through the exception handler I would typically recommend looking at the session in us (isUnitOfWork) or the query type (isWriteObjectQuery) to see if the operation that failed was involved in a transaction (UnitOfWork commit).
    In these transaction cases you need to do more then just re-connect and retry. You need to ensure after reconnection that an application exception is raised so the UnitOfWork operation(s) can be retried completely. I would simply add to this case to ensure that the JDBC connection is put back in a state where it can be managed properly.
    There is no special operation or any case I know of where any special auto-commit needs to be set on a connection after it has dropped and before it is re-connected.
    Doug

  • Ineffective autocommit and  no statement executing error

    commit ineffective with AutoCommit enabled at script line **.
    I got the above error when i executed my perl script. What does this mean?
    In addition, i also got another error message"
    DBD::Oracle::st fetchrow_array failed: ERROR no statement executing (perhaps you need to call execute first) [for Statement " ...my sql select"]
    but when i do print out the value "$sth->{NUM_OF_FIELDS}" i get the correct number of fields.my code is
    $sth= $dbh->prepare ("select ......")
    $sth =->execute ();
    while (@row = $sth->fetchrow_array() ) {
    }

    Somebody asked nearly the same question Re: EMERGENCY! pl/sql syntax error!!!

  • Error in starting SPLService on Tomcat

    Hi,
    I get an error while starting CC&B v2.1.0 installed at my local machine on Tomcat. Hereunder is the SPL.log :
    - 10:32:37,953 [main] INFO (web.startup.SPLWebStartup) Initializing SPL web application
    - 10:32:37,953 [main] INFO (shared.context.ApplicationMode) Application is running web-based
    - 10:32:37,953 [main] INFO (shared.context.ApplicationMode) Application set to production mode
    - 10:32:38,031 [main] INFO (web.dynamicui.TransformServletHelper) Disable UIPage Compression set to false
    - 10:32:38,968 [main] INFO (support.context.ContextFactory) Creating default context
    - 10:32:39,093 [main] INFO (shared.environ.ApplicationProperties) loaded properties from resource spl.properties: {spl.runtime.service.extraInstallationServices=CILTINCP, spl.runtime.cobol.remote.jvmcommand=D:/CCB_Install/jdk1.5.0_09/bin/java.exe, spl.tools.loaded.applications=base,ccb,cm, spl.runtime.cobol.remote.jvmcount=1, spl.runtime.socket.file.dir=D:/ccbenv/ccbdemo/runtime, spl.runtime.cobol.sql.fetchSize=150, spl.runtime.cobol.cobrcall=false, spl.runtime.cobol.encoding=UTF8, spl.runtime.cobol.sql.disableQueryCache=false, spl.runtime.utf8Database=true, spl.runtime.cobol.remote.jvmoptions=-Xmx156m -server -Dfile.encoding=ISO8859_1 -cp D:/ccbenv/ccbdemo/splapp/standalone/config;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-beanutils-1.6.1.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-codec-1.3.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-collections-2.1.1.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-fileupload-1.1.1.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-httpclient-2.0.2.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-io-1.2.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-lang-2.2.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-logging-1.0.4.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/concurrent-1.3.4.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/dom4j-1.6.1.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/hibernate-3.1.3.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/icu4j-3.6.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/jaxen-1.1-beta-11.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/jta.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/jtds-1.2.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/log4j-1.2.11.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/mfcobol.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/spl-base-2.1.0.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/spl-shared-2.1.0.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/spl-xai-2.1.0.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/xstream-1.2.1.jar, spl.runtime.environ.init.dir=D:/ccbenv/ccbdemo/etc, spl.runtime.cobol.sql.cache.maxTotalEntries=1000, spl.runtime.oracle.statementCacheSize=300, spl.runtime.cobol.remote.rmiStartPort=5503, spl.runtime.cobol.sql.cursoredCache.maxRows=10, spl.runtime.cobol.remote.jvm=true, spl.runtime.sql.highValue=}
    - 10:32:47,140 [main] WARN (shared.environ.ContextManagedObjectSet) Could not load resource com/splwg/cm/domain/contextManagedObjects.xml on classpath. This may be harmless but could mean a problem with the classpath. Please verify that the classpath for application cm is correctly configured.
    - 10:33:12,234 [main] INFO (support.context.ContextFactory) Registering lookups
    - 10:33:12,593 [main] INFO (support.context.ContextFactory) 480 lookups registered, time 348.717 ms
    - 10:33:12,593 [main] INFO (support.context.ComponentContainerLookupHelper) Initializing constants on 505 lookup interface classes
    - 10:33:13,187 [main] INFO (support.context.ComponentContainerLookupHelper) Done initializing lookup constants, time 594.028 ms
    - 10:33:13,187 [main] INFO (support.context.ContextFactory) Registering algorithm spots
    - 10:33:13,187 [main] INFO (support.context.ContextFactory) 99 algorithm spots registered, time 0.168 ms
    - 10:33:13,187 [main] INFO (support.context.ContextFactory) Registering algorithm components
    - 10:33:13,187 [main] INFO (support.context.ContextFactory) 46 algorithm components registered, time 0.045 ms
    - 10:33:13,187 [main] INFO (support.context.ContextFactory) Registering batch jobs
    - 10:33:13,187 [main] INFO (support.context.ContextFactory) 13 batch jobs registered, time 0.036 ms
    - 10:33:13,187 [main] INFO (support.context.ContextFactory) Registering Entities
    - 10:33:15,515 [main] INFO (support.context.ContextFactory) 812 entities registered, time 2,320.145 ms
    - 10:33:15,515 [main] INFO (support.context.ContextFactory) Registering Components
    - 10:33:15,515 [main] INFO (support.context.ContextFactory) 227 components registered, time 1.367 ms
    - 10:33:15,515 [main] INFO (support.context.ContextFactory) Registering Change Handlers
    - 10:33:15,515 [main] INFO (support.context.ContextFactory) 200 handlers registered, time 0.386 ms
    - 10:33:15,515 [main] INFO (support.context.ContextFactory) Registering Services
    - 10:33:15,671 [main] INFO (support.context.ContextFactory) 313 services registered, time 158.694 ms
    - 10:33:15,671 [main] INFO (support.context.ContextFactory) Registering Code Description queries
    - 10:33:15,687 [main] INFO (support.context.ContextFactory) 40 code/description queries registered, time 0.060 ms
    - 10:33:15,687 [main] INFO (support.context.ContextFactory) Registering cobol programs
    - 10:33:16,140 [main] INFO (support.context.ContextFactory) 187 cobol copybooks registered, time 455.640 ms
    - 10:33:16,140 [main] INFO (support.context.ContextFactory) Registering cobol programs
    - 10:33:16,140 [main] INFO (support.context.ContextFactory) 39 cobol programs registered, time 0.048 ms
    - 10:33:16,140 [main] INFO (support.context.ApplicationContext) Building hibernate configuration
    - 10:33:16,687 [main] INFO (support.context.ApplicationContext) Adding 812 hibernate mappings
    - 10:33:17,640 [main] INFO (support.context.ApplicationContext) Added 100 mappings
    - 10:33:18,250 [main] INFO (support.context.ApplicationContext) Added 200 mappings
    - 10:33:19,015 [main] INFO (support.context.ApplicationContext) Added 300 mappings
    - 10:33:19,609 [main] INFO (support.context.ApplicationContext) Added 400 mappings
    - 10:33:20,562 [main] INFO (support.context.ApplicationContext) Added 500 mappings
    - 10:33:21,140 [main] INFO (support.context.ApplicationContext) Added 600 mappings
    - 10:33:21,734 [main] INFO (support.context.ApplicationContext) Added 700 mappings
    - 10:33:22,343 [main] INFO (support.context.ApplicationContext) Added 800 mappings
    - 10:33:22,406 [main] INFO (support.context.ApplicationContext) Added 812 mappings
    - 10:33:22,500 [main] INFO (support.context.ApplicationContext) Done building hibernate configuration, time 6,351.886 ms
    - 10:33:22,500 [main] INFO (support.context.ApplicationContext) Building hibernate session factory
    - 10:33:24,218 [main] INFO (hibernate.connection.ConnectionProviderFactory) Initializing connection provider: org.hibernate.connection.C3P0ConnectionProvider
    - 10:33:24,218 [main] INFO (hibernate.connection.C3P0ConnectionProvider) C3P0 using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:etmdemo
    - 10:33:24,218 [main] INFO (hibernate.connection.C3P0ConnectionProvider) Connection properties: {user=ccbuser, password=****}
    - 10:33:24,218 [main] INFO (hibernate.connection.C3P0ConnectionProvider) autocommit mode: false
    - 10:33:24,234 [main] INFO (v2.log.MLog) MLog clients using log4j logging.
    - 10:33:24,640 [main] INFO (v2.c3p0.C3P0Registry) Initializing c3p0-0.9.0.4 [built 23-January-2006 22:20:29 -0500; debug? true; trace: 10]
    - 10:33:24,812 [main] INFO (v2.c3p0.PoolBackedDataSource) Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@215748 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@100269d [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 100269d, idleConnectionTestPeriod -> 0, initialPoolSize -> 1, maxIdleTime -> 300, maxPoolSize -> 150, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@56be4e [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> 56be4e, jdbcUrl -> jdbc:oracle:thin:@localhost:1521:etmdemo, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 300, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ], factoryClassLocation -> null, identityToken -> 215748, numHelperThreads -> 3 ]
    - 10:33:26,296 [main] INFO (hibernate.dialect.Dialect) Using dialect: org.hibernate.dialect.Oracle9Dialect
    - 10:33:26,312 [main] INFO (hibernate.transaction.TransactionFactoryFactory) Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
    - 10:33:26,312 [main] INFO (hibernate.transaction.TransactionManagerLookupFactory) No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
    - 10:33:26,343 [main] INFO (hibernate.impl.SessionFactoryImpl) building session factory
    - 10:33:36,812 [main] INFO (hibernate.impl.SessionFactoryObjectFactory) Not binding factory to JNDI, no JNDI name configured
    - 10:33:36,812 [main] INFO (support.context.ApplicationContext) Done building hibernate session factory, time 14,318.045 ms
    - 10:33:37,484 [main] INFO (support.sql.OracleFunctionReplacer) Oracle driver statement cache enabled with size of 300
    - 10:33:37,531 [main] INFO (support.context.ApplicationContext) Database: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    - 10:33:37,531 [main] INFO (support.context.ApplicationContext) JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0
    - 10:33:38,828 [main] INFO (support.context.ApplicationContext) System owner is: 'CM '
    - 10:33:39,328 [main] INFO (cobol.host.CobolHostStartup) Using provided java command for remote cobol execution: D:/CCB_Install/jdk1.5.0_09/bin/java.exe
    - 10:33:39,328 [main] INFO (cobol.host.CobolHostStartup) Using provided java command options for remote cobol execution: -Xmx156m -server -Dfile.encoding=ISO8859_1 -cp D:/ccbenv/ccbdemo/splapp/standalone/config;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-beanutils-1.6.1.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-codec-1.3.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-collections-2.1.1.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-fileupload-1.1.1.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-httpclient-2.0.2.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-io-1.2.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-lang-2.2.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/commons-logging-1.0.4.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/concurrent-1.3.4.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/dom4j-1.6.1.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/hibernate-3.1.3.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/icu4j-3.6.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/jaxen-1.1-beta-11.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/jta.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/jtds-1.2.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/log4j-1.2.11.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/mfcobol.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/spl-base-2.1.0.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/spl-shared-2.1.0.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/spl-xai-2.1.0.jar;D:/ccbenv/ccbdemo/splapp/standalone/lib/xstream-1.2.1.jar
    - 10:33:39,343 [main] INFO (cobol.host.CobolHostStartup) Using starting port number 5503 for remote cobol execution.
    - 10:33:40,031 [main] INFO (cobol.host.SocketStrategy) Socket strategy set to com.splwg.base.support.cobol.host.sockets.WindowsPipeSocketStrategy
    - 10:33:41,171 [main] INFO (cobol.host.CobolHostStartup) Using active JVM count of 1 for remote cobol execution.
    *-  10:34:03,203 [main] ERROR (cobol.host.SocketStrategy) Unable to establish connection on port 5506 after waiting 20 seconds.*
    java.net.ConnectException: Error: Could not open pipe
    caused by system error: The system cannot find the file specified.
         at com.splwg.base.support.cobol.host.sockets.WindowsPipeSocket.connectToPipe(Native Method)
         at com.splwg.base.support.cobol.host.sockets.WindowsPipeSocket.<init>(WindowsPipeSocket.java:63)
         at com.splwg.base.support.cobol.host.sockets.WindowsPipeSocket.createSocket(WindowsPipeSocket.java:100)
         at com.splwg.base.support.cobol.host.sockets.WindowsPipeSocket.connect(WindowsPipeSocket.java:95)
         at com.splwg.base.support.cobol.host.sockets.WindowsPipeSocketStrategy.openSocket(WindowsPipeSocketStrategy.java:32)
         at com.splwg.base.support.cobol.host.SocketStrategy.unsafeOpen(SocketStrategy.java:118)
         at com.splwg.base.support.cobol.host.SocketStrategy.open(SocketStrategy.java:103)
         at com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.createNewHolder(OptimizedRemoteExecuterStub.java:162)
         at com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.getStreamHolder(OptimizedRemoteExecuterStub.java:125)
         at com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.invoke(OptimizedRemoteExecuterStub.java:46)
         at com.splwg.base.support.cobol.host.RemoteRunnerImpl.invoke(RemoteRunnerImpl.java:89)
         at com.splwg.base.support.cobol.host.RemoteJVMConnectionImpl.createRemoteRunner(RemoteJVMConnectionImpl.java:148)
         at com.splwg.base.support.cobol.host.RemoteJVMConnectionImpl.<init>(RemoteJVMConnectionImpl.java:67)
         at com.splwg.base.support.cobol.host.RemoteJVMFactoryImpl.addConnection(RemoteJVMFactoryImpl.java:83)
         at com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider.addNewConnection(RotatingCommandRunnerProvider.java:135)
         at com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider.addNecessaryConnections(RotatingCommandRunnerProvider.java:121)
         at com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider.<init>(RotatingCommandRunnerProvider.java:61)
         at com.splwg.base.support.cobol.host.CobolHostStartup.startup(CobolHostStartup.java:41)
         at com.splwg.base.support.context.ApplicationContext.initializeCobolRuntime(ApplicationContext.java:178)
         at com.splwg.base.support.context.ApplicationContext.initialize(ApplicationContext.java:158)
         at com.splwg.base.support.context.ContextFactory.buildContext(ContextFactory.java:144)
         at com.splwg.base.support.context.ContextFactory.buildContext(ContextFactory.java:65)
         at com.splwg.base.support.context.ContextFactory.createDefaultContext(ContextFactory.java:426)
         at com.splwg.base.web.startup.SPLWebStartup.initializeApplicationContext(SPLWebStartup.java:175)
         at com.splwg.base.web.startup.SPLWebStartup.contextInitialized(SPLWebStartup.java:63)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    - 10:34:03,234 [main] ERROR (cobol.host.SocketStrategy) Unable to create socket for inter JVM communication on port 5506
    - 10:34:03,250 [main] INFO (cobol.host.RemoteJVMConnectionImpl) Connection to JVM 1 being shunned
    *-  10:34:03,250 [main] ERROR (cobol.host.RemoteJVMConnectionImpl) An exception has occurred calling the remote JVM*
    *-  10:34:03,250 [main] FATAL (support.context.ApplicationContext) Error initializing ApplicationContext*
    *-  10:34:03,250 [main] ERROR ([Catalina].[localhost].[]) Exception sending context initialized event to listener instance of class com.splwg.base.web.startup.SPLWebStartup*com.splwg.shared.common.LoggedException:
    The following stacked messages were reported as the LoggedException was rethrown:
    com.splwg.base.support.context.ApplicationContext.initialize(ApplicationContext.java:158): Error initializing ApplicationContext
    com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.getStreamHolder(OptimizedRemoteExecuterStub.java:125): An exception has occurred calling the remote JVM
    com.splwg.base.support.cobol.host.SocketStrategy.unsafeOpen(SocketStrategy.java:123): Unable to create socket for inter JVM communication on port 5506
    The root LoggedException was: Unable to establish connection on port 5506 after waiting 20 seconds.
         at com.splwg.shared.common.LoggedException.wrap(LoggedException.java:197)
         at com.splwg.shared.common.LoggedException.wrap(LoggedException.java:85)
         at com.splwg.base.support.cobol.host.SocketStrategy.handleConnectionException(SocketStrategy.java:134)
         at com.splwg.base.support.cobol.host.SocketStrategy.unsafeOpen(SocketStrategy.java:123)
         at com.splwg.base.support.cobol.host.SocketStrategy.open(SocketStrategy.java:103)
         at com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.createNewHolder(OptimizedRemoteExecuterStub.java:162)
         at com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.getStreamHolder(OptimizedRemoteExecuterStub.java:125)
         at com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.invoke(OptimizedRemoteExecuterStub.java:46)
         at com.splwg.base.support.cobol.host.RemoteRunnerImpl.invoke(RemoteRunnerImpl.java:89)
         at com.splwg.base.support.cobol.host.RemoteJVMConnectionImpl.createRemoteRunner(RemoteJVMConnectionImpl.java:148)
         at com.splwg.base.support.cobol.host.RemoteJVMConnectionImpl.<init>(RemoteJVMConnectionImpl.java:67)
         at com.splwg.base.support.cobol.host.RemoteJVMFactoryImpl.addConnection(RemoteJVMFactoryImpl.java:83)
         at com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider.addNewConnection(RotatingCommandRunnerProvider.java:135)
         at com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider.addNecessaryConnections(RotatingCommandRunnerProvider.java:121)
         at com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider.<init>(RotatingCommandRunnerProvider.java:61)
         at com.splwg.base.support.cobol.host.CobolHostStartup.startup(CobolHostStartup.java:41)
         at com.splwg.base.support.context.ApplicationContext.initializeCobolRuntime(ApplicationContext.java:178)
         at com.splwg.base.support.context.ApplicationContext.initialize(ApplicationContext.java:158)
         at com.splwg.base.support.context.ContextFactory.buildContext(ContextFactory.java:144)
         at com.splwg.base.support.context.ContextFactory.buildContext(ContextFactory.java:65)
         at com.splwg.base.support.context.ContextFactory.createDefaultContext(ContextFactory.java:426)
         at com.splwg.base.web.startup.SPLWebStartup.initializeApplicationContext(SPLWebStartup.java:175)
         at com.splwg.base.web.startup.SPLWebStartup.contextInitialized(SPLWebStartup.java:63)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    Caused by: java.net.ConnectException: Error: Could not open pipe
    caused by system error: The system cannot find the file specified.
         at com.splwg.base.support.cobol.host.sockets.WindowsPipeSocket.connectToPipe(Native Method)
    can anyone please help me out to resolve this issue.
    Thanks,
    Fawaz

    Hi,
    Have you tried to restart the SPL service again and again? And sometime i use to get these OptimizedRemoteExecuterStub.getStreamHolder(OptimizedRemoteExecuterStub.java:125): An exception has occurred calling the remote JVM exception if the machine is occupying more memory....
    Try to restart it again.

  • "Connection is closed" closed error while using MS Access database

    We are using MS Access database in our project. Recently the database was upgraded to 2000.
    After upgrading the database, I get the folowing error when getAutoCommit() is called on a connection -
    java.sql.SQLException: Connection is closed
         at sun.jdbc.odbc.JdbcOdbcConnection.validateConnection(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcConnection.getAutoCommit(Unknown Source)
    The connection is not closed explicity before getAutoCommit() is called, only the statement is closed.
    This error is sporadic and occurs under load scenario only (when a lot of connections are open). Once the error occurs, all the database calls fail then onwards. The error was not occuring before the database was upgraded.
    I suspect the jbdc-odbc driver. The driver might not be compatible with Access2000 database. Under load scenario, it might be closing connections automatically.
    Has anybody faced similar problem before? Where can I find the compatible jdbc-odbc driver? And how to ensure that it is jdbc-odbc driver problem only?
    The database verison - MS Access 2000
    Java version - 1.3.1_01

    can i just point out that there is no support for transactions in Access so I wonder why you are calling autoCommit methods at all...

  • Autocommit and Cursor commit Behaviour

    Hi,
    I need help to set and get the Autocommit and Cursor commit behavior attributes
    in Oracle.
    AUTOCOMMIT:
    For DDL Statement, this attribute is set while executing the OCIStmtExecute() api
    as below:-
    r = OCIStmtExecute(d->svc, d->sql, d->err, 1,0,
    (CONST OCISnapshot *) NULL,
    (OCISnapshot *) NULL,
    d->transaction ? OCI_DEFAULT :                                         OCI_COMMIT_ON_SUCCESS);
    For DML Statement, from the OCI documentation the database parameter attributes
    support OCI_ATTR_AUTOCOMMIT_DDL with the values OCI_AC_DDL and OCI_NO_AC_DDL.
    Since this is a parameter attribute, I couldn't set using OCIAttrSet() API.
    I need help in implementing AUTOCOMMIT for both DDL / DML statements.
    CURSOR COMMIT BEHAVIOUR:
    Similarly, I have observed that Oracle support cursor commit behavior attributes
    using OCI_ATTR_CURSOR_COMMIT_BEHAVIOR and the attribute values are OCI_CURSOR_OPEN and OCI_CURSOR_CLOSED.
    I have tried setting this attribute as below:-
    ub1 nCommitType = OCI_CURSOR_OPEN;
    oraRC = OCIAttrSet((dvoid *)d->svc, (ub4)OCI_HTYPE_SVCCTX,
         (dvoid *)&nCommitType,
         (ub4)sizeof(nCommitType),
         OCI_ATTR_CURSOR_COMMIT_BEHAVIOR, d->err);
    This always fails with the error ORA-24315: illegal attribute type.
    I need help in setting this attribute using OCI.
    Another approach to set Autocommit / Close Cursor attributes:-
    Oracle support SET commands for autocommit and closecursor, I have prepared
    and executed these set commands using OCIStmtPrepare and OCIStmtExecute api. The OCIStmtExecute() API fails to execute the below command texts.
    SET AUTOCOMMIT ON/OFF
    SET CLOSECURSOR ON/OFF
    Is it the right method of setting these attributes?
    Thanks,
    Sankar.P.

    Hi.
    You are trying to commit "child" information before your Parent information is commited.
    Can you describe how you dragged & droped your views?.
    Dragged relationship views or single views?.
    Can you put output log with jbo with FINEST level?.
    To find a solution try next solutions:
    1) Disable "strong" association between your parent-child entities. To achieve it follow next steps:
    - Go to your "Assoc" that describes your foreign key.
    - In "Realtionship" tab, "Behaviour" disable "Composition Association".
    Image: http://1.bp.blogspot.com/-Em8NZvjOUzo/T_NQbJTcLjI/AAAAAAAAAm4/hPsDwtEhJQ4/s1600/4.png
    2) Drag and Drop correct views as a Master-Detail (cascading views in your Data Control).
    http://2.bp.blogspot.com/-1By5vNNGMFQ/T_NQdYzexKI/AAAAAAAAAnE/DGn7Gr0RSDw/s1600/6.png (in spanish).
    In the image, drag & drop PortalwebView2 is the correct way for Master-Details tables. Probably you dragged PortalwebView1 that have dependecy to master table.
    Steps that you have followed:
    - Drag & Drop dependen View Object as a Master-Detail with two tables.
    - Add Create operations from these views to create Rows.
    - Add Commit general operation from Data Control.
    Try to drag & drop Master-Detail views correctly before disable association.
    PD: To try your model faster run Model project instead of your application.
    Regards.
    Edited by: Daniel Merchán on 30-jul-2012 12:05

  • Dg4odbc to MySQL update errors: "does not support IS NULL in this context"

    I am having a problem with 'where x is null' clauses in update statements to MySQL from 11g, using dg4odbc. Updates using the clause 'where x is null' return errors like this:
    ORA-02070: database PLAZAHOST does not support IS NULL in this context
    The rejected queries never get to mysql. Furthermore, I noticed that select statements with 'where x is null' show up in the mysql query log with the where clause stripped out, although correct results are returned to SQLPlus. It looks as though 'where x is null' is stripped off by dg4odbc, which subsequently applies a secondary filter to the results received from MySQL.
    Note, both statements above work properly when issued from the MySQL client.
    Has anybody seen this? It's a big problem for me, but I can't find any references to other people having the same problem, so I assume I've got something misconfigured -- but I don't know what.
    I'm using MySQL ODBC 5.1 Driver, MySQL 5.1 Community Edition, and Oracle 11g R1 all running on a 32-bit Windows server.
    Thank you -- rick
    =============
    here's a spool of a sample oracle session:
    SQL> col descr1 for a40
    SQL> select * from t1@plazahost;
    id1 descr1
    1 hello
    2
    SQL> descr t1@plazahost
    Name Null? Type
    id1 NUMBER(10)
    descr1 VARCHAR2(255)
    SQL> select * from t1@plazahost where "descr1" is null;
    id1 descr1
    2
    SQL> update t1@plazahost set "descr1"='updated' where "descr1" is null;
    update t1@plazahost set "descr1"='updated' where "descr1" is null
    ERROR at line 1:
    ORA-02070: database PLAZAHOST does not support IS NULL in this context
    SQL> spool off
    =============
    here's the mysql query log snip for the oracle session:
    100804 10:24:20 1637 Connect     moms_oracle@MOMS_HOST on moms
              1637 Query     SET NAMES utf8
              1637 Query     SET character_set_results = NULL
              1637 Query     SET SQL_AUTO_IS_NULL = 0
              1637 Query     set autocommit=0
              1637 Query     select database()
              1637 Query     COMMIT
              1637 Query     SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
              1637 Query     SHOW TABLE STATUS FROM `moms` LIKE 'T1'
              1637 Query     SHOW COLUMNS FROM `moms`.`t1`
              1637 Query     SELECT `id1`,`descr1` FROM `moms`.`t1` LIMIT 0
              1637 Query     SHOW KEYS FROM `moms`.`T1`
              1637 Query     SHOW TABLE STATUS FROM `moms` LIKE 'T1'
              1637 Query     SHOW COLUMNS FROM `moms`.`t1`
              1637 Query     SELECT `id1`,`descr1` FROM `moms`.`t1` LIMIT 0
              1637 Query     SELECT A1.`id1`,A1.`descr1` FROM `T1` A1
              1637 Query     SELECT `id1`,`descr1` FROM `T1`
    100804 10:24:28 1637 Query     COMMIT
              1637 Quit     
    =============
    here's the Oracle HS trace file for the same oracle session:
    Oracle Corporation --- WEDNESDAY AUG 04 2010 10:24:19.608
    Heterogeneous Agent Release
    11.1.0.7.0
    Oracle Corporation --- WEDNESDAY AUG 04 2010 10:24:19.608
    Version 11.1.0.7.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "DEBUG"
    Entered hgosdip
    setting HS_OPEN_CURSORS to default of 50
    setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
    setting HS_FDS_RECOVERY_PWD to default value
    setting HS_FDS_TRANSACTION_LOG to default of "HS_TRANSACTION_LOG"
    setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
    setting HS_NLS_NCHAR to default of "UCS2"
    setting HS_FDS_TIMESTAMP_AS_DATE to default of "TRUE"
    setting HS_RPC_FETCH_REBLOCKING to default of "ON"
    setting HS_FDS_FETCH_ROWS to default of "100"
    setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
    setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
    setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
    setting HS_FDS_MAP_NCHAR to default of "TRUE"
    setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
    setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
    setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
    setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
    setting HS_FDS_QUERY_DRIVER to default of "TRUE"
    setting HS_FDS_SUPPORT_STATISTICS to default of "TRUE"
    Parameter HS_FDS_QUOTE_IDENTIFIER is not set
    setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics"
    Exiting hgosdip, rc=0
    ORACLE_SID is "plazahost"
    Product-Info:
    Port Rls/Upd:7/0 PrdStat:0
    Agent:Oracle Database Gateway for ODBC
    Facility:hsa
    Class:ODBC, ClassVsn:11.1.0.7.0_0006, Instance:plazahost
    Exiting hgogprd, rc=0
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=178
    HOCXU_DRV_NCHAR=1000
    HOCXU_DB_CSET=178
    HOCXU_SEM_VER=110000
    Entered hgolofn at 2010/08/04-10:24:19
    Exiting hgolofn, rc=0 at 2010/08/04-10:24:20
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    Exiting hgoinit, rc=0 at 2010/08/04-10:24:20
    Entered hgolgon at 2010/08/04-10:24:20
    reco:0, name:moms_oracle, tflag:0
    Entered hgosuec at 2010/08/04-10:24:20
    Exiting hgosuec, rc=0 at 2010/08/04-10:24:20
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned ""HS_TRANSACTION_LOG""
    HOSGIP for "HS_FDS_TIMESTAMP_AS_DATE" returned "TRUE"
    HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULT_SET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using moms_oracle as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    Entered hgocont at 2010/08/04-10:24:20
    HS_FDS_CONNECT_INFO = "momsPlazaHost"
    RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
    Entered hgogenconstr at 2010/08/04-10:24:20
    dsn:momsPlazaHost, name:moms_oracle
    optn:
    ##>Connect Parameters (len=43)<##
    ## DSN=momsPlazaHost;
    #! UID=moms_oracle;
    #! PWD=*
    Exiting hgogenconstr, rc=0 at 2010/08/04-10:24:20
    DriverName:myodbc5.dll, DriverVer:05.01.0005
    DBMS Name:MySQL, DBMS Version:5.1.35-community-log
    Exiting hgocont, rc=0 at 2010/08/04-10:24:20
    SQLGetInfo returns Y for SQL_CATALOG_NAME
    SQLGetInfo returns 64 for SQL_MAX_CATALOG_NAME_LEN
    Exiting hgolgon, rc=0 at 2010/08/04-10:24:20
    Entered hgoulcp at 2010/08/04-10:24:20
    Entered hgowlst at 2010/08/04-10:24:20
    Exiting hgowlst, rc=0 at 2010/08/04-10:24:20
    SQLGetInfo returns ` for SQL_IDENTIFIER_QUOTE_CHAR
    SQLGetInfo returns Y for SQL_COLUMN_ALIAS
    2 instance capabilities will be uploaded
    capno:1991, context:0x0001ffff, add-info: 0
    capno:1992, context:0x0001ffff, add-info: 1, translation:"`"
    Exiting hgoulcp, rc=0 at 2010/08/04-10:24:20
    Entered hgouldt at 2010/08/04-10:24:20
    0 instance DD translations were uploaded
    Exiting hgouldt, rc=0 at 2010/08/04-10:24:20
    Entered hgobegn at 2010/08/04-10:24:20
    tflag:0 , initial:1
    hoi:0x12f03c, ttid (len 26) is ...
    00: 4D4F4D53 44422E38 62393537 3032392E [MOMSDB.8b957029.]
    10: 322E3130 2E333131 3531 [2.10.31151]
    tbid (len 23) is ...
    00: 4D4F4D53 44425B32 2E31302E 33313135 [MOMSDB[2.10.3115]
    10: 315D5B31 2E345D [1][1.4]]
    TXN Capable:3, Isolation Option:0xf
    Exiting hgobegn, rc=0 at 2010/08/04-10:24:20
    Entered hgodtab at 2010/08/04-10:24:20
    count:1
    table: T1
    Entered hgopcda at 2010/08/04-10:24:20
    Column:1(id1): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:0, sign:1, radix:10
    Exiting hgopcda, rc=0 at 2010/08/04-10:24:20
    Entered hgopcda at 2010/08/04-10:24:20
    Column:2(descr1): dtype:12 (VARCHAR), prc/scl:255/0, nullbl:1, octet:255, sign:1, radix:10
    Exiting hgopcda, rc=0 at 2010/08/04-10:24:20
    The hoada for table T1 follows...
    hgodtab, line 651: Printing hoada @ 02A32DDC
    MAX:2, ACTUAL:2, BRC:1, WHT=6 (TABLE_DESCRIBE)
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    4 INTEGER Y 4 4 0/ 0 0 0 0 id1
    12 VARCHAR Y 255 255 0/ 0 0 0 0 descr1
    Exiting hgodtab, rc=0 at 2010/08/04-10:24:20
    Entered hgodafr, cursor id 0 at 2010/08/04-10:24:20
    Exiting hgodafr, rc=0 at 2010/08/04-10:24:20
    Entered hgotcis at 2010/08/04-10:24:20
    Calling SQLStatistics for T1
    Calling SQLColumns for moms_oracle.T1
    Column "id1": dtype=4, colsize=10, decdig=0, char_octet_length=0, cumulative avg row len=4
    Column "descr1": dtype=12, colsize=255, decdig=0, char_octet_length=255, cumulative avg row len=195
    Exiting hgotcis, rc=0 at 2010/08/04-10:24:20
    Entered hgopars, cursor id 1 at 2010/08/04-10:24:20
    type:0
    SQL text from hgopars, id=1, len=40 ...
    00: 53454C45 43542041 312E6069 6431602C [SELECT A1.`id1`,]
    10: 41312E60 64657363 72316020 46524F4D [A1.`descr1` FROM]
    20: 20605431 60204131 [ `T1` A1]
    Exiting hgopars, rc=0 at 2010/08/04-10:24:20
    Entered hgoopen, cursor id 1 at 2010/08/04-10:24:20
    hgoopen, line 83: NO hoada to print
    Exiting hgoopen, rc=0 at 2010/08/04-10:24:20
    Entered hgodscr, cursor id 1 at 2010/08/04-10:24:20
    Entered hgopcda at 2010/08/04-10:24:20
    Column:1(id1): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:0, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2010/08/04-10:24:20
    Entered hgopcda at 2010/08/04-10:24:20
    Column:2(descr1): dtype:12 (VARCHAR), prc/scl:255/0, nullbl:1, octet:256, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2010/08/04-10:24:20
    hgodscr, line 506: Printing hoada @ 02A32DDC
    MAX:2, ACTUAL:2, BRC:100, WHT=5 (SELECT_LIST)
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    4 INTEGER Y 4 4 0/ 0 0 0 0 id1
    12 VARCHAR Y 256 256 0/ 0 0 0 0 descr1
    Exiting hgodscr, rc=0 at 2010/08/04-10:24:21
    Entered hgoftch, cursor id 1 at 2010/08/04-10:24:21
    hgoftch, line 117: Printing hoada @ 02A32DDC
    MAX:2, ACTUAL:2, BRC:100, WHT=5 (SELECT_LIST)
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    4 INTEGER Y 4 4 0/ 0 0 0 0 id1
    12 VARCHAR Y 256 256 0/ 0 0 0 0 descr1
    SQLBindCol: column 1, cdatatype: -16, bflsz: 4
    SQLBindCol: column 2, cdatatype: 1, bflsz: 257
    2 rows fetched
    Exiting hgoftch, rc=0 at 2010/08/04-10:24:21
    Entered hgoftch, cursor id 1 at 2010/08/04-10:24:21
    hgoftch, line 117: Printing hoada @ 02A32DDC
    MAX:2, ACTUAL:2, BRC:2, WHT=5 (SELECT_LIST)
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    4 INTEGER Y 4 4 0/ 0 0 0 0 id1
    12 VARCHAR Y 5 256 0/ 0 0 0 0 descr1
    0 rows fetched
    Exiting hgoftch, rc=1403 at 2010/08/04-10:24:21
    Entered hgoclse, cursor id 1 at 2010/08/04-10:24:23
    Exiting hgoclse, rc=0 at 2010/08/04-10:24:23
    Entered hgodafr, cursor id 1 at 2010/08/04-10:24:23
    Exiting hgodafr, rc=0 at 2010/08/04-10:24:23
    Entered hgopars, cursor id 1 at 2010/08/04-10:24:23
    type:0
    SQL text from hgopars, id=1, len=31 ...
    00: 53454C45 43542060 69643160 2C606465 [SELECT `id1`,`de]
    10: 73637231 60204652 4F4D2060 543160 [scr1` FROM `T1`]
    Exiting hgopars, rc=0 at 2010/08/04-10:24:23
    Entered hgoopen, cursor id 1 at 2010/08/04-10:24:23
    hgoopen, line 83: NO hoada to print
    Exiting hgoopen, rc=0 at 2010/08/04-10:24:23
    Entered hgodscr, cursor id 1 at 2010/08/04-10:24:23
    Entered hgopcda at 2010/08/04-10:24:23
    Column:1(id1): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:0, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2010/08/04-10:24:23
    Entered hgopcda at 2010/08/04-10:24:23
    Column:2(descr1): dtype:12 (VARCHAR), prc/scl:255/0, nullbl:1, octet:256, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2010/08/04-10:24:23
    hgodscr, line 506: Printing hoada @ 02A32DDC
    MAX:2, ACTUAL:2, BRC:100, WHT=5 (SELECT_LIST)
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    4 INTEGER Y 4 4 0/ 0 0 0 0 id1
    12 VARCHAR Y 256 256 0/ 0 0 0 0 descr1
    Exiting hgodscr, rc=0 at 2010/08/04-10:24:24
    Entered hgoftch, cursor id 1 at 2010/08/04-10:24:24
    hgoftch, line 117: Printing hoada @ 02A32DDC
    MAX:2, ACTUAL:2, BRC:100, WHT=5 (SELECT_LIST)
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    4 INTEGER Y 4 4 0/ 0 0 0 0 id1
    12 VARCHAR Y 256 256 0/ 0 0 0 0 descr1
    SQLBindCol: column 1, cdatatype: -16, bflsz: 4
    SQLBindCol: column 2, cdatatype: 1, bflsz: 257
    2 rows fetched
    Exiting hgoftch, rc=0 at 2010/08/04-10:24:24
    Entered hgoftch, cursor id 1 at 2010/08/04-10:24:24
    hgoftch, line 117: Printing hoada @ 02A32DDC
    MAX:2, ACTUAL:2, BRC:2, WHT=5 (SELECT_LIST)
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    4 INTEGER Y 4 4 0/ 0 0 0 0 id1
    12 VARCHAR Y 5 256 0/ 0 0 0 0 descr1
    0 rows fetched
    Exiting hgoftch, rc=1403 at 2010/08/04-10:24:24
    Entered hgoclse, cursor id 1 at 2010/08/04-10:24:27
    Exiting hgoclse, rc=0 at 2010/08/04-10:24:27
    Entered hgodafr, cursor id 1 at 2010/08/04-10:24:27
    Exiting hgodafr, rc=0 at 2010/08/04-10:24:27
    Entered hgocomm at 2010/08/04-10:24:28
    keepinfo:0, tflag:1
    00: 4D4F4D53 44422E38 62393537 3032392E [MOMSDB.8b957029.]
    10: 322E3130 2E333131 3531 [2.10.31151]
    tbid (len 23) is ...
    00: 4D4F4D53 44425B32 2E31302E 33313135 [MOMSDB[2.10.3115]
    10: 315D5B31 2E345D [1][1.4]]
    cmt(0):
    Entered hgocpctx at 2010/08/04-10:24:28
    Exiting hgocpctx, rc=0 at 2010/08/04-10:24:28
    Exiting hgocomm, rc=0 at 2010/08/04-10:24:28
    Entered hgolgof at 2010/08/04-10:24:28
    tflag:1
    Exiting hgolgof, rc=0 at 2010/08/04-10:24:28
    Entered hgoexit at 2010/08/04-10:24:28
    Exiting hgoexit, rc=0 at 2010/08/04-10:24:28

    is null statement is post processed. This means in case of a select ALL records from the remote database are fetched into the Oracle database and the is null statement is then processed locally in the Oracle db.
    So thze select will work as it is handled internally in the Oracle database. This also means as But "is null" isn't sent to the foreign MySQL db the update clause will fail with ORA-02070: database PLAZAHOST does not support IS NULL in this context
    You need to recode the statement or use passthrough statements.

  • BDB vxworks 6.6 kernel port error

    Hello,
    I have Berkeley DB 4.7.25 compiled in kernel. When I try the example in txn_guide.c, I have got the following error:
    Error opening environment: S_dosFsLib_FILE_NOT_FOUND
    I'm all done.
    value = 10 = 0xa
    I traced the source code it fails in __rep_reset_init() when it tries to open file __db.rep.init. How can I fix this? Thanks.
    Allan
    #ifdef HAVE_REPLICATION
              if ((ret = __rep_reset_init(env)) != 0 ||
              (ret = __env_remove_env(env)) != 0 ||
    #else
    Have I missed anything? Thanks.
    /* File: txn_guide.c */
    /* We assume an ANSI-compatible compiler */
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <db.h>
    #ifdef _WIN32
    #include <windows.h>
    #define     PATHD '\\'
    extern int getopt(int, char * const *, const char *);
    extern char *optarg;
    typedef HANDLE thread_t;
    #define     thread_create(thrp, attr, func, arg) \
    (((*(thrp) = CreateThread(NULL, 0, \
         (LPTHREAD_START_ROUTINE)(func), (arg), 0, NULL)) == NULL) ? -1 : 0)
    #define     thread_join(thr, statusp) \
    ((WaitForSingleObject((thr), INFINITE) == WAIT_OBJECT_0) && \
    GetExitCodeThread((thr), (LPDWORD)(statusp)) ? 0 : -1)
    typedef HANDLE mutex_t;
    #define     mutex_init(m, attr) \
    (((*(m) = CreateMutex(NULL, FALSE, NULL)) != NULL) ? 0 : -1)
    #define     mutex_lock(m) \
    ((WaitForSingleObject(*(m), INFINITE) == WAIT_OBJECT_0) ? 0 : -1)
    #define     mutex_unlock(m) (ReleaseMutex(*(m)) ? 0 : -1)
    #else
    #include <pthread.h>
    #include <unistd.h>
    #define     PATHD '/'
    typedef pthread_t thread_t;
    #define     thread_create(thrp, attr, func, arg) \
    pthread_create((thrp), (attr), (func), (arg))
    #define     thread_join(thr, statusp) pthread_join((thr), (statusp))
    typedef pthread_mutex_t mutex_t;
    #define     mutex_init(m, attr) pthread_mutex_init((m), (attr))
    #define     mutex_lock(m) pthread_mutex_lock(m)
    #define     mutex_unlock(m) pthread_mutex_unlock(m)
    #endif
    /* Run 5 writers threads at a time. */
    #define     NUMWRITERS 5
    * Printing of a thread_t is implementation-specific, so we
    * create our own thread IDs for reporting purposes.
    int global_thread_num;
    mutex_t thread_num_lock;
    /* Forward declarations */
    int count_records(DB *, DB_TXN *);
    int open_db(DB **, const char *, const char *, DB_ENV *, u_int32_t);
    int usage(void);
    void writer_thread(void );
    /* Usage function */
    int
    usage()
    fprintf(stderr, " [-h <database_home_directory>]\n");
    return (EXIT_FAILURE);
    #if 0
    int
    main(int argc, char *argv[])
    /* Initialize our handles */
    DB *dbp = NULL;
    DB_ENV *envp = NULL;
    thread_t writer_threads[NUMWRITERS];
    int ch, i, ret, ret_t;
    u_int32_t env_flags;
    char *db_home_dir;
    /* Application name */
    const char *prog_name = "txn_guide";
    /* Database file name */
    const char *file_name = "mydb.db";
    /* Parse the command line arguments */
    #ifdef _WIN32
    db_home_dir = ".\\";
    #else
    db_home_dir = "./";
    #endif
    while ((ch = getopt(argc, argv, "h:")) != EOF)
         switch (ch) {
         case 'h':
         db_home_dir = optarg;
         break;
         case '?':
         default:
         return (usage());
    #endif
    void myDbTest(char *home)
         /* Initialize our handles */
         DB *dbp = NULL;
         DB_ENV *envp = NULL;
         thread_t writer_threads[NUMWRITERS];
         int ch, i, ret, ret_t;
         u_int32_t env_flags;
         char *db_home_dir;
         /* Application name */
         const char *prog_name = "txn_guide";
         /* Database file name */
         const char *file_name = "mydb.db";
         /* Parse the command line arguments */
         #ifdef _WIN32
         db_home_dir = ".\\";
         #else
         db_home_dir = "./";
         #endif     
    db_home_dir = home;
    /* Create the environment */
    ret = db_env_create(&envp, 0);
    if (ret != 0) {
         fprintf(stderr, "Error creating environment handle: %s\n",
         db_strerror(ret));
         goto err;
    * Indicate that we want db to perform lock detection internally.
    * Also indicate that the transaction with the fewest number of
    * write locks will receive the deadlock notification in
    * the event of a deadlock.
    ret = envp->set_lk_detect(envp, DB_LOCK_MINWRITE);
    if (ret != 0) {
         fprintf(stderr, "Error setting lock detect: %s\n",
         db_strerror(ret));
         goto err;
    envp->set_shm_key(envp, 10);
    env_flags =
    DB_CREATE | /* Create the environment if it does not exist */
    DB_RECOVER | /* Run normal recovery. */
    DB_INIT_LOCK | /* Initialize the locking subsystem */
    DB_INIT_LOG | /* Initialize the logging subsystem */
    DB_INIT_TXN | /* Initialize the transactional subsystem. This
                   * also turns on logging. */
    DB_INIT_MPOOL | /* Initialize the memory pool (in-memory cache) */
    DB_THREAD; /* Cause the environment to be free-threaded */
    /* Now actually open the environment */
    ret = envp->open(envp, db_home_dir, env_flags, 0);
    if (ret != 0) {
         fprintf(stderr, "Error opening environment: %s\n",
         db_strerror(ret));
         goto err;
    * If we had utility threads (for running checkpoints or
    * deadlock detection, for example) we would spawn those
    * here. However, for a simple example such as this,
    * that is not required.
    /* Open the database */
    ret = open_db(&dbp, prog_name, file_name,
    envp, DB_DUPSORT);
    if (ret != 0)
         goto err;
    /* Initialize a mutex. Used to help provide thread ids. */
    (void)mutex_init(&thread_num_lock, NULL);
    /* Start the writer threads. */
    for (i = 0; i < NUMWRITERS; i++)
         (void)thread_create(
         &writer_threads, NULL, writer_thread, (void *)dbp);
    /* Join the writers */
    for (i = 0; i < NUMWRITERS; i++)
         (void)thread_join(writer_threads[i], NULL);
    err:
    /* Close our database handle, if it was opened. */
    if (dbp != NULL) {
         ret_t = dbp->close(dbp, 0);
         if (ret_t != 0) {
         fprintf(stderr, "%s database close failed: %s\n",
              file_name, db_strerror(ret_t));
         ret = ret_t;
    /* Close our environment, if it was opened. */
    if (envp != NULL) {
         ret_t = envp->close(envp, 0);
         if (ret_t != 0) {
         fprintf(stderr, "environment close failed: %s\n",
              db_strerror(ret_t));
              ret = ret_t;
    /* Final status message and return. */
    printf("I'm all done.\n");
    return (ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
    * A function that performs a series of writes to a
    * Berkeley DB database. The information written
    * to the database is largely nonsensical, but the
    * mechanism of transactional commit/abort and
    * deadlock detection is illustrated here.
    void *
    writer_thread(void *args)
    static char *key_strings[] = {
         "key 1", "key 2", "key 3", "key 4", "key 5",
         "key 6", "key 7", "key 8", "key 9", "key 10"
    DB *dbp;
    DB_ENV *envp;
    DBT key, value;
    DB_TXN *txn;
    int i, j, payload, ret, thread_num;
    int retry_count, max_retries = 20; /* Max retry on a deadlock */
    dbp = (DB *)args;
    envp = dbp->get_env(dbp);
    /* Get the thread number */
    (void)mutex_lock(&thread_num_lock);
    global_thread_num++;
    thread_num = global_thread_num;
    (void)mutex_unlock(&thread_num_lock);
    /* Initialize the random number generator */
    srand(thread_num);
    /* Write 50 times and then quit */
    for (i = 0; i < 50; i++) {
         retry_count = 0; /* Used for deadlock retries */
         * Some think it is bad form to loop with a goto statement, but
         * we do it anyway because it is the simplest and clearest way
         * to achieve our abort/retry operation.
    retry:
         /* Begin our transaction. We group multiple writes in
         * this thread under a single transaction so as to
         * (1) show that you can atomically perform multiple writes
         * at a time, and (2) to increase the chances of a
         * deadlock occurring so that we can observe our
         * deadlock detection at work.
         * Normally we would want to avoid the potential for deadlocks,
         * so for this workload the correct thing would be to perform our
         * puts with autocommit. But that would excessively simplify our
         * example, so we do the "wrong" thing here instead.
         ret = envp->txn_begin(envp, NULL, &txn, 0);
         if (ret != 0) {
         envp->err(envp, ret, "txn_begin failed");
         return ((void *)EXIT_FAILURE);
         for (j = 0; j < 10; j++) {
         /* Set up our key and values DBTs */
         memset(&key, 0, sizeof(DBT));
         key.data = key_strings[j];
         key.size = (u_int32_t)strlen(key_strings[j]) + 1;
         memset(&value, 0, sizeof(DBT));
         payload = rand() + i;
         value.data = &payload;
         value.size = sizeof(int);
         /* Perform the database put. */
         switch (ret = dbp->put(dbp, txn, &key, &value, 0)) {
              case 0:
              break;
              * Our database is configured for sorted duplicates,
              * so there is a potential for a KEYEXIST error return.
              * If we get one, simply ignore it and continue on.
              * Note that you will see KEYEXIST errors only after you
              * have run this program at least once.
              case DB_KEYEXIST:
              printf("Got keyexists.\n");
              break;
              * Here's where we perform deadlock detection. If
              * DB_LOCK_DEADLOCK is returned by the put operation,
              * then this thread has been chosen to break a deadlock.
              * It must abort its operation, and optionally retry the
              * put.
              case DB_LOCK_DEADLOCK:
              * First thing that we MUST do is abort the
              * transaction.
              (void)txn->abort(txn);
              * Now we decide if we want to retry the operation.
              * If we have retried less than max_retries,
              * increment the retry count and goto retry.
              if (retry_count < max_retries) {
                   printf("Writer %i: Got DB_LOCK_DEADLOCK.\n",
                   thread_num);
                   printf("Writer %i: Retrying write operation.\n",
                   thread_num);
                   retry_count++;
                   goto retry;
              * Otherwise, just give up.
              printf("Writer %i: ", thread_num);
              printf("Got DB_LOCK_DEADLOCK and out of retries.\n");
              printf("Writer %i: Giving up.\n", thread_num);
              return ((void *)EXIT_FAILURE);
              * If a generic error occurs, we simply abort the
              * transaction and exit the thread completely.
              default:
              envp->err(envp, ret, "db put failed");
              ret = txn->abort(txn);
              if (ret != 0)
                   envp->err(envp, ret,
                   "txn abort failed");
              return ((void *)EXIT_FAILURE);
         } /** End case statement **/
         } /** End for loop **/
         * print the number of records found in the database.
         * See count_records() for usage information.
         printf("Thread %i. Record count: %i\n", thread_num,
         count_records(dbp, NULL));
         * If all goes well, we can commit the transaction and
         * exit the thread.
         ret = txn->commit(txn, 0);
         if (ret != 0) {
         envp->err(envp, ret, "txn commit failed");
         return ((void *)EXIT_FAILURE);
    return ((void *)EXIT_SUCCESS);
    * This simply counts the number of records contained in the
    * database and returns the result. You can use this function
    * in three ways:
    * First call it with an active txn handle.
    * Secondly, configure the cursor for uncommitted reads (this
    * is what the example currently does).
    * Third, call count_records AFTER the writer has committed
    * its transaction.
    * If you do none of these things, the writer thread will
    * self-deadlock.
    * Note that this function exists only for illustrative purposes.
    * A more straight-forward way to count the number of records in
    * a database is to use DB->stat() or DB->stat_print().
    int
    count_records(DB dbp, DB_TXN txn)
    DBT key, value;
    DBC *cursorp;
    int count, ret;
    cursorp = NULL;
    count = 0;
    /* Get the cursor */
    ret = dbp->cursor(dbp, txn, &cursorp,
         DB_READ_UNCOMMITTED);
    if (ret != 0) {
         dbp->err(dbp, ret,
         "count_records: cursor open failed.");
         goto cursor_err;
    /* Get the key DBT used for the database read */
    memset(&key, 0, sizeof(DBT));
    memset(&value, 0, sizeof(DBT));
    do {
         ret = cursorp->get(cursorp, &key, &value, DB_NEXT);
         switch (ret) {
         case 0:
              count++;
              break;
         case DB_NOTFOUND:
              break;
         default:
              dbp->err(dbp, ret,
              "Count records unspecified error");
              goto cursor_err;
    } while (ret == 0);
    cursor_err:
    if (cursorp != NULL) {
         ret = cursorp->close(cursorp);
         if (ret != 0) {
         dbp->err(dbp, ret,
              "count_records: cursor close failed.");
    return (count);
    /* Open a Berkeley DB database */
    int
    open_db(DB **dbpp, const char progname, const char file_name,
    DB_ENV *envp, u_int32_t extra_flags)
    int ret;
    u_int32_t open_flags;
    DB *dbp;
    /* Initialize the DB handle */
    ret = db_create(&dbp, envp, 0);
    if (ret != 0) {
         fprintf(stderr, "%s: %s\n", progname,
              db_strerror(ret));
         return (EXIT_FAILURE);
    /* Point to the memory malloc'd by db_create() */
    *dbpp = dbp;
    if (extra_flags != 0) {
         ret = dbp->set_flags(dbp, extra_flags);
         if (ret != 0) {
         dbp->err(dbp, ret,
              "open_db: Attempt to set extra flags failed.");
         return (EXIT_FAILURE);
    /* Now open the database */
    open_flags = DB_CREATE | /* Allow database creation */
              DB_READ_UNCOMMITTED | /* Allow dirty reads */
              DB_AUTO_COMMIT; /* Allow autocommit */
    ret = dbp->open(dbp, /* Pointer to the database */
              NULL, /* Txn pointer */
              file_name, /* File name */
              NULL, /* Logical db name */
              DB_BTREE, /* Database type (using btree) */
              open_flags, /* Open flags */
              0); /* File mode. Using defaults */
    if (ret != 0) {
         dbp->err(dbp, ret, "Database '%s' open failed",
         file_name);
         return (EXIT_FAILURE);
    return (EXIT_SUCCESS);

    More information: After I create the DB, DB put works fine. The db_stat is OK.
    After reboot the processor, db_stat gives error. After running db_recover, it gives errors.
    Before reboot:
    -> ls
    CfgDbEr.log
    __db.001
    log.0000000001
    OpvCfg.db
    value = 0 = 0x0
    -> db_stat "-h /bk1/db -d OpvCfg.db"
    THU AUG 14 18:12:23 2008 Local time
    53162 Btree magic number
    9 Btree version number
    Big-endian Byte order
    Flags
    2 Minimum keys per-page
    4096 Underlying database page size
    1007 Overflow key/data size
    1 Number of levels in the tree
    1 Number of unique keys in the tree
    1 Number of data items in the tree
    0 Number of tree internal pages
    0 Number of bytes free in tree internal pages (0% ff)
    1 Number of tree leaf pages
    4058 Number of bytes free in tree leaf pages (0% ff)
    0 Number of tree duplicate pages
    0 Number of bytes free in tree duplicate pages (0% ff)
    0 Number of tree overflow pages
    0 Number of bytes free in tree overflow pages (0% ff)
    0 Number of empty pages
    0 Number of pages on the free list
    value = 0 = 0x0
    After reboot, it points out error:segment /bk1/db/__db.001 does not exist
    -> db_stat "-h /bk1/db -d OpvCfg.db"
    db_stat: segment /bk1/db/__db.001 does not exist
    THU JAN 01 00:01:32 1970 Local time
    53162 Btree magic number
    9 Btree version number
    Big-endian Byte order
    Flags
    2 Minimum keys per-page
    4096 Underlying database page size
    1007 Overflow key/data size
    1 Number of levels in the tree
    1 Number of unique keys in the tree
    1 Number of data items in the tree
    0 Number of tree internal pages
    0 Number of bytes free in tree internal pages (0% ff)
    1 Number of tree leaf pages
    4058 Number of bytes free in tree leaf pages (0% ff)
    0 Number of tree duplicate pages
    0 Number of bytes free in tree duplicate pages (0% ff)
    0 Number of tree overflow pages
    0 Number of bytes free in tree overflow pages (0% ff)
    0 Number of empty pages
    0 Number of pages on the free list
    value = 0 = 0x0
    The result of running db_recover:
    db_recover "-c -h /bk1/db"db_recover: segment /bk1/db/__db.001 does not exist
    db_recover: /bk1/db/log.0000000002: log file unreadable: S_dosFsLib_FILE_NOT_FOU
    ND
    db_recover: PANIC: S_dosFsLib_FILE_NOT_FOUND
    db_recover: PANIC: fatal region error detected; run recovery
    db_recover: dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery
    value = 1 = 0x1

  • Database connection error in Weblogic 11g

    Hello Everyone,
    I am new to this forum and Weblogic. I am in the process of migrating a big application from Weblogic 8.1 to Weblogic 11g. I am facing a issue with JDBC Commit. I am getting following exception while trying to commit
    ####<Feb 18, 2010 1:11:51 PM EST> <Debug> <JTAPropagate> <PPXP2CE951B506> <AdminServer> <ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <3de6adeed2d219bd:-1c9bd9a6:126e245ecb6:-7fff-0000000000000010> <1266516711438> <BEA-000000> <java.lang.Exception: DEBUG: receiveRequest, tx=Xid=BEA1-0000957A69A07E5F133C(16499456),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=300,XAServerResourceInfo[demoPool_cashlinkdomain]=(ServerResourceInfo[demoPool_cashlinkdomain]=(state=ended,assigned=none),xar=demoPool,re-Registered = false),SCInfo[cashlinkdomain+AdminServer]=(state=active),properties=({}),local properties=({weblogic.jdbc.jta.demoPool=[autoCommit=false,enabled=true,isXA=true,isJTS=false,vendorID=0,connUsed=true,doInit=false,'null',destroyed=false,poolname=demoPool,appname=null,moduleName=null,connectTime=187,dirtyIsolationLevel=false,initialIsolationLevel=2,infected=false,lastSuccessfulConnectionUse=1266516711423,secondsToTrustAnIdlePoolConnection=10,currentUser=java.lang.Exception
    at weblogic.jdbc.common.internal.ConnectionEnv.setup(ConnectionEnv.java:310)
    at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:344)
    at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:433)
    at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:316)
    at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:93)
    at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:61)
    at weblogic.jdbc.jta.DataSource.getXAConnectionFromPool(DataSource.java:1584)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1357)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:438)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:395)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:355)
    at com.mycompany.res.services.util.DatabaseHelper.getConnection(DatabaseHelper.java:109)
    at com.mycompany.res.services.util.DatabaseHelper.getConnection(DatabaseHelper.java:46)
    at com.mycompany.res.services.security.ejb.LoginManagerEJB.login(LoginManagerEJB.java:64)
    at com.mycompany.res.services.security.ejb.LoginManagerEJB_z7om1c_EOImpl.login(LoginManagerEJB_z7om1c_EOImpl.java:573)
    at com.mycompany.res.services.security.ejb.LoginManagerEJB_z7om1c_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ,currentThread=Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],lastUser=null,currentError=null,currentErrorTimestamp=null,JDBC4Runtime=true,supportStatementPoolable=true,needRestoreClientInfo=false,defaultClientInfo={},supportIsValid=true]}),CoordinatorURL=AdminServer+10.240.15.248:7001+cashlinkdomain+t3+)
    at weblogic.transaction.internal.TxDebug.debugStack(TxDebug.java:60)
    at weblogic.transaction.internal.TransactionManagerImpl.receiveRequest(TransactionManagerImpl.java:1366)
    at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:287)
    at weblogic.rmi.cluster.ClusterableServerRef.dispatch(ClusterableServerRef.java:242)
    at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:1138)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:1020)
    at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.java:240)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:882)
    at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:453)
    at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:322)
    at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
    at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
    at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    What is going wrong with this?
    I get the following error every time Weblogic is trying to do database connection check
    ####<Feb 18, 2010 1:35:40 PM EST> <Debug> <JTA2PC> <PPXP2CE951B506> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <BEA1-028CACE03896> <3de6adeed2d219bd:-1c9bd9a6:126e245ecb6:-7fff-00000000000000c6> <1266518140849> <BEA-000000> <BEA1-028CACE03896: JDBC Internal: TX[BEA1-028CACE03896] committing-->committed
    java.lang.Exception: DEBUG
         at weblogic.transaction.internal.TransactionImpl.setState(TransactionImpl.java:1711)
         at weblogic.transaction.internal.ServerTransactionImpl.setCommitted(ServerTransactionImpl.java:2945)
         at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2737)
         at weblogic.transaction.internal.ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2657)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:285)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:233)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:286)
         at weblogic.jdbc.common.internal.ConnectionEnv.testInternal(ConnectionEnv.java:734)
         at weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:704)
         at weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:487)
         at weblogic.common.resourcepool.ResourcePoolImpl.testResource(ResourcePoolImpl.java:2260)
         at weblogic.common.resourcepool.ResourcePoolImpl.checkResource(ResourcePoolImpl.java:1601)
         at weblogic.common.resourcepool.ResourcePoolImpl.checkAndReturnResource(ResourcePoolImpl.java:1507)
         at weblogic.common.resourcepool.ResourcePoolImpl.checkAndReturnResource(ResourcePoolImpl.java:1496)
         at weblogic.common.resourcepool.ResourcePoolImpl.testUnusedResources(ResourcePoolImpl.java:1942)
         at weblogic.common.resourcepool.ResourcePoolImpl.access$800(ResourcePoolImpl.java:40)
         at weblogic.common.resourcepool.ResourcePoolImpl$ResourcePoolMaintanenceTask.timerExpired(ResourcePoolImpl.java:2368)
         at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Edited by: user12640178 on Feb 18, 2010 10:36 AM
    Edited by: user12640178 on Feb 18, 2010 10:38 AM

    Priya,
    Thank you so much for your response. I did test my database source from console and on the console it reported the test was successful, where in the admin logs has same exception logs. I did try creating a non XA connection and it did not have these errors. But my application did raise same exception while doing transaction.
    The application has around 250 EJB's that are written long ago and they all comply to EJB 1.1 spec. I am in the process of investigating the level of support for EJB 1.1 in Weblogic 11g.
    - Kasi

  • Error in creating Cache Group

    Hi,
    When i tried to create cache group i am getting below error
    CREATE READONLY CACHE GROUP customer_orders
    FROM myuser.customer
    (cust_num NUMBER(6) NOT NULL,
    region VARCHAR2(10),
    name VARCHAR2(50),
    address VARCHAR2(100),
    PRIMARY KEY(cust_num)),
    myuser.orders
    (ord_num NUMBER(10) NOT NULL,
    cust_num NUMBER(6) NOT NULL,
    when_placed DATE NOT NULL,
    when_shipped DATE NOT NULL,
    PRIMARY KEY(ord_num),
    FOREIGN KEY(cust_num) REFERENCES myuser.customer(cust_num)) ;
    5220: Permanent Oracle connection failure error in OCIServerAttach(): ORA-12154: TNS:could not resolve the connect identifier specified rc = -1
    5131: Cannot connect to backend database: OracleNetServiceName = "orcl_db", uid = "XXXXXXX", pwd is hidden, TNS_ADMIN = "C:\TimesTen11.2.2", ORACLE_HOME= ""
    But my Oracle database Name is MYdatabase
    Oracle LSNRCTL
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1522)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
    Start Date 07-AUG-2012 10:31:38
    Uptime 4 days 3 hr. 1 min. 55 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\TimesTen11.2.2\listener.ora
    Listener Log File E:\app\XXXXXXX\diag\tnslsnr\localhost\listener\alert\log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1522ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522)))
    Services Summary...
    Service "MYdatabaseXDB" has 1 instance(s).
    Instance "MYdatabase", status READY, has 1 handler(s) for this service...
    Service "MYdatabase" has 1 instance(s).
    Instance "MYdatabase", status READY, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
    Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    how to change OracleNetServiceName = "orcl_db" to OracleNetServiceName = "MYdatabase"
    Thanks!

    You should create the cache groups by using cachadmin user, not use object owner user.
    In Oracle DB:
    SQL> @grantCacheAdminPrivileges "cacheadmin"
    Please enter the administrator user id
    The value chosen for administrator user id is cacheadmin
    ***************** Initialization for cache admin begins ******************
    0. Granting the CREATE SESSION privilege to CACHEADMIN
    1. Granting the TT_CACHE_ADMIN_ROLE to CACHEADMIN
    2. Granting the DBMS_LOCK package privilege to CACHEADMIN
    3. Granting the RESOURCE  privilege to CACHEADMIN
    4. Granting the CREATE PROCEDURE  privilege to CACHEADMIN
    5. Granting the CREATE ANY TRIGGER  privilege to CACHEADMIN
    6. Granting the DBMS_LOB package privilege to CACHEADMIN
    7. Granting the SELECT on SYS.ALL_OBJECTS privilege to CACHEADMIN
    8. Granting the SELECT on SYS.ALL_SYNONYMS privilege to CACHEADMIN
    9. Checking if the cache administrator user has permissions on the default
    tablespace
         Permission exists
    11. Granting the CREATE ANY TYPE privilege to CACHEADMIN
    ********* Initialization for cache admin user done successfully *********
    SQL>In TimesTen:
    Command> CREATE USER cacheadmin IDENTIFIED BY oracle;
    User created.
    Command> GRANT CREATE SESSION, CACHE_MANAGER, CREATE ANY TABLE, DROP ANY TABLE TO cacheadmin;
    Command>
    Command> CREATE USER oratt IDENTIFIED BY oracle;
    User created.
    Command> grant create session to oratt;
    Command>
    [oracle@tt1 ~]$ ttIsql "DSN=db_cache;UID=cacheadmin;PWD=oracle;OraclePWD=oracle"
    Copyright (c) 1996-2010, Oracle.  All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
    connect "DSN=db_cache;UID=cacheadmin;PWD=oracle;OraclePWD=oracle";
    Connection successful: DSN=db_cache;UID=cacheadmin;DataStore=/u01/app/oracle/datastore/db_cache;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/u01/app/oracle/product/11.2.1/TimesTen/tt1/lib/libtten.so;PermSize=100;TempSize=32;TypeMode=0;CacheGridEnable=0;OracleNetServiceName=ORCL;
    (Default setting AutoCommit=1)
    Command> call ttCacheUidPwdSet('cacheadmin','oracle');
    Command>
    Command> CREATE READONLY CACHE GROUP readcache
           >   AUTOREFRESH INTERVAL
           >   5 SECONDS
           > FROM oratt.readtab (
           >        a NUMBER NOT NULL PRIMARY KEY,
           >        b VARCHAR2(100) );
    Command> Additionally dont forget to issue the grants for cacheadmin user in Oracle DB
    SQL> GRANT SELECT ON readtab TO cacheadmin;
    Grant succeeded.Regards,
    Gennady

  • Error in deleting a record

    I am using Oracle Driver and try to delete a record in the database, fail
    error occurs, saying "Invalid operation on read only resultset". But I have
    already set the resultset as updatable, what am I missing?
    Please give me some hints?
    statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    resultSet = statement.executeQuery("Select * from emp");
    ... // move to a record position
    resultSet.deleteRow(); // Error occurs when I perform this operation

    No, closing has nothing to do with committing!
    If you have done nothing like
    "connection.setAutoCommit( false)", then you are in
    AutoCommit mode, means each stattement is handled by
    JDBC as a 1-step-transaction and automatically and
    immediately commited.By default, new connections are in auto-commit mode. The commit occurs when the statement completes or the next execute occurs, whichever comes first. In the case of statements returning a ResultSet, the statement completes when the last row of the ResultSet has been retrieved or the ResultSet has been closed.
    So, closing has an effect. Please look at the thread
    http://forum.java.sun.com/thread.jsp?forum=48&thread=189922
    Am I wrong in my observation?

  • Error in Running my  Hibenate Program.............

    hi dudes........
    I am new to hibernate.......I have some errors in while Running my program using Ecllipse..
    */****Table/******
    create table student(sno number(20),sname varchar(20),mobile number(10),email varchar(20));
    Table created.
    *//****POJO class***///**
    import java.io.Serializable;
    *public class Student implements Serializable {*
    private int sno;
    private String sname;
    private long mobile;
    private String email;
    *public Student() {*
    *public int getSno() {*
    return sno;
    *public void setSno(int sno) {*
    this.sno = sno;
    *public String getSname() {*
    return sname;
    *public void setSname(String sname) {*
    this.sname = sname;
    *public long getMobile() {*
    return mobile;
    *public void setMobile(long mobile) {*
    this.mobile = mobile;
    *public String getEmail() {*
    return email;
    *public void setEmail(String email) {*
    this.email = email;
    */**ClientStudent.java***//*
    import org.hibernate.;*
    import org.hibernate.cfg.Configuration;
    *class ClientStudent {*
    *public static void main(String[] args) {*
    *try{*
    Configuration cfg= new Configuration();
    cfg.configure("/hibernate.cfg.xml");
    SessionFactory factory = cfg.buildSessionFactory();
    Session session = factory.openSession();
    Transaction tx = session.beginTransaction();
    student Sto = new student();
    Sto.setSno(1);
    Sto.setSname("saichand");
    Sto.setMobile(412171);
    Sto.setEmail("[email protected]");
    session.save(Sto);
    tx.commit();
    session.close();
    *}catch(HibernateException ex)*
    ex.printStackTrace();
    */****Hibernate.cfg.xml***/**
    *<?xml version='1.0' encoding='UTF-8'?>*
    *<!DOCTYPE hibernate-configuration PUBLIC*
    *"-//Hibernate/Hibernate Configuration DTD 3.0//EN"*
    *"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">*
    *<!-- Generated by MyEclipse Hibernate Tools. -->*
    *<hibernate-configuration>*
    *<session-factory>*
    *<property name="myeclipse.connection.profile">*
    OracleEx
    *</property>*
    *<property name="connection.driver_class">*
    sun.jdbc.odbc.JdbcOdbcDriver
    *</property>*
    *<property name="connection.url">jdbc:odbc:dfi</property>*
    *<property name="connection.username">system</property>*
    *<property name="connection.password">tiger</property>*
    *<property name="dialect">*
    org.hibernate.dialect.DB2400Dialect
    *</property>*
    *<property name="show_sql">true</property>*
    *<property name="format_sql">true</property>*
    *<property name="use_sql_comments">true</property>*
    *<property name="hibernate.transaction.factory_class">*
    org.hibernate.transaction.JDBCTransactionFactory
    *</property>*
    *<property name="hibernate.connection.autocommit">*
    false
    *</property>*
    *<mapping resource="student.hdm.xml" />*
    *</session-factory>*
    *</hibernate-configuration>*
    *//**student.xml***/**
    *<?xml version="1.0" encoding="UTF-8"?>*
    *<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">*
    *<hibernate-mapping>*
    *<class name="student" table="student">*
    *<id name="sno" column="sno" type="integer">*
    *<generator class="assigned"/>*
    *</id>*
    *<property name="sname" column="sname" type="string"/>*
    *<property name="mobile" column="mobile" type="string"/>*
    *</class>*
    *</hibernate-mapping>*
    These are the two .xml files........
    While running this program i got the ERROR  ..........
    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).*+
    log4j:WARN Please initialize the log4j system properly.*+
    Exception in thread "main" java.lang.ClassCastException: java.lang.Integer*+
    at org.hibernate.type.StringType.toString(StringType.java:44)*+
    at org.hibernate.type.NullableType.toLoggableString(NullableType.java:168)*+
    at org.hibernate.pretty.Printer.toString(Printer.java:53)*+
    at org.hibernate.pretty.Printer.toString(Printer.java:90)*+
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:97)*+
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)*+
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)*+
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)*+
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)*+
    at ClientStudent.main(ClientStudent.java:21)*+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    hi dudes........
    I am new to hibernate.......I have some errors in while Running my program using Ecllipse..
    ////Table/////
    create table student(sno number(20),sname varchar(20),mobile number(10),email varchar(20));
    Table created.
    POJO class
    import java.io.Serializable;
    public class Student implements Serializable {
    private int sno;
    private String sname;
    private long mobile;
    private String email;
    public Student() {
    public int getSno() {
    return sno;
    public void setSno(int sno) {
    this.sno = sno;
    public String getSname() {
    return sname;
    public void setSname(String sname) {
    this.sname = sname;
    public long getMobile() {
    return mobile;
    public void setMobile(long mobile) {
    this.mobile = mobile;
    public String getEmail() {
    return email;
    public void setEmail(String email) {
    this.email = email;
    /**ClientStudent.java***//
    import org.hibernate.;*
    import org.hibernate.cfg.Configuration;
    class ClientStudent {
    public static void main(String[] args) {
    try{
    Configuration cfg= new Configuration();
    cfg.configure("/hibernate.cfg.xml");
    SessionFactory factory = cfg.buildSessionFactory();
    Session session = factory.openSession();
    Transaction tx = session.beginTransaction();
    student Sto = new student();
    Sto.setSno(1);
    Sto.setSname("saichand");
    Sto.setMobile(412171);
    Sto.setEmail("[email protected]");
    session.save(Sto);
    tx.commit();
    session.close();
    }catch(HibernateException ex)
    ex.printStackTrace();
    /////Hibernate.cfg.xml//////
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <!-- Generated by MyEclipse Hibernate Tools. -->
    <hibernate-configuration>
    <session-factory>
    <property name="myeclipse.connection.profile">
    OracleEx
    </property>
    <property name="connection.driver_class">
    sun.jdbc.odbc.JdbcOdbcDriver
    </property>
    <property name="connection.url">jdbc:odbc:dfi</property>
    <property name="connection.username">system</property>
    <property name="connection.password">tiger</property>
    <property name="dialect">
    org.hibernate.dialect.DB2400Dialect
    </property>
    <property name="show_sql">true</property>
    <property name="format_sql">true</property>
    <property name="use_sql_comments">true</property>
    <property name="hibernate.transaction.factory_class">
    org.hibernate.transaction.JDBCTransactionFactory
    </property>
    <property name="hibernate.connection.autocommit">
    false
    </property>
    <mapping resource="student.hdm.xml" />
    </session-factory>
    </hibernate-configuration>
    student.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
    <class name="student" table="student">
    <id name="sno" column="sno" type="integer">
    <generator class="assigned"/>
    </id>
    <property name="sname" column="sname" type="string"/>
    <property name="mobile" column="mobile" type="string"/>
    </class>
    </hibernate-mapping>
    These are the two .xml files........
    While running this program i got the ERROR ..........
    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
    log4j:WARN Please initialize the log4j system properly.
    Exception in thread "main" java.lang.ClassCastException: java.lang.Integer
    at org.hibernate.type.StringType.toString(StringType.java:44)
    at org.hibernate.type.NullableType.toLoggableString(NullableType.java:168)
    at org.hibernate.pretty.Printer.toString(Printer.java:53)
    at org.hibernate.pretty.Printer.toString(Printer.java:90)
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:97)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
    at ClientStudent.main(ClientStudent.java:21)

  • Error while updating order - even after using recommended format

    Used below while updating order:
    1) Transaction
    2) Synchronization
    still getting below error:
    Caused by: atg.service.pipeline.RunProcessException: An exception was thrown from the context of the link named [updatePriceInfoObjects].
            at atg.service.pipeline.PipelineChain.runProcess(PipelineChain.java:393)
            at atg.service.pipeline.PipelineChainContext.runProcess(PipelineChainContext.java:207)
            at atg.service.pipeline.PipelineManager.runProcess(PipelineManager.java:475)
            at atg.commerce.pipeline.CommercePipelineManager.runProcess(CommercePipelineManager.java:123)
            at atg.commerce.order.OrderManager.updateOrder(OrderManager.java:2905)
            ... 64 common frames omitted
    Caused by: atg.commerce.CommerceException: Saving order 818320012 failed because doing so would result in data being overwritten. This save attempt had an out of date repository item [pricingAdjustment].
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.writeProperties(ProcSavePriceInfoObjects.java:1428)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.savePricingAdjustments(ProcSavePriceInfoObjects.java:1316)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.saveSubtotalPriceInfos(ProcSavePriceInfoObjects.java:1185)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.saveShippingItemsSubtotalPriceInfos(ProcSavePriceInfoObjects.java:1076)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.savePriceInfo(ProcSavePriceInfoObjects.java:1052)
            at atg.projects.store.order.processor.StoreProcSavePriceInfoObjects.savePriceInfo(StoreProcSavePriceInfoObjects.java:101)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.saveOrderPriceInfo(ProcSavePriceInfoObjects.java:807)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.runProcess(ProcSavePriceInfoObjects.java:716)
            at atg.service.pipeline.PipelineLink.runProcess(PipelineLink.java:255)
            at atg.service.pipeline.PipelineChain.runProcess(PipelineChain.java:365)
            ... 68 common frames omitted
    Caused by: atg.repository.ConcurrentUpdateException: no rows updated oldVersion=1 for item=pricingAdjustment:pa5090009 in GSATransaction=atg.adapter.gsa.GSATransaction@2c6042ec    thread=[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' transaction=Xid=BEA1-439B3F1AD2C4DD758FA4(744502646),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=3600,activeThread=Thread[[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],XAServerResourceInfo[ATGProductionDS_atgdv02g3]=(ServerResourceInfo[ATGProductionDS_atgdv02g3]=(state=started,assigned=none),xar=ATGProductionDS,re-Registered = false),SCInfo[atgdv02g3+ss_ps01]=(state=active),local properties=({weblogic.jdbc.jta.ATGProductionDS=[autoCommit=true,enabled=true,isXA=true,isJTS=false,vendorID=0,connUsed=true,doInit=false,'null',destroyed=false,poolname=ATGProductionDS,appname=null,moduleName=null,connectTime=38,dirtyIsolationLevel=false,initialIsolationLevel=2,infected=false,lastSuccessfulConnectionUse=1384308810784,secondsToTrustAnIdlePoolConnection=10,currentUser=null,currentThread=null,lastUser=null,currentError=null,currentErrorTimestamp=null,JDBC4Runtime=true,supportStatementPoolable=true,needRestoreClientInfo=false,defaultClientInfo={},supportIsValid=true]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=ss_ps01+devrdatgap138.dev.nintendo.com:10180+atgdv02g3+t3+, XAResources={ATGPublishingDS_atgdv02g3, WLStore_atgdv02g3__WLS_ss_ps01, ATGSwitchingDS_A_atgdv02g3, ATGSwitchingDS_B_atgdv02g3, WSATGatewayRM_ss_ps01_atgdv02g3, ATGAgentDS_atgdv02g3, ATGProductionDS_atgdv02g3},NonXAResources={})],CoordinatorURL=ss_ps01+devrdatgap138.dev.nintendo.com:10180+atgdv02g3+t3+)
            at atg.adapter.gsa.GSAItemDescriptor.updateItem(GSAItemDescriptor.java:7507)
            at atg.adapter.gsa.GSARepository.updateItem(GSARepository.java:1075)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.writeProperties(ProcSavePriceInfoObjects.java:1424)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.savePricingAdjustments(ProcSavePriceInfoObjects.java:1316)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.saveSubtotalPriceInfos(ProcSavePriceInfoObjects.java:1187)
            at atg.commerce.order.processor.ProcSavePriceInfoObjects.saveShippingItemsSubtotalPriceInfos(ProcSavePriceInfoObjects.java:1077)
            ... 74 common frames omitted

    Update your Order with the pattern suggested by Devon, here is the link
    Design Pattern for Updating an ATG Order | Devon Hillard&amp;#039;s Digital Sanctuary

  • Error while Importing SQL Table's Metadata

    Hi
    I am creating an External defination of category "dbtab". when i try to import the table in 3rd step i get this error.
    "Error occurred while attempting to connect to database".
    I checked the JDBC channel, in the channel getting this error "Error processing request in sax parser: Error when executing statement for table/stored proc. 'metadataRequest' (structure 'statement'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode."
    Please help

    Hi,
      Check this discussion.
    Re: JDBC Channel : Connection reset
    Also try setting AutoCommit = true (Check box in the JDBC adapter)
    Regards,
    Ravi Kanth Talagana
    Edited by: Ravi Kanth Talagana on Oct 27, 2009 11:07 AM

  • Error while installing and verifying Timesten on windows.

    Hi ,
    I am trying to install Timesten 32bit on windows platform , everything went well , created a odbc source , then used ttIsql to connect to the dsn , created the table , however when i try to view the version by select * from v$version i get the following error ,
    Command> autocommit 0;
    Command> set passthrough 2;
    Command> select * from v$version;
    5104: Could not initialize the function pointers backend database api. Functi
    n OCIEnvCreate was not in the library.
    The command failed.
    Please help.
    thnx
    Vikash

    Do you have a supported version of the Oracle client installed on the machine? If so, were the relevant environment variables set in the global environment/registry before the TimesTen Data Manager service was started? Generally, if you install Oracle, or the Oracle client, after installing TimesTen then you must reboot the machine, or at least stop and restart the TimesTen service, for the new environment variables to be picked up.
    Chris

Maybe you are looking for

  • Home Hub 3/USB HDD causing internet connection to ...

    Hi Guys,  I've been using a Home Hub 3 for a couple of years without any real problems. I recently decided to plug a USB HDD into the hubs usb port to act as shared storage on the network. I initially tried using an unpowered portable HDD which faile

  • Thunderbolt Ethernet not working after Yosemite upgrade

    Upgraded last night to 10.10, and now my Thunderbolt Ethernet adapter has no MAC address, and my MBP appears to think the cable is unplugged - it's not, and worked fine when the MBP was running 10.9 yesterday. Things which haven't worked: Deleting an

  • Error in Adapter engine in RWB

    Hi, I'm facing 2 type of issues in RWB, Issue 1) Adapter Engine is in Red State in Component monitoring, Error: Details for 'Is the Adapter Engine Running?' Response from Adapter Engine: Fatal ArchiveJob (Archiving) failed.(Details: Code: MS.JOB.ARCH

  • Can't import CDs to network volume....permissions

    I have iTunes 11 and can't import any CDs to my iTunes library folder which is stored on my NAS.   The library is at /volumes/media/music.   iTunes complains that it can't write to this folder, but I can navigate there using shell from my Mac and can

  • How do I change the default program to open PDFs?

    I would like Adobe Acrobat 9 to open my PDFs as a default program. When I followed the Adobe prompt to update (pop up), it changed the default to Adobe Reader 10.