Mapping ejb and database - primary key problem

I'm trying to map some ejb's to an existing database. Unfortunately, when I load the db schema into deploytool, the table I'm interested in is not available because it doesn't have any primary key defined.
Is it impossible to map an ejb to a db table without primary key ?
Is it a sun-specific feature, or can I expect the same behaviour from other application servers vendors ?
Thanks for the help.

Hi Maxime,
In J2EE RI 1.4, you can't map beans to tables w/o primary keys. I don't know, how other other products treat this issue.
Regards,
-- markus.

Similar Messages

  • Replication for Data on DEV and QA - bad idea - primary key problem now

    I goofed.  I tried to use replication to keep the data on my dev machine up to date with the live server.  Now when I try to work on the database, adding new stuff, it fails.  It says there is a primary key problem every time I try to add
    a new item to a table with my program.  I should have realized this would happen!  Now, even though I've removed the replication, I'm having the problem.  Can anyone help me get my database functional again :/  Or should I resort to a database
    restore.  Thanks!

    So you have an IDENTITY column in your table? Run a
    DBCC CHECKIDENT (Transact-SQL) command with option RESEED to fix the current identity value to see if it works then.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Exception: non-read-only mapping defined for the primary key field

    Hello.
    I'm new to Oracle and I created Java EE Web Project.
    And I created entities from tableA, tableB, tableC from my database.
    tableA has foreign key to tableB and has unidirectional Many-to-One relationship. tableC has two primary keys and one of these is foreign key to primary key in tableA. tableC also has unidirection Many-to-One relationship to tableA.
    Then I created session bean and data control from it, in design window, created read-only table from tableA.
    And I selected columns in tableA and also in tableB.
    I ran the application and saw the following exception in log window.
    Local Exception Stack:
    Exception [EclipseLink-46] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: There should be one non-read-only mapping defined for the primary key field [tableC.tableA_ID].
    Descriptor: RelationalDescriptor(mypack.tableC --> [DatabaseTable(tableC)])
    tableA_ID is a primary key in tableA.
    How can I solve this error?
    Please help me.
    Edited by: 900471 on 2011. 12. 3 오전 5:32
    Edited by: 900471 on 2011. 12. 3 오전 5:33
    Edited by: 900471 on 2011. 12. 3 오전 5:33
    Edited by: 900471 on 2011. 12. 3 오전 5:34

    There are not enough details to be sure since you have not provided the mappings. From just the error, it looks like you are using the tableC.tableA_ID field as the foreign key in the ManyToOne relationship to A, but have marked it as insertable=false, writeable=false, meaning that it cannot be updated or used for inserts.
    Either make it writable (set the settings to true), or add another basic mapping/attribute in the entity for TableC that maps to the field which you can use to set when you insert a new tableC entity. A simple example is available at
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/2.0/DerivedIdentifiers
    Best Regards,
    Chris

  • Javax.ejb.EJBException: Null primary key returned by ejbCreate method

    Hi all,
    I'm using SunOne 7.1 and I got this error when I call the create on the CMP bean.
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.ejb.EJBException: Null primary key returned by ejbCreate method
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: javax.ejb.EJBException: Null primary key returned by ejbCreate method
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.ejb.containers.EntityContainer.postCreate(EntityContainer.java:801)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.applicationAdmin.ejb.ApplicationAdminBean_854379388_ConcreteImpl_LocalHomeImpl.createNewApplication(ApplicationAdminBean_854379388_ConcreteImpl_LocalHomeImpl.java:64)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean_EJBObjectImpl.insertNewApplicationName(SFApplicationAdminBean_EJBObjectImpl.java:31)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin._SFApplicationAdminBean_EJBObjectImpl_Tie._invoke(Unknown Source)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:569)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:211)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:113)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:275)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:83)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(ServicableWrapper.java:25)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(FastThreadPool.java:283)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at java.lang.Thread.run(Thread.java:534)
    cmp:
    public java.lang.Integer ejbCreateNewApplication(java.lang.String application) throws javax.ejb.CreateException {
    setApplication(application);
    return null;
    The key is auto_increment and is an integer.
    I'm usin MySQL and it is already set up as ANSI. (running as mysqld --ansi)
    Any Idea?
    Thanks in advance

    What happend when two concourrent user try to get the same key on the table? If for example I have 30 users at same time do I have lock table?
    Any way here the finest log using sunone 8. The error is the same, so I think I missing something:
    [#|2004-08-14T12:11:19.296+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=11;|IM: preInvokeorg.apache.catalina.servlets.DefaultServlet@1acecf3|#]
    [#|2004-08-14T12:11:19.296+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=11;|IM: postInvokeorg.apache.catalina.servlets.DefaultServlet@1acecf3|#]
    [#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
    [#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Changing Policy Context ID: oldV = null newV = Test|#]
    [#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = SFApplicationAdmin (Action) = create,Home, (Codesource) = (file:/Test <no certificates>)|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = SFApplicationAdmin (Action) = insertNewApplicationName,Remote,java.util.Hashtable (Codesource) = (file:/Test <no certificates>)|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: preInvokeuk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean@1fa487f|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: doAsPrivileged contextId(Test)|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    new|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    mgmt: com.sun.enterprise.naming.TransientContext:com.sun.enterprise.naming.TransientContext@ad00b2|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    new|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    SFApplicationAdmin: javax.naming.Reference:Reference Class Name: reference
    Type: url
    Content: ejb/SFApplicationAdmin
    |#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = ApplicationAdmin (Action) = createNewApplication,LocalHome,java.lang.String (Codesource) = (file:/Test <no certificates>)|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|[Pool-ApplicationAdmin]: Added PoolResizeTimerTask...|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: preInvokeuk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl@7ae165|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|:Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] -->SQLPersistenceManagerFactory.getPersistenceManager().|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] <->SQLPersistenceManagerFactory.getPersistenceManager() FOUND javax.transaction.Transaction: com.sun.ejb.containers.PMTransactionImpl@5.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<--SQLPersistenceManagerFactory.getFromPool().|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|PersistenceManagerImpl cache properties: _txCacheInitialCapacity=20, _flushedCacheInitialCapacity=20, _flushedCacheLoadFactor=0.75, _weakCacheInitialCapacity=20, _weakCacheLoadFactor=0.75.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.utility|_ThreadID=22;|NullSemaphore constructor() for PersistenceManagerImpl.cacheLock.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.utility|_ThreadID=22;|NullSemaphore constructor() for PersistenceManagerImpl.fieldUpdateLock.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<--SQLPersistenceManagerFactory.getFromPool() PM: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c for JTA com.sun.ejb.containers.PMTransactionImpl@5.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<->SQLPersistenceManagerFactory.getPersistenceManager() JDO Transaction:   Transaction:
    status = STATUS_NO_TRANSACTION
    Transaction Object = Transaction@16077795
    threads = 0
    .|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.transaction|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] Tran[   Transaction:
    status = STATUS_NO_TRANSACTION
    Transaction Object = Transaction@16077795
    threads = 0
    ].begin:status = STATUS_NO_TRANSACTION ,txType: UNKNOWN for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.transaction|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] Tran[   Transaction:
    status = STATUS_NO_TRANSACTION
    Transaction Object = Transaction@16077795
    threads = 0
    ].setStatus: STATUS_NO_TRANSACTION => STATUS_ACTIVE for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] <->SQLPersistenceManagerFactory.getPersistenceManager() : com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c for JTA: com.sun.ejb.containers.PMTransactionImpl@5.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.getCurrentWrapper() > current: null.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.pushCurrentWrapper() > current: null  new: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@567117.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.popCurrentWrapper() > current: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@567117  prev: null.|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: postInvokeuk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl@7ae165|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|Exception in forceDestroyBean()
    java.lang.IllegalStateException: Primary key not available
         at com.sun.ejb.containers.EntityContextImpl.getPrimaryKey(EntityContextImpl.java:114)
         at com.sun.ejb.containers.EntityContainer.forceDestroyBean(EntityContainer.java:1232)
         at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:2559)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2416)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:763)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:197)
         at $Proxy10.createNewApplication(Unknown Source)
         at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
         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:324)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.insertNewApplicationName(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:324)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    |#]
    [#|2004-08-14T12:11:26.196+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|EJB5018: An exception was thrown during an ejb invocation on [ApplicationAdmin]|#]
    [#|2004-08-14T12:11:26.196+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
    java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
         at com.sun.jdo.spi.persistence.support.ejb.cmp.JDOEJB11HelperImpl.assertPrimaryKeyFieldNotNull(JDOEJB11HelperImpl.java:446)
         at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl.setApplicationId(ApplicationAdminBean_1421299025_ConcreteImpl.java:102)
         at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean.ejbCreateNewApplication(ApplicationAdminBean.java:93)
         at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl.ejbCreateNewApplication(ApplicationAdminBean_1421299025_ConcreteImpl.java:334)
         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:324)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:140)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:168)
         at $Proxy10.createNewApplication(Unknown Source)
         at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
         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:324)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.insertNewApplicationName(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:324)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
         at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:2564)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2416)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:763)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:197)
         at $Proxy10.createNewApplication(Unknown Source)
         at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
         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:324)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.insertNewApplicationName(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:324)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    |#]
    Any Idea?
    Thanks in advance for any help

  • Help with primary key problem

    Oracle 9.2.0 on Red Hat Linux advanced server 2.1
    (There are a number of large tables that this applies to)
    I have a partitioned table where during the creation of the table a Primary key was declared and was placed 'using index tablespace primary_key'. So the table is created, and the primary key is set to use the 'primary_key' tablespace.
    Since our loads are quite large, we disable constraints during the load process, then enable them after the load has completed. Here's the problem, when the constraints are enabled, the tablespace for constraints change to the default tablespace of the schema owner.
    We have a specific tablespace created to hold the primary keys of the various tables, called 'primary_key'. The schema owner has his own default tablespace called 'POWER1'. When the schema owner runs the enable script to enable the primary keys, they all start being placed in 'POWER1' which is not nearly as large as 'primary_key' and as a result the first couple primary keys are created in 'POWER1' and then 'unable to extend segment in tablespace POWER1' pops up and the rest of the primary keys fail to enable.
    The workaround for this is to set the default tablespace for the schema owner to to be 'primary_key' but that is not what we really want.
    any feedback on this is appreciated, thanks

    In the old days, when we disabled a primary constraint, Oracle dropped the index. When we re-enabled the constraint the index was built again. But, if we didn't specify the index tablspace when we re-enabled the constraint the index was built in the default tablespace. Which is what is happening to you now.
    In 9i Oracle added the KEEP INDEX clause, which allowed us to retain the index even though the primary key was no longer enforced. However, as your aim is to increase the speed of data take on, you in fact want the index dropped. So, what you need to do is:
    ALTER TABLE whatever DISABLE PRIMARY KEY
    DROP INDEX;
    ALTER TABLE whatever ENABLE PRIMARY KEY
    USING INDEX TABLESPACE indx;Cheers, APC

  • Getting the UPDATEd value and its primary key

    I have two procedures, proc1 and proc2.
    In proc1 there is an update happening like
    CREATE OR REPLACE procedure proc1
    as
    TYPE NumList IS TABLE OF employees.employee_id%TYPE;
    enums NumList;
    TYPE NameList IS TABLE OF employees.last_name%TYPE;
    names NameList;
    BEGIN
    UPDATE emp set sal=900 WHERE department_id = 30
    RETURNING employee_id, last_name BULK COLLECT INTO enums, names;
    DBMS_OUTPUT.PUT_LINE('Updated ' || SQL%ROWCOUNT || ' rows:');
    FOR i IN enums.FIRST .. enums.LAST
    LOOP
    DBMS_OUTPUT.PUT_LINE('Employee #' || enums(i) || ': ' || names(i));
    END LOOP;
    END;
    /In proc2 which is getting executed just after proc2 i want to SELECT the sal column values and its primary keys(employee_id) which got updated in proc 1.
    How can i achieve this?

    add two out parameters from proc1 so that you can pass them into proc2 (obv. you'd need to add two in parameters to proc2 if they aren't there already)

  • Mapping in OWB with primary key and foreign key relationship

    Hi all,
    I am new to this datawarehousing field. I have just started my career. I have to now create a mapping in owb where a table has a field which is a primary key of another table in the same staging area. If you guys could help me out with the a method it can be created that would be very helpful to me.
    I thought of 2 ideas,
    1. If I can use a look up, but then I am not sure if i can use a lookup for primary key, foreign key relationship. If I can use also, I do not know how to use that.
    2. What if I can directly take that the first table and link the primary key of that table to the second table which uses that primary key of the first table as one of its fields.
    I do not know how feasible these methods are. Please guys help me out.
    Thanks in advance.

    I have a similar case where table a and table b having relation but table a got inserted with data and table b is empty so there no values for foriegn key column in table b to realte with table a.
    Now i want to load table b foriegn key with primary key column values of table a.
    how can we do this in owb
    thanks
    kumar

  • Primary key problem using with oc4j

    Hi everyone
    I have deployed my entity bean in the oc4j container without any problem.But when I use the search->primary key in the console,no results display.
    detail:
    Step1I open the oc4j console by typing java -jar orion.jar -console
    the oc4j container is successfully built
    and in the left part of my console I see my entity bean
    step2 I click my entity bean and in the right of the console in the search->primary key I type the a number which exists in my table in the database.
    but no results display.
    the following is my datasource-file anf orion-ejb-jar file
    data-sources.xml
    <?xml version="1.0"?>
    <!DOCTYPE data-sources PUBLIC "-//Evermind//- Data-sources configuration" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
         <data-source
              class="com.evermind.sql.DriverManagerDataSource"
              name="jdbc/OracleDSCore"
              location="jdbc/OracleDSCore"
              pooled-location="jdbc/OracleDSPooled"
              xa-location="jdbc/xa/OracleDSXA"
              connection-driver="oracle.jdbc.driver.OracleDriver"
              username="SCOTT"
              password="TIGER"
              url="jdbc:oracle:thin:@localhost:1521:b2b"
         />
    </data-sources>
    orion-ejb-jar.xml
    <?xml version = '1.0' encoding = 'GBK'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
    <enterprise-beans>
    <entity-deployment name="EMP" data-source="jdbc/OracleDSCore" table="EMP" >
    <primkey-mapping>
    <cmp-field-mapping>
    <fields>
    <cmp-field-mapping name="EMPNO"
    persistence-name="EMPNO" persistence-type="VARCHAR2(4)"/>
    </fields>
    </cmp-field-mapping>
    </primkey-mapping>
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="&lt;default-ejb-caller-role>" impliesAll="true"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    Any answer is welcome. Thankou in advance!

    Fernando,
    I see you suffer a lot with ADF...write me at [email protected] and let´s keep in touch.
    Maybe we can do a Brazilian list for JDev/ADF.
    Regards,
    Marcelo Alcantara

  • CMP with Auto-increment Primary Key problem

    I'm trying to set a column as IDENTITY in PointBase and have the app server utilize this in the CMP beans. I followed the instructions from the tutorial:
    - In the deployment descriptor, the primary key class is defined as a java.lang.Object. The primary key field is not specified.
    - In the home interface, the argument of the findByPrimaryKey method must be java.lang.Object.
    - In the entity bean class, the return type of the ejbCreate method must be a java.lang.Object.
    Below is (a fragment of) my deployment descriptor:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <display-name>CMPModule</display-name>
    <enterprise-beans>
    <entity>
    <display-name>DocState</display-name>
    <ejb-name>DocState</ejb-name>
    <home>com.sun.itstar.j2ee.projectdocmgt.ejb.DocStateHome</home>
    <remote>com.sun.itstar.j2ee.projectdocmgt.ejb.DocState</remote>
    <local-home>com.sun.itstar.j2ee.projectdocmgt.ejb.LocalDocStateHome</local-home>
    <local>com.sun.itstar.j2ee.projectdocmgt.ejb.LocalDocState</local>
    <ejb-class>com.sun.itstar.j2ee.projectdocmgt.ejb.DocStateBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Object</prim-key-class>
    <reentrant>False</reentrant>
    <abstract-schema-name>DocState</abstract-schema-name>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>description</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>color</field-name>
    </cmp-field>
    </entity>
    In the admin-serv/logs directory I get the follow message (bad place for the logs, took me a while to find where it was putting it!):
    [24/Sep/2002:16:33:57] WARNING ( 4165): Validation error in bean DocumentType: Warning: All primary key columns in primary table DOCUMENT_TYPE of the bean corresponding to the generated class com.sun.itstar.j2ee.projectdocmgt.ejb.DocumentTypeBean_387898907_JDOState must be mapped to key fields.
    Map the following primary key columns to key fields: DOCUMENT_TYPE.ID. If you already have fields mapped to these columns, verify that they are key fields.

    Great! This worked. Here are some clear steps:
    1. delete the field from the CMP
    2. delete any business methods that you might have for the field
    3. go to the properties of the bean, find the primary key property. Set the property to Unkown Primey Key Class (java.lang.Object)
    Now there is a bigger problem. CMR fields. In ejbPostCreate() the bean gets its own pk and looks up other related beans. Now that I have removed the accessor to the pk field (and the pk field from the bean), how do I lookup the relationships?
    I need some method that I can call from within ejbPostCreate() that will return the primary key...
    I tried adding the field back in but not as the primary key. That generated an exception that said you cannot do that. If the field is the pk it must be marked as the pk.
    Any ideas?

  • Primary Key problem in 11g - Known issue 6894412

    Hi Everyone:
    We are on JDeveloper 11.1.1.4, and JHeadstart 11.1.1.2.46. This thread originally started on the JHeadstart forum and can be seen at: Problem with LOV's in 11g
    We are converting our 10g application to 11g. We have an established Oracle database that does not use pre-populated primary keys that are sequence number. Our database has composite keys and the integrity of those composite keys are established by foreign key constraints to edit tables. This approach has worked extremely well for us for over a decade, the logic of the database has been designed so that the database protects itself through the elimination of cascade deletes where necessary, and cascade deletes as the business logic dictates. This will not be changing.
    In the database tables in which the 10g application has been displayed in the table format, after conversion to 11g, the LOV pop-ups are not working unless the SAVE button (or refresh of the browser) has been pressed. The first LOV pop-up will work, but as soon as you select a value from it, the next LOV pop-ups will not execute until the SAVE or REFRESH is done. This is only in table format. If the display format is form, our primary key LOV's work fine. In 10g, this functionality worked fine as long as we didn't use an "ADD ROW" button on a table format. The Add Row button caused the primary key values to be returned to the application, but not be displayed on the screen. A refresh would then show them.
    From the initial investigation in the JHeadstart forum, I realize that we are hitting the "Primary Keys from Model" 6894412 problem that is listed in the 11.1.1.4 Release Notes. We have spent many, many hours establishing a re-usable .jar file of all of the entities of this very large database as suggested by JDeveloper Best Practises (http://download.oracle.com/docs/cd/B31017_01/web.1013/b25947/bcadvgen007.htm). This has worked very well for us in 10g - define all the entity specifics in one place, once, then every application can re-use them. Productivity at its finest. Therefore, we cannot make fake columns in our database in order to fix this "limitation" in 11g. We have many complex parent/child/child tables to put into our application which will not work unless our entities have the primary keys properly defined. I have tried to implement the workaround that was found in the release notes, but have been unable to get it to work.
    I have created a testcase with the HRSchema by adding a table to that Schema that I can provide the SQL commands for, but I do not know who in Oracle support to send it to. Could someone please provide me with the information on who to contact. I have, I believe, taken all the steps as established in the release notes for this problem and have clearly documented the changes in the .jsff page, but the problem still exists. Clearly, I am doing something wrong, or need more information.
    Thank you in advance
    Mary
    UofW

    Frank:
    I thank you for your reply.
    I have been working on the JHeadstart forums for so long, I actually forgot how to submit things to Metalink, and now that I have done it again...SR #3-3101357281 for this issue....I realize why I blocked out using Metalink from my memory.
    It took me an incredible amount of time to fill that SR in, then after completing everything, I was sent a request by the person assigned to the SR to repeat the instructions of how to run my testcase. I had already filled out all of the instructions on how to run the testcase in the "Notes to Oracle" section of the upload step. Almost every time I send something to Metalink, I have to repeat things. It seems as though they aren't read fully and any reason at all is used to send them back to the client.
    My dealings with Metalink have been very, very frustrating. My colleagues share this sentiment.
    Mary
    UofW

  • Primary key problem - Urgent! PLEASE, HELP!

    Hi all,
    I'm new here, and I have a stupid problem, I think. If someone could help me, I'll be grateful.
    I have to build a very simple JSP application using a few database tables, providing the base functionality: insert, update, delete, search.
    I'm using Oracle 8.1.7, and JDeveloper 9.0.3
    One table looks like that:
    CREATE TABLE TEST (
         sPrimaryKey varchar2(30) not null,
         sField varchar2(100)
    ALTER TABLE TEST
    ADD ( CONSTRAINT test_id_pk
              PRIMARY KEY (sPrimaryKey)
    I'm using a sequence for generating primary key...
    CREATE SEQUENCE test_seq
    START WITH 100
    INCREMENT BY 1
    NOCACHE
    NOCYCLE;
    ... and a trigger before insert for seting the new value of the primary key.
    CREATE OR REPLACE TRIGGER BI_TEST
    BEFORE INSERT ON TEST
    FOR EACH ROW
    DECLARE
         new_id integer;
    BEGIN
         select test_seq.nextval into new_id from dual;
         :new.sPrimaryKey := 'AAA' || new_id;
    END;
    I have created a BC4J. How can I insert a new row into that table without providing the primary key, by hand, and let the trigger and sequence do that?
    Thank you!
    Razvan

    In the attribute settings editor for the Attribute TestIdPk in Entity Test:
    select Updateable Never
    deselect Mandatory
    select Refresh After Update & Refresh After Insert
    HTH.
    Thanks, George

  • Database Primary Key Question - Best Practices

    I posted this in the ADDT forum, but I imagine I'll get more
    responses here:
    All you database developers - how do you deal with primary
    keys? Do you
    ALWAYS use an AutoIncrement/AutoNumber? Or only sometimes? Is
    there an
    argument to NOT use AutoIncrement? I know how I create
    databases and how
    I usually do things. I know how a few of my colleagues work.
    But how
    about the rest of the world? (Research for a MS Access book I
    am
    involved with.)
    Alec
    Adobe Community Expert

    .oO(Alec)
    >I posted this in the ADDT forum, but I imagine I'll get
    more responses here:
    >All you database developers - how do you deal with
    primary keys? Do you
    >ALWAYS use an AutoIncrement/AutoNumber?
    No.
    >Or only sometimes? Is there an
    >argument to NOT use AutoIncrement?
    AUTO_INCREMENT is a proprietary MySQL feature. For some
    people this
    might be an argument against it, but doesn't have to. Every
    DBMS has its
    own special features. You just have to decide whether you
    want to keep
    your code/queries as portable as possible or want to get the
    most out of
    your DB. Usually I prefer performance/features over
    portability, simply
    because for me and my projects it's very unlikely that I have
    to change
    the DBMS. I've chosen MySQL for good reasons and will stay
    with it for
    quite a while.
    >I know how I create databases and how
    >I usually do things. I know how a few of my colleagues
    work. But how
    >about the rest of the world? (Research for a MS Access
    book I am
    >involved with.)
    It always depends on the table itself, what data it contains,
    what I
    want to do with it and also some personal preferences. In n:m
    tables for
    example there's no need for an extra numeric PK, since the
    entire record
    already is the PK, built from two or more FKs.
    But if I need a numeric PK, I usually use sequences. Some
    DBMS support
    them natively, in MySQL they can be emulated with an extra
    table. It
    simply means, that the used PK number is generated _before_
    the record
    itself is inserted. For me and my framework this has some
    advantages
    (makes the internal work a bit easier), but of course in
    other cases an
    AUTO_INCREMENT might be more appropriate.
    So IMHO there's no general solution. If an AUTO_INCREMENT or
    something
    similar fits your needs, you should use it. I don't see a
    real problem
    with that.
    Micha

  • Mapping tables with no primary key defined

    Hi!
    I was just wondering if it's possible to map a table with no primary key? The reason why is that I have a logging table that I want to access, which is built very simple and the only useful filtering criteria that I'll be using there is a date column.
    Regards,
    Bjorn Boe

    TopLink requires that an object have a primary key to determine identity, perform caching, and database updates and deletes. It is best to define a primary key in all your objects; a sequence number can be used if the object has no natural primary key. The primary key does not have to be defined on the database, as long as a set of fields in the table are unique you can define them to be the primary key in your TopLink descriptor.
    If your table truly has no primary key, nor unique set of fields, it is still possible to map the table with some restrictions. If you disable caching, and mark the object as read-only, and never update or delete the object, you can map it for read-only purposes.
    You will need to do the following:
    - Set any field as the primary key to avoid the validation warning.
    - Set the cache type to NoIdentityMap.
    - Set the descriptor to be read-only.

  • EJB with no primary key?

    I have an EJB with two fields, timestamp (Date) and entry (String). It's possible for two fields to have the same timestamp, so I can't use it as the primary key. Is it possible to just say there isn't a primary key, or do I have to do something tricky?

    I'd be a little easier about it if the page you pointed to didn't show the DAO being accessed from an -entity- bean ..
    I think I'm going to stick with an auto-incrementing key. I think I might use another EJB to keep the count, which maybe I can re-use across all my other applications. My only worry is about performance, because I'm going to be getting the current count every single time I create a new log entry. Though .. I think it'll be pretty efficient, I'm going to assume the EJB I use for the count doesn't update the database every single time I increment it.
    Either that, or I could be tricky and wait a millisecond if the date I get is the same as the last one. ;-)

  • Oracle 10g express edition primary key problem

    Hi , i have a database with varchar as primary key eg.SEG. however after i insert row and set priamry key as SEG , the primary key will be displayed as number eg.1 and not SEG. Why is it so?

    835401 wrote:
    Table Data Indexes Model Constraints Grants Statistics UI Defaults Triggers Dependencies SQL
    CREATE TABLE "TEST_DEPARTMENT"
    (     "DEPT_CODE" VARCHAR2(10) NOT NULL ENABLE,
         "DEPT_NAME" VARCHAR2(50),
         CONSTRAINT "TEST_DEPARTMENT_PK" PRIMARY KEY ("DEPT_CODE") ENABLE
    CREATE OR REPLACE TRIGGER "BI_TEST_DEPARTMENT"
    before insert on "TEST_DEPARTMENT"
    for each row
    begin
    select "TEST_DEPARTMENT_SEQ".nextval into :NEW.DEPT_CODE from dual;
    end;
    ALTER TRIGGER "BI_TEST_DEPARTMENT" ENABLE
    This is my SQLSo why is DEPT_CODE defined as VARCHAR2(10) when you are going to populate it (via the trigger) with a NUMBER?

Maybe you are looking for