TOPLINK-4002 No suitable driverCode with MySql5

Hello,
I try to use Jdev 10.1.3 and Toplink and driver mysql-connector-java-3.1.12-bin.jar to access a MySql 5 server db.
I can open a Jdbc connection to MySql db without problem.
I could generate the Toplink Mapping and create the Toplink Object Relational Map.
But when i try to create a TopLink Database Session to MySql, i receive the message:
Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
Exception interne : java.sql.SQLException: No suitable driverCode d'erreur : 0
My source code to create the Database Session:
XMLSessionConfigLoader xmlLoader = new oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader("META-INF/sessions.xml");
oracle.toplink.tools.sessionmanagement.SessionManager sessionManager = oracle.toplink.tools.sessionmanagement.SessionManager.getManager();
DatabaseSession topLinkSession = (DatabaseSession)sessionManager.getSession(xmlLoader, mySession, new BusinessObjectFactory().getClass().getClassLoader());
Can anybody help me?
Jean-Marc

Jean-Marc,
It sounds like your login information is incorrectly configured or you do have the JDBC library on your project classpath. To test out the TopLink configuration I typically write a small test client or JUnit test case that verifies my configuration and ability to login.
Here is a simple block of code you can use to diagnose the problem:
package testing;
import java.util.List;
import junit.framework.TestCase;
import oracle.toplink.sessions.Session;
import oracle.toplink.tools.sessionmanagement.SessionManager;
import oracle.toplink.util.SessionFactory;
import toplink.example.model.Employee;
public class ConnectTest extends TestCase {
    public void test() throws Exception {
        SessionFactory factory = new SessionFactory("default");
        Session session = factory.acquireSession();
        List<Employee> emps = session.readAllObjects(Employee.class);
        for (Employee emp: emps) {
            System.out.println("READ> " + emp);
        session.release();
        SessionManager.getManager().destroyAllSessions();
}This assume your sessions configuration file is located at: 'META-INF/sessions.xml' and that the session name is 'default' if these are different then alter the SessionFactory constructor.
Assuming this is all in place you should simply ensure that the MySQL JDBC library is on your library classpath for the project and execute the test case (or sample client's main()).
Doug

Similar Messages

  • TOPLINK-4002: java.sql.SQLException: No suitable driver

    Good Day,
    I'm building a simple test where a BPEL is using a Database Service; it's set up to talk to an XE database (Oracle JDBC) option. The IDE works great but when I try to run the BPEL the following error occurs:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:fpre="http://schemas.oracle.com/bpel/extension"><faultcode xmlns="">fpre:remoteFault</faultcode><faultstring xmlns=""/><faultactor xmlns=""/><detail xmlns=""><summary>null: Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'DatabaseServiceSelect' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by Exception [TOPLINK-4002] (Oracle TopLink - 11g Technology Preview 3 (11.1.1.0.0) (Build 071207)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: No suitable driver
    Error Code: 0.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    </summary></detail></env:Fault></env:Body></env:Envelope>
    After reading a few threads I'm still confused as to what to do here; it seems that I must copy some jar files in some lib folder - it's not clear to me what jars, from where and to where; the jars must be somewhere as the IDE works; I'd greatly appreciate if someone can answer this.
    Then why does everything work fine in the IDE but when I deploy there's problems - shouldn't everything be bundled with the IDE and server; I'm not using some strange 3rd party data store?
    Further I'd like to know when using some of the other services is this behavior to be expected - must you manually configure them somewhere and copy jars?
    Regards
    J

    Hi Everyone,
    I managed to sort this one by doing the following:
    1. Copy the jar files from $JOH\jdbc\lib to $JDEV_USR_DIR\workspace\system11.1.1.0.22.47.96\o.j2ee\embedded-oc4j\applib.
    2. Edit the connection from the DatabaseAdapater tab and ticked both Save and Deploy Password buttons.
    After this I restarted the whole lot; it's now talking to the database which is most useful.
    Hope this helps others.

  • Exception [TOPLINK-4002] : A lock could not be obtained within the time req

    Hi,
    i am using Toplink bundled with Netbeans 5.5.1.
    I have 2 projects : one with common objects and one with business objects. When a business session bean calls a common session bean in order to create and persist a common object used in business part, we have the following errors :
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: A lock could not be obtained within the time requested
    Error Code: -1
    Call: SELECT ID FROM IMAGESOWNER WHERE (ID = ?)
    bind => [2]
    Query: DoesExistQuery()
    at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:304)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:551)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:437)
    at oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:465)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:213)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:199)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectRowForDoesExist(DatasourceCallQueryMechanism.java:642)
    at oracle.toplink.essentials.queryframework.DoesExistQuery.executeDatabaseQuery(DoesExistQuery.java:243)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:609)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:536)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2219)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:894)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.checkForUnregisteredExistingObject(UnitOfWorkImpl.java:516)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork$1.iterate(RepeatableWriteUnitOfWork.java:123)
    at oracle.toplink.essentials.internal.descriptors.DescriptorIterator.internalIterateReferenceObject(DescriptorIterator.java:174)
    at oracle.toplink.essentials.internal.descriptors.DescriptorIterator.iterateReferenceObjectForMapping(DescriptorIterator.java:281)
    at oracle.toplink.essentials.mappings.ObjectReferenceMapping.iterateOnRealAttributeValue(ObjectReferenceMapping.java:254)
    at oracle.toplink.essentials.internal.indirection.IndirectionPolicy.iterateOnAttributeValue(IndirectionPolicy.java:207)
    at oracle.toplink.essentials.mappings.ForeignReferenceMapping.iterate(ForeignReferenceMapping.java:571)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.iterate(ObjectBuilder.java:2061)
    at oracle.toplink.essentials.internal.descriptors.DescriptorIterator.iterateReferenceObjects(DescriptorIterator.java:296)
    at oracle.toplink.essentials.internal.descriptors.DescriptorIterator.startIterationOn(DescriptorIterator.java:469)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.discoverUnregisteredNewObjects(RepeatableWriteUnitOfWork.java:145)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.discoverAllUnregisteredNewObjects(UnitOfWorkImpl.java:1278)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.assignSequenceNumbers(UnitOfWorkImpl.java:368)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.collectAndPrepareObjectsForCommit(UnitOfWorkImpl.java:707)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1098)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2429)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:186)
    at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:116)
    at oracle.toplink.essentials.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:76)
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:406)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:358)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3736)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3515)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1305)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1267)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:104)
    at $Proxy190.createAMember(Unknown Source)
    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 com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:204)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:123)
    at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:196)
    at ppcobjectssessionbeans.__PpcMemberSessionRemote_Remote_DynamicStub.createAMember(__PpcMemberSessionRemote_Remote_DynamicStub.java)
    at ppcobjectssessionbeans._PpcMemberSessionRemote_Wrapper.createAMember(ppcobjectssessionbeans._PpcMemberSessionRemote_Wrapper.java)
    at polyplastoclub.admin.addMember_action(admin.java:630)
    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 com.sun.el.parser.AstValue.invoke(AstValue.java:174)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:284)
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
    at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
    at javax.faces.component.UICommand.broadcast(UICommand.java:383)
    at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
    at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:258)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:189)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:81)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:193)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:255)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
    Caused by: java.sql.SQLException: A lock could not be obtained within the time requested
    at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
    at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
    at org.apache.derby.client.am.ResultSet.next(Unknown Source)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:502)
    ... 97 more
    Caused by: org.apache.derby.client.am.SqlException: A lock could not be obtained within the time requested
    at org.apache.derby.client.am.ResultSet.completeSqlca(Unknown Source)
    at org.apache.derby.client.net.NetResultSetReply.parseFetchError(Unknown Source)
    at org.apache.derby.client.net.NetResultSetReply.parseCNTQRYreply(Unknown Source)
    at org.apache.derby.client.net.NetResultSetReply.readFetch(Unknown Source)
    at org.apache.derby.client.net.ResultSetReply.readFetch(Unknown Source)
    at org.apache.derby.client.net.NetResultSet.readFetch_(Unknown Source)
    at org.apache.derby.client.am.ResultSet.flowFetch(Unknown Source)
    at org.apache.derby.client.net.NetCursor.getMoreData_(Unknown Source)
    at org.apache.derby.client.am.Cursor.stepNext(Unknown Source)
    at org.apache.derby.client.am.Cursor.next(Unknown Source)
    at org.apache.derby.client.am.ResultSet.nextX(Unknown Source)
    ... 99 more
    If i persist the common object in business part, i have no problem : is it a toplink limit or there is something to do ?
    Best regards
    H. Deslandes

    Hi,
    I am getting same error code but with different error details.
    Whenever my BPEL process is idle for a long time and then if I execute the BPEL process, it gives me an error from db adapter as shown here:
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="code">
    <code>17002
    </code>
    </part>
    -<part name="summary">
    <summary>
    file:/oracle/product/Oracle_SOA_10.1.3/bpel/domains/default/tmp/.bpel_IHCloseTaskResponse_1.0_aaa6a3e5c7a3340eff9954dbeaf1e374.tmp/InsertIHCloseDB.wsdl [ InsertIHCloseDB_ptt::write(IhCloseMainCollection) ] - WSIF JCA Execute of operation 'write' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    write failed. Descriptor name: [InsertIHCloseDB.IhCloseMain]. [Caused by: Io exception: Broken pipe]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    write failed. Descriptor name: [InsertIHCloseDB.IhCloseMain]. [Caused by: Io exception: Broken pipe]
    Caused by Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Io exception: Broken pipeError Code: 17002
    Call:SELECT TIH_REFERENCE_NUMBER FROM IH_CLOSE_MAIN WHERE (TIH_REFERENCE_NUMBER = ?)
         bind => [IH1107100305]
    Query:DoesExistQuery().
    </summary>
    </part>
    -<part name="detail">
    <detail>
    Internal Exception: java.sql.SQLException: Io exception: Broken pipeError Code: 17002
    Call:SELECT TIH_REFERENCE_NUMBER FROM IH_CLOSE_MAIN WHERE (TIH_REFERENCE_NUMBER = ?)
         bind => [IH1107100305]
    Query:DoesExistQuery()
    </detail>
    </part>
    </remoteFault>
    Can any body help me to sort out this problem, please?
    Many thanks in advance.

  • Security 090398 Invalid Subject and TOPLINK-4002 error.

    Hi,
    I am running a soa application with SOA 11g and keep getting below exceptions from soa weblogic admin console. I can still run the application but don't know how to clean the error. any suggestions how to fix the issue? Thanks in advance.
    Call: SQLCall(INSERT INTO COMPOSITE_INSTANCE_FAULT (ID, COMPOSITE_INSTANCE_ID, B
    R_CATEGORY, UNIQUE_ID, BINDING_TYPE, CPST_PARTITION_DATE) VALUES (?, ?, ?, ?, ?,
    Query: InsertObjectQuery(oracle.integration.platform.instance.CompositeInstanceF
    [TopLink Warning]: 2011.07.26 16:17:05.729--ClientSession(99855179)--Exception [
    Internal Exception: java.sql.SQLException: java.lang.SecurityException: [Securit
    Error Code: 0
    ####<Jul 26, 2011 3:38:07 PM EDT> <Error> <oracle.integration.platform.instance> <DRSSBRA2913> <AdminServer> <weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@3ac9b3c> <Tksmau5l3NSXhDfOeb7L7ubmyW6lsKrbQVo8ckt0> <> <e893b723eb6fbe4f:-3bb14c3b:13157b3753d:-8000-000000000001b6fa> <1311709087384> <BEA-000000> <oracle.integration.platform.instance.store.DOStore$RetryableException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.4.0) (Build 101210)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[Tksmau5l3NSXhDfOeb7L7ubmyW6lsKrbQVo8ckt0]
    Error Code: 0
         at oracle.integration.platform.instance.store.DOStore.put(DOStore.java:179)
         at oracle.integration.platform.instance.error.DOObjectExceptionHandler.recover(DOObjectExceptionHandler.java:41)
         at oracle.integration.platform.instance.error.FileBackedExceptionHandler.recoverObjects(FileBackedExceptionHandler.java:309)
         at oracle.integration.platform.instance.error.FileBackedExceptionHandler.recover(FileBackedExceptionHandler.java:301)
         at oracle.integration.platform.instance.error.FileBackedExceptionHandler.run(FileBackedExceptionHandler.java:355)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.4.0) (Build 101210)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[Tksmau5l3NSXhDfOeb7L7ubmyW6lsKrbQVo8ckt0]
    Error Code: 0
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:282)
         at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:128)
         at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:84)
         at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:153)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:273)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:231)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:478)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1347)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:251)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.rollbackTransaction(DatasourceAccessor.java:580)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.rollbackTransaction(DatabaseAccessor.java:1406)
         at oracle.toplink.internal.sessions.AbstractSession.basicRollbackTransaction(AbstractSession.java:369)
         at oracle.toplink.threetier.ClientSession.basicRollbackTransaction(ClientSession.java:135)
         at oracle.toplink.internal.sessions.AbstractSession.rollbackTransaction(AbstractSession.java:3003)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.rollbackTransaction(UnitOfWorkImpl.java:4486)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.rollbackTransaction(UnitOfWorkImpl.java:4507)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1384)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1427)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1173)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:945)
         at oracle.integration.platform.instance.store.DOStore.put(DOStore.java:176)
         at oracle.integration.platform.instance.error.DOObjectExceptionHandler.recover(DOObjectExceptionHandler.java:40)
         at oracle.integration.platform.instance.error.FileBackedExceptionHandler.recoverObjects(FileBackedExceptionHandler.java:308)
         ... 5 more
    Caused by: java.sql.SQLException: java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[Tksmau5l3NSXhDfOeb7L7ubmyW6lsKrbQVo8ckt0]
         at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:259)
         at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiDataSource.java:352)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:369)
         at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:123)
         ... 26 more
    Caused by: java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[Tksmau5l3NSXhDfOeb7L7ubmyW6lsKrbQVo8ckt0]
         at weblogic.security.service.SecurityServiceManager.seal(SecurityServiceManager.java:833)
         at weblogic.security.service.IdentityUtility.authenticatedSubjectToIdentity(IdentityUtility.java:30)
         at weblogic.security.service.RoleManager.getRoles(RoleManager.java:183)
         at weblogic.security.service.AuthorizationManager.isAccessAllowed(AuthorizationManager.java:375)
         at weblogic.jdbc.common.internal.JDBCUtil.checkPermission(JDBCUtil.java:231)
         at weblogic.jdbc.common.internal.ConnectionPool.doAuthorizationCheck(ConnectionPool.java:443)
         at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:344)
         at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:324)
         at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:94)
         at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiDataSource.java:350)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:369)
         at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:123)
         at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:84)
         at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:153)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:273)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:231)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:478)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1348)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:251)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.rollbackTransaction(DatasourceAccessor.java:580)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.rollbackTransaction(DatabaseAccessor.java:1407)
         at oracle.toplink.internal.sessions.AbstractSession.basicRollbackTransaction(AbstractSession.java:369)
         at oracle.toplink.threetier.ClientSession.basicRollbackTransaction(ClientSession.java:135)
         at oracle.toplink.internal.sessions.AbstractSession.rollbackTransaction(AbstractSession.java:3003)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.rollbackTransaction(UnitOfWorkImpl.java:4487)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.rollbackTransaction(UnitOfWorkImpl.java:4508)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1385)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1427)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1173)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:945)
         at oracle.integration.platform.instance.store.DOStore.put(DOStore.java:176)
         at oracle.integration.platform.instance.error.DOObjectExceptionHandler.recover(DOObjectExceptionHandler.java:41)
         at oracle.integration.platform.instance.error.FileBackedExceptionHandler.recoverObjects(FileBackedExceptionHandler.java:309)
         ... 5 more
    >
    Regards,
    Kelvin.

    I had the same issue, it got resolved after closing the Context in finally block

  • Replace collection [TOPLINK-4002] error

    Hi all!
    I've a 1:N relationship.
    I need to replace the objects in the collection.
    I've used the following code:
    if (distretti != null) {
    //create new list
    usrlgdistretti=new ArrayList(distretti.size());
    it = distretti.iterator();
    //add elements to list
    while (it.hasNext()) {
    Tbdistretti dist=(Tbdistretti)unofw.registerObject(it.next());
    if(dist!=null){
    Usrlgdistretti uld=(Usrlgdistretti)unofw.registerObject(new Usrlgdistretti());
    uld.setDistretti(dist);
    uld.setTdbuser(user);
    usrlgdistretti.add(uld);
    //change the collection
    user.setUsrlgdistrettiCollection(usrlgdistretti);
    but, if I try to replace the collection [object A, object B] with the collection [object B, object C], i get an [TOPLINK-4002] error, caused by object B and the UNIQUE constraint.
    do I need to use "performDeleteFirst" of unitofwork?
    can you please help me?
    thanks!

    Replacing the collection is fine. The rule of thumb though is that the objects in the new collection should be working copies retrieved from the database and registered with the UnitOfWork. If ObjectB was an existing working copy you would not see and INSERT attempted for it.
    Instead of simply creating new instances for the target collection you need to see if you can retrieve existing elements to use.
    Doug

  • Exception [TOPLINK-4002]

    Hi,I have no idea,help.thanks
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: null; nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Error Code: 0
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: null; nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException:Connection refused: connect。
    Error Code: 0
         at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:191)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:176)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:123)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:196)
         at org.acrowise.RCP.__SessionEJB_Remote_DynamicStub.getEmail(__SessionEJB_Remote_DynamicStub.java)
         at org.acrowise.RCP._SessionEJB_Wrapper.getEmail(org.acrowise.RCP._SessionEJB_Wrapper.java)
         at org.acrowise.client.testClient.main(testClient.java:21)
    Caused by: java.rmi.RemoteException: null; nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Connection refused: connect。
    Error Code: 0
         at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:237)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1337)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1267)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
         at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:104)
         at $Proxy82.getEmail(Unknown Source)
         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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:125)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:658)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:198)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1821)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1681)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1063)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:179)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:781)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:538)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2542)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:502)
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Connection refused: connect。
    Error Code: 0
         at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:290)
         at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:135)
         at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:170)
         at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:537)
         at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
         at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:212)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:78)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:111)
         at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:84)
         at com.sun.enterprise.util.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:335)
         at com.sun.enterprise.util.EntityManagerWrapper.createNamedQuery(EntityManagerWrapper.java:733)
         at org.acrowise.RCP.SessionEJBBean.getEmail(SessionEJBBean.java:98)
         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 com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1055)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:163)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2846)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3930)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
         ... 17 more
    Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException: Connection refused: connect。
         at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:102)
         at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:130)
         ... 36 more
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: null; nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/20/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException Connection refused: connect。
    Error Code: 0
         at org.acrowise.RCP._SessionEJB_Wrapper.getEmail(org.acrowise.RCP._SessionEJB_Wrapper.java)
         at org.acrowise.client.testClient.main(testClient.java:21)

    TopLink Essentials is attempting to connect to a data source within your container and failing. Does the data source name provided in your persistence.xml match what is configured in the container?
    Doug

  • While scheduling I am getting the Exception [TOPLINK-4002] Error

    Dear All,
    While scheduling I am getting the following Error
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: No more data to read from socketError Code: 17410 Call:UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 1 WHERE SEQ_NAME = 'SUBSCRIPTION_ID_SEQ' Query:DataModifyQuery()
    Error Detail
    I am Using BI Publisher 10.1.3.3.1

    Yes, Please I need your support
    I have this issue related to this subject.
    But I have two databases Oracle 10g release 2 and the toplink have thi url jdbc
    jdbc:oracle:thin:@
    (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.33.12.38)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.33.12.39)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = MITDB)
    (FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))
    for connecting two databases, now when i try to submit button this message was thrown, i need to apply RAC
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: No more data to read from socketError Code: 17410
    Call:UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 1 WHERE SEQ_NAME = 'IND_REG_REQ_SEQ'
    Query:DataModifyQuery()
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: OALL8 is in an inconsistent state.Error Code: 0
    Call:SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = 'IND_REG_REQ_SEQ'
    Query:ValueReadQuery()
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4011] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Exception Description: Error preallocating sequence numbers. The sequence table information is not complete.
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Io exception: Software caused connection abort: socket write errorError Code: 17002
    Call:UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 1 WHERE SEQ_NAME = 'MITREQUEST_SEQ'
    Query:DataModifyQuery()
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Closed ConnectionError Code: 17008
    Call:SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = 'MITREQUEST_SEQ'
    Query:ValueReadQuery()
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4011] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Exception Description: Error preallocating sequence numbers. The sequence table information is not complete.
    [TopLink Warning]: 2008.03.24 06:56:40.101--ClientSession(27665811)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Closed ConnectionError Code: 17008
    Message was edited by:
    Mohammed Amr.

  • TOPLINK-4002 SQL string is not Query Error Code: 17128

    I got following exception when trying to execute native SQL query via session EJB. The query is defined in orm.xml file using JDev 11g Preview:
    javax.ejb.EJBException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 070502)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: SQL string is not QueryError Code: 17128
    Call:findProfilesByLastName
    I have following native query defined:
    select o.last_name,
    o.first_name,
    o.middle_name,
    o.birth_date,
    o.sex_code,
    a.height_cm,
    a.weight_kg,
    o.PERSON_ID
    from persons o,
    person_bookings b,
    person_physical_attributes a
    where o.PERSON_ID = b.PERSON_ID
    and b.PERSON_BOOK_ID = a.PERSON_BOOK_ID
    and o.last_name like '%?1%'
    I also tried these versions of the same query but got the same exception:
    select o.last_name,
    o.first_name,
    o.middle_name,
    o.birth_date,
    o.sex_code,
    a.height_cm,
    a.weight_kg,
    o.PERSON_ID
    from persons o,
    person_bookings b,
    person_physical_attributes a
    where o.PERSON_ID = b.PERSON_ID
    and b.PERSON_BOOK_ID = a.PERSON_BOOK_ID
    and o.last_name like '%:1%'
    select o.last_name,
    o.first_name,
    o.middle_name,
    o.birth_date,
    o.sex_code,
    a.height_cm,
    a.weight_kg,
    o.PERSON_ID
    from persons o,
    person_bookings b,
    person_physical_attributes a
    where o.PERSON_ID = b.PERSON_ID
    and b.PERSON_BOOK_ID = a.PERSON_BOOK_ID
    and o.last_name like '%#partialName%'
    select o.last_name,
    o.first_name,
    o.middle_name,
    o.birth_date,
    o.sex_code,
    a.height_cm,
    a.weight_kg,
    o.PERSON_ID
    from persons o,
    person_bookings b,
    person_physical_attributes a
    where o.PERSON_ID = b.PERSON_ID
    and b.PERSON_BOOK_ID = a.PERSON_BOOK_ID
    and o.last_name like '%#partialName#%'
    Log trace:
    Query:DataReadQuery(); nested exception is:
    Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 070502)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: SQL string is not QueryError Code: 17128
    Call:findProfilesByLastName
    Query:DataReadQuery(); nested exception is: oracle.oc4j.rmi.OracleRemoteException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 070502)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: SQL string is not QueryError Code: 17128
    Call:findProfilesByLastName
    Query:DataReadQuery(); nested exception is:
    Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 070502)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: SQL string is not QueryError Code: 17128
    oracle.oc4j.rmi.OracleRemoteException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 070502)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: SQL string is not QueryError Code: 17128
    Call:findProfilesByLastName
    Query:DataReadQuery()
    at com.evermind.server.ejb.EJBUtils.getUserException(EJBUtils.java:127)
    at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:91)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:52)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at oracle.oc4j.security.SecurityServices.doAsPrivileged(SecurityServices.java:150)
    at oracle.oc4j.security.SecurityServices.doAsPrivileged(SecurityServices.java:420)
    at oracle.oc4j.security.JaasModeImpl$DoAsPrivilegedExecutor.execute(JaasModeImpl.java:280)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:57)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:58)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:104)
    at SearchFacade_RemoteProxy_43jlpm9.queryProfilesByLastName(Unknown Source)
    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 com.evermind.server.rmi.RmiMethodCall.invokeMethod(RmiMethodCall.java:104)
    at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:59)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    Nested exception is:
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 070502)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: SQL string is not QueryError Code: 17128
    at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:283)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:583)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:443)
    at oracle.toplink.internal.sessions.AbstractSession.executeCall(AbstractSession.java:749)
    at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
    at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:179)
    at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:250)
    at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:232)
    at oracle.toplink.queryframework.DataReadQuery.executeNonCursor(DataReadQuery.java:122)
    at oracle.toplink.queryframework.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:114)
    at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:671)
    at oracle.toplink.queryframework.DataReadQuery.execute(DataReadQuery.java:100)
    at oracle.toplink.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:594)
    at oracle.toplink.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2632)
    at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1014)
    at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:986)
    at oracle.toplink.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:395)
    at oracle.toplink.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:502)
    at ejbmodel.SearchFacadeBean.queryProfilesByLastName(SearchFacadeBean.java:107)
    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 com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:27)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
    at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:52)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at oracle.oc4j.security.SecurityServices.doAsPrivileged(SecurityServices.java:150)
    at oracle.oc4j.security.SecurityServices.doAsPrivileged(SecurityServices.java:420)
    at oracle.oc4j.security.JaasModeImpl$DoAsPrivilegedExecutor.execute(JaasModeImpl.java:280)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:57)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:58)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:104)
    at SearchFacade_RemoteProxy_43jlpm9.queryProfilesByLastName(Unknown Source)
    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 com.evermind.server.rmi.RmiMethodCall.invokeMethod(RmiMethodCall.java:104)
    at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:59)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: SQL string is not Query
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:72)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:105)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:168)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:224)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:439)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1302)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3522)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3574)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:267)
    at oracle_jdbc_driver_OraclePreparedStatementWrapper_Proxy.executeQuery(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:754)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:518)
    ... 51 more

    Does this error only occur when the SQL is defined in orm.xml ? Have attempted to run this query in code only?
    --Gordon                                                                                                                                                                                                                                                   

  • Using Toplink Version 2.5.1 with Oracle 9i

    I am trying to find out if I can use an old version of TOPLink, version 2.5.1 with Oracle 9i.
    Has anybody deployed TOPLink 2.5.1 on Oracle 9i? Any input/help/documentation is appreciated.
    Thank you for your help in advance,
    Sc.

    Hi Srinivasa,
    As long as you chose a complient JDBC driver, there should be no problems.
    Darren

  • Suitable distro with Pavilion 15 p050su

    Hello, as the title said I need suitable distro with Pavilion 15 p050su. I tried Ubuntu 14.04 but I have problem with my wireless card. I thought to try with OpenSUSE but decided first to ask here. I think that will be good to mention that I have problem with my wireless card driver(Broadcom N43142), my wireless range is always at the minimum even when I'm infront of the router, the problem isn't in the router bucause there are other machines connected to it. 

    Hi @Combat_Engineer,
    Welcome to the HP Support Forums!
    I understand that you are having problems with the wireless adapter on your notebook. What  operating system is currently installed? You mentioned Ubuntu 14.04. Is that still your current OS?
    The following may be helpful for diagnosing the problem although it is more for windows.
    Resolving Universal WLAN, Wireless, and Wi-Fi Errors
    If you determine that the problem is more the WLAN hardware, then I would recommend calling in to phone support at  800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    Please see the following for instructions on the parts and servicing for your notebook.
    HP Pavilion 17 Notebook PC HP Pavilion 15 Notebook PC - Maintenance and Service Guide
    Malygris1
    I work on behalf of HP
    Please click Accept as Solution if you feel my post solved your issue, it will help others find the solution.
    Click Kudos Thumbs Up on the right to say “Thanks” for helping!

  • Toplink Optimistic Locking not working with Session Bean facade.

    I am working on Oracle JDeveloper v 10.1.2 and connecting to an Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
    The application is based on J2EE architecture and the technology stack uses Struts for presentation/controller framework, Stateless Session EJBs as session facade for custom business services, Simple java classes for the business services, Toplink implementation of DAO layer, Domain objects are mapped to database tables using Toplink Workbench that ships with JDeveloper. The transaction is managed by the session bean and hence the toplink session is configured to use external transaction controller and a named datasource as follows.
    <session xsi:type="server-session">
    <name>DBSession</name>
    <server-platform xsi:type="oc4j-1012-platform"/>
    <event-listener-classes/>
    <logging xsi:type="toplink-log">
    <log-level>fine</log-level>
    <file-name>D:/ToplinkLog.log</file-name>
    </logging>
    <primary-project xsi:type="xml">META-INF/toplink-descriptor.xml</primary-project>
    <login xsi:type="database-login">
    <platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</platform-class>
    <external-connection-pooling>true</external-connection-pooling>
    <external-transaction-controller>true</external-transaction-controller>
    <sequencing>
    <default-sequence xsi:type="native-sequence">
    <name>Native</name>
    <preallocation-size>1</preallocation-size>
    </default-sequence>
    </sequencing>
    <datasource>jdbc/ORADS</datasource>
    </login>
    </session>
    We intend to use Optimistic Locking based on Timestamp-version locking through an audit field "last_modification_date" of type java.sql.Timestamp. The corresponding database field is also of type Timestamp(6). We are not storing the version in cache.
    The problem we are facing is as follows.. we have an edit screen from where user can edit values for a domain object which are then persisted using Toplink...we expect Toplink to check the database record version (modification_date timestamp) before it applies the update. In DAO implementation, we register the object in a unitOfWork, then set the modified values, however we leave the modification_date (version field) unedited. Now when the application is running, on edit, an exception is thrown by the Session bean before ending the transaction.
    com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Error in transaction: java.lang.NullPointerException
         at TrackingMediator_StatelessSessionBeanWrapper2.editOverheadExpenditure(TrackingMediator_StatelessSessionBeanWrapper2.java:1597)
         at com.enbridge.dsm.web.action.TrackingPortfolioAction.editOverheadExpenditure(TrackingPortfolioAction.java:264)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:278)
         at com.enbridge.dsm.web.shared.BaseAction.execute(BaseAction.java:90)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
         at com.enbridge.dsm.web.shared.DSMPojoRequestProcessor.process(DSMPojoRequestProcessor.java:182)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1425)
         at com.sourcebeat.strutslive.common.SLActionServlet.process(SLActionServlet.java:44)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at com.enbridge.dsm.web.shared.security.SecurityFilter.doFilter(SecurityFilter.java:142)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
         Nested exception is:
    java.lang.NullPointerException
         at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:1190)
         at com.evermind.sql.FilterConnection.commit(FilterConnection.java:209)
         at com.evermind.sql.DriverManagerXAConnection.commit(DriverManagerXAConnection.java:203)
         at com.evermind.server.TransactionEnlistment.commit(TransactionEnlistment.java:251)
         at com.evermind.server.ApplicationServerTransaction.singlePhaseCommit(ApplicationServerTransaction.java:745)
         at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:690)
         at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:1035)
         at TrackingMediator_StatelessSessionBeanWrapper2.editOverheadExpenditure(TrackingMediator_StatelessSessionBeanWrapper2.java:1593)
         at com.enbridge.dsm.web.action.TrackingPortfolioAction.editOverheadExpenditure(TrackingPortfolioAction.java:264)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:278)
         at com.enbridge.dsm.web.shared.BaseAction.execute(BaseAction.java:90)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
         at com.enbridge.dsm.web.shared.DSMPojoRequestProcessor.process(DSMPojoRequestProcessor.java:182)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1425)
         at com.sourcebeat.strutslive.common.SLActionServlet.process(SLActionServlet.java:44)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at com.enbridge.dsm.web.shared.security.SecurityFilter.doFilter(SecurityFilter.java:142)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    Note that the exception is thrown at the time when the session bean is about to commit the transaction. i.e. the DAO code did not throw any exception and was able to check the optimistic locking and submit the update transaction.
    I am not able to understand why is the the EJB throwing this weird error with Optimistic locking implementation. The application is working fine when the optimistic locking is disabled.
    I am facing another problem due to this problem... since the session bean throws this exception after exiting the bean implemented method, when trying to commit the transaction, I am not able to mark the session context to setRollbackOnly. Hence if I continue on to another transaction by navigating to another screen in the application, mysteriously the previous transaction gets committed!!... again... weird...

    I am using JDBC driver version 10.1.2.
    I saw this additional error message in JDeveloper console, which for some reason was not logged to my log4j log file... if it helps...
    06/09/22 18:32:10 Thr[thread 6]-TransactionEnlistment.TransactionEnlistment.Caught forgetandRollback XAException e null
    Here are the logs from my Toplink log file....
    [TopLink Info]: 2006.09.22 06:31:46.546--ServerSession(989)--Thread(Thread[HttpRequestHandler-86,5,main])--TopLink, version: Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)
    [TopLink Info]: 2006.09.22 06:31:46.578--ServerSession(989)--Thread(Thread[HttpRequestHandler-86,5,main])--Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
    [TopLink Config]: 2006.09.22 06:31:46.593--ServerSession(989)--Connection(991)--Thread(Thread[HttpRequestHandler-86,5,main])--connecting(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> ""
         connector=>JNDIConnector datasource name=>jdbc/ORADS
    [TopLink Config]: 2006.09.22 06:31:47.484--ServerSession(989)--Connection(1432)--Thread(Thread[HttpRequestHandler-86,5,main])--Connected: jdbc:oracle:thin:@10.210.16.37:1521:orabld
         User: APP_USR
         Database: Oracle Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver Version: 10.1.0.3.0
    [TopLink Config]: 2006.09.22 06:31:47.500--ServerSession(989)--Connection(1433)--Thread(Thread[HttpRequestHandler-86,5,main])--connecting(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> ""
         connector=>JNDIConnector datasource name=>jdbc/ORADS
    [TopLink Config]: 2006.09.22 06:31:47.500--ServerSession(989)--Connection(1434)--Thread(Thread[HttpRequestHandler-86,5,main])--Connected: jdbc:oracle:thin:@10.210.16.37:1521:orabld
         User: APP_USR
         Database: Oracle Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver Version: 10.1.0.3.0
    [TopLink Info]: 2006.09.22 06:31:47.671--ServerSession(989)--Thread(Thread[HttpRequestHandler-86,5,main])--DBSession login successful
    [TopLink Fine]: 2006.09.22 06:31:47.703--ServerSession(989)--Connection(1554)--Thread(Thread[HttpRequestHandler-86,5,main])--select * from user_role ur, app_resource ar, role_resource rr where rr.APP_RESOURCE_ID = ar.APP_RESOURCE_ID and rr.USER_ROLE_ID = ur.USER_ROLE_ID
    [TopLink Fine]: 2006.09.22 06:31:49.937--ServerSession(989)--Connection(10245)--Thread(Thread[HttpRequestHandler-86,5,main])--SELECT * FROM PROGRAM_SUB_CAT
    [TopLink Fine]: 2006.09.22 06:31:50.015--ServerSession(989)--Connection(10332)--Thread(Thread[HttpRequestHandler-86,5,main])--SELECT PROGRAM_ID, CREATED_BY_USERID FROM (SELECT CREATED_BY_USERID, ROWNUM PROGRAM_ID FROM (SELECT DISTINCT(CREATED_BY_USERID) CREATED_BY_USERID, 1 AS PROGRAM_ID FROM PROGRAM))
    (I only see my application specific queries after this... no exceptions or debug logs)... as I said before.. the application gives exception in the session bean at the time of commit, and there's no exception raised from Toplink code in DAO...

  • Toplink\JPA vs JDBC - Toplink died for my app with 5000 users

    Hi All Just a quick question about performance when comparing toplink jpa ans jdbc.
    I have an app I just develpoed using toplink for all data acces that will have approx 5000 users and initial testing with 200 things look good. However after launch and going live for 5000 people the app blew up. Lot's of memory heap errors, and TopLink exceptions...
    To make things work I have replaced all the toplink with traditional JDBC, this works but I am currious as to why toplink blew up? I notice when JDev creates the Toplink code that it never does any checking for open connections and never explicitly closes connections. Is this something that I have to do?
    I should not that I was not using datacontrols directly, I created a datacontrol but then ised the FacesContext to create a list of results in the backing bean??
    Anyway, I know that's not a great description but I thought I would throw this question out there and see what people had to say?
    Thanks
    J

    It is hard to say where a memory issue occurred. Normally usage of a memory profiler such as JRockit JRA, or JProfiler is useful in debugging such issues.
    There were a couple related memory issues in previous releases, so ensure you have the latest release or patch release.
    Using an isolated (shared=false) or weak cache may also help.
    In general you should be able to scale to 5000 users without any issues.
    James : http://www.eclipselink.org

  • Toplink 9.0.4.5 with java 5

    Hi
    I'm wondering how toplink 9.0.4.5. copes with java 5. since its shipped with jre 1.4.
    What enabling generics features can do to toplink workbench - for example.
    Br
    PF

    I'm wondering how toplink 9.0.4.5. copes with java 5.
    since its shipped with jre 1.4.
    What enabling generics features can do to toplink
    workbench - for example.TopLink 9.0.4.5 predates Java 5 so it was not certified against it but I'm not aware of any reported problems. If you do use generics in your code it shouldn't be a problem because generics are a compile time feature, not runtime. Generics information is lost in compilation (which is referred to as type erasure). The Workbench works with .class files which contains no generics information and there's no way to get that information without looking at the source.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • No suitable driver with com.mysql.jdbc.Driver

    Ok. here's the issue. I have a windows box. (first problem) but let's pretend that it's ok. :) I installed Tomcat 4.1 installed J2SDK1.4.0
    start serving pages GREAT!. I have Mysql working perfectly with PHP on this system. I JUST want to connect with JDBC :)
    I've downloaded the MySQL Jdbc Connector/J 3.08 stable installed the .jar file in the $JAVA_HOME/jre/lib/ext as per the README
    Now granted I am a little new to JSP. but I have checked over this again and again. used different code. connected as many ways as I can think of and I still get the same result.
    Database Error :
    No suitable driver
    Please Try Some Other Time
    So I figure it's a MYSQL issue. no I also went thru and did the Microsot connection to MS SQL 2000 with the same result.
    Here's where the drivers are (tried using the other method for installing the MySQL connector as well, and my class path
    Y:\j2sdk1.4.0\com\mysql\jdbc\Driver.class
    com.mysql.jdbc.Driver.class
    Y:\j2sdk1.4.0\org\gjt\mm\mysql\Driver.class
    org.gjt.mm.mysql.Driver.class
    My classpath is:
    .;F:\j2sdk1.4.0\;F:\j2sdk1.4.0\bin\;F:\j2sdk1.4.0\lib\;F:\j2sdk1.4.0\lib\classes\
    [ Here's The Enviorment]
    Windows 2000 5.00.2195 SP3
    MS SQL 2K SP3
    Apache Tomcat/4.1.27
    j2sdk1.4.0
    MySql 3.23.57-nt
    mysql Jdbc Connector/J 3.08 stable
    <!-- mysql.jsp BEGIN-->
    <%@ page import="java.sql.*" %>
    <%
    Connection conn;
    ResultSet results;
    try      {
         String jdbc_driver = "com.mysql.jdbc.Driver";
         System.out.println("jdbc_driver = " + jdbc_driver);
         Class.forName(jdbc_driver).newInstance();
         catch (ClassNotFoundException cnfe)
         System.out.println(cnfe.getMessage());
    try      {
         String url = "jdbc:mysql://localhost:3306/javatest?username=root,password=****"; // pass hidden
         conn = DriverManager.getConnection(url);
         System.out.println("connected to mySql DataBase");
         Statement stmt = conn.createStatement();
         Statement smt=conn.createStatement();
         results=smt.executeQuery("select * from testdata");
              while(results.next())
                   %>
                   <%= results.getString("foo")%>
                   <%= results.getString("bar")%>
                   <%= results.getString("id")%>
                   <%
              results.close();
              conn.close();
         catch(Exception exp)
         %>
              <H3>Database Error : </H3><B><%= exp.getMessage() %></B><H3>Please Try Some Other Time</H3>
         <%
    %>
    <!-- mysql.jsp end -->
    BTW i aslo tried connecting to MicrosoftSQL 2K
    <!-- microsoft.jsp Begin -->
    <%@ page import="java.sql.*" %>
    <%
    Connection conn;
    ResultSet results;
    try      {
         String jdbc_driver = "sun.jdbc.odbc.JdbcObdcDriver";
         System.out.println("jdbc_driver = " + jdbc_driver);
         Class.forName(jdbc_driver).newInstance();
         catch (ClassNotFoundException cnfe)
         System.out.println(cnfe.getMessage());
    try      {
         String url = "jdbc:odbc:contacts";
         String username = "javauser";
         String pw = "javauser";
         conn = DriverManager.getConnection(url, username, pw);
         System.out.println("connected to Msoft DataBase");
         Statement stmt = conn.createStatement();
         Statement smt=conn.createStatement();
         results=smt.executeQuery("select * from contacts");
              while(results.next())
                   %>
                   <%= results.getString("name")%><br>
                   <%
              results.close();
              conn.close();
         catch(Exception exp)
         %>
              <H3>Database Error : </H3><B><%= exp.getMessage() %></B><H3>Please Try Some Other Time</H3>
         <%
    %>
    <!-- microsoft.jsp end -->
    got the exact same results.
    Just to show you mysql is Good. with localhost.
    mysql -u root -h localhost -p
    mysql> use javatest
    Database changed
    mysql> select * from testdata;
    | id | foo | bar |
    | 1 | hello | 12345 |
    1 row in set (0.00 sec)
    mysql>

    Nope, it's not a MySQL issue.
    I'd recommend NOT putting the JDBC JAR file (or any others, except Sun-sanctioned extensions) in JAVA_HOME/jre/lib/ext.
    JDBC JARs belong in TOMCAT_HOME/common/lib or in the WEB-INF/lib directory for your particular app. If you put them in the former, all apps running under Tomcat can have access to them. If you put them in the latter, only your app can see them.
    After you've done that, do some reading about JNDI data sources under Tomcat:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    That way you can get that connection code out of your JSPs and into the web.xml and <Context>, where it belongs. You'll be able to change data sources without rewriting your pages.
    Good luck - MOD

  • Toplink support for stored procedure with 2 OUT  REF CURSOR ?

    Can Toplink StoredProcedureCall be used with Oracle PLSql procedure with 2 OUT parameters. Parameter type is Ref Cursor (Oracle PLSQL resulset)
    Regards

    In a TopLink StoredProcedureCall using an OUT CURSOR the cursor is assumed to map to the result set for the TopLink query.
    For example if you had a stored procedure READ_ALL_EMP that returned a out cursor of EMP rows, you could use that procedure in a TopLink mapped Employee class mapped to the EMP table and use the stored procedure in a ReadAllQuery for the Employee class.
    If the procedure does not return data that maps to objects, you can use a DataReadQuery to access the data. The out cursor would be returned as a Vector of DatabaseRows that contain the data from the cursor rows.
    If the procedures data is complex and does not map to objects, it may be better to access the procedure directly through JDBC.

Maybe you are looking for

  • Can't figure out how to use home sharing

    Since the latest couple iTunes updates, my family and I can not figure out how to use home sharing. Everyone in our household has their own iTunes, and for a long time we would just share our music through home sharing. But with the updates, so much

  • Error multisim 10 with windows vista

    Hi, I have seen that multisim 10 is not compatible with windows vista, when I installed all is ok, but when I try to run the programs it marks an error, with autoroute.dll (998) or something like that, I know that in this forum is already a similar p

  • Domain Guideance and Clarification using SVN and an Export suggestion

    Hello Oracle SQL Data Modeler Support, Apologies if this has been documented somehwere and I have missed reading it, but have gone through the User Guide and cannot find the clarification I want regarding domains. 1) WHAT IS BEST PRACTICE TO SAVE WHE

  • Creating a sales order via lsmw.

    Hi, I am creating sales orders via lsmw. Each of these sales orders may contain any number of line items, i.e. sales order 1 might have 3 line items and the next sales order may have 10. How do I cater for this in lsmw. Is there a way of saying: when

  • Insert Insert XML file into multiple records in Oracle Database

    I would like to find out if it is possible to insert a single XML file into multiple records or tuples in a Oracle database table. I have a single XML file which is at multiple levels. The meta data for the levels are common and each level can have m