JDO or Entity Beans?

I read on an article : "
1. entity beans are slow (due to RMI calls).
2. EJBQL is a weak language; complex operations are not permitted.
3. it is difficult to map into an entity bean complex data.
You should utilize JDO instead of Entity Beans."
What do you think about these statemets?

1. With local interfaces you can eliminate many RMI calls. Many
containers had optimized this anyway prior to EJB 2.0
2. EJBQL is new and will be enhanced rapidly as it is adopted. The
latest draft addresses these issues.
3. EJB relationships help in this area although they will also require
time to mature.
I feel JDO has its place. I especially like JDO where many rows are
required - it can be an excellent active/passive caching mechanism. But I would pursue EJB for bringing up the state of a business process/transaction.

Similar Messages

  • Can JDO replace Entity beans.

    I feel that while designing a J2EE application, using the Java Data Objects alongwith Entity beans is somewhat redundant. Is it so or there is any reason behind this architecture?

    EJB's strength is component transactions. JDO's strength is data object encapsulation. JDO holds forth the potential to standardize OR mapping. The design decision tree is as follows:
    1. Will EJB manage connections and transactions or will the app do it manually?
    2.1 If the app manages connections and transactions, will it use JDBC or an OR mapping toolkit?
    2.2 If the app uses EJB, will the EBs be BMP or CMP?
    2.2.1 If the app uses BMP, will it use JDBC or an OR mapping toolkit?
    3. If the app uses an OR mapping toolkit, will it use JDO?
    Session Bean encapsulates business logic and and can be used for that purpose even if JDO is used rather than EBs.

  • Using JDO under BMP entity beans

    I have an entity bean that is a BMP which uses JDO under the hood. The Oc4J document says that "Bean-managed persistence entity beans manage the resource locking within the bean implementation themselves" in the advanced subject chapter. Ok can someone in oracle add an extra line eloborating on that statement ?
    I am stuck in trying to pass a test that can do concurrent modify of an entity bean. I had 2 or more threads trying to modify one single BMP entity bean object concurrently. The database vendor recognizes one bean had the lock and deny locks to any other beans. Who should block the call to the database until one thread releases the lock on the object ? The developer ? J2EE container ? Database ?
    J2EE tenet "Developers are shielded from concurrency and threading issues while implementing business logic" Does that still hold ??
    An object Person's salary value and his benefit information are tried to be modified at the same time by different external system(salary administrator, benefit's administrator). But I dont want the user to see the lock on the object error, but instead I require a pessimistic lock on the BMP. Why does Oc4J not support pessimistic concurrency option for BMP ?

    Kurien,
    If you wish to bring something to the attention of the "Oracle dev team", I suggest you try Oracle's "MetaLink" Web site:
    http://metalink.oracle.com
    It is the official Oracle support Web site.
    These forums are for the Oracle community. Oracle Corporation employees are not obliged to even visit these forums.
    By the way, I am not an Oracle employee.
    Good Luck,
    Avi.
    P.S. For your information, you may find Debu Panda's blogs of help:
    http://radio.weblogs.com/0135826/

  • Entity Beans /JDO and Datawarehousing

    Hi,
    Currently i'm involved in a project, in which we want to generate some very basic custom reports, like turnover calculations etc.
    These reports will be publish on a intranet environment.
    My questions are:
    How do Entity Beans perform when handling large tables (like a few million of rows).
    What about transactions? The datawarehouse will not be updated by the application. Is it therefore advisible to turn it of, in order to gain performance?
    I'm am completely new to JDO, would JDO be a better alternative compared to entity beans when working with large resultsets?
    I hope someone can help
    Thanks and Regards,
    Velli

    hello
    I strongly suggest to use JDBC instead of EJB/JDO. EJB's are great if you need transactions and has a lot of concurrent access. But they are very slow if you read huge data, because for every row an EJB instance is created. For reports you would need to iterate all those instance, in short, performace would be very bad.
    Turning off transactions wont help. Some containers (WEBLogic) allows to configure entity beans as "read only", thus improving performance by data caching in EJB instances. So... if you really need EJB then you can use that.
    However this would not be very effective too, if you really have millions of rows, because it's not possible to keep them all in RAM.
    For several thousands of records it would be very good, but not millions.
    Furthermore, several design patterns suggest to use JDBC in such sitoation. For more information you can read:
    + http://java.sun.com/blueprints/patterns/FastLaneReader.html
    + book "EJB design patterns" (You can find it at TSS)
    + book "Bitter Java"
    Maris Orbidans
    System.out.println(out2.readOutputValue());

  • Java.lang.IllegalStateException when trying to get a entity bean

    hi all,
    I wrote a simple container managed entity bean and deployed it. When i call the find all method of the entity bean following is the log trace of my exception
    com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection@13974ba TX optimistic: false referenceCount =1 for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINER ( 1496): SQL statement<select t0."USER_ID", t0."LOGIN_NAME", t0."PASSWORD", t0."FIRST_NAME", t0."LAST_NAME", t0."EMAIL", t0."ADDRESS1", t0."ADDRESS2", t0."POSTALCODE", t0."CITY", t0."COUNTRY", t0."STATE", t0."ACCOUNT_STATUS", t0."CREATE_DATE", t0."MODIFY_DATE", t0."CREATED_BY", t0."MODIFIED_BY" from "EXPENSE_USER" t0> with no input values
    [22/Jul/2003:23:35:54] FINE ( 1496): <-> DBVendorType.getSpecialDBOperation():com.sun.jdo.spi.persistence.support.sqlstore.database.oracle.OracleSpecialDBOperation@1a92d3a.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking key field iD as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.acquire() for PersistenceManagerImpl.cacheLock.
    [22/Jul/2003:23:35:54] FINER ( 1496): SQLStoreManager.getPersistenceConfig(), classType = com.expense.ejb.entity.container.UserBean1689033004_JDOState.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore constructor() for SQLStateManager.
    [22/Jul/2003:23:35:54] FINE ( 1496): --> SqlStateManager.applyUpdates(), field = iD.
    [22/Jul/2003:23:35:54] FINEST ( 1496): iD = 1.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.release() for PersistenceManagerImpl.cacheLock.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.acquire() for SQLStateManager.
    [22/Jul/2003:23:35:54] FINEST ( 1496): loginName = root.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field loginName as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): password = root.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field password as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): firstName = super user.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field firstName as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): lastName = null.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field lastName as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): email = root@expen.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field email as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): address1 = xxx .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field address1 as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): address2 = xxx .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field address2 as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): postalCode = 12345 .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field postalCode as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): city = xxxx .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field city as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): country = usa .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field country as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): state = ca .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field state as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): accountStatus = null.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field accountStatus as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): convertValue: 7/22/03 11:07 PM From: java.sql.Timestamp To: class java.lang.Long.
    [22/Jul/2003:23:35:54] FINEST ( 1496): createDate = 7/22/03 11:07 PM.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.release() for SQLStateManager.
    [22/Jul/2003:23:35:54] FINEST ( 1496): --- TransactionImpl.releaseConnection(): TX optimistic: false Inside Commit: false referenceCount: 0 for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): --- TransactionImpl.closeConnection() com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection@13974ba for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---PersistenceManagerImpl.popCurrentWrapper() > current: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@2606b8 prev: null.
    [22/Jul/2003:23:35:54] FINE ( 1496): Exception in forceDestroyBean()
    java.lang.IllegalStateException: Primary key not available
         at com.sun.ejb.containers.EntityContextImpl.getPrimaryKey(EntityContextImpl.java:157)
         at com.sun.ejb.containers.EntityContainer.forceDestroyBean(EntityContainer.java:1252)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1792)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1608)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:133)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread.currentThread()Tran[  Transaction:
    status = STATUS_ACTIVE
    Transaction Object = Transaction@17774593
    threads = 1
    ].afterCompletion: status = STATUS_ACTIVE, sync = null, STATUS_ROLLEDBACK for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ACTIVE
    Transaction Object = Transaction@17774593
    threads = 1
    ].setStatus: STATUS_ACTIVE => STATUS_ROLLING_BACK for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ROLLING_BACK
    Transaction Object = Transaction@17774593
    threads = 1
    ].internalRollback:status = STATUS_ROLLING_BACK ,txType: CMT for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ROLLING_BACK
    Transaction Object = Transaction@17774593
    threads = 1
    ].setStatus: STATUS_ROLLING_BACK => STATUS_ROLLEDBACK for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---PersistenceManagerImpl.afterCompletion() process: true.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ROLLEDBACK
    Transaction Object = Transaction@17774593
    threads = 1
    ].forget:status = STATUS_ROLLEDBACK ,txType: CMT for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---SQLPersistenceManagerFactory.releasePersistenceManager() PM:com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c for JTA Tx: com.sun.ejb.containers.PMTransactionImpl@2.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---SQLPersistenceManagerFactory.releasePersistenceManager() PM:com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c for JTA Tx: null.
    [22/Jul/2003:23:35:54] FINEST ( 1496): <--SQLPersistenceManagerFactory.returnToPool().
    [22/Jul/2003:23:35:54] FINE ( 1496): EJB5018: Some unmapped exception occurred : [{0}]
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
    java.lang.ClassCastException
         at com.expense.ejb.entity.container.UserBean1689033004_JDOState.jdoSetField(UserBean1689033004_JDOState.java:969)
         at com.sun.jdo.spi.persistence.support.sqlstore.model.FieldDesc.setValue(FieldDesc.java:337)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.setFields(ResultDesc.java:749)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.getResult(ResultDesc.java:635)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:648)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:500)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:989)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:634)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.execute(QueryImpl.java:455)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl.ejbFindAll(UserBean1689033004_ConcreteImpl.java:1249)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:128)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
         at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:1893)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1796)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1608)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:133)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.acces
    [22/Jul/2003:23:35:54] FINE ( 1496): EJB5019: Some application or system exception occurred : [UserBean]
    [22/Jul/2003:23:35:54] FINE ( 1496):
    [22/Jul/2003:23:35:55] SEVERE ( 1496): StandardWrapperValve[usertest]: Servlet.service() for servlet usertest threw exception
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
    java.lang.ClassCastException
         at com.expense.ejb.entity.container.UserBean1689033004_JDOState.jdoSetField(UserBean1689033004_JDOState.java:969)
         at com.sun.jdo.spi.persistence.support.sqlstore.model.FieldDesc.setValue(FieldDesc.java:337)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.setFields(ResultDesc.java:749)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.getResult(ResultDesc.java:635)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:648)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:500)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:989)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:634)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.execute(QueryImpl.java:455)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl.ejbFindAll(UserBean1689033004_ConcreteImpl.java:1249)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:128)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
         at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:1893)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1796)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1608)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:133)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.c
    [22/Jul/2003:23:36:15] FINE ( 1496): SingleSignOn[server1]: SSO expiration started. Current entries: 0
    [22/Jul/2003:23:36:15] FINE ( 1496): SingleSignOn[server1]: SSO cache will expire 0 entries.
    [22/Jul/2003:23:37:15] FINE ( 1496): SingleSignOn[server1]: SSO expiration started. Current entries: 0
    [22/Jul/2003:23:37:15] FINE ( 1496): SingleSignOn[server1]: SSO cache will expire 0 entries.
    following is the ejb-jar.xml part of this entity bean
    <entity>
    <ejb-name>UserBean</ejb-name>
    <local-home>com.expense.ejb.entity.container.LocalUserHome</local-home>
    <local>com.expense.ejb.entity.container.LocalUser</local>
    <ejb-class>com.expense.ejb.entity.container.UserBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>userSchema</abstract-schema-name>
    <cmp-field>
    <field-name>loginName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>password</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>iD</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>firstName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>email</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>lastName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>address1</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>address2</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>postalCode</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>city</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>state</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>country</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>accountStatus</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>createdBy</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>modifiedBy</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>modifyDate</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>createDate</field-name>
    </cmp-field>
    <primkey-field>iD</primkey-field>
    <query>
    <query-method>
    <method-name>findByLoginName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql> select object(l) from userSchema l WHERE l.loginName = ?1</ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByCreateDate</method-name>
    <method-params>
    <method-param>java.lang.Long</method-param>
    </method-params>
    </query-method>
    <ejb-ql>select object(l) from userSchema l where l.createDate = ?1 </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByModifyDate</method-name>
    <method-params>
    <method-param>java.lang.Long</method-param>
    <method-param>java.lang.Long</method-param>
    </method-params>
    </query-method>
    <ejb-ql>select object(l) from userSchema as l where l.modifyDate between ?1 and ?2</ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql>SELECT OBJECT(L) FROM userSchema L </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>UserBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    can anyone suggest me on howto solve this problem

    I suspect that there is a type mismatch somewhere in the CMP fields (there is a ClassCastException in the trace).
    Please check the generated code (UserBean1689033004_JDOState.java line 969) that can be found under
    <appserver-install>/domains/domain1/server1/generated/ejb/j2ee-apps/<app-name>/<packages...>/
    Thank you,
    -marina

  • Entity Bean Database Access Problem

    I have developed the CustomerBook application from the NetBeans 4.1 quick start tutorial with SJAS8.1Q2 (http://www.netbeans.org/kb/41/quickstart-j2ee.html) with MySQL. I get the following set of errors. I am new to SJAS. I've tried a lot of different things. For the life of me, I can't understand why this isn't working. I know the problem is with the entity bean accessing the database because the session bean communicates well with the client when calling the entity bean.
    Thank you in advance for any efforts made to help me on this.
    Seymour
    [#|2005-08-15T15:58:50.250-0500|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb|_ThreadID=21;|EJB5018: An exception was thrown during an ejb invocation on [CustomerFacadeBean]|#]
    [#|2005-08-15T15:58:50.251-0500|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb|_ThreadID=21;|
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: com.sun.jdo.api.persistence.support.JDOFatalInternalException: JDO76519: Failed to identify vendor type for the data store.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource
    com.sun.jdo.api.persistence.support.JDOFatalInternalException: JDO76519: Failed to identify vendor type for the data store.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.initializeSQLStoreManager(SQLPersistenceManagerFactory.java:870)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getFromPool(SQLPersistenceManagerFactory.java:786)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:673)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:849)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:681)
         at ejb.CustomersBean_2122496195_ConcreteImpl.jdoGetPersistenceManager(CustomersBean_2122496195_ConcreteImpl.java:862)
         at ejb.CustomersBean_2122496195_ConcreteImpl.ejbFindByPrimaryKey(CustomersBean_2122496195_ConcreteImpl.java:417)
         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.SecurityUtil.invoke(SecurityUtil.java:147)
         at com.sun.ejb.containers.EntityContainer.invokeFindByPrimaryKey(EntityContainer.java:738)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:181)
         at $Proxy15.findByPrimaryKey(Unknown Source)
         at ejb.CustomerFacadeBean.getCompanyInfo(CustomerFacadeBean.java:73)
         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.SecurityUtil$2.run(SecurityUtil.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy18.getCompanyInfo(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:123)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    NestedStackTrace:
    java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource
         at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:74)
         at com.sun.jdo.spi.persistence.support.sqlstore.ejb.TransactionHelperImpl.getConnection(TransactionHelperImpl.java:181)
         at com.sun.jdo.spi.persistence.support.sqlstore.ejb.EJBHelper.getConnection(EJBHelper.java:166)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getConnection(SQLPersistenceManagerFactory.java:892)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.initializeSQLStoreManager(SQLPersistenceManagerFactory.java:857)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getFromPool(SQLPersistenceManagerFactory.java:786)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:673)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:849)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:681)
         at ejb.CustomersBean_2122496195_ConcreteImpl.jdoGetPersistenceManager(CustomersBean_2122496195_ConcreteImpl.java:862)
         at ejb.CustomersBean_2122496195_ConcreteImpl.ejbFindByPrimaryKey(CustomersBean_2122496195_ConcreteImpl.java:417)
         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.SecurityUtil.invoke(SecurityUtil.java:147)
         at com.sun.ejb.containers.EntityContainer.invokeFindByPrimaryKey(EntityContainer.java:738)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:181)
         at $Proxy15.findByPrimaryKey(Unknown Source)
         at ejb.CustomerFacadeBean.getCompanyInfo(CustomerFacadeBean.java:73)
         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.SecurityUtil$2.run(SecurityUtil.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy18.getCompanyInfo(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:123)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: com.sun.jdo.api.persistence.support.JDOFatalInternalException: JDO76519: Failed to identify vendor type for the data store.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource
         at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:2674)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2526)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:819)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:199)
         at $Proxy15.findByPrimaryKey(Unknown Source)
         at ejb.CustomerFacadeBean.getCompanyInfo(CustomerFacadeBean.java:73)
         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.SecurityUtil$2.run(SecurityUtil.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy18.getCompanyInfo(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:123)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)

    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.gjt.mm.mysql.jdbc2.optional.MysqlDataSourcePlease check that you have the driver in appserver's class path.

  • Problem with mapping the Entity beans onto database tables

    Hi,
    I got a problem with mapping the Entity beans onto database tables. Here are what I did:
    First Step:
    asant capture-schema
    Second Step:
    capture-schema -driver com.pointbase.jdbc.jdbcUniversalDriver -dburl jdbc:pointbase:server://localhost/sun-appserv-samples -username pbPublic -password pbpublic -table APPLICANT -table APPLICANTSKILL -table CUSTOMER -table LOCATION -table job -table JOBSKILL -table SKILL -out build/agency.dbschema
    The first step was fine. But, in the second step, I got the error message as follow:
    using dburl:jdbc:pointbase:server://localhost/sun-appserv-samples
    using username:pbPublic
    using password:pbpublic
    using driver:com.pointbase.jdbc.jdbcUniversalDriver
    using schemaname:null
    using output file:build/agency.dbschema
    JDO71100: Failed to find a class. Verify that the class is available on your CLASSPATH
    java.lang.ClassNotFoundException: com.pointbase.jdbc.jdbcUniversalDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at com.sun.forte4j.modules.dbmodel.jdbcimpl.ConnectionProvider.<init>(Co
    nnectionProvider.java:38)
    at com.sun.jdo.api.persistence.mapping.ejb.CaptureSchema.main(CaptureSch
    ema.java:130)
    at com.sun.jdo.spi.persistence.support.ejb.util.CaptureSchemaWrapper.mai
    n(CaptureSchemaWrapper.java:29)
    Thanks for your help!

    You need to add the pbclient.jar or some similar name like that, in the CalssPath.

  • Can't deploy Simple 2.0 CMP Entity Bean into Sun One Server 7

    Dear all:
    I use JBuilder9 + SunOne Plug-in to
    build a Simple Entity Bean, but I can't
    deploy it into SunOne 7 Server that return
    error message:
    Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- -- Error while processing CMP beans.
    But I use JBuilder9 + JBoss 3.x Plug-in
    that corrent run on JBoss 3.2 RC
    All code are generated by JBuilder9 EJB Designer
    and only have PK finder.
    Our deploy description flile are:
    ejb-jar.xml=============================
    <?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>
    <enterprise-beans>
    <entity>
    <display-name>Enterprise1</display-name>
    <ejb-name>Enterprise1</ejb-name>
    <home>untitled1.Enterprise1RemoteHome</home>
    <remote>untitled1.Enterprise1Remote</remote>
    <local-home>untitled1.Enterprise1Home</local-home>
    <local>untitled1.Enterprise1</local>
    <ejb-class>untitled1.Enterprise1Bean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>untitled1.Enterprise1PK</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Enterprise1</abstract-schema-name>
    <cmp-field>
    <field-name>inDate</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>sndSeq</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>msgSnd</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>msgRcv</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>brkId</field-name>
    </cmp-field>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Enterprise1</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    =================================
    sun-ejb-jar.xml=====================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
    <sun-ejb-jar>
    <enterprise-beans>
    <ejb>
    <ejb-name>Enterprise1</ejb-name>
    <jndi-name>Enterprise1Remote</jndi-name>
    </ejb>
    <pm-descriptors>
    <pm-descriptor>
    <pm-identifier>IPLANET</pm-identifier>
    <pm-version>1.0</pm-version>
    <pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
    <pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
    </pm-descriptor>
    <pm-inuse>
    <pm-identifier>IPLANET</pm-identifier>
    <pm-version>1.0</pm-version>
    </pm-inuse>
    </pm-descriptors>
    <cmp-resource>
    <jndi-name>jdo/sample-cmp</jndi-name>
    <default-resource-principal>
    <name>mv01</name>
    <password>mv01</password>
    </default-resource-principal>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    ===========================
    sun-cmp-mappings.xml===============
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp-mapping_1_0.dtd'>
    <sun-cmp-mappings>
    <sun-cmp-mapping>
    <schema>META-INF/mySchema</schema>
    <entity-mapping>
    <ejb-name>Enterprise1</ejb-name>
    <table-name>TSE_MSG_T</table-name>
    <cmp-field-mapping>
    <field-name>inDate</field-name>
    <column-name>INDATE</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>sndSeq</field-name>
    <column-name>SNDSEQ</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>msgSnd</field-name>
    <column-name>MSGSND</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>msgRcv</field-name>
    <column-name>MSGRCV</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>brkId</field-name>
    <column-name>BRKID</column-name>
    </cmp-field-mapping>
    </entity-mapping>
    </sun-cmp-mapping>
    </sun-cmp-mappings>
    =========================

    I remember getting errors like that. The only thing I see is in the map file. When I
    did mine I used TABLENAME.CMPFIELD to map columns to CMP attributes.
    TSE_MSG_T.INDATE
    TSE_MSG_T.SNDSEQ
    for column names in the sun-cmp-mappings.xml file.
    For any other errors set the logging for server1 or which one you are using to "finest".
    Try the deploy, shut down the server, and when you view the log, start at the bottom
    and keep scrolling up to the top of each stack trace and you should get a more
    specific error explanation at about the 3rd or 4th stack trace.

  • Problem when trying to delete CMP entity bean

    Hi,
    When I try to remove a CMP entity bean, I have this error :
    re09.projet_ejb.syndic.AdminException: Exception thrown from bean; nested exception is: javax.ejb.EJBException: nested exception is: com.sun.jdo.api.persistence.support.JDOUnsupportedOptionException: JDO76207: Update of a primary key field is not allowed.It's only happening when I try to remove a bean which has a relation with another bean. The relation type is One to Many. I tried to search on this forum to find an answer but I found nothing that could help me.
    Message was edited by:
    Starship
    Sry I just found the mistake, the cascade delete was not on the right place :s
    Message was edited by:
    Starship

    Got it sorted so I thought I would share the solution here:  The problem wasnt related to LR 5.2 but was to do with Mac OS X 10.8.5 AKA Mountain Lion.  I had also noticed that I was having an issue around deleting anything on my MAC.  When I tried to delete a file from anywhere I was asked to submit my password.  The message I got was finder wants to make a change please submit password.  I checked through the mountain Lion forums and found a solution here; https://discussions.apple.com/message/20499360#20499360%2320499360
    I implemented it and the problem has dissappeared.

  • CMP Entity Bean wrong generated ejbfindByPrimaryKey

    i am using Netbeans 6.1
    with GlassFish V2
    and JavaDB
    i wrote a basic CMP Entity Bean and it gives me this exception
    JDO74004: Bean 'ProducttbBean' method ejbFindByPrimaryKey:
    com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
    SQL statement<select t0."PRODUCTID", t0."PRODUCTNAME" from "PRODUCTTBBEAN" t0 where t0."PRODUCTID" = CAST (? AS INTEGER)> with input values:java.lang.Integer:1.
    Please examine the SQLException for more information.
    NestedException: java.sql.SQLSyntaxErrorException: Table/View 'PRODUCTTBBEAN' does not exist.
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.retrieve(SQLStateManager.java:2059)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1197)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1153)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:658)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:276)
    at mybeanspack.ProducttbBean_2002768886_ConcreteImpl.ejbFindByPrimaryKey(ProducttbBean_2002768886_ConcreteImpl.java:148)
    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:597)
    at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
    at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
    at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
    at com.sun.ejb.containers.EntityContainer.invokeFindByPrimaryKey(EntityContainer.java:803)
    at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:233)
    at $Proxy22.findByPrimaryKey(Unknown Source)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java from :63)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    the table name i'm querying at is
    PRODUCTTB
    and in the generated select statement
    PRODUCTTBBEAN
    i need help to solve this problem

    This is a copy of the sun-cmp-mappings.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-cmp-mappings PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 OR Mapping//EN" "http://www.sun.com/software/appserver/dtds/sun-cmp-mapping_1_2.dtd">
    <sun-cmp-mappings>
    <sun-cmp-mapping>
    <schema>BOOSHA_CMPBeanApplication-ejb</schema>
    <entity-mapping>
    <ejb-name>ProducttbBean</ejb-name>
    <table-name>PRODUCTTB</table-name>
    <cmp-field-mapping>
    <field-name>productid</field-name>
    <column-name>PRODUCTTB.PRODUCTID</column-name>
    <fetched-with>
    <default/>
    </fetched-with>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>productname</field-name>
    <column-name>PRODUCTTB.PRODUCTNAME</column-name>
    <fetched-with>
    <default/>
    </fetched-with>
    </cmp-field-mapping>
    </entity-mapping>
    </sun-cmp-mapping>
    </sun-cmp-mappings>
    the table name is right in the descriptor.

  • Disadvantages of using entity beans.

    can I know the disadvantages of using entity beans.

    sigh I guess if someone puts it on a website it must be true...
    "Forces the use of a heavy component mechanism for fine grained business objects."
    Heaviness is not some arbitrary side-effect. It is directly due to the services provided by the EntityBeans (transactions, etc). If you need those services, you pay the price. If you don't then you shouldn't be using EJB to begin with. Also with the advent of LocalInterfaces, fine-grainedness is no longer a liability.
    "More complex than JDO limiting developer productivity."
    Perhaps it has less to do with limited productivity, and more to do with limited developers.
    "More difficult to achieve good performance."
    Compared to a simple data storage mechanism, sure.
    "Inheritance not supported."
    Really? Wow, I guess all the EJB code I've written for the last 3 years doesn't really work.
    "Cannot be used for persistence in non-application server environments."
    Uhh, yeah, but seeing as how the decision to use EJBs is not limited to the persistance scheme, the non-use of an application server is moot.
    "There is no dynamic query mechanism to lookup entity beans (finders are specified at compile time)."
    And what compiled business process (i.e SessionBeans) requires dynamic lookup of arbitrary data? Humans performing search functions can be done via entity beans, but probably should not be done since a large searches do not (or very rarely) need to be transactional.
    "It is not easy to write unit tests for beans as it is not possible to use them outside of the application server."
    For a long time this was true, but there are now many unit test suites designed for J2EE.
    "No support for automatic primary key generation."
    In the spec, no. But it's fairly trivial to implement on your own.
    "Only relational databases are supported."
    If you use CMP, yes. If you use BMP, you can do whatever you want inside your ejbLoad()/ejbStore() methods. Another reason to not use CMP.

  • Entity bean (ejb 3.0) refactoring problem

    I didn't find a better method than regenerating an entity bean after modifying the table definition and renaming the class after deleting the old one.
    I'm not sure i can delete the old class representing the entity bean before regenerating it without any effects into the others entity beans.
    It work fine but still a little problem. The refactoring process didn't change the name of the entity bean into the select clauses into queynamed injection.

    I am facing a similar problem. Does JDeveloper 10g (10.1.3.3.0) provide an automatic process to update an Entity Bean definition when the underlying database table definition changes?
    I also noticed that for JDeveloper to create all the relationships (i.e. @OneToMany, @ManyToOne) between multiple Entity beans, I need to create all the Entity beans together in one pass using the wizard. If two entities depend on each other, and not created together, JDeveloper will not create the relationships between them. Is there a way around that?
    Thank you

  • Error While Deploying A CMP Entity Bean With A Composite Primary Key

    Hello all,
    I have a problem deploying CMP Entity beans with composite primary keys. I have a CMP Entity Bean, which contains a composite primary key composed of two local stubs. If you know more about this please respond to my post on the EJB forum (subject: CMP Bean Local Stub as a Field of a Primary Key Class).
    In the mean time, can you please tell me what following error message means and how to resolve it? From what I understand it might be a problem with Sun ONE AS 7, but I would like to make sure it's not me doing something wrong.
    [05/Jan/2005:12:49:03] WARNING ( 1896):      Validation error in bean CustomerSubscription: The type of non-static field customer of the key class
    test.subscription.CustomerSubscriptionCMP_1530383317_JDOState$Oid must be primitive or must implement java.io.Serializable.
         Update the type of the key class field.
         Warning: All primary key columns in primary table CustomerSubscription of the bean corresponding to the generated class test.subscription.CustomerSubscriptionCMP_1530383317_JDOState must be mapped to key fields.
         Map the following primary key columns to key fields: CustomerSubscription.CustomerEmail,CustomerSubscription.SubscriptionType. If you already have fields mapped to these columns, verify that they are key fields.Is it enough that a primary key class be serializable or all fields have to implement Serializable or be a primitive?
    Please let me know if you need more information to answer my question.
    Thanks.
    Nikola

    Hi Nikola,
    There are several problems with your CMP bean.
    1. Fields of a Primary Key Class must be a subset of CMP fields, so yes, they must be either a primitive or a Serializable type.
    2. Sun Application Server does not support Primary Key fields of an arbitrary Serializable type (i.e. those that will be stored
    as BLOB in the database), but only primitives, Java wrappers, String, and Date/Time types.
    Do you try to use stubs instead of relationships or for some other reason?
    If it's the former - look at the CMR fields.
    If it's the latter, I suggest to store these fields as regular CMP fields and use some other value as the PK. If you prefer that
    the CMP container generates the PK values, use the Unknown
    PrimaryKey feature.
    Regards,
    -marina

  • To use Entity Bean or Oracle stored Package?

    Currently, in my project, Weblogic8.1 and Oracle is used, but lots of business logic is implemented using Oracle stored Packages, many of these packages have a package level readonly lookup table(like index-by table or nested table), which is populated with data from database, once the package is called, and is accessed very often in subsequent calls of stored procedures.
    Since, in Weblogic server, a connection pool is maintained, and those package level lookup tables would be stored as session data in oracle PGA, I'm afraid this might cause oracle database server to be overloaded.
    to fully take advantage of middleware cache service that weblogic provide, should I move those business logic out of oracle and implement them using like read only entity bean?
    any help appreciated!

    Its very hard to say without knowing the usage patterns of the data. It sounds like you have a lot of read-only entities. These could be spread around a WLS cluster, therefore there is more scalability and performance with this option. However, I would not neccessarily rewrite business logic from SP into EJB just for middle-tier caching.
    If its a DB intensive app with lots of SQL, then if the calls are within SP's, there is only 1 call from WLS and the DBA ought o be able to tune the DB usin read-ahead and other DBA semantics. If there is locality of reference in the data, again, DB can use read-ahead better than WLS, although RO cache in middle is more scalable than DBMS.
    I wouldnt rewrite business logic from SP to EJB/Entity beans to take advantage of cache, especially if there is no locality of read-only reference to data. Oracle could do this better in my opinion, especially if SP's already exist
    Need for information on the usage patterns of the data - how is it CRUD'd.
    I would use-case the steel threads and put them under test load to see if the SP's really are an issue, since this is an architecture decision. What state is the project at? Live/Dev? Inception?

  • Multiple create methods of entity beans in single transcation

    Hi,
    I have some entity beans with CMR. I am managing these entity beans with a Stateful session bean whose transaction type is Container Managed for all its methods.
    In one particular method of this Session bean I am calling two entity bean's create method. i.e I am creating two entity beans through home.create() methods. There are two home.create() methods one after another inside a try catch block.
    I want that the entire operation be under just one transcation so i have also given the transaction attribute as Required for all methods of Session bean and Entity Beans.
    However if i pass invalid parameters to second create method so that it generates exception then still the first create statement is successful and database is updated.
    what i want is that the first create also should be roll backed.
    How can i acheive this through Container Managed Transaction Session Bean?

    Hi Ashwini,
    "Ashwini" <[email protected]> wrote in message news:400291af$[email protected]..
    I have some entity beans with CMR. I am managing these entity beans with a Stateful session bean whose transactiontype is Container Managed for all its methods.
    >
    In one particular method of this Session bean I am calling two entity bean's create method. i.e I am creatingtwo entity beans through home.create() methods. There are two home.create() methods one after another inside a try catch
    block.
    >
    I want that the entire operation be under just one transcation so i have also given the transaction attribute asRequired for all methods of Session bean and Entity Beans.
    >
    However if i pass invalid parameters to second create method so that it generates exception then still the firstcreate statement is successful and database is updated.
    what i want is that the first create also should be roll backed.
    How can i acheive this through Container Managed Transaction Session Bean?o Do you use TXDatasource with your entity beans?
    o In CMT transactions are automatically rolled back only when RuntimeExceptions
    are thrown. What kind of exception is thrown in your case?
    Regards,
    Slava Imeshev

Maybe you are looking for

  • How to retrive the List in jsp

    Hi i m storing the objects of the same class in the List. and that list i stored in a request scope in the Acton class . Now i want to acess the single object from the List in jsp page ... so please suggest me ; how can i access it ? and i also dont

  • IPod is full, playlists gone

    My iPod is full. iTunes created a playlist called Patty's iPod Selection. But now on my iPod I no longer have my other playlists. I want to continue to add music to my library (and can delete some stuff so that it fits on the iPod) but short of buyin

  • Supported resolution different between OSX and XP

    Hey guys, I have a proview PL576Ws 15.4" widescreen connected to my macbook pro. It supports up to a 1280x800 resolution but only in Windows XP, when I try to get it to display 1280x800 in Mac OSX Leopard it claims "MODE NOT SUPPORTED" and fails to d

  • Portal runtime error -logs

    Hi, I am a portal programmer beginner and i am triying to develop a portal component that retrieve information from sap r/3. I get the next message when i use the iview: Portal Runtime Error An exception occurred while processing a request for : iVie

  • Process and not quitting

    I am writing a tag for Lasso (like php) with the Lasso Java API to use OpenOffice as a converter for documents. I wrote a function to start the service if it is not running. Unfortunately it is not running as I thought it would. Previously in c++ I u