Strange classloader experience with toplink-essentials on Oc4j-10.1.3.3.0

Hi,
I am teaching classes at the Eotvos University/Budapest on a topic where OC4J has been used for 2 years. Students use jdeveloper (regularly updated) to create webapps with EJB3.0+toplink backends. They test their projects first with the JDeveloper embedded OC4J, but after that they deploy it on a central server running standalone OC4J.
Students make quite an intensive and versatile use of the OC4J server, a noteworthy stress-test you may find interesting! The server is a Ubuntu Linux with JDK_1.5.0_14.
1. The first known issue is that after about 10 projects are deployed (small class projects 3-4 EJBs, 3-4 JSP-s each), oc4j regularl goes into a "runaway" mode, i.e. the CPU utilization of the JVM process goes up to 99-100%. Static web content is still available, but all applications stop responding. I can state pretty safely that the applications deployed are fairly harmless and it is not even necessary to run them to make this happen. I.e. after 10-15 apps are depoyed it is enough to start the admin-client.jar or the admin console to experience this problem. (The applications have no problem individually: last year after these issues occurred, we installed them individually for grading and nothing like this happened).
Let me point out that SO FAR this happened with Oc4j-10.1.3.1 and Oc4j-10.1.3.2 only, and this was the main reason we swithed to Oc4j-10.1.3.3.0
2. Another issue that exists both with the earlier versions and 10.1.3.3.0 is that applications need to include the toplink-essentials.jar explicitely if they use EJB3.0 entities. It appears to me that this should not be neessary as there are default definitions for that in config/server.xml (a shared-library definition for toplink-essentials), and in config/system-application.xml (a corresponding import-shared-library tag), but still their applications cannot be deployed because of the follwing error:
Deploy error: Deploy error: Operation failed with error:
Hiányzó osztály: oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
FĂĽggĹ' osztály: com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl
BetöltĹ': oc4j:10.1.3
Kódforrás: /opt/oc4j_101330/j2ee/home/lib/oc4j-internal.jar
(On our machines, JDK displays some errors in Hungarian: HiányzĂł osztály=Missing class; FĂĽggĹ' osztály=Dependent class; BetöltĹ'=Loader; KĂłdforrás=Code source.)
To fix this issue, we used a workaround, i.e. their orion-application.xml is regularly extended with something like:
<library path="/opt/oc4j/toplink/jlib/toplink-essentials.jar"/>
And this solved the problem. Can you explain this?
3. Now, with 10.1.3.3.0 this did not help much either. Although the toplink-essentials.jar was found, another nasty exception happened in the server still during deployment:
Caused by: java.lang.NoSuchMethodException: oracle.toplink.essentials.platform.server.oc4j.Oc4jPlatform.<init>(oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl)
at java.lang.Class.getConstructor0(Class.java:2678)
at java.lang.Class.getConstructor(Class.java:1629)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.updateServerPlatform(EntityManagerSetupImpl.java:309)
Apparently a class in toplink-essentials.jar (version 2, build 41, i.e. the one that comes with oc4j) cannot properly invoke a the constructor of another class IN THE SAME JAR.
I checked everything, even unzipped and checked the class signatures, and also made sure that there is no other toplink-essentials.jar in the classpath. Still the error remained.
FInally, I tried to add the above libary tag to $OC4J_HOME/config/apllication.xml instead of the applications local orion-application.xml, and - voila!!! - it WORKS now!
Can you explain all this to me? From the documentation the location of the <library> tag in the descriptor files should not amke any difference, but still it seems to do.
Regards: Arpad Bakay

Seems to be a bug. That was the response from Oracle support (Metalink)
Response:
Your issue seems to be related to bug 5594702 - Abstract: EJB30 ENTITY BEAN WITH @ID AND @COLUMN ANNOTATION FAILS TO DEPLOY ON AIX.
There is an issue with the IBM JDK/JRE 1.5's processing of annotations.
Links:
http://www.theserverside.com/discussions/thread.tss?thread_id=37764
http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=367&thread=112543&cat=10
When processing annotations it returns boolean values as false.
Work-around:
Fully specify the @Column annotation's boolean values. If insertable and updatable are set to false (which will happen due to this bug) then TopLink sets the PK
mapping to read-only and the exception seen is expected.
Note: nullable attribute of the @Colmun is not used in the EJB3/JPA preview of 10.1.3.0 If the customer MUST override the default column name then they should use:
@Column(name="column-name", insertable=true, updatable=true)
If they do not wish to override the default column name then simply do not use an @Column annotation.
It can be deleted or commented out in the JDev generated code.
There are two reported annotation processing issues with the AIX JVM. One was fixed in SR1 and the other is fixed
in SR3 (due out Oc 11 - today). Upgrading to these more recent JVM releases may also address this issue.
RECOMMENDED SOLUTIONS:
1. Upgrade the IBM AIX JVM to SR3.
OR
2. Fix all generated @Column annotations as described above

Similar Messages

  • Predeploy for PersistenceUnit failed - JBOSS with toplink essentials

    I am trying to migrate my project from Tomcat 6 to Jboss-5.1.0-GA
    I am using JPA 1.0 with toplink-essentials 2.0 for database process.
    In tomcat it is working perfectly.
    But when i am trying in JBOSS, it showing the below error..
    19:38:27,983 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#Entity state=Create
    javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/21/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
    Exception Description: predeploy for PersistenceUnit [Entity] failed.
    Internal Exception: java.lang.NullPointerException
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:615)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(EntityManagerFactoryProvider.java:178)
    at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
    at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
    at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
    at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
    at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
    at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
    at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
    at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
    at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
    at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
    at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
    at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
    at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
    at org.jboss.Main.boot(Main.java:221)
    at org.jboss.Main$1.run(Main.java:556)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/21/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
    Exception Description: predeploy for PersistenceUnit [Entity] failed.
    Internal Exception: java.lang.NullPointerException
    at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:212)
    ... 62 more
    Caused by: java.lang.NullPointerException
    at oracle.toplink.essentials.internal.ejb.cmp3.xml.XMLHelper.parseDocument(XMLHelper.java:623)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.readStandardMappingFiles(MetadataProcessor.java:369)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.readMappingFiles(MetadataProcessor.java:339)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:344)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:584)
    ... 61 more
    15:37:39,014 WARN [HDScanner] Failed to process changes
    org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
    DEPLOYMENTS IN ERROR:
    Deployment persistence.unit:unitName=#Entity is in error due to the following reason(s): java.lang.NullPointerException
    at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)and my persistence.xml file is here like below...
    <persistence 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" version="1.0">
    <persistence-unit name="Entity" transaction-type="JTA">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <jta-data-source>java:/iport</jta-data-source>
    <mapping-file>orm.xml</mapping-file>
    <class>env.model.authorization.IptUsersRoles</class>
    <class>env.model.defaults.IptConveyourMaster</class>
    <class>env.model.defaults.IptAccessroles</class>
    <class>env.model.defaults.IptAccesstype</class>
    <class>env.model.defaults.IptAccounttype</class>
    <class>env.model.defaults.IptCompanylicensejoin</class>
    <class>env.model.defaults.IptCompagentjoin</class>
    <class>env.model.defaults.IptState</class>
    <class>env.model.defaults.IptStockyardCargotype</class>
    <class>env.model.defaults.IptTaxcategory</class>
    <class>env.model.defaults.IptTaxparameter</class>
    <class>env.model.defaults.IptTaxtype</class>
    <class>env.model.defaults.IptTerminaltype</class>
    <class>env.model.defaults.IptTugtype</class>
    <class>env.model.defaults.IptGldetailsmaster</class>
    <class>env.model.defaults.IptBagmaster</class>
    <class>env.model.defaults.IptTax</class>
    <class>env.model.defaults.IptBranch</class>
    <class>env.model.defaults.IptTransactionType</class>
    <class>env.model.masters.IptAgentmaster</class>
    <class>env.model.operations.IptCommunicationTemplate</class>
    <class>env.model.operations.IptCommtemplateLines</class>
    <class>env.model.workflow.IptApprovedDocstatus</class>
    <class>env.model.masters.IptVesselPerformanceMaster</class>
    <class>env.model.defaults.IptEquipmentType</class>
    <class>env.model.defaults.IptCity</class>
    <class>env.model.transactions.IptLabreportFunction</class>
    <class>env.model.defaults.IptAttachmentConfiguration</class>
    <class>env.model.defaults.IptAttachmentConfigurationLines</class>
    <class>env.model.defaults.IptExchangeratelines</class>
    <class>env.model.masters.IptNotifications</class>
    <class>env.model.masters.IptNotificationslines</class>
    <class>env.model.defaults.IptLogSheet</class>
    <properties>
    <property name="toplink.jdbc.driver"
    value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
    <property name="toplink.jdbc.url"
    value="jdbc:sqlserver://x.x.x.x;databaseName=IPORTMAN_GPL" />
    <property name="toplink.jdbc.user" value="xx" />
    <property name="toplink.jdbc.password" value="xx" />
    </properties>
    </persistence-unit>
    </persistence>I also have the /META-INF/orm.xml file... where the code is like below...
    <?xml version="1.0" encoding="UTF-8"?>
    <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
    version="1.0">
    <persistence-unit-metadata>
    <persistence-unit-defaults>
    <schema>IPORTMAN</schema>
    <catalog>IPORTMAN_GPL</catalog>
    </persistence-unit-defaults>
    </persistence-unit-metadata>
    </entity-mappings>I can understand one thing, that there is some thing wrong in persistence.xml and it's data.
    After so much googled, i had found some solutions.... like....
    1) Remove the "private static final long serialVersionUID = 1L;" from all pojos.
    2) There should not be white space in persistence.xml inside <class> tag.
    3) Change the JTA datasource from NON-JTA datasoucre.
    I had changed all things as per the above mentioned points.
    But still i am getting the same error.
    Please verify the problem and suggest me a possible solution.
    Please help me.. Please..
    Edited by: sree4j on May 1, 2013 12:55 AM
    Edited by: sree4j on May 1, 2013 12:56 AM
    Edited by: sree4j on May 1, 2013 12:57 AM

    Hai jsutherl, Thank you for reply..
    Right now cannot upgrade my project from toplink to eclipselink.
    Because my project was an huge application. where i am using nearly 250 actionclasses and dao.
    I already tried to migrate, but the package structures are completely different. so, i am unable to figure out this packages path.
    So, as per your suggestion, i had renamed my orm.xml to mapping.xml file.
    But when i am running the application then the below error was throwing....
    19:03:30,149 INFO [STDOUT] [TopLink Warning]: 2013.05.01 07:03:30.119--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class env.model.masters.IptNotifications. The class is ignored.[here IptNotifications is a database pojo refrence class where the db table name is IPT_NOTIFICATIONS]
    The above same kind of error was throwing to all my pojos [i.e. Database table refrence classes]
    Please help me.
    I have to migrate my project to jboss.
    All my work are getting stopped due to this issues.
    Please help me..

  • Problems with Toplink Essentials on OracleAS 10.1.3.1 / OC4J 10.1.3.2

    Hi, all.
    I successfully installed OracleAS 10.1.3.0 and applied patch 5906151 to update do OAS 10.1.3.1 and OC4J 10.1.3.2, running on both Windows and AIX.
    I deployed a j2ee app (ejb-jar and ear/war separatelly) on both. My application runs very well on Windows platform, but fails on AIX.
    In order to get my app running with EJB 3.0, JPA and Toplink, I had to copy toplink-essentials.jar to $ORACLE_HOME/j2ee/home/applib/ directory.
    On AIX I was getting the following error:
    exception occurred during method invocation: javax.ejb.EJBException:
       java.lang.RuntimeException: javax.ejb.EJBException: oracle.toplink.essentials.exceptions.ValidationException
              Exception Description: Error encountered when building the @NamedQuery [MyClass.findAll]
                 from entity class [class oracle.toplink.essentials.internal.ejb.cmp3.metadata.queries.MetadataNamedQuery].
             Internal Exception: java.lang.IllegalStateException: ClassLoader "myApp.root:0.0.1"
               (from  in /oracle/product/10.1.3.0/j2ee/OC4J_1/applications/myApp/):
      This loader has been closed and should not be in use.;
    But I found a known issue on Metalink [Note:427650.1] (bug 5928776) - https://metalink.oracle.com/metalink/plsql/f?p=130:14:11405609768040641618::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,427650.1,1,1,1,helvetica
    I replaced the toplink-essentials.jar and toplink-essentials-agent.jar as stated on the metalink for the version build 41, and tested. And later for the latest build 58.
    But I am getting another error message:
    Exception [TOPLINK-46] (Oracle TopLink Essentials - 2.0 (Build b58-rc1 (08/05/2007))): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: There should be one non-read-only mapping defined for the primary key field [MY_TABLE.MY_FIELD].
    Descriptor: RelationalDescriptor(xyz.MyClass --> [DatabaseTable(MY_TABLE)])
    Runtime Exceptions:
    ; nested exception is: javax.persistence.PersistenceException: Exception [TOPLINK-0] (Oracle TopLink Essentials - 2.0 (Build b58-rc1 (08/05/2007))): oracle.toplink.essentials.exceptions.IntegrityException
    Descriptor Exceptions:
    ---------------------------------------------------------Does anyone have any idea about this issue?

    Seems to be a bug. That was the response from Oracle support (Metalink)
    Response:
    Your issue seems to be related to bug 5594702 - Abstract: EJB30 ENTITY BEAN WITH @ID AND @COLUMN ANNOTATION FAILS TO DEPLOY ON AIX.
    There is an issue with the IBM JDK/JRE 1.5's processing of annotations.
    Links:
    http://www.theserverside.com/discussions/thread.tss?thread_id=37764
    http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=367&thread=112543&cat=10
    When processing annotations it returns boolean values as false.
    Work-around:
    Fully specify the @Column annotation's boolean values. If insertable and updatable are set to false (which will happen due to this bug) then TopLink sets the PK
    mapping to read-only and the exception seen is expected.
    Note: nullable attribute of the @Colmun is not used in the EJB3/JPA preview of 10.1.3.0 If the customer MUST override the default column name then they should use:
    @Column(name="column-name", insertable=true, updatable=true)
    If they do not wish to override the default column name then simply do not use an @Column annotation.
    It can be deleted or commented out in the JDev generated code.
    There are two reported annotation processing issues with the AIX JVM. One was fixed in SR1 and the other is fixed
    in SR3 (due out Oc 11 - today). Upgrading to these more recent JVM releases may also address this issue.
    RECOMMENDED SOLUTIONS:
    1. Upgrade the IBM AIX JVM to SR3.
    OR
    2. Fix all generated @Column annotations as described above

  • Replacing Oracle Toplink with TopLink Essentials

    Is it possible to force OC4J to use TopLink Essentials by default
    instead of Oracle TopLink?

    Hi
    Replace your toplink jars in your server with the new
    jars. it should pick up automatically
    Regards,
    RaghavendraHi,
    I am trying to use the latest version of Toplink Essentials with the embedded OC4J in JDeveloper 10.1.3.
    Can you please be more specific?
    Which JAR files must be replaced?
    Thanks in advance,
    George

  • Error while deploying Spring PetClinic Demo App(with Toplink OR )on OC4J

    Hi All,
    I am trying to deploy sample app provided with spring framework on oc4j with Toplink as my OR layer, but i am facing issues with the deployment
    App fails to start with error finding "org.springframework.orm.toplink.support.CommonsLoggingSessionLog"
    this is found in toplink-applicatio context.xml file
    i found that this class is missing in spring framework.
    please help to get the jar files
    Thanks
    Raghavendra

    i got the class files. actually in 10.1.3 these class files are put in a different jar file spring-toplink.jar
    The Main issue here is that 10.1.3 toplink production is yet to be integrated into spring 2.
    petClinic will work fine if we use 10.1.3 developer preview edition
    Thanks
    Raghavendra

  • Lazy fetching problem with TopLink essentials

    [TopLink Warning]: 2008.08.02 08:56:14.656--ServerSession(29131495)--Ignoring LAZY fetch type on element [public byte[] org.mayhem.mail.entity.Message.getRawBytes()] within entity class [class org.mayhem.mail.entity.Message]. All basic mappings default to use EAGER fetching.This is what I get when I start TopLink essesntials based JavaEE server. Why is that ?
    No, no..... I knooow that lazy fetching is not required to be supported by a JPA implementor.
    The question is why ?
    I mean, isnt Toplink the official implementation, and arent all features "supposed" to be implemented?
    How can I address this issue ?
    I dont want to fetch the bytes on each accessed message ...... ;(

    TopLink Essentials does not support this optional feature.
    EclipseLink 1.0 does, (JPA 2.0 reference impl). EclipseLink is basically the full open sourcing of the TopLink product, where as TopLink Essentials only included "Essential" features.
    -- James : [http://www.eclipselink.org]

  • How to use (toplink essentials)JPA with EJB 2.1 spec in oc4j 10.1.3.2

    I have an application that uses EJB 2.1 spec with SLSB (no entity beans) and uses DAO pattern with hibernate2 for persistence. I want to replace hibernate with toplink-essentials (JPA). I cannot upgrade the EJB spec version as we use some thirdparty beans. The application uses DAO pattern so I should be able to hook in a new toplink DAO impl. What I am struggling with is how do I get hold of the EntityManagerFactory in my EJB 2.1 SLSB. Also I need CMT with XA transactions as our application interacts with jms and database using MDBs and SLSBs.
    Prantor

    You should be able to use Persistence.createEntityManagerFactory(<your-persistence-unit-name>, properties), and create your EntityManager from that.
    To have TopLink integrated with JTA, in your persistence.xml (or properties) you need to use a JTA DataSource, and set the ServerPlatform for your JEE server.

  • 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

  • External ConnectionPool in toplink-essentials..

    Is it possible to use external connection-pool with toplink-essentials ??

    Yes...
    Basically,
    1)You need a sessionCustomizer
    public class MySessionCustomizer implements SessionCustomizer {
    public void customize(Session session) throws Exception {
    MyDataSource dataSource = new MyDataSource();
    JNDIConnector connector = new JNDIConnector(dataSource);
    session.getLogin().setConnector(connector);
    session.getLogin().useExternalConnectionPooling();
    2)In persistence.xml
    <property name ="toplink.session.customizer" value="util.MySessionCustomizer"/>
    3)A Datasource :
    public class MyDataSource implements javax.sql.DataSource
    --Serkan Sunel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Toplink app works without oc4j,fails with security excp. in oc4j[SOLVED]

    OS: Windows XP
    jdk version: 1.5.0.04 (installed normally with windows installer, no tampering)
    JDeveloper version: 10.1.3.2.0 (base installation)
    I'm new to JDeveloper and I'm working on SRDemo application from online ADF tutorial under JDeveloper. After 6th chapter I tried to run the app with embedded oc4j. After a login to app i got a toplink exception caused by a security exception. I've tried toplink part of the application with a standalone client it works without this strange problem. Also other toplink tutorials that i have work without oc4j.
    The exception is this:
    Note: some messages were in Turkish, so I (partly) translated them, they may not match original english messages
    [TopLink Info]: 2007.07.06 10:52:31.312--ServerSession(29560314)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--TopLink, sürüm: Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)
    [TopLink Config]: 2007.07.06 10:52:31.328--ServerSession(29560314)--Connection(27524709)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--connected(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> "SRDEMO"
         data source url=> "jdbc:oracle:thin:@localhost:1521:XE"
    [TopLink Severe]: 2007.07.06 10:52:31.343--ServerSession(29560314)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--Local Exception Stack:
    Exception[TOPLINK-7107] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.ValidationException
    Exception message: Error in decrypting .....
    Caused by: java.security.NoSuchAlgorithmException: Algorithm DES not available      at oracle.toplink.exceptions.ValidationException.errorDecryptingPassword(ValidationException.java:587)
         at oracle.toplink.internal.security.JCEEncryptor.decryptPassword(JCEEncryptor.java:94)
         at oracle.toplink.sessions.DatasourceLogin.prepareProperties(DatasourceLogin.java:296)
         at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:147)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:197)
    ...(the stack goes on followed by below causes)
    Caused by: java.security.NoSuchAlgorithmException: Algorithm DES not available
         at javax.crypto.SunJCE_b.a(DashoA12275)
         at javax.crypto.SecretKeyFactory.getInstance(DashoA12275)
         at oracle.toplink.internal.security.JCEEncryptor$Synergizer.getMultitasker(JCEEncryptor.java:104)
         at oracle.toplink.internal.security.JCEEncryptor.decryptPassword(JCEEncryptor.java:74)
         ... 117 more
    Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: DES, provider: SunJCE, class: com.sun.crypto.provider.DESKeyFactory)
         at java.security.Provider$Service.newInstance(Provider.java:1155)
         at sun.security.jca.GetInstance.getInstance(GetInstance.java:220)
         ... 121 more
    Caused by: java.lang.SecurityException: class "com.sun.crypto.provider.DESKeyFactory"'s signer information does not match signer information of other classes in the same package
         at java.lang.ClassLoader.checkCerts(ClassLoader.java:775)
         at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
         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.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1620)
         at java.security.Provider$Service.getImplClass(Provider.java:1172)
         at java.security.Provider$Service.newInstance(Provider.java:1129)
         ... 122 more
    This happens when i run toplink project inside oc4j, with a normal java client outside oc4j it works.
    The strange thing is the root cause of the problem (the exception complaining about signer) . If the root cause of this problem was really correct system wide, neither security code samples nor the standalone client that i tried would have worked.
    Only similiar issue I've found on the net is a problem that occured under eclipse due to a bug in previous versions of jce, but it seems this is no longer an issue.
    No one other than me seems to have this problem, so this implies a problem with my system, but the root exception about signer information (which is not correct) says there is something wrong with toplink/oc4j runtime or there is some subtle bug.
    I am trying to download another jdk1.5 version to see if this is a subtle bug of java-1.5.0.04 and oc4j, but either sun servers or my isp has a problem because the download is in the order of bytes and fails all the time.
    I think there can be a problem with the java2.policy file under oc4j config dir, but i don't know if it is really used and necessary or not.
    I don't know much about oc4j config so i need some help to proceed. thanks in advance
    Message was edited by:
    identityunknown

    Sorry, I tried something that I should have tried before posting, that gives another information about my problem.
    when i use standalone oc4j using start_oc4j.bat under jdev/bin, I also get the same security exception stack (nothing deployed to server) during server initialization. the default java command in start_oc4j.bat is this:
    OC4J_OPTS=
    VM_OPTS=-XX:MaxPermSize=256m
    JAVA_COMMAND="%JAVA_HOME%\bin\java.exe" %VM_OPTS% -jar oc4j.jar %OC4J_OPTS%
    if I change the command to this:
    OC4J_OPTS=
    VM_OPTS=-XX:MaxPermSize=256m -Xbootclasspath/p:"%JAVA_HOME%\jre\lib\ext\sunjce_provider.jar"
    JAVA_COMMAND="%JAVA_HOME%\bin\java.exe" %VM_OPTS% -jar oc4j.jar %OC4J_OPTS%
    and put sunjce_provider.jar on boot classpath I don't get that exception and oc4j initializes normally. My new questions are:
    1. what is the reason for this behavior
    2. how can I specify boot classpath option for embedded oc4j and/or JDeveloper

  • Toplink Essentials in Jdeveloper 10.1.3.1: production or experientment?

    Dear All,
    i have a question about the toplink essentials bundled with the jdeveloper 10.1.3.1 production release.
    Is this version of production quality or just for experientment?
    is it stable enough to developer application on top of it ??
    thanks.

    Dear Shay,
    Thank you.
    Then i can persuade my colleague to use it to develop our small, new application.
    BTW, will oracle provide official support if there is any problem related to toplink essentials
    in 10.1.3.1? my company sign contract and pay for technical support.(through metalink)
    thank you.

  • Problem with standalone Toplink Essentials (Spring/JPA)

    I'm using the Glassfish/Toplink JPA implementation in combination with the new JPA code in 2.0M5. Works great when I run my web app from within Maven using the jetty6 maven plugin.
    But, when I deploy my app as a WAR to an application server I get the following exception:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: URI scheme is not "file"
    Caused by: java.lang.IllegalArgumentException: URI scheme is not "file"
    at java.io.File.<init>(File.java:338)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPersistentClassNamesFromURL(PersistenceUnitProcessor.java:556)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.buildPersistentClassSet(PersistenceUnitProcessor.java:401)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.buildEntityList(EntityManagerSetupImpl.java:159)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:492)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(EntityManagerFactoryProvider.java:154)
    at org.springframework.orm.jpa.ContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(ContainerEntityManagerFactoryBean.java:181)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:232)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:901)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:870)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:393)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:256)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:167)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:332)
    at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
    This happens with both Glassfish and plain Tomcat.
    I don't really understand the problem. It looks like some classpath issue, but it is not clear what Toplink is looking for.
    S.

    Hello,
    Does this work if you set the <exclude-unlisted-classes> tag to true and list your classes in the persistence.xml as described in:
    http://www.oracle.com/technology/products/ias/toplink/jpa/howto/java-se-usage.html
    If it works, the problem might be with searching the persistence context for entities using a non-url classloader.
    Best Regards,
    Chris

  • Crucial question about Toplink Essentials JPA in OC4J 10.1.3.3

    Hi all!
    I'm developing an EJB 3.0 service which will be deployed to an OracleAS 10.1.3.3 and even after I've read lots of docs and articles, I still got an unanswered question:
    I know JPA leaves concurrent data access to the application's responsibility (or the vendor implementation's), that Oracle explicitly recommends using @Version to enable JPA's standard optimistic locking and also that Toplink Essentials JPA is OC4J's default persistence provider for EJB 3.0 modules. Considering this last important fact, what will be the default locking mode assumed by Toplink Essentials if I don't use @Version?
    Looking at Toplink Essentials JPA extensions doc preview for OC4J 11g (http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html), I found that I can use @OptimisticLocking to define the locking policy when defining an entity and use a lock type that doesn't require me to define a @Version field. But that annotation doesn't exist in version 10.1.3.3. Is there another way to define locking policy and type (on global or per entity basis) in version 10.1.3.3?
    Any help will be really welcome!
    TIA,
    Eduardo.

    Quoting Mr. Doug Clarke:
    "Eduardo,
    The only way to ensure that concurrent writers to the database don't overwrite one another is to either lock optimistically or pessimistically (i.e.: SELECT ... FOR UPDATE). Both of these approaches are supported by Oracle TopLink as well as TopLink Essentials. If neither is used then no locking is applied and the last writer will succeed leaving the database in a potentially corrupted state. Also note that minimal writes are used so each thread only updates the columns it changes so the resulting state of the database could be a combination of the two concurrent writes. Users of JPA are strongly recommended to use optimistic locking to ensure concurrent writing scenarios do not produce unexpected result in their database.
    Our JPA implementation in 10.1.3.3 is TopLink Essentials which is the Open Source references implementation of JPA derived from Oracle TopLink developed in GlassFish. This edition of TopLink only has support for JPA's @Version annotation as you noted. This approach does require a dedicated column in the database table for comparison on write to detect changes made since this thread's version of the original data was read.
    In Oracle TopLink 11g we have implemented JPA 1.0 in our product. This means that full capabilities of TopLink are available through JPA along with some custom annotations to assist in configuring them. This includes the additional optimistic locking policies provided for schemas where adding version columns is not possible. These capabilities are not included in TopLink Essentials. Customers can access these capabilities in the 11gR1 technology previews as well as in the new Eclipse Persistence Services Project "EclipseLink" which is the full functionality of Oracle TopLink developed as an open source solution. Oracle TopLink 11g and its distribution of EclipseLink are not yet available in a supported release."

  • Toplink Essentials final in Embedded OC4J - When?

    Hi,
    As far as i know (please correct me if I am wrong), the current release of JDeveloper (10.1.3.x) works with old Toplink Essentials version that covers an early draft of the JPA specs.
    My question is: when will the final version of Toplink Essentials be available in the Embedded version of the OC4J server? What about the standalone OC4J version and the complete Oracle Application server itself?
    Thanks in advance,
    George

    Complete EJB 3.0 implementation is planned for version 10.1.3.1
    We are hoping to get a developer preview out on OTN of 10.1.3.1 soon.

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

Maybe you are looking for

  • Slowness while accessing the Responsiblities and further activities in EBS

    Hi , we are using Apps 12.0.4 & Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi and running PMF module. It is a two node architecture with db running on one node and CP,FORMS,admin , web on the other node. The db node is having 4 CPUS and 8

  • Using the result of a subselect in another part of the select

    Does anyone know if 9i can use the results of a subselect in a select in another part of the select. For example: select x, (select y from sometable) as ssvar, z, (select abc from someothertable where somecolumn=ssvar) from yetanothertable Anyone? We

  • How to send files back to TC from external hard drive quickly?

    Hi, I have just archived 500gb of my TC to external hard drive which was directly connected to TC. I have replaced failing hard drive in TC on 2GB (£50) and reformated gain. Now is ready to be used. Then I wanted to put archive files back onto TC fro

  • Document form events

    Scenario : I open Order form I write the name of the customer in the customer name textbox. I click TAB button to find the customer. I need now to catch the event, what is it ? FORM LOAD ? FORM ACTIVATE ? Giuseppe

  • Preloaders, loading order and -levels

    Hi, everyone I am using Flash 8 and AS2 for my project. My website is now working just about as I like, as long as the whole movie has loaded. I have a main time line and several movie clips on the time line. Only problem is, that the movie seems to