Oracle 8i's EJB

There's probably a bug in the Oracle's RMI over IIOP
implementation. In java it is absolutely legal to return null
where array of something is expected. Not in the Oracle 8i EJBs.
My guess is, since array in java is not an object itself, Oracle
doesn't check it for null during transport and tries to obtain
the array size to populate an internal storage.
In short, Oracle throws NullPointerException when methods with
array return type return null. We can, of course, always
interpret NullPointerException as "nothing returned", but it well
might confuse EJB client into thinking that certain EJB method is
not working properly (when it is).
As a workaround, I replace all null returns with the array
returns, where arrays contain 1 element that is null, but in the
perfect world this should be fixed.
Thanks.
null

... and what the object type of the array?
Anyway, create an EJB with just one method that returns, say,
String[]. Put just one command in the method's body: return
null;.
Next deploy this EJB into Oracle 8i. Next write the sample client
calling on this method.
You will get RemoteException with NullPointerException nested.
Thanks.
Frank Zhang (guest) wrote:
: Alex:
: Java arrays are objects based on The Java Language
Specification.
: Can you be more specific about the problem?
: Frank
: alex (guest) wrote:
: : There's probably a bug in the Oracle's RMI over IIOP
: : implementation. In java it is absolutely legal to return null
: : where array of something is expected. Not in the Oracle 8i
: EJBs.
: : My guess is, since array in java is not an object itself,
: Oracle
: : doesn't check it for null during transport and tries to
obtain
: : the array size to populate an internal storage.
: : In short, Oracle throws NullPointerException when methods
with
: : array return type return null. We can, of course, always
: : interpret NullPointerException as "nothing returned", but it
: well
: : might confuse EJB client into thinking that certain EJB
method
: is
: : not working properly (when it is).
: : As a workaround, I replace all null returns with the array
: : returns, where arrays contain 1 element that is null, but in
: the
: : perfect world this should be fixed.
: : Thanks.
null

Similar Messages

  • Duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliver

    Hi all ,
    I am getting this error every time i try to make a new instance of BPEL process using java API .
    The error is thrown on when I do a post using "deliveryService.post("UserTaskSample", "4.0", "initiate", nm);"
    An exception has occured : java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NamingException: Lookup error: javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ]; nested exception is: javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ] [Root exception is javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ]] at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:69) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279) at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:299) at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:194) at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:178) at welcome.welcome.doPost(welcome.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) Caused by: javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ] at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:100) at com.evermind.server.rmi.RMIClientConnection.waitForJndiResponse(RMIClientConnection.java:425) at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:233) at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:302) at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:56) ... 18 more Caused by: oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2287) at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1462) at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674) at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getNamedInterfaces(ClientRmiTypeCache.java:98) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getInterfaceType(ClientRmiTypeCache.java:85) at oracle.oc4j.rmi.ClientRmiTypeCache.getCachedType(ClientRmiTypeCache.java:33) at com.evermind.server.rmi.RMIClientConnection.getBoundObject(RMIClientConnection.java:1018) at com.evermind.server.rmi.RMIClientInputStream.resolveObject(RMIClientInputStream.java:26) at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1346) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at com.evermind.server.rmi.RMIClientConnection.handleLookupResponse(RMIClientConnection.java:879) at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:337) at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:296) at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:278) at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152) at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127) at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) at com.evermind.server.rmi.RMICall.warningExceptionOriginatesFromTheRemoteServer(RMICall.java:109) at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:91) ... 22 more Caused by: java.lang.LinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2241) at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1462) at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674) at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getNamedInterfaces(ClientRmiTypeCache.java:98) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getInterfaceType(ClientRmiTypeCache.java:85) at oracle.oc4j.rmi.ClientRmiTypeCache.getCachedType(ClientRmiTypeCache.java:33) at com.evermind.server.rmi.RMIClientConnection.getBoundObject(RMIClientConnection.java:1018) at com.evermind.server.rmi.RMIClientInputStream.resolveObject(RMIClientInputStream.java:26) at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1346) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at com.evermind.server.rmi.RMIClientConnection.handleLookupResponse(RMIClientConnection.java:879) at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:337) at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:296) at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:278) at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152) at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127) at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107) ... 2 more ".

    Hi,
    Thanks for the reply since I am quite new to BPEl can you elaborate a bit on this .
    What I did was
    1. I created a Async BPEL process in JDeveloper and in the same project I put my servlet code and html part when I deploy it on the server and ascess it the welcome jsp is displayed when I click submit on wecome.jsp it forwards to servlet and there the error originates .
    2 If instead I deploy the BPEl process seperately and the try to access the BPEL process using my JDeveloper java code I don't get any error it works fine.
    3 I have included config and schema folders in source path . wf_client_config.xml,user-properties.xml and wf-config.xml is also present in the source folder.
    4 Along with this the jars needed have been also added.
    So when I deploy the BPEL process created in 1 above from Jdeveloper it creates a .ear in j2ee\home\applications and the deploys it .This .ear doesn't has any .class files .
    I take bpelclasses.jar from the .jar which is created when I compile the project and put it in the j2ee\home\applib folder and made an entry for it in the server.xml file.After this it is able to get .class files.
    If there is any alternate way to do the same thing kindly tell me .
    Thanks
    Pranay

  • Problems accessing tables in oracle database with ejb entity bean

    I have created a simple server application that uses an entity bean (version 2.0) for an existing table in oracle database, and a session bean that is used as an outside interface for performing operations on that table.
    after deploying the server and client application the client attempts to perform an operation with the session bean remote interface it obtained.
    The session bean uses a locale interface to communicate with the entity bean, but when it tries to use its methods (create, findByXXX) it always get the following Exception: java.sql.SQLException: ORA-00942: table or view does not exist.
    the table of course exists, and the username password I'm using has all the permissions needed for this table.
    note - I'm using the Forte enterprise edition 4.0 as developer tool.
    I'll be glad to get some help.
    Here is the full stack trace of the exception:
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-00942: table or view does not exist
    javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-00942: table or view does not exist
    java.sql.SQLException: ORA-00942: table or view does not exist
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1674)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:314)
    at com.sun.ejb.persistence.SQLEngine.ejb20Finder(SQLEngine.java:226)
    at com.sun.ejb.persistence.PartitionImpl.ejbFinder(PartitionImpl.java:736)
    at com.cti2.telco.core.ejb.entity.userInfo.UserInfoEJB_PM.ejbFindByEmail(UserInfoEJB_PM.java:393)
    at com.cti2.telco.core.ejb.entity.userInfo.UserInfoEJB_PM_LocalHomeImpl.findByEmail(UserInfoEJB_PM_LocalHomeImpl.java:64)
    at com.cti2.telco.core.ejb.UserManagerEJB.authenticate(UserManagerEJB.java:77)
    at com.cti2.telco.core.ejb.UserManagerEJB.authenticate(UserManagerEJB.java:68)
    at com.cti2.telco.core.ejb.UserManagerEJB_EJBLocalObjectImpl.authenticate(UserManagerEJB_EJB
    LocalObjectImpl.java:63)
    at com.cti2.telco.core.ejb.dispatch.TelcoFacadeEJB.userLogin(TelcoFacadeEJB.java:80)
    at com.cti2.telco.core.ejb.dispatch.TelcoFacadeEJB_EJBObjectImpl.userLogin(TelcoFacadeEJB_EJBObjectImpl.java:24)
    at com.cti2.telco.core.ejb.dispatch._TelcoFacadeEJB_EJBObjectImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:519)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:204)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
    at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:273)
    at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
    at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
    ...

    Well it seems like the problems has a simple explanation. The Forte assigns a default table name (<entityName>EJBTable) when creating an entity bean from an existsing table in DB (which is not the same as the one it was created from !!!). Also, for reason unknown, when you deploy these entity beans, it doesn't even create the new table under its new name (even if instructed to).
    So using the Forte we managed to use successfuly only entity beans that were created "from scretch" (when deployed their tables are created).
    Does anyone know how to change the default name the Forte uses, and make it work properly with entity beans created from an existsing table (without going over the xml's) ?

  • How to use index of Oracle Table in EJB??

    Hello I have a Table Department and it's index on Dpt_Name column.
    I have created ejb - cmp in OC4J for Department Table.
    I am getting all the data but it is not in index on department, Where I have to specify index of table in Oc4j.
    Reply appriciated.
    Rajiv

    Rajive,
    An index is used automatically by the Database for faster retrieval of data. The query optimizer in the database determines whether to use an index and which index to use for a SQL statement and you don't have to specify the index in OC4J.
    If you have an index on deptname, then the index will be used when the SQL has a where clause like "where deptname = 'Personal' " or
    "where deptname like 'P%' ", etc. In case of CMP, if you have a finder method called findByDeptName and then this index will be used.
    For details on deciding on your indexing strategies please look at http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96590/adg06idx.htm#11977
    regards
    Debu Panda
    oracle

  • Problem with Oracle DB in EJB

    Hi experts,
            I am doing Oracle DB application with EJB. I have written in following connection method in EJB. I am using stateless session bean
      Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection("jdbc:oracle:thin:@<>:<>:<>", "<>","<>");
    While calling this method in webdynpro controller i got a following exception
    com.sap.engine.services.rmi_p4.exception.P4BaseRuntimeException: I/O operation failed : java.io.NotSerializableException: com.sap.engine.services.dbpool.cci.ConnectionHandle :
    I have added project reference as well as webdynpro references!!!
    I am calling the connection method in controller
              String lookupString ="sap.com/<sampleBean>/<sampleEAR>";
              Object obj = ctx.lookup(lookupString);
              sampleHome ejbHome =(sampleHome ) javax.rmi.PortableRemoteObject.narrow(obj,sampleHome .class);
              sampleHome simpleEjb = ejbHome.connection ();
    The same scenario I successfully done in webdynpro itself.If i execute the above connection method in Webdynpro, it is successfully executed and access the Oracle DB!!
    If i Use EJB i got a above exception? how to resolve this issue? give your solutions!!
    Regards,
    Manivannan P

    Hi experts,
            Problem got resolved once restart the server
    Regards,
    Manivannan P

  • Oracle and J2EE EJB

    Hi all,
    I am novice in the develpment of applications using EJB's. I have created the table and inserted the records in the oracle database using the J2EE where by the J2EE creates the table autometically. The application is working fine. But my main concern is that I am not able to access any records of this table when I give "select * from SportscarBeanTable" querry in the sql prompt of the oracle for which I get "no such table". But if I give the querry "Select table_name from user_tables", the table created by me is displayed. Can anybody clarify my doubt. Any help will be greatly appreciated.
    deepak

    Hi,
    Yes it is listing the table. The table is created by the J2EE server in the oracle database. Can u please specify the schema under which the J2EE server creates the tables in the oracle database.
    Thank you,
    deepak

  • ArrayDescriptor.createDescriptor uses Oracle specific in EJB Server

    I use Pramati EJB Server. It is EJB 1.1 compatible. I can use getCustomDatum calls without any error (even though it is Oracle specific). But I can't use setCustomDatum. It throws me ClassCastException error.
    My line looks like
    ((OraclePreparedStatement) pstmt).setCustomDatum(...)
    So I tried different method to acheive the same. That is to use Loosely Typed method setArray.
    To use setArray I need to get the descriptor from Oracle.
    I use the following line to do that.
    ArrayDescriptor orderLinesDesc = ArrayDescriptor.createDescriptor("OBL_EMPLOYEE", connection);
    Where OBL_EMPLOYEE is a Table of EMPLOYEE Object OB_EMPLOYEE.
    Where OB_EMPLOYEE has several primitive fields and a TABLE (OBL_ROLES) of Roles object OB_ROLES.
    Where OB_ROLES has primitive types and table (OBL_RESPONSIBILITY) of Responisibilities OB_RESPONSIBILITY
    Where OB_Responsibility has primitive types
    I get the same ClassCastException.
    Both parameters (String, Connection) to createDescriptor are non Oracle-Specific.
    But the EJB Server vendor says the method tries to typecast to OracleConnection which they don't support.
    Any idea?

    user521490,
    Pardon me if I am asking an obvious question, but did you create the ACCOUNT_TYPE using a "create type" DDL statement? For example:
    create or replace type ACCOUNT_TYPE as ...An "ArrayDescriptor" only works for global types (as far as I know).
    I'm guessing that JACKCACHE is a [PL/SQL] package, and that's probably why it doesn't work.
    Good Luck,
    Avi.

  • Oracle Portal and EJB Web application

    Hi,
    Can anyone tell me how to make portlets in Oracle Portal from the jsp files which are a part of EJB application ?
    Problem here is OC4J is accessed behind Apache so the provider testing url(eg http://localhost/servlet/xxxx) gives page not found error.So portlets cannot be made.
    Hope somebody has some solution on this.
    Regards,
    Mandar.

    Hi Christopher,
    I am trying to do the same as you have said,I am trying to access the EJB from JSP's that run on JServ.However I am getting this error when I try to use RMI
    com.evermind.server.rmi.OrionRemoteException: Invocation error: java.lang.ClassNotFoundException: com.crm.Dao.Customer.CustomerDataHome; nested exception is: java.lang.ClassNotFoundException: com.crm.Dao.Customer.CustomerDataHome
    But the same code runs fine if run the jsp from Orion server.
    My code in jsp -
    Properties env = new Properties();
    env.put("java.naming.provider.url","ormi://localhost/autoglobal");
    env.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
    // env.put("java.naming.factory.initial","com.evermind.server.ApplicationClientInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL,"admin");
    env.put(Context.SECURITY_CREDENTIALS,"j2ee");
    InitialContext ictx_t = new InitialContext(env);
    CustHom = (CustomerDataHome)ictx_t .lookup("CustomerData");
    CustRem =CustHom.create();
    The above error is when I am using com.evermind.server.rmi.RMIInitialContextFactory .
    If I use com.evermind.server.ApplicationClientInitialContextFactory I get the following error
    javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.crm.Dao.Customer.CustomerData' found for the ejb-ref CustomerData
    Hope to get some solution on this.
    Regards,
    Mandar

  • Can't download the Oracle Application Server EJB 3.0 Preview

    Dear Oracle,
    When i press the "Download Here" hyperlink, i got a 30k size zip file and the name of the file is "oracle_ejb3.zip". But i can't unzip it, my operating system pop up an error message box. Please help me to download the software. Thanks a lot!!
    Barnard
    [email protected]

    You're going to need to give us more details. Expand some of those acronyms so we know what you're talking about. Tell us exactly what happens, and what error messages you are getting.

  • How to get utf-8 Chinese Characters from Oracle DB by EJB

    We have found that after disabling JIT in weblogic, the Chinese can be displayed correctly, otherwise, it doesn't work.How come this happens?

    Thanks for all of your suggestions. It still refuses to work.
    I entered the following: ���^�E on the HTML form using the Chinese(PRC)keyboard on my Win2K box.
    I checked and verified the correct encoding in the servlet request (GB2312 for chinese characters)
    request.getParameter(xxx) yields ???
    new String(request.getParameter(xxx).getBytes("GB2312")) yields three boxes (values 20309, 27946 and 23380)
    new String(request.getParameter(xxx).getBytes("GB2312"), "UTF-8") yields nothing
    Any ideas?

  • Error while retreiving data from oracle using EJB.

    HII All,
    I m getting this error while trying to retreive data from oracle DB using EJB.
    An error has occurred. Maybe the request is not accepted by the server:
    Exception in method empName.
    HTTP/1.1 500 Internal Server Error
    Connection: close
    Server: SAP J2EE Engine/6.40
    Content-Type: text/xml; charset=UTF-8
    Set-Cookie: <value is hidden>
    Date: Mon, 24 Jul 2006 10:50:11 GMT
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Exception in method empName.</faultstring><detail><ns1:com.sap.engine.services.ejb.exceptions.BaseEJBException xmlns:ns1='http://sap-j2ee-engine/client-runtime-error'>Exception in method empName.</ns1:com.sap.engine.services.ejb.exceptions.BaseEJBException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Thanks in advance
    Devendra Phate.

    Hi Devendra,
    this error message does not tell me much. Pleas either start debugging or watch your logs for more detailed messages.
    Regards,
    Benny

  • JNDI Error when Oracle BPM Process invokes an EJB Service Adapter

    Hi All,
    I am trying to invoke an EJB Service from my Oralce BPM process/workflow. I have provided the JNDI name in EJB service adapter in Jdeverloper also. Even though I have configured the JNDI in weblogic server properly, i am getting some JNDI invocation error (FabricInvocationException) as below.
    Can somebody help me on this.
    Non Recoverable System Fault :
    *<bpelFault><faultType>0</faultType><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>oracle.fabric.common.FabricInvocationException: Exception creating jndi context for ejb invocation:</summary></part><part name="detail"><detail>Unable to resolve 'XXXXXXInterfaceRemote'. Resolved ''</detail></part><part name="code"><code>null</code></part></remoteFault></bpelFault>*
    Edited by: 920456 on Apr 2, 2013 2:09 AM

    Hi All,
    Still i am facing the above stated challenge, i am getting a JNDI error when i am trying to call it from Oracle BPM process.
    can somebody tell me Does Oracle SOA Suite - EJB Adapter version 3.0 has any runtime bugs ? etc.
    Bcoz in the below link it is given something like EJB Version 2 Are Not Supported During Runtime. So, i want to check whether any bugs.
    [Oracle SOA EJB Adapter Version bugs|http://www.oracle.com/technetwork/middleware/docs/aiasoarelnotesps5-1455925.html#intadapt]
    Regards,
    Satya

  • Deploying EJB in Oracle 9 iAS

    Hi
    I have installed oracle 9ias(standard edition-1.0.2) and have a DB running in another m/c(oracle 8.1.6).both machines are running in Win 2K .when i tried to deploy the sample EJB (customer)-(by using makeit command), the process terminates saying the following error .
    Descriptor oracle_customer.xml server.jar
    Reading Deployment Descriptor...done
    Verifying Deployment Descriptor...done
    Gathering users...done
    Processing container managed persistence bean...don
    Generating Comm Stubs..............................
    Compiling Stubs...done
    Generating Jar File...done
    Loading EJB Jar file and Comm Stubs Jar file...
    Cannot locate the LoadJava server: Unknown reasons
    Please note the error at the last line .Can any one suggest a solution for this .
    thanks in advance
    Prem
    null

    1. I read somewhere that since in oracle 9i AS , ejb are deployed into the DB ,site will be much faster and now oracle itself is recommending to use OC4J which is almost same as orion server
    OC4J is a superb implementation of the J2EE specification. Oracle ships and fully supports OC4J as the preferred J2EE (JSP, servlet, EJB) execution engine for Oracle9iAS.
    2. Will OC4J will work without oracle 9iAS
    Let me clarify one point - OC4J is a component of Oracle9iAS. It is licensed as part of Oracle9iAS.
    However, the OC4J component can be downloaded as a separate, small package and installed on it's own. For this scenario, it is 10MB to download and 15MB when installed.
    Additionally, the OC4J component is also shipped as part of the complete Oracle9iAS distribution.
    It runs equally as well in both scenarios.
    3. Which databse can(version - 8.1.6 or 8.1.7) can be used with 9iAS
    Oracle9iAS 1022 is certified with Oracle 8.0.6 and 8.1.7.
    -steve-
    null

  • EJB - Oracle Date Field

    hello
    how can i insert a date field into oracle table using EJB?
    now i'm using java.sql.Timestamp, but it's deprecated
    bye
    ACS

    Hi Antonio,
    Since when is java.sql.Timestamp deprecated?
    I am using OC4J version 1.0.2.2 with JDK 1.2.2 (that comes with 9iAS)
    and I use java.sql.Timestamp all the time in my applications without
    any problems. Here is an example using JDBC:
    java.sql.Timestamp timestamp = new java.sql.Timestamp(System.currentTimeMillis());
    Connection conn = DriverManager.getConnection();
    String sql = "UPDATE my_table SET my_date_col = ?";
    PreparedStatement ps = conn.prepareStatement(sql);
    ps.setTimestamp(1, timestamp);
    ps.executeUpdate();
    What am I missing?
    Good Luck,
    Avi.

  • Oracle XMLType with CMP EJBs

    Hi!
    I am currently trying to use Oracles XMLType with EJBs. Preferrably I would like to use CMP. Although the documentation http://e-docs.bea.com/wls/docs81/jdbc_drivers/oracle.html#1067224
    says that XMLType is mapped to a CLOB, I get an error
    ORA-00932: inconsistent datatypes: expected NUMBER got CLOB
    when trying to update it. (I marked the bean as dbms-column-type OracleClob). If I do not mark it as OracleClob, I get an SQLException invalid type sqlType=2007 .
    Is there another way to make XMLType work?
    Thanks so much,
    Hans-Peter Stoerr
    PS: We are using Bea Weblogic Portal 8.1, but might migrate to 9. The driver is the oracle thin driver with oracle 9.2.

    Hi Brian,
    Im not sure whats the issue with using DB Triggers. You could possibly have another
    column(s) for created_by and updated_by and still use triggeres for the create_time
    and update_time.
    Inheritance would make it better if u have multiple tables which need the same
    behaviour but the above solution maybe the easy one.
    -Raj
    "Brian Preston" <[email protected]> wrote:
    >
    Our DB has 4 'audit' columns : create_date, created_by, last_update_date,
    last_updated_by.
    We're currently not using ejbs, just J2SE, servlets & jsps, but I'm looking
    into
    using ejbs.
    Is there any kind of design pattern for this? I've been searching the
    newsgroups
    about this. I can't use DB triggers because our application connects
    to the DB
    as the same user, regardless of the application user.
    I'm trying to use inheritance as well, have a 'base' object that has
    these audit
    columns and have all the ejbs extend that base class.
    Another issue is how would I trigger setting these columns? Do I have
    to store
    all the column values in ejbLoad and compare them in ejbStore? I've also
    read
    a little about the javax.ejb.SessionSynchronization interface, can I
    use that?
    Thanks,
    Brian Preston

Maybe you are looking for

  • Instalment payment terms and Due date

    Hello Can i have some comments on how the due date will be calculated in case of instalment payment terms.what is the configuration needed.Can we get the discount for each instalment if we pay in advance i.e before the due date. with regds RAJA

  • Connecting Macbook to printer in wireless network

    I recently got a Macbook. I have a pc downstairs that is connected to an HP officejet printer, and one upstairs connected to the same printer via the wireless network. My Macbook uses the same wireless network but I don't know how to find and connect

  • Creating PDF the same size as the original

    I have a TIF created in Photoshop CS2 and I'm trying to create a PDF that's the same size as the original (3 x 2 inches). What is the secret? I'm pretty sure I've done this before, but I can't figure out what to select for Paper Size to make this hap

  • IOS 8.1 Mesages/Text Message Forwarding - Duplicate Computer names

    I just upgraded to iOS 8.1 on my iPhone 6.  On my IPhone, when enabling Text Message Forwarding to my devices I noticed that my Mac's (15" MacBook Pro 5.1 Late 2008 with Yosemite) computer name appeared there twice. As expected, only one of the two d

  • Cursors throwing Unexpected lock status: 6

    I am using a Berkeley DB instance and have a multithreaded clients each performing various types of operations on the database. In general there are three types of operations being performed, reads, writes (which use RMW locks), and (non-transactiona