CMP EJB in 1.1/1.2..., mapping problems

Hello,
I'm a little bit confused by all these different EJB specifications and products...
I want to use CMP EJB, because as far as I understand this topic, the container should do a lot of work for me (transaction management, connection pooling) and all tutorials tell me to prefer CMP ;-)
Now I've got a Java class (to became my CMP EJB) like this:
class doc {
Descriptor descr;
String body;
and another class:
class descriptor {
int id;
String title;
My database contains two tables for both classes:
table descr:
id int (primary key);
title varchar;
table doc:
fk_descr int; // foreign key to descr
body varchar;
Is it possible to make a CMP EJB using these two tables and using a Descriptor object? Which versions of EJB can handle this? Do you have any expirience with that?
All examples I've read are always using only one table and classes containing only basic types like int, String.
Thank you,
Jens

What you've described is a 1-1 relationship between two classes, which is not supported by CMP until EJB 2.0.
-Peris

Similar Messages

  • Migrating CMP EJB mapped to SQL Server table with identity column from WL

    Hi,
        I want to migrate an application from Weblogic to SAP Netweaver 2004s (7.0). We had successfully migrated this application to an earlier version of Netweaver. I have a number of CMP EJBs which are mapped to SQL Server tables with the PK as identity columns(autogenerated by SQL Server). I am having difficulty mapping the same in persistant.xml. This scenario works perfectly well in Weblogic and worked by using ejb-pk in an earlier version of Netweaver.
       Please let me know how to proceed.
    -Sekhar

    I suspect it is the security as specified in the message. E.g .your DBA set the ID columns so no user can override values in it.
    And I suggest you 1st put the data into a staging table, then push it to the destination, this does not resolve the issue, but ensures better processing.
    Arthur
    MyBlog
    Twitter

  • Question: How to use XMLType in a CMP EJB???

    Hello, Together,
    I have a big problem using XMLType in a CMP EJB. I don't know, if somebody knows about it:
    I am trying to write a CMP EJB, which should be deployed under JBoss later. The problem here is, which java data type should I use to map a column of XMLType. I have tried to use it as a java.lang.Object, and also as a java.lang.String, it did not work properly.
    Can someone help me? Thanks a lot!

    Just pass the in the JSP/Servlet involved ServletContext through as a method or constructor parameter of that Java class.
    Semi-pseudo:protected doPost(req, res) {
        ServletContext servletContext = getServletContext();
        SomeJavaClass someJavaClass = new SomeJavaClass(servletContext);
        // or
        someJavaClass.doSomething(servletContext);
    }

  • Error when accessing CMP EJB methods

    I get a strange error, when I access a getter method in my remote interface to query the variables in my CMP EJB. I use Jdev 3.2 agains Oracle 8.1.7.
    I can see that the error must be originating from the persistance manager BC4J XML, but not sure how to resolve it, any help is appreciated.
    The line having the problem is the second line;
    portofolio.Portofolio remoteInterface = homeInterface.findByPrimaryKey("Fantacy");
    System.out.println("The record is " + remoteInterface.getPORTO_TYPE());
    The full error stack is as follows ( I don't see why there is a complaint about an update statement ?? );
    Caught RuntimeException in remote method; nested exception is:
    oracle.jbo.DMLException:JBO-26041: Failed to post data to database during "Update": SQL Statement " UPDATE PORTOFOLIO Portofolio123 SET VALUE=:1,PORTO_TYPE=:2,REAL_IND=:3,PORTO_NAME=:4,VALUED_ON=:5 WHERE PORTO_NAME=:6".
    Remote Stack Trace:
    oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Update": SQL Statement " UPDATE PORTOFOLIO Portofolio123 SET VALUE=:1,PORTO_TYPE=:2,REAL_IND=:3,PORTO_NAME=:4,VALUED_ON=:5 WHERE PORTO_NAME=:6".
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:348)
    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:3293)
    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:2588)
    at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:1628)
    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:997)
    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1151)
    at oracle.jbo.server.ejb.cmp.CMPTransactionImpl.beforeCompletion(CMPTransactionImpl.java:74)
    at oracle.aurora.transaction.OracleTransaction.localBeforeCompletion(OracleTransaction.java)
    at oracle.aurora.transaction.OracleTransactionManager.localBeforeCompletion(OracleTransactionManager.java)
    at oracle.aurora.transaction.OracleTransactionManager.rollback(OracleTransactionManager.java)
    at oracle.aurora.transaction.OracleTransactionManager.rollback(OracleTransactionManager.java)
    at oracle.aurora.ejb.server.AuroraEnterpriseBean.__txn_rollback(AuroraEnterpriseBean.java)
    at oracle.aurora.ejb.gen._test_omeed_Portofolio.EjbObject_Portofolio.getPORTO_TYPE(oracle/aurora/ejb/gen/_test_omeed_Portofolio/EjbObject_Portofolio:228)
    at portofolio._tie_Portofolio.getPORTO_TYPE(_tie_Portofolio.java:143)
    at portofolio._PortofolioImplBase._execute(_PortofolioImplBase.java:186)
    at portofolio._PortofolioImplBase._execute(_PortofolioImplBase.java:117)
    at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(SkeletonDelegateImpl.java)
    at oracle.aurora.server.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java)
    at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java)
    at oracle.aurora.server.ThreadSessionDispatcher.run(ThreadSessionDispatcher.java)
    at oracle.aurora.server.VCIiopConnection.processRequest(VCIiopConnection.java)
    at oracle.aurora.server.GiopServer._service(GiopServer.java)
    at oracle.aurora.server.GiopServer.service(GiopServer.java)
    at oracle.aurora.net.VirtualCircuit.processRequest(VirtualCircuit.java)
    at oracle.aurora.net.Presentation.handleRequest(Presentation.java)
    ## Detail 0 ##
    oracle.jdbc.driver.OracleSQLException: ORA-01861: literal does not match format string
    at oracle.jdbc.kprb.KprbDBAccess.check_error(KprbDBAccess.java)
    at oracle.jdbc.kprb.KprbDBAccess.executeFetch(KprbDBAccess.java)
    at oracle.jdbc.kprb.KprbDBAccess.parseExecuteFetch(KprbDBAccess.java)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java)
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:269)
    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:3293)
    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:2588)
    at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:1628)
    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:997)
    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1151)
    at oracle.jbo.server.ejb.cmp.CMPTransactionImpl.beforeCompletion(CMPTransactionImpl.java:74)
    at oracle.aurora.transaction.OracleTransaction.localBeforeCompletion(OracleTransaction.java)
    at oracle.aurora.transaction.O
    racleTransactionManager.localBeforeCompletion(OracleTransactionManager.java)
    at oracle.aurora.transaction.OracleTransactionManager.rollback(OracleTransactionManager.java)
    at oracle.aurora.transaction.OracleTransactionManager.rollback(OracleTransactionManager.java)
    at oracle.aurora.ejb.server.AuroraEnterpriseBean.__txn_rollback(AuroraEnterpriseBean.java)
    at oracle.aurora.ejb.gen._test_omeed_Portofolio.EjbObject_Portofolio.getPORTO_TYPE(oracle/aurora/ejb/gen/_test_omeed_Portofolio/EjbObject_Portofolio:228)
    at portofolio._tie_Portofolio.getPORTO_TYPE(_tie_Portofolio.java:143)
    at portofolio._PortofolioImplBase._execute(_PortofolioImplBase.java:186)
    at portofolio._PortofolioImplBase._execute(_PortofolioImplBase.java:117)
    at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(SkeletonDelegateImpl.java)
    at oracle.aurora.server.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java)
    at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java)
    at oracle.aurora.server.ThreadSessionDispatcher.run(ThreadSessionDispatcher.java)
    at oracle.aurora.server.VCIiopConnection.processRequest(VCIiopConnection.java)
    at oracle.aurora.server.GiopServer._service(GiopServer.java)
    at oracle.aurora.server.GiopServer.service(GiopServer.java)
    at oracle.aurora.net.VirtualCircuit.processRequest(VirtualCircuit.java)
    at oracle.aurora.net.Presentation.handleRequest(Presentation.java)
    oracle.aurora.ejb.RemoteRuntimeException: Caught RuntimeException in remote method; nested exception is:
    oracle.jbo.DMLException:JBO-26041: Failed to post data to database during "Update": SQL Statement " UPDATE PORTOFOLIO Portofolio123 SET VALUE=:1,PORTO_TYPE=:2,REAL_IND=:3,PORTO_NAME=:4,VALUED_ON=:5 WHERE PORTO_NAME=:6".
    Remote Stack Trace:
    oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Update": SQL Statement " UPDATE PORTOFOLIO Portofolio123 SET VALUE=:1,PORTO_TYPE=:2,REAL_IND=:3,PORTO_NAME=:4,VALUED_ON=:5 WHERE PORTO_NAME=:6".
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:348)
    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:3293)
    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:2588)
    at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:1628)
    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:997)
    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1151)
    at oracle.jbo.server.ejb.cmp.CMPTransactionImpl.beforeCompletion(CMPTransactionImpl.java:74)
    at oracle.aurora.transaction.OracleTransaction.localBeforeCompletion(OracleTransaction.java)
    at oracle.aurora.transaction.OracleTransactionManager.localBeforeCompletion(OracleTransactionManager.java)
    at oracle.aurora.transaction.OracleTransactionManager.rollback(OracleTransactionManager.java)
    at oracle.aurora.transaction.OracleTransactionManager.rollback(OracleTransactionManager.java)
    at oracle.aurora.ejb.server.AuroraEnterpriseBean.__txn_rollback(AuroraEnterpriseBean.java)
    at oracle.aurora.ejb.gen._test_omeed_Portofolio.EjbObject_Portofolio.getPORTO_TYPE(oracle/aurora/ejb/gen/_test_omeed_Portofolio/EjbObject_Portofolio:228)
    at portofolio._tie_Portofolio.getPORTO_TYPE(_tie_Portofolio.java:143)
    at portofolio._PortofolioImplBase._execute(_PortofolioImplBase.java:186)
    at portofolio._PortofolioImplBase._execute(_PortofolioImplBase.java:117)
    at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(SkeletonDelegateImpl.java)
    at oracle.aurora.server.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java)
    at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java)
    at oracle.aurora.server.ThreadSessionDispatcher.run(ThreadSessionDispatcher.java)
    at oracle.aurora.server.VCIiopConnection.processRequest(VCIiopConnection.java)
    at oracle.aurora.server.GiopServer._service(GiopServer.java)
    at oracle.aurora.server.GiopServer.service(GiopServer.java)
    at oracle.aurora.net.VirtualCircuit.processRequest(VirtualCircuit.java)
    at oracle.aurora.net.Presentation.handleRequest(Presentation.java)
    ## Detail 0 ##
    oracle.jdbc.driver.OracleSQLException: ORA-01861: literal does not match format string
    at oracle.jdbc.kprb.KprbDBAccess.check_error(KprbDBAccess.java)
    at oracle.jdbc.kprb.KprbDBAccess.executeFetch(KprbDBAccess.java)
    at oracle.jdbc.kprb.KprbDBAccess.parseExecuteFetch(KprbDBAccess.java)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java)
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:269)
    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:3293)
    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:2588)
    at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:1628)
    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:997)
    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1151)
    at oracle.jbo.server.ejb.cmp.CMPTransactionImpl.beforeCompletion(CMPTransactionImpl.java:74)
    at oracle.aurora.transaction.OracleTransaction.localBeforeCompletion(OracleTransac
    tion.java)
    at oracle.aurora.transaction.OracleTransactionManager.localBeforeCompletion(OracleTransactionManager.java)
    at oracle.aurora.transaction.OracleTransactionManager.rollback(OracleTransactionManager.java)
    at oracle.aurora.transaction.OracleTransactionManager.rollback(OracleTransactionManager.java)
    at oracle.aurora.ejb.server.AuroraEnterpriseBean.__txn_rollback(AuroraEnterpriseBean.java)
    at oracle.aurora.ejb.gen._test_omeed_Portofolio.EjbObject_Portofolio.getPORTO_TYPE(oracle/aurora/ejb/gen/_test_omeed_Portofolio/EjbObject_Portofolio:228)
    at portofolio._tie_Portofolio.getPORTO_TYPE(_tie_Portofolio.java:143)
    at portofolio._PortofolioImplBase._execute(_PortofolioImplBase.java:186)
    at portofolio._PortofolioImplBase._execute(_PortofolioImplBase.java:117)
    at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(SkeletonDelegateImpl.java)
    at oracle.aurora.server.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java)
    at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java)
    at oracle.aurora.server.ThreadSessionDispatcher.run(ThreadSessionDispatcher.java)
    at oracle.aurora.server.VCIiopConnection.processRequest(VCIiopConnection.java)
    at oracle.aurora.server.GiopServer._service(GiopServer.java)
    at oracle.aurora.server.GiopServer.service(GiopServer.java)
    at oracle.aurora.net.VirtualCircuit.processRequest(VirtualCircuit.java)
    at oracle.aurora.net.Presentation.handleRequest(Presentation.java)
    java.lang.String portofolio._st_Portofolio.getPORTO_TYPE()
    void portoclient.PortoClient.main(java.lang.String[])
    null

    Hi,
    How did you map the CMP-fields? I got the same Exceptions when I mapped a column which is DATE type to java.lang.String. DATE type column should be mapped to java.sql.Date.

  • Trouble saving date in CMP EJB on OC4J

    I have a CMP EJB that I'm trying to update and there is a field that maps to date type in the table.
    I get the following error when I try to assign a string literal of the type YYYY-MM-DD:
    javax.ejb.EJBException: Error saving state: ORA-01861: literal does not match format string
    How do you know what format string the container is using/expecting to pass to the database???
    How can you specify that? The EJB itself has the field as a String, not a Date. Should it be a Date?
    The OC4J container created it that way to begin with.
    I'm using JDeveloper with embedded OC4J and the database is 8i.

    Yes, the CMP-field's Java type should be Date. On the database side, the column-type is DATE.

  • Weblogic Deployment Descriptor for CMP EJB

    Hi all,
    Am new to EJB, CMP. Pls help me how to write deployment descriptors for the CMP EJB for Weblogic.
    Give me the list of the Deployment descriptors needed and also pls give me some samples
    thanks in advance
    rgds
    Ravi Bharathi

    The easiest way is to go through some tutorial or refer the code samples. If you have installed weblogic, there are examples provided in the weblogic installation folder itself for each type of bean. Basically for cmp you have to provide the table names and mapping between the class variables to db fields in weblogic_cmp_rdbms.xml deployment descriptor.

  • Question abou CMP EJB

    those days i read the book 'enterprise java bean'
    i got some question while reading.
    1. in CMP EJB the container will take care the connect to the database and while deployment the ejb it will create the finder methods ( and other SQL statements ) right ?
    2. in CMP EJB, where is the database? i look some deployment file, can not find any thing about database.so where is it? and how container connect the database, it use jdbc as well ?
    3. When using EJB, the client part will run ejb sever as well? i think the ejb sever part will run the sever, the client will not, right?
    thanks for answer those questions. your help will be very appreciated.
    thanks

    those days i read the book 'enterprise java bean'
    i got some question while reading.
    1. in CMP EJB the container will take care the connect
    to the database and while deployment the ejb it will
    create the finder methods ( and other SQL statements )
    right ?
    If is is BMP (Bean Managed Persistence) then you have to do it, if it has CMP (Container Managed Persistence) then the container will do it for you.
    2. in CMP EJB, where is the database? i look some
    deployment file, can not find any thing about
    database.so where is it? and how container connect the
    database, it use jdbc as well ?
    The mapping between the EJB and the database is done in a vendor specific xml file, where you map the columns of the table(s) in the database to the fields in your EJB. In that XML file you will reference the database that you will use by referencing a connection pool or datasource.
    3. When using EJB, the client part will run ejb sever
    as well? i think the ejb sever part will run the
    sever, the client will not, right?The Client part doesn't run any container. You have to create a context to the Container running the EJB and then find it and use it.
    MSB

  • Running CMP EJB in remote OC4J fails, works in embedded. Oracle 9i

    I more or less followed the EJB Tutorial (in the help) for creating a session-entity bean facade from Oracle 9i tables. Everything executes correctly in the embedded oc4j but it fails on the remote oc4j with
    java.sql.SQLException: Invalid column name
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:292)
         at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:5632)
         at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:716)
         at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1506)
         at com.evermind.sql.FilterResultSet.getString(FilterResultSet.java:585)
         at EmployeeLocalHome_EntityHomeWrapper13.findAll(EmployeeLocalHome_EntityHomeWrapper13.java:1260)
    Then I also created another simpler CMP EJB that just has 3 fields from Oracle table. This one doesn't even work in embedded oc4j :
    com.evermind.server.rmi.OrionRemoteException: Database error: ORA-01747: invalid user.table.column, table.column, or column specification
         java.util.Collection TimesheetHoursHome_EntityHomeWrapper11.findAll()
    Are there any known problems I should look out for with generating CMP EJBS with wizards?
    I think the IDE is more intuitive than WSAD. It would be great it things worked though.
    Another question is regarding relationships. Do the wizards always use ejb-refs to implement relationships? It should be easy enough to add them with EJB Editor if they do not.
    Thanks for any help.

    Known issues are documented in the release notes
    http://otn.oracle.com/products/jdev/htdocs/readme_903Preview.html#ejb
    <<<Another question is regarding relationships. Do the wizards always use ejb-refs to implement relationships? >>>>
    Not sure what you meant here. If you reverse engineer let us say DEPT and EMP tables, foreign key relationships between the tables are reverse engineered as CMR but there aren't any ejb-ref/ejb-local-ref tags which get generated in the deployment descriptor.
    <<It should be easy enough to add them with EJB Editor if they do not. >>
    You can double-click on the EJB to bring the EJB Module Editor and select "Relationships" node to add/edit/delete relationships visually.
    raghu
    JDev Team

  • Additional field in join table for CMP EJB

    Hello,
    I'm trying to perform this task using CMP entity beans:
    The entity A has a CMR relation of cardinality m-n with entity B (bidirectional) (This is working fine).
    I want to add a parameter to the relation.
    Ex : When I find that A1 is linked to B1, I need to perform "x" times an action. x would be my parameter, and I would have kept this parameter as an additional column in the join table A_TO_B.
    Could anyone provide an example of how to perform this with CMP EJB?
    NOTE: I'm using OC4J 10g 9.0.4 standalone (and cannot change my version).
    Thanks
    Tanguy

    Manohar,
    You need to create an append structure for table VBAP (for example ZAVBAP) using SE11. In this structure you create your ZZ fields. If you need a non-SAP domain/data element for your field then you need to create it first using the same transaction and activate it. Attach ZAVBAP to VBAP so the SE11 shows:
    .APPEND in the Fields column and
    ZAVBAP in the Field type column.
    Your ZZ fields will be shown automatically.
    When you have finished then activate your ZAVBAP structure. You will notice when you go VA01 (for example) that a lot of programs are being recompiled. Don't worry. It will be ok.
    The user-exit screen number for items is 8459 (in program SAPMV45A).
    Thanks,
    Wojtek

  • Adding more fields to a CMP EJB

    I'm using Sun's ONE studio 5, Sun ONE AS, and PointBase-db.
    I use the CMP EJB wizard to generate the skeleton for a CMP EJB, and specify to use a database-table from PointBase as the CMP-persistant fields.
    The problem arises when i want to add futher fields, when i try adding the in the IDE, i cant deploy the application(!)
    What am i doing wrong?
    Thank you in advance!

    Please see response to
    http://forum.java.sun.com/thread.jsp?forum=136&thread=444274&start=0&range=15#2191688
    vbk

  • CMP EJB created base on Synonyms

    Hello,
    When created CMP EJBs based on Synonyms, entity to entity relationship (use -DassociateUsingThirdTable=true) works fine in JDeveloper embedded OC4J (10g release 1). If deploy to Oracle Application Server (10g release 2) got run time error:
    05/05/24 15:12:49 Error in bean User: Database Error
    java.sql.SQLException: ORA-00918: column ambiguously defined
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
    at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:661)
    at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:959)
    at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:693)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1065)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2901)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2942)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].sql.FilterPreparedStatement.executeQuery(FilterPreparedStatement.java:270)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].sql.FilterPreparedStatement.executeQuery(FilterPreparedStatement.java:270)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].sql.FilterPreparedStatement.executeQuery(FilterPreparedStatement.java:270)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].sql.PreparedStatementBCELProxy.executeQuery(PreparedStatementBCELProxy.java:31)
    at UserLocal_UserRoleLocal_ORCollection638.getObjects(UserLocal_UserRoleLocal_ORCollection638.java:74)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.ejb.ORCollection.iterator(ORCollection.java:99)
    UserLocal_UserRoleLocal_ORCollection638.getObjectsUserLocal_UserRoleLocal_ORCollection638.getObjects(UserLocal_UserRoleLocal_ORCollection638.java:74)
    This is Application Server generated file. I have found two work around: one is create physical tables for the synonym tables, second is using ejbSelect method (EJB QL). But I still want to know if anybody has encountered this type of problem and any solution besides above memtioned work around.
    [email protected]
    Thanks,
    Eileen Young

    The issues are resolved now.
    1. This classpath entry problem was a bit mystifying. The manifest entry was
    correct and it should have picked it up automatically. When i restarted the
    server though, it started up properly.
    2. The CMP problem was a bit more troublesome. I think it was because of an
    incorrect datasource and connection pool properties. I used utils.Schema to
    check my database connection and once i got the url and driver name
    correctly it worked.
    TAR,
    Pavan

  • Running a CMP EJB with MySql DB Connection Problem

    I have created a CMP EJB in JDev connecting to a MySql table. I am able to see the connection in JDev just fine (everything is correctly configured for MySql). However, when I try to run it in the Embedded OC4J Server I get the following error:
    ****************************** Start of message output *************************************
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\JDev9i\jdk\bin\javaw.exe -ojvm -classpath C:\JDev9i\j2ee\home\oc4j.jar com.evermind.server.OC4JServer -config C:\JDev9i\jdev\system\oc4j-config\server.xml
    Error instantiating application at file:/C:/JDeveloper/jdev/system/oc4j-config/applications/bc4j.ear: Unable to find/read assembly info for C:\JDeveloper\jdev\system\oc4j-config\applications/bc4j (IO error: unable to find bc4j)
    Error initializing data-source 'jdbc/MySqlCoreDS': DriverManagerDataSource driver 'org.gjt.mm.mysql.Driver' not found
    Copying default deployment descriptor from archive at F:\JavaProjects\Questionaire\QuestionsEJB\classes/META-INF/orion-ejb-jar.xml to deployment directory C:\JDev9i\jdev\system\oc4j-config\application-deployments\current-workspace-app\classes...
    Auto-deploying file:/F:/JavaProjects/Questionaire/QuestionsEJB/classes/ (No previous deployment found)... SQL error: No suitable driver
    Warning: Error creating table: No suitable driver
    done.
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    ************************ End of message output ************************************
    I have updated the data-sources.xml to include the datasource:
         <data-source
              class="com.evermind.sql.DriverManagerDataSource"
              name="MySqlDS"
              location="jdbc/MySqlCoreDS"
              xa-location="jdbc/xa/MySqlXADS"
              ejb-location="jdbc/MySqlDS"
              connection-driver="org.gjt.mm.mysql.Driver"
              username="root"
              password="yes"
              url="jdbc:mysql://localhost:3306/questionaire?ultradevhack=true"
              inactivity-timeout="30"
         />
    What else to I need to do to get this working?
    Thanks,
    Karl

    I have created a CMP EJB in JDev connecting to a MySql table. I am able to see the connection in JDev just fine (everything is correctly configured for MySql). However, when I try to run it in the Embedded OC4J Server I get the following error:
    Error initializing data-source 'jdbc/MySqlCoreDS': DriverManagerDataSource driver 'org.gjt.mm.mysql.Driver' not foundMake sure that you create a Library in JDeveloper containing the MySQL JAR files and add this library to your project before launching starting the embedded OC4J instance.
    Rob

  • Error deploying first CMP EJB

    I'm trying to create and deploy a simple CMP EJB and am getting the following error
    upon deployment:
    C:\bea\wlserver6.1\tmp_ejbENBrianPr280\vwejbapp_Contactejb\vw\ejb\ContactEJB_za4
    cvx__WebLogic_CMP_RDBMS.java:342: ';' expected java.lang.String __WL_query = "SELECT
    WL0.name=\"FIRST_NAME\", WL0.name=\" CONTACT_ID\", WL0.name=\"LAST_NAME\" FROM
    name=\"BASE_CONTACT\" WL0 WHERE (WL0. name="CONTACT_ID" = ?)" + __WL_pm.selectForUpdate();
    I have tried using both EJBGEN and XDoclet to generate my classes and descriptors,
    and WLS6.1 SP2 on Win2k.

    I'm trying to create and deploy a simple CMP EJB and am getting the following error
    upon deployment:
    C:\bea\wlserver6.1\tmp_ejbENBrianPr280\vwejbapp_Contactejb\vw\ejb\ContactEJB_za4
    cvx__WebLogic_CMP_RDBMS.java:342: ';' expected java.lang.String __WL_query = "SELECT
    WL0.name=\"FIRST_NAME\", WL0.name=\" CONTACT_ID\", WL0.name=\"LAST_NAME\" FROM
    name=\"BASE_CONTACT\" WL0 WHERE (WL0. name="CONTACT_ID" = ?)" + __WL_pm.selectForUpdate();
    I have tried using both EJBGEN and XDoclet to generate my classes and descriptors,
    and WLS6.1 SP2 on Win2k.

  • JSP and CMP EJB 2.0

              Hi there,
              I having a problem every time I try to EJBHome.create( ...) a new
              CMP EJB 2.0 via a JavaBean
              called from an JSP or directly from the JSP.
              However, I successfully can retrieved EJBHome.findByPrimaryKey("myKey")
              from both the
              JavaBean and JSP.
              Could you help me figure out why .create does not work ?
              Here is the exceptions chain :
              weblogic.utils.AssertionError: *****
              ASSERTION FAILED *****[ Unexpected IOException
              marshalling on server-side ] at
              weblogic.rmi.internal.OutboundServerResponse.sendThrowable(OutboundServerResponse.java:63)
              at weblogic.rmi.internal.BasicServerAdapter.handleThrowable(BasicServerAdapter.java:477)
              at
              weblogic.rmi.internal.BasicServerAdapter.postInvoke(BasicServerAdapter.java:449)
              at
              weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestHandler.java:122)
              at
              weblogic.rmi.internal.BasicRequestDispatcher.dispatch(BasicRequestDispatcher.java:115)
              at
              weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:88)
              at
              weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:108)
              at
              weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
              at
              weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
              < ... my
              source file specified here ...>
              at jsp_servlet._jsp._user._results._jspService(_results.java:182)
              at
              weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622)
              at
              weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at
              weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              <Mar 22, 2001 5:50:03 PM JST>
              <Error> <AdapterDispatcher> <Error
              in Dispatcher
              Thank you, rivisa
              

    Sorry but I have forgotten to precise that I have also developped a EJB CMP 1.1 where the bean class is not abstract and I have the same error when the JSP page calls this EJB
    (for the EJB CMP 2.0 the bean class is declared abstract)

  • BLOB & CMP EJB - Cannot bind stream to a ScrollableResultSet

    Hi,
    I am trying to bind a byte[] to a Blob column in CMP EJB using Oracle 10g OCI driver in WebSphere. This gives the below error.
    java.sql.SQLException: Cannot bind stream to a ScrollableResultSet or UpdatableResultSetDSRA0010E: SQL State = null, Error Code = 17,169
         at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:195)
         at com.ibm.ejs.container.LocalExceptionMappingStrategy.setUncheckedException(LocalExceptionMappingStrategy.java:266)
         at com.ibm.ejs.container.EJSDeployedSupport.setUncheckedLocalException(EJSDeployedSupport.java:318)
    Thanks

    When you create a DataSource, use the below class in the field 'Data Source helper classs name'. This should solve the issue.
    import java.util.Properties;
    import javax.resource.ResourceException;
    import com.ibm.websphere.appprofile.accessintent.AccessIntent;
    public class OracleDataStoreHelper extends com.ibm.websphere.rsadapter.OracleDataStoreHelper {
         public OracleDataStoreHelper(Properties props) {
              super(props);
         public int getResultSetConcurrency(AccessIntent intent)     throws ResourceException {
              return java.sql.ResultSet.CONCUR_READ_ONLY;
    }

Maybe you are looking for