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

Similar Messages

  • EJB CMP remove create cache issue? DuplicateKeyException

    EJB CMP remove create cache issue? DuplicateKeyException
    Hi I have an EJB 2.1 application using CMP. Most things work fine. But if I in a transaction tries to remove a bean and create a new one with the same primary key I get a DuplicateKeyException:
    2007-11-16 09:25:31,963 ERROR [RMICallHandler-6] AdminGroupData_ConcreteSubClass147 - Error adding AccessRules:
    javax.ejb.DuplicateKeyException: Exception [EJB - 10007]: Exception creating bean of type [AccessRulesData]. Bean already exists.
    at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.duplicateKeyException(EJBExceptionFactory.java:195)
    I suspect that the remove call only removes from the cache (until commit), but that the create call checks the database or something?
    My code is simple like the following:
    AdminPreferencesDataLocal apdata1 = adminpreferenceshome.findByPrimaryKey(certificatefingerprint);
    adminpreferenceshome.remove(certificatefingerprint);
    adminpreferenceshome.create(certificatefingerprint,newadminpreference);
    Is there some configuration I can set in toplink-ejb-jar.xml to fix this?
    I use OC4j 10.1.3.3
    Cheers,
    Tomas

    The bean.remove() was executed but the sql DELETE was executed to the database as the result, oc4j manages all sql statements and they are optimized to commit to the database in batch at once when the transaction commit. Oc4j ejb container is smart and preventing you from creating the same entity cached in the transaction because the sql delete was not really committed to the database when the create is called.
    My guess is that the reason it works with IBM WAS was because it issued sql for each remove/create call right away instead of doing them in batch as oc4j, or your WAS remove then create were called in separate transactions.

  • 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

  • Get row id after EJB create method.

    Hi,
    does any one know how to get an id of new created by CMP ejb row? When I create new object it's id is 0, when i call ejb create it creates new row in DB and crates new ID by increasing the old one, but how can I get this new ID after create has finished?
    Now I have to look equals by some fields object in DB after creation, looks ugly.

    So here is my CMP :
    * @ejb.bean name="Dividend"
    * type="CMP"
    * view-type="local"
    * primkey-field="id"
    * schema="dividends"
    * cmp-version="2.x"
    * @ejb.value-object name="Dividend"
    * match="*"
    * @ejb.transaction type="Required"
    * @ejb.persistence table-name="dividends"
    * @ejb.finder signature="Collection findAll()"
    * query="SELECT OBJECT(d) FROM dividends d"
    * @jboss.query signature="Collection findAll()"
    * @ejb.finder signature="Dividend findByActivityId(java.lang.Integer activityId)"
    * query="SELECT OBJECT(d) FROM dividends d WHERE d.activityId = ?1"
    * @jboss.query signature="Dividend findByActivityId(java.lang.Integer activityId)"
    * strategy="on-load"
    * @jboss.persistence create-table="false"
    * remove-table="false"
    * datasource="java:/ChronimDS"
    * datasource-mapping="mySQL"
    public abstract class DividendBean implements EntityBean {
    //~ Methods ----------------------------------------------------------------
    //==========================================
    // Business methods
    //==========================================
    * @ejb.interface-method
    public Dividend getDividend() {
    Dividend dividend = new Dividend();
    dividend.setId(this.getId());
    dividend.setActivityId(this.getActivityId());
    dividend.setLower(this.getIsLower());
    dividend.setLowerAmount(this.getLowerAmount());
    return dividend;
    * @ejb.interface-method
    public void setDividend(Dividend dividend) {
    this.setActivityId(dividend.getActivityId());
    this.setIsLower(dividend.isLower());
    this.setLowerAmount(dividend.getLowerAmount());
    //==========================================
    // CMP fields
    //==========================================
    * @ejb.pk-field
    * @ejb.persistence column-name="id"
    * jdbc-type="INTEGER"
    * sql-type="INTEGER"
    * @ejb.interface-method
    * @ejb.transaction type="NotSupported"
    public abstract Integer getId();
    public abstract void setId(Integer id);
    * @ejb.persistence column-name="activityId"
    * jdbc-type="INTEGER"
    * sql-type="INTEGER"
    public abstract Integer getActivityId();
    public abstract void setActivityId(Integer activityId);
    * @ejb.persistence column-name="isLower"
    * jdbc-type="TINYINT"
    * sql-type="TINYINT"
    public abstract boolean getIsLower();
    public abstract void setIsLower(boolean isLower);
    * @ejb.persistence column-name="lowerAmount"
    * jdbc-type="INTEGER"
    * sql-type="INTEGER"
    public abstract Integer getLowerAmount();
    public abstract void setLowerAmount(Integer lowerAmount);
    //==========================================
    // EJB callbacks
    //==========================================
    * @ejb.create-method
    public Integer ejbCreate(Dividend dividend)
    throws CreateException {
    this.setId(dividend.getId());
    this.setIsLower(dividend.isLower());
    this.setLowerAmount(dividend.getLowerAmount());
    this.setActivityId(dividend.getActivityId());
    return null;
    public void ejbPostCreate(Dividend dividend)
    throws CreateException {
    // EntityBean (empty) implementation
    public void setEntityContext(javax.ejb.EntityContext ec) {
    public void unsetEntityContext() {
    public void ejbLoad() {
    public void ejbStore() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void ejbRemove() {
    As you can see I'm using xdoclets.
    Suppose I need to create new row of this object :
    Dividend d = new Dividend();
    // fill dividend by values here but do not set it's id it is 0 before creation
    // SQL server will set it automaticly
    Object ref = context.lookup("DividendLocal");
    DividendLocalHome dividendLocal = (DividendLocalHome) ref;
    dividendLocal.create(dividend)
    I create new row of dividend in my DB and want to get an ID of the new created row, I thought that dividend object will get this ID after creation automaticly, but no, his id is 0.
    so here id will be 0 :
    dividendLocal.create(dividend);
    int id = dividend.getId(); // 0
    and if I write this
    dividendLocal.create(dividend).getId();
    I get :
    2007-06-25 14:44:02,384 ERROR [org.jboss.ejb.plugins.LogInterceptor]
    EJBException in method: public abstract java.lang.Integer
    com.xxx.xxx.ejb.SessionFacade.createDividend(
    xxx.xxx.model.Contract) throws java.rmi.RemoteException:
    javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=0

  • 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 when calling ejb.create() call

    Hi Folks,
    I am trying to create a simple CMP bean with J2EE1.4 but when I call ejb.create I get the following exception :-
    Exception in thread "main" java.rmi.ServerException: RemoteException occurred in
    server thread; nested exception is:
    java.rmi.RemoteException
    at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemExceptio
    n(Unknown Source)
    at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
    at com.titan.customer._CustomerHomeRemote_Stub.create(Unknown Source)
    at Client.main(Client.java:20)
    Caused by: java.rmi.RemoteException
    at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.ja
    va:195)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:73
    9)
    at com.titan.customer.CustomerBean_986018080_ConcreteImpl_RemoteHomeImpl
    .create(CustomerBean_986018080_ConcreteImpl_RemoteHomeImpl.java:38)
    at com.titan.customer._CustomerBean_986018080_ConcreteImpl_RemoteHomeImp
    l_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
    tchToServant(CorbaServerRequestDispatcherImpl.java:648)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
    tch(CorbaServerRequestDispatcherImpl.java:191)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    Request(CorbaMessageMediatorImpl.java:1655)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    (CorbaMessageMediatorImpl.java:1514)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
    orbaMessageMediatorImpl.java:896)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
    back(RequestMessage_1_2.java:172)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    (CorbaMessageMediatorImpl.java:668)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
    h(SocketOrChannelConnectionImpl.java:352)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(So
    cketOrChannelConnectionImpl.java:261)
    at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadI
    mpl.java:73)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
    run(ThreadPoolImpl.java:382)
    Bean code :-
    package com.titan.customer;
    import javax.ejb.EntityContext;
    public abstract class CustomerBean implements javax.ejb.EntityBean {
    public Integer ejbCreate(Integer id) {
    setId(id);
    return id;
    public void ejbPostCreate() {
    //abstract methods
    public abstract Integer getId();
    public abstract void setId(Integer Id);
    public abstract String getLastName();
    public abstract void setLastName(String lastName );
    public abstract String getFirstName();
    public abstract void setFirstName(String firstName);
    public void setEntityContext(EntityContext ec) {}
    public void unsetEntityContext() {}
    public void ejbLoad() {}
    public void ejbStore() {}
    public void ejbActivate() {}
    public void ejbPassivate() {}
    public void ejbRemove() {}
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <display-name>CustomerBean</display-name>
    <enterprise-beans>
    <entity>
    <ejb-name>CustomerBean</ejb-name>
    <home>com.titan.customer.CustomerHomeRemote</home>
    <remote>com.titan.customer.CustomerRemote</remote>
    <ejb-class>com.titan.customer.CustomerBean</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>CustomerBean</abstract-schema-name>
    <cmp-field>
    <description>no description</description>
    <field-name>firstName</field-name>
    </cmp-field>
    <cmp-field>
    <description>no description</description>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <description>no description</description>
    <field-name>lastName</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    </enterprise-beans>
    </ejb-jar>
    sun cmp mapping
    <?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.dtd">
    <sun-cmp-mappings>
    <sun-cmp-mapping>
    <schema>CustomerBean_jar</schema>
    <entity-mapping>
    <ejb-name>CustomerBean</ejb-name>
    <table-name>CUSTOMERBEAN</table-name>
    <cmp-field-mapping>
    <field-name>firstName</field-name>
    <column-name>CUSTOMERBEAN.FIRSTNAME</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>id</field-name>
    <column-name>CUSTOMERBEAN.ID</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>lastName</field-name>
    <column-name>CUSTOMERBEAN.LASTNAME</column-name>
    </cmp-field-mapping>
    </entity-mapping>
    </sun-cmp-mapping>
    </sun-cmp-mappings>
    sun-ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <name>CustomerBean</name>
    <unique-id>579688304</unique-id>
    <ejb>
    <ejb-name>CustomerBean</ejb-name>
    <jndi-name>CustomerBean</jndi-name>
    </ejb>
    <pm-descriptors/>
    <cmp-resource>
    <jndi-name>jdbc/Vineeth</jndi-name>
    <create-tables-at-deploy>true</create-tables-at-deploy>
    <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
    <schema-generator-properties>
    <property>
    <name>use-unique-table-names</name>
    <value>true</value>
    </property>
    <property>
    <name>java-to-database</name>
    <value>true</value>
    </property>
    </schema-generator-properties>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    Can someone please help me out with this...this is a bit urgent..
    Thanks

    It seems that u need a ejbPostCreate with the same parameters as ejbCreate:
    public Integer ejbCreate(Integer id) {
    setId(id);
    return id;
    public void ejbPostCreate(Integer id) {
    }

  • 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.

  • 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.

  • 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;
    }

  • Trouble using MS SQL Server with CMP EJBs

    Hi all,
    I have an application which uses CMP EJBs. I am migrating it from a DB2 backend (where it works like a dream) to a SQL Server 2000 backend. I am using WebSphere 5.0 and I am able to launch the application on the test server without problems, but when I run the EJB test client and try to create any of the EJBs, I get a mass of exceptions - the most pertinent part of which seems to be:
    Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/msissuetracker, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a PooledConnection from the DataSource.
    Why am I unable to get a PooledConnection? I am using the JDBC driver which I downloaded from the MS website, and the doco says it supports connection pooling. I am very unfamiliar with SQLServer, so can anyone tell me if I'm missing something here??
    Help much appreciated! Cheers, Ben.

    Problem is now sorted. A bit embarassing really. It was a permissions issue. Nothing about permission or access denied was mentioned anywhere in the few hundred lines of exceptions. A more descriptive exception message would have been helpful instead of "Unable to get a PooledConnection from the DataSource". Yes! But WHY?

  • 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

  • CMP EJBs for Weblogic 6.1

    Hi All
    It seems that when I use the functionality to build a CMP EJB (an EJB that is automatically built based on an Oracle table) the deployment descriptors are missing lots of info so it it not possible to deploy to Weblogic (6.1).
    I'm assuming the functionality intended is that it will be possible to automatically generate CMP EJBs from Oracle and deploy them directly to a iAS/Weblogic etc....
    Session Beans seem OK.
    Anyone got any thoughts on this?
    Dave

    For Weblogic - Users can develop session beans add weblogic-ejb-jar.xml and
    deploy to a WebLogic connection.
    If the project doesn't have a weblogic-ejb-jar.xml and a connection type of Weblogic is choosen for deployment , weblogic-ejb-jar.xml is automatically generated for the EJBs and wrapped in the EJB.jar before deploying to WLS.
    JDeveloper provides Deployment descriptor editors for editing weblogic-ejb-jar.xml thru UI panels. This is very convinient rather than hand editing the XML.
    Currently you would have to add Weblogic cmp specific deployment descriptor into the project and make it part of the EJB.jar during the assembly process (i.e when you create the deployment profile).
    raghu
    JDev Team

  • Create a public synonym for a db link - "Connection desccriptor not found".

    I want to create a public synonym for a db link.
    The existing db link name is tst.world ( which is in db links table and is working fine).
    I created the following db link using the following command:
    create public synonym "syn.world" for "tst.world";
    It created the synonym successfully.
    If I try the following, it throws error "Connection desccriptor not found".
    select * from [email protected];
    It says "Connection desccriptor not found".
    Any suggestions.
    Thanks in Advance.

    Well then, lookup the Documentation on the CREATE SYNONYM statement in the SQL Language Reference manual.
    The documentation lists the types of objects which you can create synonyms for.
    You can create synonyms for objects referenced across DBLinks.
    You cannot create synonyms for DBLinks.
    Hemant K Chitale

Maybe you are looking for

  • Can't login to my account after upgrading to Mavericks

    I have a late 2008 Macbook Pro.  I have had no problems up until upgrading to Mavericks.  I did a complete backup using Time Machine prior upgrading.  I have a 750 GB hard disk with about 70 GB of free space.  This computer has been bullet proof for

  • No logic plug in settings seem to have installed...?

    hello kind and friendly list.. so as I have mentioned elsewhere, I'm currently away from my real studio and needing to do some work moderately urgently. while waiting for a shiny new macbook pro to arrive which will make working a normal pleasant exp

  • How do I download after changing my operating system from a 32 bit to a 64 bit system?

    I changed my operating system from a 32 bit to a 64 bit system and I need to re-purchase or trade my purchase for a different download -fridayjunior

  • Adobe Photoshop CS5.1 Trial Wont Install on my Mac (OSX Lion)

    Information about the problem: I am trying to install a trial version of Adobe Photoshop CS5.1. I have fully downloaded the trail via the Adobe Download Assistant. The file i now have is 'Photoshop_12_1_LS1.dmg'. I can open the .dmg and go through th

  • TRYING TO PRINT THE OUTPUT ON SCREEN.

    Hi, I am trying to print the out put to the screen. what am i doing wrong. CREATE OR REPLACE PROCEDURE "WRITESHIPPING" is p_Shipid VARCHAR2(40); p_OrderID VARCHAR2(10); p_ShippingMethodId NUMBER(10); p_ShippingMethodName VARCHAR2(50); p_ShippingAmoun