How to verify OC4J uses Oracle Toplink 10.x and not Toplink Essentials

Hi,
We dont want to use the default JPA provider "Toplink *Essentials*" that comes with OC4J. Rather we want to use Oracle Toplink 10.x
I downloaded [Oracle Toplink 10.x|http://www.oracle.com/technology/software/products/ias/htdocs/1013topsoft.html] and followed the installation instructions:- http://www.oracle.com/technology/products/ias/toplink/doc/10131/install/install.html#CHDBBIFB
When i deploy my EJB 3.0 appliation and invoke a JPA Entity, i can see the server log:- NOTIFICATION TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
Do i have to do any other configuration/setting to ensure that i use Oracle Toplink and not Toplink Essentials in OC4J?
Thanks in Advance,
Prashant Tejura
Edited by: user1186295 on May 26, 2009 10:33 AM

rashant,
Hi, there are currently the following providers to choose from - you may want to consult your rep for any details on moving from 10.1.3.4 to 10.1.3.5.
1) TopLink or EclipseLink using EclipseLink JPA - the RI for JPA for WebLogic, OC4J and GlassFish
- EclipseLink JPA is focus of all current JPA development as part of EclipseLink and TopLink
2) Another open-source JPA implementation like OpenJPA or Hibernate
Deprecated:
3) TopLink using TopLink JPA - replaced by (1) TopLink using EclipseLink JPA
4) TopLink using TopLink Essentials JPA - replaced by (1) TopLink using EclipseLink JPA
Changes to server.xml as follows:
http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial#Modify_server.xml
<shared-library name="oracle.persistence" version="1.0" library-compatible="true">
          <code-source path="../../../eclipselink/eclipselink.jar"/>
          <code-source path="../../../eclipselink/javax.persistence_*.jar"/>
          <import-shared-library name="oracle.jdbc"/>
     </shared-library>
Changes to persistence.xml as follows: (container-managed JTA datasource)
http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial#Persistence.xml
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="example" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/OracleDS</jta-data-source>
<class>org.eclipse.persistence.example.jpa.server.business.Cell</class>
<properties>
<property name="eclipselink.target-server" value="OC4J"/>
<property name="eclipselink.logging.level" value="FINEST"/>
</properties>
</persistence-unit>
</persistence>
You should see output similar to the following in your server log:
http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial#Console_Output
[EL Finest]: 2009-02-26 14:04:34.464--ServerSession(8634980)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--Begin deploying Persistence Unit example; state Predeployed; factoryCount 1
[EL Info]: 2009-02-26 14:04:34.542--ServerSession(8634980)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--EclipseLink, version: Eclipse Persistence Services - ***
[EL Fine]: 2009-02-26 14:04:35.213--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--Detected Vendor platform: org.eclipse.persistence.platform.database.oracle.Oracle10Platform
[EL Config]: 2009-02-26 14:04:35.26--ServerSession(8634980)--Connection(5230779)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--Connected: jdbc:oracle:thin:@//1y.yyy.yy.yy:1521/ORCL
     User: SCOTT
     Database: Oracle Version: Oracle Database 11g Release 11.1.0.0.0 - Production
     Driver: Oracle JDBC driver Version: 10.1.0.5.0
[EL Finest]: 2009-02-26 14:04:35.385--UnitOfWork(5746770)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--PERSIST operation called on: org.eclipse.persistence.example.jpa.server.business.Cell@9107088( id: null state: null left: null right: null parent: null references: null).
[EL Fine]: 2009-02-26 14:04:35.807--ClientSession(5748500)--Connection(6653899)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--INSERT INTO EL_CELL (ID, STATE, TSEQ, RIGHT_ID) VALUES (?, ?, ?, ?)
     bind => [551, null, null, null]
thank you
/michael
www.eclipselink.org

Similar Messages

  • Mapping Database using Oracle Toplink 10.1.3.3.0

    Hi everybody, I'd like to use Oracle TopLink to do mapping my database and here is the database's script
    1F.sql
    ==========
    @@case1F.typ
    @@case1F.tab
    @@case1F.con
    1F.typ
    ==========
    CREATE TYPE TCUSTOMER
    CREATE TYPE TMEMORY
    CREATE TYPE TPHONE
    CREATE TYPE TNAME
    CREATE TYPE TMOTHERBOARD
    CREATE TYPE TADDRESS
    PROMPT Creating Object Type 'TNAME'
    CREATE OR REPLACE TYPE TNAME AS OBJECT
    (FIRST VARCHAR2(240)
    ,LAST VARCHAR2(240)
    SHOW ERROR
    PROMPT Creating Object Type 'TMOTHERBOARD'
    CREATE OR REPLACE TYPE TMOTHERBOARD AS OBJECT
    (KODE VARCHAR2(240)
    ,SERIES VARCHAR2(240)
    ,MERK VARCHAR2(240)
    ,VGA VARCHAR2(240)
    SHOW ERROR
    PROMPT Creating Object Type 'TMEMORY'
    CREATE OR REPLACE TYPE TMEMORY AS OBJECT
    (KODE VARCHAR2(240)
    ,MERK VARCHAR2(240)
    ,TIPE VARCHAR2(240)
    ,UKURAN VARCHAR2(240)
    SHOW ERROR
    PROMPT Creating Object Type 'TADDRESS'
    CREATE OR REPLACE TYPE TADDRESS AS OBJECT
    (STREET VARCHAR2(240)
    ,CITY VARCHAR2(240)
    SHOW ERROR
    PROMPT Creating Object Type 'TPHONE'
    CREATE OR REPLACE TYPE TPHONE AS OBJECT
    (CODE VARCHAR2(240)
    ,DIGIT VARCHAR2(240)
    SHOW ERROR
    PROMPT Creating Object Type 'TCUSTOMER'
    CREATE OR REPLACE TYPE TCUSTOMER AS OBJECT
    (USERNAME VARCHAR2(240)
    ,NAME TNAME
    ,ADDRESS TADDRESS
    ,PHONE TPHONE
    ,TYPE NUMERIC(1)
    ,EMAIL VARCHAR2(240)
    SHOW ERROR
    1F.tab
    ==========
    PROMPT Creating Table 'DTRANSAKSI'
    CREATE TABLE DTRANSAKSI
    (CPU_KODBERG VARCHAR2(6) NOT NULL
    ,HTI_NONOTA VARCHAR2(4) NOT NULL
    ,JMLBRG NUMERIC
    PROMPT Creating Table 'CPU'
    CREATE TABLE CPU
    (KODBERG VARCHAR2(6) NOT NULL
    ,NAMA VARCHAR2(240)
    ,MEMORY REF TMEMORY
    ,MOTHERBOARD REF TMOTHERBOARD
    ,HARGA NUMERIC
    ,KET CLOB
    ,VERSI VARCHAR2(240)
    PROMPT Creating Table 'HTRANSAKSI'
    CREATE TABLE HTRANSAKSI
    (NONOTA VARCHAR2(4) NOT NULL
    ,USERNAME REF TCUSTOMER
    ,TGLTRANS DATE
    ,VERSI VARCHAR2(240)
    ,CONSTRAINT HTI_PK PRIMARY KEY
    (NONOTA)
    ORGANIZATION INDEX
    PROMPT Creating Table 'MEMORY'
    CREATE TABLE MEMORY OF TMEMORY
    (KODE NOT NULL
    PROMPT Creating Table 'MOTHERBOARD'
    CREATE TABLE MOTHERBOARD OF TMOTHERBOARD
    (KODE NOT NULL
    PROMPT Creating Table 'CUSTOMER'
    CREATE TABLE CUSTOMER OF TCUSTOMER
    ALTER TABLE CPU
    ADD (SCOPE FOR (MEMORY) IS MEMORY)
    ALTER TABLE CPU
    ADD (SCOPE FOR (MOTHERBOARD) IS MOTHERBOARD)
    ALTER TABLE HTRANSAKSI
    ADD (SCOPE FOR (USERNAME) IS CUSTOMER)
    1F.conn
    ===================
    PROMPT Creating Primary Key on 'DTRANSAKSI'
    ALTER TABLE DTRANSAKSI
    ADD (CONSTRAINT DTI_PK PRIMARY KEY
    (HTI_NONOTA
    ,CPU_KODBERG))
    PROMPT Creating Primary Key on 'CPU'
    ALTER TABLE CPU
    ADD (CONSTRAINT CPU_PK PRIMARY KEY
    (KODBERG))
    PROMPT Creating Foreign Key on 'DTRANSAKSI'
    ALTER TABLE DTRANSAKSI ADD (CONSTRAINT
    DTI_HTI_FK FOREIGN KEY
    (HTI_NONOTA) REFERENCES HTRANSAKSI
    (NONOTA))
    PROMPT Creating Foreign Key on 'DTRANSAKSI'
    ALTER TABLE DTRANSAKSI ADD (CONSTRAINT
    DTI_CPU_FK FOREIGN KEY
    (CPU_KODBERG) REFERENCES CPU
    (KODBERG))
    I found an error in ORACLE TOPLINK while adding table CUSTOMER, MOTHERBOARD and MEMORY from database to workbench. Any idea how to solve that error?
    And other questions:
    1. Does Toplink support inheritance and aggregation object table modelling? If it doesn't, what should I do?
    2. Is there any example or tutorial using Toplink Foundation Library?
    Thanks a lot.

    What error do you get in the MW?
    TopLink does support object-relational data-types, but the Mapping Workbench does not have support for object-relational data-types, so you may need to define your mappings through the TopLink Descriptor and Mapping Java code API. There is a section on object-relational data-type mappings in the TopLink User Guide.
    -- James : http://www.eclipselink.org

  • How to transfer files using Oracle Managed File Transfer from Oracle EBS 12.1.3

    Hello,
    I'm looking for ideas to securely transfer files bi-directional between Oracle EBS 12.1.3 to IIS using Oracle Managed File Transfer and SOA.  Any help is greatly appreciated.
    Thanks

    Hi Hussain,
    In the Note 466649.1
    Edited
    I have installed R12.1.1
    Datafiles on installed on local file system /u01/EBS_DATa/*dbf, *.ctl, *.log
    doing non RAC to RAC conversion with ASM option,
    I am using ASM with RAC and created ASM disks (DATA, FRA, CRS) on Shared SAN disks between node1 and node2 which are DATA for CRD (control, redo and Data) files, FRA for archive files, CRS for cluster files while doing RAC instalation,
    now how i move my CRD on local file system /u01/EBS_DATa/*dbf, *.ctl, *.log to shared ASM disk DATA ???????
    Please describe with step wise,
    Thanks in advance.
    Regards,
    Vara
    Edited by: user13409653 on Jan 3, 2012 12:25 AM
    Edited by: user13409653 on Jan 3, 2012 5:10 AM

  • How to start to use Oracle client to access Database ?

    Folks,
    Hello. I have just installed Oracle Client into directory /home/myOracle/Oracle_Client. But I don't know how to start and configure the client to access Oracle Database.
    Can any folk tell me how to start to use Oracle client to access Database ?

    user13764998 wrote:
    I have earlier managed to install the Oracle Client (32-bit) in 32-bit clients and servers Oracle Client 10.
    The reason that it went well before was the exellent setup and configurationprograms we got with that version.It seems you are confusing the "full" Datbase Client with Instant Client.
    Now I'm trying to install the Oracle Instant Client 11g R2 both 32-bit and 64 (of the latest revision) on a 64-bit Windows 2008 Server .
    I have managed to install the driver but the setup doesn't give me any Net Configuration Assistant or Net Manager to help with the configuration.What setup? Are you not using just the zip files?
    What are you installing exactly, i.e. what install media (file) did you download?
    So I haven't succeded in configuring it despite I I read the readme-info that comes with the Instant Client files.There's not much to configure - that's sort of the point of Instant Client. Just drop a few files in a folder, set PATH and off you go.
    Doesn't <instant client dir>\sqlplus user@'hostname/servicename' work?

  • How can I start using Oracle Express Edition

    Good afternoon, how can I start using Oracle Express Edition? I have it installed it but I can not enter any user or key that allows me to manage the program from the Internet. I have understood that this version is free.
    Correct me I'm wrong and please do noted me. In my country this course very expensive and I'm looking to learn on my own.
    Edited by: user12301712 on 03-dic-2009 9:46

    Hi
    During installation wizard asked you about password for SYS and SYSTEM user, you had to set it. If you forgot you can loggin to ORACLE via SQL plus without password:
    c:\>SQLPLUS / sys as sysdba
    after connect you can set new password for any user, for example (SYSTEM user):
    ALTER USER SYSTEM identified by NEW_PASSWORD;
    After this you can login to APEX (Internet enviroment)
    Remember Oracle it's not only Internet frontend, it's huge tools with many functions. If you need study Oracle you need many time and zest but it is worth-while.
    Yes Oracle XE is free (read licence agreement).

  • Oracle TopLink Essentials and CommunicationsException

    Hi ,
    I have server application , using MySql and Oracle TopLink Essentials - 2.0 working fine .
    But in the next day am getting always error :
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureAfter searching get some info , that there is a default connection time for MySql (8h), and after that conection is closing.
    I found some solution which should after 7h restart the connection, so it never will close :
    <property name="idle-timeout-in-seconds" value="25200"/>I add it to the persistence.xml, unfortunately this is not working :(
    Have any one the Idea how to solve this problem ?
    This is Exception stack :
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    Last packet sent to the server was 0 ms ago.
    Error Code: 0
    Call: SELECT ID, EMAIL, PASSWORD, USERNAME, CREATIONDATE, DESCRIPTION FROM ADMIN WHERE (EMAIL = ?)
         bind => [and]
    Query: ReportQuery(***.*******.*****.models.Admin)
         *** ****.*******.core.LgAdmin.login(LgAdmin.java:149)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:616)
         at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:406)
         at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
         at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1417)
         at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:878)
         at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
         at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
         at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:49)
         at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
         at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
         at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:274)
         at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:377)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
         at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
         at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
         at java.lang.Thread.run(Thread.java:636)
    Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThank you for any Help !!

    Hallo ForumKid2.
    Ok, at first , I am really beginner with J2EE :(
    Yes , I open connection as private attribute , with out closing it....
    private final EntityManagerFactory emf = Persistence.createEntityManagerFactory("TestModel", new java.util.HashMap<String, String>());I had an Idea to do it with own factory (Singleton class) to open and close the connection .
    I don't know how to do this via connection pool.. it mean to use some property in persistence.xml?
    But it will not fix the connection error ...or ?
    Anyone has Idea how to solve this problem ???
    Thank you !
    greetings
    andrzej

  • Unable to deploy Web App using JPA TopLink Essentials in Tomcat5.5.17

    Hi All,
    I am trying to deploy a Web App ( used Top Link Essentials ) to Tomcat and i am getting the following Error..
    I am strating tomcat using -javaagent:/Path/To/spring-agaent.jar
    Dec 14, 2006 9:52:46 AM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already.  Could not load oracle.toplink.essentials.internal.weaving.ClassDetails.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at oracle.toplink.essentials.internal.weaving.TopLinkWeaver.transform(TopLinkWeaver.java:84)
            at org.springframework.orm.jpa.persistenceunit.ClassFileTransformerAdapter.transform(ClassFileTransformerAdapter.java:56)
            at sun.instrument.TransformerManager.transform(TransformerManager.java:122)
            at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
            at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
            at java.lang.Class.getConstructor0(Class.java:2671)
            at java.lang.Class.newInstance0(Class.java:321)
            at java.lang.Class.newInstance(Class.java:303)
            at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:396)
            at com.sun.faces.config.ConfigureListener.verifyObjects(ConfigureListener.java:1438)
            at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:509)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
            at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
            at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
            at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
            at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
            at org.apache.catalina.core.StandardService.start(StandardService.java:450)
            at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Thanks
    Sateesh

    Spring 2.0 provides custom support for TopLink Essentials in Tomcat out-of-the-box. You should follow the instructions here: http://static.springframework.org/spring/docs/2.0.x/reference/orm.html#orm-jpa-setup-lcemfb-tomcat
    Essentially, Spring provides a custom class loader for Tomcat and doesn't use an agent.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Help with: oracle.toplink.essentials.exceptions.ValidationException

    hi guys,
    I really need ur help with this.
    I have a remote session bean that retrieves a list of books from the database using entity class and I call the session bean from a web service. The problem is that when i display the books in a jsp directly from the session bean everything works ok but the problem comes when I call the session bean via the web service than it throws this:
    Exception Description: An attempt was made to traverse a relationship using indirection that had a null Session. This often occurs when an entity with an uninstantiated LAZY relationship is serialized and that lazy relationship is traversed after serialization. To avoid this issue, instantiate the LAZY relationship prior to serialization.
    at oracle.toplink.essentials.exceptions.ValidationException.instantiatingValueholderWithNullSession(ValidationException.java:887)
    at oracle.toplink.essentials.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:233)
    at oracle.toplink.essentials.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:105)
    at oracle.toplink.essentials.indirection.IndirectList.buildDelegate(IndirectList.java:208)
    at oracle.toplink.essentials.indirection.IndirectList.getDelegate(IndirectList.java:330)
    at oracle.toplink.essentials.indirection.IndirectList$1.<init>(IndirectList.java:425)
    at oracle.toplink.essentials.indirection.IndirectList.iterator(IndirectList.java:424)
    at com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister.iterator(Lister.java:278)
    at com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister.iterator(Lister.java:265)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:129)
    at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
    at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
    at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
    at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:277)
    at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:100)
    at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:141)
    at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:315)
    at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
    at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:320)
    at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
    at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:176)
    ... 29 more
    This happens when I test the web service using netbeans 6.5.
    here's my code:
    session bean:
    ArrayList bookList = null;
    public ArrayList retrieveBooks()
    try
    List list = em.createNamedQuery("Book.findAll").getResultList();
    bookList = new ArrayList(list);
    catch (Exception e)
    e.getCause();
    return bookList;
    web service:
    @WebMethod(operationName = "retrieveBooks")
    public Book[] retrieveBooks()
    ArrayList list = ejbUB.retrieveBooks();
    int size = list.size();
    Book[] bookList = new Book[size];
    Iterator it = list.iterator();
    int i = 0;
    while (it.hasNext())
    Book book = (Book) it.next();
    bookList[i] = book;
    i++;
    return bookList;
    Please help guys, it's very urgent

    Yes i have a relationship but i didnt want it to be directly. Maybe this is a design problem but in my case I dont expect any criminals to be involved in lawsuit. My tables are like that:
    CREATE TABLE IF NOT EXISTS Criminal(
         criminal_id INTEGER NOT NULL AUTO_INCREMENT,
         gender varchar(1),
         name varchar(25) NOT NULL,
         last_address varchar(100),
         birth_date date,
         hair_color varchar(10),
         eye_color varchar(10),
         weight INTEGER,
         height INTEGER,
         PRIMARY KEY (criminal_id)
    ENGINE=INNODB;
    CREATE TABLE IF NOT EXISTS Lawsuit(
         lawsuit_id INTEGER NOT NULL AUTO_INCREMENT,
         courtName varchar(25),
         PRIMARY KEY (lawsuit_id),
         FOREIGN KEY (courtName) REFERENCES Court_of_Law(courtName) ON DELETE NO ACTION
    ENGINE=INNODB;
    CREATE TABLE IF NOT EXISTS Rstands_trial(
         criminal_id INTEGER,
         lawsuit_id INTEGER,
         PRIMARY KEY (criminal_id, lawsuit_id),
         FOREIGN KEY (criminal_id) REFERENCES Criminal(criminal_id) ON DELETE NO ACTION,
         FOREIGN KEY (lawsuit_id) REFERENCES Lawsuit(lawsuit_id) ON DELETE CASCADE
    ENGINE=INNODB;So I couldnt get it.

  • Oracle.toplink.essentials.exceptions.ValidationException

    Hi,
    In my EJB 3 application we added a Schema entity to our already existing Student entity.
    I added the followning code in the student entity:
    @OneToOne(cascade = CascadeType.ALL)
    @JoinColumn(
              nullable = true,
              name = "SCHEMA_ID"
    private Schema schema;
    After adding the Schema enity I tried to compile and run the tests. I got the following toplink error message (roughly):
    nternal Exception: Exception [TOPLINK-7250] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: [class se.myapp.subsytem.alpha.Student] uses a non-entity [class se.myapp.subsytem.domain.Schema] as target entity in the relationship attribute [private e.myapp.subsytem.domain.Schema].
    I found out that I had to change the persistence.xml but not why?
    I would be very happy if someone could shed some light in this matter since I have no clue why I must put it in the persistence.xml
    cheers,
    //mike

    You must either annotate every Entity with the @Entity annotation, or map it through the ORM.xml. All Entities must also define an @Id annotation.
    -- James : http://www.eclipselink.org

  • Remove related entity, oracle.toplink.essentials.indirection.IndirectList

    I have two entities autogenerated by the jdev 10.1.3.1 JPA wizard, Proveedor(codprov varchar2 PK) having n Lineas(codprov varchar2 PK, Codline varchar2 PK) related as:
    in entity Proveedor:
    private List<Linea> lineas;
    @OneToMany(mappedBy="proveedor")
    public List<Linea> getLineas() {
    return lineas;
    public Linea removeLinea(Linea linea) {
    System.out.println(" is at:" + getLineas().indexOf(linea));
    getLineas().remove(linea);
    linea.setProveedor(null);
    return linea;
    in Linea:
    @Id
    @ManyToOne
    @JoinColumn(name="CODPROV", referencedColumnName="CODPROV")
    public Proveedor getProveedor() {
    return proveedor;
    the delete method on the service bean is :
    public void delLinea( String codprov,String codline){
    EntityManager em = jpaResourceBean.getEntityManager();
    try{
    em.getTransaction().begin();
    Linea linea = em.find(Linea.class, new LineaPK(codprov, codline));
    em.remove(linea);
    em.getTransaction().commit();
    linea.getProveedor().removeLinea(linea);
    finally {
    em.close();
    when i try to remove the entity linea calling delLinea on the service bean
    the List (oracle.toplink.essentials.indirection.IndirectList) is NOT removing the entity linea, the system output show that is not there:
         06/08/30 16:59:23 is at:-1
    the relationship is not lost, as linea.getProveedor().removeLinea(linea); works so it's being held ok (at least from Linea to Proveedor)
    what i'm doing wrong, is IndirectList is mantaining copies of the related entities ??

    thank you, after reading your reply i tried this:
    public void delLinea( String codprov,String codline){
    EntityManager em = jpaResourceBean.getEntityManager();
    try{
    em.getTransaction().begin();
    Linea linea = em.find(Linea.class, new LineaPK(codprov, codline));
    linea.getProveedor().removeLinea(linea);
    em.remove(linea);
    em.getTransaction().commit();
    finally {
    em.close();
    As you advised, I'm reading the Proveedor in the transaction and clearing the relation before removing the entity Linea, but em.getTransaction().commit() throws:
    GRAVE: #{ProveedorBean.linea_Del}: javax.faces.el.EvaluationException: javax.persistence.RollbackException: java.lang.NullPointerException
    javax.faces.FacesException: #{ProveedorBean.linea_Del}: javax.faces.el.EvaluationException: javax.persistence.RollbackException: java.lang.NullPointerException
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:105)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: javax.persistence.RollbackException: java.lang.NullPointerException
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         ... 25 more
    Caused by: javax.persistence.RollbackException: java.lang.NullPointerException
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:109)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:45)
         at services.inventario.impl.InventarioServiceBean.delLinea(InventarioServiceBean.java:473)
         at ui.ProveedorBean.linea_Del(ProveedorBean.java:152)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         ... 26 more
    Caused by: java.lang.NullPointerException
         at oracle.toplink.essentials.internal.identitymaps.CacheKey.computeHash(CacheKey.java:183)
         at oracle.toplink.essentials.internal.identitymaps.CacheKey.setKey(CacheKey.java:366)
         at oracle.toplink.essentials.internal.identitymaps.IdentityMap.getCacheKey(IdentityMap.java:277)
         at oracle.toplink.essentials.internal.identitymaps.IdentityMap.remove(IdentityMap.java:399)
         at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.removeFromIdentityMap(IdentityMapManager.java:1036)
         at oracle.toplink.essentials.internal.sessions.IdentityMapAccessor.removeFromIdentityMap(IdentityMapAccessor.java:801)
         at oracle.toplink.essentials.internal.sessions.IdentityMapAccessor.removeFromIdentityMap(IdentityMapAccessor.java:793)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.postMergeChanges(UnitOfWorkImpl.java:2834)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.mergeChangesIntoParent(UnitOfWorkImpl.java:2556)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:93)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:842)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:90)
         ... 34 more
    The following variation throws the same exception:
    public void delLinea( String codprov,String codline){
    EntityManager em = jpaResourceBean.getEntityManager();
    try{
    em.getTransaction().begin();
    Proveedor prov = em.find(Proveedor.class, codprov);
    Linea linea = em.find(Linea.class, new LineaPK(codprov, codline));
    prov.removeLinea(linea);
    em.remove(linea);
    em.getTransaction().commit();
    finally {
    em.close();
    the following variation:
    public void delLinea( String codprov,String codline){
    EntityManager em = jpaResourceBean.getEntityManager();
    try{
    em.getTransaction().begin();
    Proveedor prov = em.find(Proveedor.class, codprov);
    Linea linea = em.find(Linea.class, new LineaPK(codprov, codline));
    prov.removeLinea(linea);
    em.getTransaction().commit();
    em.getTransaction().begin();
    linea = em.find(Linea.class, new LineaPK(codprov, codline));
    em.remove(linea);
    em.getTransaction().commit();
    finally {
    em.close();
    after the second commit(); throws the same:
    Caused by: javax.persistence.RollbackException: java.lang.NullPointerException
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:109)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:45)
         at services.inventario.impl.InventarioServiceBean.delLinea(InventarioServiceBean.java:477)
         at ui.ProveedorBean.linea_Del(ProveedorBean.java:152)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         ... 23 more
    Caused by: java.lang.NullPointerException
         at oracle.toplink.essentials.internal.identitymaps.CacheKey.computeHash(CacheKey.java:183)
         at oracle.toplink.essentials.internal.identitymaps.CacheKey.setKey(CacheKey.java:366)
         at oracle.toplink.essentials.internal.identitymaps.IdentityMap.getCacheKey(IdentityMap.java:277)
         at oracle.toplink.essentials.internal.identitymaps.IdentityMap.remove(IdentityMap.java:399)
         at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.removeFromIdentityMap(IdentityMapManager.java:1036)
         at oracle.toplink.essentials.internal.sessions.IdentityMapAccessor.removeFromIdentityMap(IdentityMapAccessor.java:801)
         at oracle.toplink.essentials.internal.sessions.IdentityMapAccessor.removeFromIdentityMap(IdentityMapAccessor.java:793)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.postMergeChanges(UnitOfWorkImpl.java:2834)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.mergeChangesIntoParent(UnitOfWorkImpl.java:2556)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:93)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:842)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:90)
         ... 31 more

  • Hi, I want to use my number for iMessage on my iPhone only and on my macbook pro use my apple id/email and not my number. Also how do i stop the iMessages on my mac appearing on my phone.

    Hi, I want to use my number for iMessage on my iPhone only and on my macbook pro use my apple id/email and not my number, how do i do that? before i updated my phone thats what it was like but now that ive updated i dont know how to change it. Also how do i stop the iMessages on my mac appearing on my phone. can you please help. Thanks

    I tried that but on my iphone i can only click on my email and my number is checked but its in grey doesnt allow me click on it and on my Mac, its the opposite, my email is checked but in grey so doesnt allow me to click on it. im realy confused

  • Can i  use Oracle Database Audit Vault and Oracle Database Firewall on Solaris?

    Can i  use Oracle Database Audit Vault and Oracle Database Firewall on Solaris?

    4195bee8-4db0-4799-a674-18f89aa500cb wrote:
    i dont have access to My Oracle Support can u send text or html of document please?
    Moderator Action:
    No they cannot send you a document that is available only to those with access to MOS.
    That would violate the conditions of having such service contract credentials.
    Asking someone to violate such privileges is a serious offense and could get that other person's organization banned from all support and all their support contracts cancelled.
    Your post is locked.
    Your duplicate post that you placed into the Audit Vault forum space has been removed (it had no responses).
    This thread which you had placed in the Solaris 10 forum space is moved to the Audit Vault forum space.
    That's the proper location for Audit Vault questions.

  • How to alert user using BizTalk if a file is not dropped in a folder during a specified time using file adapter (or any other)

    Hi,
    I have a requirement wher the client wants BizTalk to alert users somehow when a file is not received at specific time. I am using a FILE receive adapter, the requirement is, if the FILE adapter does not receive a file on time then BizTalk should alert the
    users somehow. The client wants to use ESB toolkit to do this job.
    does anybody have any idea ?
    PLEASE HELP
    Thanks & Regards
    Vikram

    Duplicate Thread.
    Follow here:
    https://social.msdn.microsoft.com/Forums/en-US/3e314d17-8b0c-451c-921a-65dbab0612a8/how-to-alert-user-using-biztalk-if-a-file-is-not-dropped-in-a-folder-during-a-specified-time-using?forum=biztalkgeneral

  • I am trying to make a purchase and want to use my Apple ID Balance and NOT charge the debit card under my account info.  How do I do this?

    I am trying to make a purchase and want to use my Apple ID Balance and NOT charge the debit card under my account info.  How do I do this?

    As far as I'm aware iTunes always charges the account balance first and when this expires charges any remaining amount to your credit/debit card. The one exception I am aware of (though there could be others) is that Apps purchased from the Canadian store must always be charged to a card rather than a gift card voucher balance due to local legislation.
    tt2

  • How activation Iphone5.Purchased used from an Iranian person and I'm from Iraq, I could not activate it because of the expense of Old Icloud possible assistance

    how activation Iphone5.Purchased used from an Iranian person and I'm from Iraq, I could not activate it because of the expense of Old Icloud possible assistance

    If the iPhone has Activation Lock - that is, it's asking for the previous owner's Apple ID and password to activate the device - then you will need that information, or you'll need to get the previous owner to remove the device from his/her iCloud account:
    http://support.apple.com/kb/PH2702
    If you can't reach the previous owner or he/she is unwilling to cooperate, then the device is unusable by you. Return the iPhone for a refund if you can.
    Regards.

Maybe you are looking for

  • Poor 3g reception issue does not come from being in a low coverage area.

    For All of you who keep saying that "If youre in a low coverage area the 3g service wont work you must turn off 3g". That is not a solution. Yes it fixes the problem of not being able to talk on the phone but that is just a workaround that in my opin

  • Can't control fans speed after upgrading to kernel26 2.6.31 [solved]

    Mother board is ASUS P5Q-SE. After upgrading pwm sensors disappeared. I can get temp and fans speed but not set. Any ideas? :-\ Last edited by urandom (2009-10-12 15:52:51)

  • PSE 7.0 and print layout with picture package

    I was used to PSE 2.0 where you could have your own print layouts sitting in a *.txt file. All you need was to make this txt file and specify in it: the unit (inch or cm) to use the width and height of the print area and for each image the coordinate

  • Release group in release strategy

    HI gurus, Can anyone tell the significance of release group in release strategy for purchase order with example.One use of it as i know is where a single person is responsible for multiple plants and in each plant he has different prerequisities.Plea

  • Why does this extra REG EVENTS cause memory leak?

    LabVIEW 8.6.1f1, Win XP/Vista My client reported a memory leak in a particular section of my code - my own tests confirmed it. Although I have found it and eliminated it, I still don't understand what's really happening. The RTEC RECEIVER CONTROLLER