Include rownum in toplink

When we form the query using Expression in toplink. How we can add rownum as one of the field in the query??

To use ROWNUM for pagination in 10.1.3.3 you will need to extend the framework. Below is a QueryRedirector that can be used with any read query to translate the firstResult and maxRow configurations into Oracle specific ROWNUM SQL.
package oracle.toplink.extension.queryframework;
import oracle.toplink.internal.databaseaccess.DatasourceCall;
import oracle.toplink.internal.sessions.AbstractSession;
import oracle.toplink.publicinterface.DatabaseRow;
import oracle.toplink.queryframework.*;
import oracle.toplink.sessions.Record;
import oracle.toplink.sessions.Session;
* This is an example of how a TopLink QueryRedirector can be used to extend the
* query framework and provide Oracle specific ROWNUM filtering. The redirector
* forces the generation of the SQL for the query and wraps it in additional
* SQL clauses to limit the results being returned.
* http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
* Limitations/Issues:
* - Code provided as is for 10.1.3.3. The complete feature has been added to
*   Oracle TopLink 11gR1 and EclipseLink
* - Does not support limiting the rows on batch reading of relationships
* @author Doug Clarke
* @since Oracle TopLink 10.1.3.3
public class OracleRowNumRedirector implements QueryRedirector {
    public static final String PREFIX =
        "SELECT * FROM ( SELECT a.*, ROWNUM rnum FROM (";
    public static final String MAX_COMPARE = ") a WHERE ROWNUM <= "; // MAX
    public static final String MIN_COMPARE = ")  WHERE rnum  >= "; // FIRST
    public Object invokeQuery(DatabaseQuery query, Record arguments,
                              Session session) {
        AbstractSession sessionImpl = (AbstractSession)session;
        DatabaseRow argsImpl = (DatabaseRow)arguments;
        // Ensure the query is read and the max value is set
        if (query.isReadQuery() && ((ReadQuery)query).getMaxRows() > 0) {
            query.checkPrepare(sessionImpl, argsImpl);
            SQLCall call = (SQLCall)query.getCall();
            ReadQuery readQuery = (ReadQuery)query;
            boolean usesBinding = call.usesBinding(sessionImpl);
            // Cache the values
            int maxValue = readQuery.getMaxRows();
            int firstValue = readQuery.getFirstResult();
            // Compute the string values for the SQL creation
            String max = usesBinding ? "?" : Integer.toString(maxValue);
            String first = usesBinding ? "?" : Integer.toString(firstValue);
            // Provide the custom SQL and reset the call so the query does not generate its own SQL
            call.setSQLString(PREFIX + call.getSQLString() + MAX_COMPARE +
                              max + MIN_COMPARE + first);
            query.setCall(call);
            // Clear the previous first & max values to ensure the JDBC limits are
            // not applied
            readQuery.setFirstResult(0);
            readQuery.setMaxRows(0);
            call.setFirstResult(0);
            call.setMaxRows(0);
            // If binding is enabled then add the values to the call's parameters
            if (usesBinding) {
                call.getParameters().add(maxValue);
                call.getParameterTypes().add(DatasourceCall.LITERAL);
                call.getParameters().add(firstValue);
                call.getParameterTypes().add(DatasourceCall.LITERAL);
        // Continue the execution with the query as is
        return query.execute(sessionImpl, argsImpl);
}To use it you simply need to configure the redirector on your query prior to execution:
        ReadAllQuery raq = new ReadAllQuery(Employee.class);
        raq.addAscendingOrdering("id");
        raq.setFirstResult(6);
        raq.setMaxRows(10);
        raq.setRedirector(new OracleRowNumRedirector());Doug

Similar Messages

  • How to deploy an EJB that uses TopLink (w/o including all the TopLink libs)

    This might be a basic question. Sorry !
    When my EJB uses TopLink libraries, is there a way to deploy the EJB without having to include the TopLink jars in the deploying JAR/EAR file ?
    Is there a way to make sure TopLink libraries are accessible commonly to all the applications on the app server ?
    Thanks,
    Krishna

    I think I got how to do this.
    I ave to use the "application.xml" file which is the global application.xml file for all applications on that OC4J instance.
    http://otn.oracle.com/tech/java/oc4j/doc_library/902/A95880_01/html/advanced.htm#1015123
    Gotta add all the common libraries to that file. for example:
         <library path="C:\OraHome1\toplink\core\lib\toplink.jar" />
         <library path="C:\OraHome1\toplink\core\lib\xerces.jar" />
         <library path="C:\OraHome1\toplink\core\lib\antlr.jar" />
         <library path="C:\OraHome1\toplink\hsql\lib\hsqldb.jar" />

  • How to have rownum in a report based on a view

    How to use rownum in a report or tabular form?
    I wanted to number the rows in a report. The most obvious way would be just stick
    rownum in there. There is a view in a database1. It is merely select a,b,c from various
    things joined together and order by pkey1.
    Apex is in database2 so I have to create a view there across the link
    like:
    create or replace view SOME_VIEW as
    select * from OTHER_VIEW@SOMELINK
    alter view SOME_VIEW add constraint PK_SOME_VIEW
    PRIMARY KEY (pkey1)
    DISABLE NOVALIDATE;
    The problem is if I try to include rownum in the query in the report I always get:
    failed to parse SQL query:
    ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc.
    There's no rowid, it knows that the primary key is Pkey1 so what is the problem?
    I know it's rownum that it hates. Maybe I can just number these things some other
    way. However it'd be good to figure out what it is griping about.
    Anyone know?
    Edited by: lake on Mar 12, 2011 9:36 AM

    thanks!
    Actually I made a mistake in testing. And it does work to do this:
    in database1:
    create or replace view VIEW1 as
    select
    rownum "SEQ", etc.
    in database2:
    create view VIEW2 as select * from VIEW1@mylink
    How I screwed up testing that I don't know. I was calling the column NUM before....
    this is good because you can create a report about the next so many of something, such as how many of
    the next batch of mailings have address problems? For that you need to know in what order it will be done and
    when to quit.
    But I'm sure I will use the report rownum thing also. thanks very much.

  • Annotations missing from toplink.jar

    The download of Toplink 11g includes the toplink.jar along with a few other jar files and a source .zip file. The toplink.jar does not include the oracle.toplink.annotations package which is necessary to use the @Convert and @Converter annotations for working with datatypes Toplink does not already understand. These classes are included in the source distribution. Am I missing something? Do I need to build the jar file from source to get the annotations package or is this available in another jar file?
    Thanks,
    Scott Akins

    The TopLink 11g release has a toplink.jar which delivers native ORM/OXM/EIS functionality focused on backwards compatibility with previous releases (uses the oracle.toplink.* packaging).
    The release also includes the EclipseLink libraries where all of the annotation support is delivered focused on implementing JPA with annotations and extended XML configuration. If you want to use JPA and our advanced annotations you should be using the included EclipseLink library.
    Doug

  • Toplink Cache issues in Cluster

    Hi
    Our production environment is have a clustered environment and we have been noticing the following problem. When a user is trying to save a record she repeatedly encounters the "Toplink-5006" exception that I have included below.
    TopLink Error]: 2006.07.19 04:49:23.359--UnitOfWork(115148745)--null--Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object [[email protected]ce459] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink_CMP_2_0 Primary Key> [1001280937, 0]
    [TopLink Error]: 2006.07.19 04:49:23.359--UnitOfWork(115148745)--null--Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object [[email protected]ce459] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink_CMP_2_0 Primary Key> [1001280937, 0]
    <Jul 19, 2006 4:49:23 PM PDT> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB com.rhii.mjplus.fo.people.beans.PeopleManagerBean.setPeople(java.util.HashMap,java.lang.String,java.lang.String,java.lang.String,java.util.HashSet,com.rhii.mjplus.common.login.data.UserInfoDO)],Xid=BEA1-795A6481D2E1938A8EAD(115171166),Status=Rolled back. [Reason=Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object [[email protected]ce459] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink_CMP_2_0 Primary Key> [1001280937, 0]],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=60,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=MS15_mjp),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@6dcf50b),SCInfo[mjp+MS15_mjp]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.rhii.mjplus.fo.people.beans.PeopleManagerBean.setPeople(java.util.HashMap,java.lang.String,java.lang.String,java.lang.String,java.util.HashSet,com.rhii.mjplus.common.login.data.UserInfoDO)], weblogic.jdbc=t3://10.253.129.56:2323}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=MS15_mjp+10.253.129.56:2323+mjp+t3+, XAResources={},NonXAResources={})],CoordinatorURL=MS15_mjp+10.253.129.56:2323+mjp+t3+): Local Exception Stack:
    Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object [[email protected]ce459] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink_CMP_2_0 Primary Key> [1001280937, 0]
         at oracle.toplink.exceptions.OptimisticLockException.objectChangedSinceLastReadWhenUpdating(Ljava/lang/Object;Loracle/toplink/queryframework/ObjectLevelModifyQuery;)Loracle/toplink/exceptions/OptimisticLockException;(OptimisticLockException.java:109)
    What is puzzling is that the occurance of this nature has increased with user load and the toplink cache does not seem to have been refreshed after it encounters the first Optimistic Lock exception. We have run several test and this is not reproducabile in the DEV environment where we do not have a clustered set. After making a few updates to a record users starts experiencing the problem ... for some this persist for a really long time.
    We do not have Cache synchronization
    Cluster setup is as followes
    There are 4 boxes and each box has one admin and 4 managed servers.
    I have included the toplink-cmp-people.xml ( Thisis the particular entity bean we have a problem with) Our application server is Weblogic and we have Toplink version 9042
    <toplink-ejb-jar>
    <session>
    <name>People</name>
    <project-class>
    com.rhii.mjplus.fo.people.beans.PeopleToplink
    </project-class>
    <login>
    <datasource>MJPool</datasource>
    <non-jts-datasource>MJPool</non-jts-datasource>
    </login>
    <use-remote-relationships>true</use-remote-relationships>
    <customization-class>com.rhii.mjplus.common.TopLinkCustomization
    </customization-class>
    </session>
    </toplink-ejb-jar>
    I would appreciate any kind of feedback
    Thanks
    Lakshmi

    Can you refresh that record using a query before you save it ?
    Hi
    Our production environment is have a clustered
    environment and we have been noticing the following
    problem. When a user is trying to save a record she
    repeatedly encounters the "Toplink-5006" exception
    that I have included below.
    TopLink Error]: 2006.07.19
    04:49:23.359--UnitOfWork(115148745)--null--Exception
    [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2)
    (Build 040311)):
    oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object
    [com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLin
    k_CMP_2_0@6dce459] cannot be updated because it has
    changed or been deleted since it was last read.
    Class>
    com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink
    CMP2_0 Primary Key> [1001280937, 0]
    [TopLink Error]: 2006.07.19
    04:49:23.359--UnitOfWork(115148745)--null--Exception
    [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2)
    (Build 040311)):
    oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object
    [com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLin
    k_CMP_2_0@6dce459] cannot be updated because it has
    changed or been deleted since it was last read.
    Class>
    com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink
    CMP2_0 Primary Key> [1001280937, 0]
    <Jul 19, 2006 4:49:23 PM PDT> <Error> <EJB>
    <BEA-010026> <Exception occurred during commit of
    transaction Name=[EJB
    com.rhii.mjplus.fo.people.beans.PeopleManagerBean.setP
    eople(java.util.HashMap,java.lang.String,java.lang.Str
    ing,java.lang.String,java.util.HashSet,com.rhii.mjplus
    .common.login.data.UserInfoDO)],Xid=BEA1-795A6481D2E19
    38A8EAD(115171166),Status=Rolled back.
    [Reason=Exception [TOPLINK-5006] (TopLink (WLS CMP) -
    10g (9.0.4.2) (Build 040311)):
    oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object
    [com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLin
    k_CMP_2_0@6dce459] cannot be updated because it has
    changed or been deleted since it was last read.
    Class>
    com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink
    CMP2_0 Primary Key> [1001280937,
    0]],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
    since begin=0,seconds
    left=60,XAServerResourceInfo[weblogic.jdbc.wrapper.JTS
    XAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrap
    per.JTSXAResourceImpl]=(state=rolledback,assigned=MS15
    _mjp),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@6dcf
    50b),SCInfo[mjp+MS15_mjp]=(state=rolledback),propertie
    s=({weblogic.transaction.name=[EJB
    com.rhii.mjplus.fo.people.beans.PeopleManagerBean.setP
    eople(java.util.HashMap,java.lang.String,java.lang.Str
    ing,java.lang.String,java.util.HashSet,com.rhii.mjplus
    .common.login.data.UserInfoDO)],
    weblogic.jdbc=t3://10.253.129.56:2323}),OwnerTransacti
    onManager=ServerTM[ServerCoordinatorDescriptor=(Coordi
    natorURL=MS15_mjp+10.253.129.56:2323+mjp+t3+,
    XAResources={},NonXAResources={})],CoordinatorURL=MS15
    _mjp+10.253.129.56:2323+mjp+t3+): Local Exception
    Stack:
    Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g
    (9.0.4.2) (Build 040311)):
    oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object
    [com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLin
    k_CMP_2_0@6dce459] cannot be updated because it has
    changed or been deleted since it was last read.
    Class>
    com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink
    CMP2_0 Primary Key> [1001280937, 0]
    at
    t
    oracle.toplink.exceptions.OptimisticLockException.obje
    ctChangedSinceLastReadWhenUpdating(Ljava/lang/Object;L
    oracle/toplink/queryframework/ObjectLevelModifyQuery;)
    Loracle/toplink/exceptions/OptimisticLockException;(Op
    timisticLockException.java:109)
    What is puzzling is that the occurance of this nature
    has increased with user load and the toplink cache
    does not seem to have been refreshed after it
    encounters the first Optimistic Lock exception. We
    have run several test and this is not reproducabile
    in the DEV environment where we do not have a
    clustered set. After making a few updates to a record
    users starts experiencing the problem ... for some
    this persist for a really long time.
    We do not have Cache synchronization
    Cluster setup is as followes
    There are 4 boxes and each box has one admin and 4
    managed servers.
    I have included the toplink-cmp-people.xml ( Thisis
    the particular entity bean we have a problem with)
    Our application server is Weblogic and we have
    Toplink version 9042
    <toplink-ejb-jar>
    <session>
    <name>People</name>
    <project-class>
    com.rhii.mjplus.fo.people.beans.PeopleToplink
    </project-class>
    <login>
    <datasource>MJPool</datasource>
    <non-jts-datasource>MJPool</non-jts-datasource>
    </login>
    <use-remote-relationships>true</use-remote-relationsh
    ips>
    <customization-class>com.rhii.mjplus.common.TopLinkCu
    stomization
    </customization-class>
    </session>
    </toplink-ejb-jar>
    I would appreciate any kind of feedback
    Thanks
    LakshmiCan you refresh that record using a query before you save it ?

  • Toplink mapping workbench

    I am trying to download the Toplink Mapping workbench and cannot locate it on Oracle website. Can anyone let me know where I can download it from? I am just going around in circles.

    The Workbench is included in the TopLink download available by clicking on the red "Free Download" button on the TopLink OTN homepage (http://www.oracle.com/technology/products/ias/toplink/index.html).
    Once you've downloaded the .zip you can find info on configuring the Workbench in the installation instructions (http://www.oracle.com/technology/products/ias/toplink/doc/10131/install/install.html).
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • JPA on OC4J 10.1.3.0

    Hi,
    Does anyone know which of the following options is preferred when using JPA/TopLink Essentials on OC4J 10.1.3.0:
    1. Delete persistency.jar from the OC4J installation and include the latest TopLink Essentials jar-files to the libs of the application.
    2. Use the persistency.jar of OC4J 10.1.3.0, which is an implementation of the draft version of JPA.
    Thanks,
    Ronald

    Using TopLink Essentials now in 10.1.3.0 will require no changes to your application when you upgrade to 10.1.3.1 since you're not changing persistence providers, just containers. The only optional change you may want to make is switching to use container managed persistence instead of application managed as you'll have to do in 10.1.3.0 with Essentials. There are API and annotations in the preview that were changed in the final spec and so they differ from TopLink Essentials. If you use the preview you'll have to update your application to use the spec compliant APIs and annotations.
    Again, there may be other issues that influence your decision but using TopLink Essentials now will give you a smooth upgrade path going forward to 10.1.3.1.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • 11g r2 documentation errors

    in http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_8004.htm
    The view must not contain any of the following constructs:
    A subquery in a SELECT list.
    but this works
    "UPDATE (SELECT employee_id, salary, (SELECT 'sub' FROM DUAL) sub FROM employees) SET salary = 1"
    In addition, if an inherently updatable view contains pseudocolumns or expressions, then you cannot update base table rows with an UPDATE statement that refers to any of these pseudocolumns or expressions.
    but including ROWNUM pseudocolumn doesnt work
    "UPDATE (SELECT employee_id, salary, ROWNUM no FROM employees) SET salary = 1"
    in http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_3001.htm#SQLRF53384
    You can change a CHAR column to VARCHAR2 (or VARCHAR)
    and a VARCHAR2 (or VARCHAR) column to CHAR only if the BLANK_TRIMMING
    initialization parameter is set to TRUE and the column size stays the same or increases.
    but i can modify a columns datatype between char and varchar2 without setting blank_trimming to true?

    All good points.
    I'll check with the subject matter experts and get back to you.
    Thanks!
    SQL Language Reference writer

  • Compare Date in Expression Builder

    Hallo,
    I'm trying to build the following sql:
    select * from (select * from TABLE1 where CODE =#myCode AND EFFECTIVE_DATE <=#myDate AND EFFECTIVE_DATE >=
    ADD_MONTHS(#myDate,(-1)*#ageMaxMonth) ORDER BY EFFECTIVE_DATE DESC ) WHERE ROWNUM < 2
    Vector args = new Vector();
    args.add(myCode);
    args.add(myDate);
    args.add(ageMaxMonth);
    ExpressionBuilder expBuilder = raq.getExpressionBuilder();
    Expression exp = expBuilder.get("myCode").equal(expBuilder.getParameter("myCode"));
    exp.and(expBuilder.get("effectiveDate").lessThanEqual(expBuilder.getParameter("myDate")));
    exp.and(expBuilder.get("effectiveDate").greaterThanEqual(expBuilder.getParameter("myDate").addMonths(ageMaxMonth.intValue() * -1)));
    raq.setSelectionCriteria(exp);
    raq.addDescendingOrdering("creationDate");
    raq.addArgument("myCode");
    raq.addArgument("myDate");
    raq.addArgument("ageMaxMonth");
    // Include rownum
    raq.setFirstResult(1);
    raq.setMaxRows(1);
    raq.setRedirector(new OracleRowNumRedirector());
    Vector vectors= (Vector) uow.executeQuery(raq, args);
    The request ist not working. Im get the entries where the effectiveDate EFFECTIVE_DATE <=
    ADD_MONTHS(#myDate,(-1)*#ageMaxMonth)
    Thanks
    Edited by: user11344339 on 25.01.2013 00:25

    cdelahun wrote:
    It maybe a cut and paste error, but the code shown is not setting exp to the new exp:
    exp =exp.and(expBuilder.get("effectiveDate").lessThanEqual(expBuilder.getParameter("myDate")));
    exp = exp.and(expBuilder.get("effectiveDate").greaterThanEqual(expBuilder.getParameter("myDate").addMonths(ageMaxMonth.intValue() * -1)));
    raq.setSelectionCriteria(exp);
    If this is not a cut and paste error, it would result in the effectiveDate range restriction not being included in the where clause at all.Hello,
    Thanks, this was a part of the problem. the generated SQL is now Ok and the query is working for the object already persisted in the Database.
    But for the Objects in the cache I’m still get records where the ‘effectiveDate’ <= ADD_MONTHS(mydate, ageMaxMonth *-1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • NullPointer exception in DatabaseAccessor.prepareStatement

    I have been trying to trace the following error for about 2 days now without any luck. Also the surprising part is that this class does not have a javadoc in the API nor is the source code available in the Toplink-src zip file included with the Toplink 101300 download.
    The query to be executed is being generated and output correctly, with all bind variables having valid values.
    [TopLink Fine]: 2006.06.29 03:14:22.079--UnitOfWork(8886)--Connection(8888)--Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--SELECT t1.PROMOTION_ID, t1.INVOICE_STATUS, t1.INVOICE_TO, t1.INVOICE_DATE, t1.OVERRIDE_REASON, t1.STATUS_UPDATED_DATE, t1.INVOICE_NUMBER, t1.STATUS_UPDATED_BY, t1.PROGRAM_ID, t1.STATUS_CODE, t1.PROMOTION_APP_ID, t1.AUDIT_ID FROM CALENDAR t4, PROMOTION_APPLICATIONS t3, PROGRAM t2, PROMOTIONS t1, STATUS t0 WHERE (((t0.STATUS_CODE = ?) AND ((t2.PROGRAM_ID = ?) AND ((t3.ITEM_NUMBER = ?) AND (t4.PROMOTION_PERIOD = ?)))) AND ((((t0.STATUS_CODE = t1.STATUS_CODE) AND (t2.PROGRAM_ID = t1.PROGRAM_ID)) AND (t3.PROMOTION_APP_ID = t1.PROMOTION_APP_ID)) AND (t4.PROMOTION_PERIOD = t3.PROMOTION_PERIOD)))
         bind => [A, 1.0, 178491.0, 200703]
    Can someone please help me understand what is wrong with the query. The error stack is as follows:
    [TopLink Warning]: 2006.06.29 03:14:22.079--UnitOfWork(8886)--Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--java.lang.NullPointerException
    06/06/29 15:14:22 java.lang.NullPointerException
    06/06/29 15:14:22      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1159)
    06/06/29 15:14:22      at oracle.toplink.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:591)
    06/06/29 15:14:22      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:489)
    06/06/29 15:14:22      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:442)
    06/06/29 15:14:22      at oracle.toplink.publicinterface.UnitOfWork.executeCall(UnitOfWork.java:1603)
    06/06/29 15:14:22      at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
    06/06/29 15:14:22      at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
    06/06/29 15:14:22      at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.cursorSelectAllRows(DatasourceCallQueryMechanism.java:60)
    06/06/29 15:14:22      at oracle.toplink.queryframework.ScrollableCursorPolicy.execute(ScrollableCursorPolicy.java:72)
    06/06/29 15:14:22      at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:449)
    06/06/29 15:14:22      at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:800)
    06/06/29 15:14:22      at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:603)
    06/06/29 15:14:22      at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:768)
    06/06/29 15:14:22      at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:436)
    06/06/29 15:14:22      at oracle.toplink.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:825)
    06/06/29 15:14:22      at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2532)
    06/06/29 15:14:22      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:981)
    06/06/29 15:14:22      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:938)
    06/06/29 15:14:22      at org.springframework.orm.toplink.TopLinkTemplate$2.readFromSession(TopLinkTemplate.java:233)
    06/06/29 15:14:22      at org.springframework.orm.toplink.SessionReadCallback.doInTopLink(SessionReadCallback.java:75)
    06/06/29 15:14:22      at org.springframework.orm.toplink.TopLinkTemplate.execute(TopLinkTemplate.java:152)
    06/06/29 15:14:22      at org.springframework.orm.toplink.TopLinkTemplate.executeQuery(TopLinkTemplate.java:227)
    06/06/29 15:14:22      at org.springframework.orm.toplink.TopLinkTemplate.executeQuery(TopLinkTemplate.java:213)
    06/06/29 15:14:22      at xxx.core.persistence.AnyTypeObjectDao.find(AnyTypeObjectDao.java:97)
    06/06/29 15:14:22      at xxx.model.service.BusinessValidationServiceImpl.validateXXX(BusinessValidationServiceImpl.java:406)
    06/06/29 15:14:22      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    06/06/29 15:14:22      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    06/06/29 15:14:22      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    06/06/29 15:14:22      at java.lang.reflect.Method.invoke(Method.java:585)
    06/06/29 15:14:22      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
    06/06/29 15:14:22      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
    06/06/29 15:14:22      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    06/06/29 15:14:22      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    06/06/29 15:14:22      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    06/06/29 15:14:22      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    06/06/29 15:14:22      at $Proxy0.validateXXX(Unknown Source)
    06/06/29 15:14:22      at xxx.model.service.PromotionsServiceImpl.persist(PromotionsServiceImpl.java:198)
    06/06/29 15:14:22      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    06/06/29 15:14:22      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    06/06/29 15:14:22      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    06/06/29 15:14:22      at java.lang.reflect.Method.invoke(Method.java:585)
    06/06/29 15:14:22      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
    06/06/29 15:14:22      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
    06/06/29 15:14:22      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    06/06/29 15:14:22      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    06/06/29 15:14:22      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    06/06/29 15:14:22      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    06/06/29 15:14:22      at $Proxy1.persist(Unknown Source)
    06/06/29 15:14:22      at xxx.view.beans.PromotionApplicationMaintenanceBean.save(PromotionApplicationMaintenanceBean.java:737)
    06/06/29 15:14:22      at xxx.view.beans.PromotionApplicationMaintenanceBean.persist(PromotionApplicationMaintenanceBean.java:707)
    06/06/29 15:14:22      at xxx.view.beans.PromotionApplicationMaintenanceBean.executePersist(PromotionApplicationMaintenanceBean.java:480)
    06/06/29 15:14:22      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    06/06/29 15:14:22      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    06/06/29 15:14:22      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    06/06/29 15:14:22      at java.lang.reflect.Method.invoke(Method.java:585)
    06/06/29 15:14:22      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    06/06/29 15:14:22      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
    06/06/29 15:14:22      at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
    06/06/29 15:14:22      at oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)
    06/06/29 15:14:22      at oracle.adf.view.faces.component.UIXPage.broadcast(UIXPage.java:122)
    06/06/29 15:14:22      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    06/06/29 15:14:22      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
    06/06/29 15:14:22      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
    06/06/29 15:14:22      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    06/06/29 15:14:22      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    06/06/29 15:14:22      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    06/06/29 15:14:22      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    06/06/29 15:14:22      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    06/06/29 15:14:22      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    06/06/29 15:14:22      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    06/06/29 15:14:22      at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    06/06/29 15:14:22      at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    06/06/29 15:14:22      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)
    06/06/29 15:14:22      at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
    06/06/29 15:14:22      at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:78)
    06/06/29 15:14:22      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
    06/06/29 15:14:22      at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:143)
    06/06/29 15:14:22      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
    06/06/29 15:14:22      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:138)
    06/06/29 15:14:22      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
    06/06/29 15:14:22      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:246)
    06/06/29 15:14:22      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
    06/06/29 15:14:22      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
    06/06/29 15:14:22      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
    06/06/29 15:14:22      at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
    06/06/29 15:14:22      at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
    06/06/29 15:14:22      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
    06/06/29 15:14:22      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    06/06/29 15:14:22      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    06/06/29 15:14:22      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    06/06/29 15:14:22      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
    06/06/29 15:14:22      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
    06/06/29 15:14:22      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    06/06/29 15:14:22      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    06/06/29 15:14:22      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    06/06/29 15:14:22      at java.lang.Thread.run(Thread.java:595)

    Hi,
    I have NPE in DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1303) too and I'm wondering about solution of roy77's case.
    Please can you (roy77, jsutherl, ... ) give a solution or any tip?
    So I get NPE (see thereinafter ) sporadically in call uow.readObject(..) in thread witch is involved as individual automat - dispenser. So yes, multiple threads are involved.
    Sometimes(!) after this NPE is connection done so I must do
    if (! S4SessionFactory.getS4Session().getServer().isConnected()) {
    S4SessionFactory.getS4Session().getServer().login();
    I think it is error in my architecture but can not find it.
    Thank you very much for any hint.
    Jara
    07/01/06 08:30:43 java.lang.NullPointerException
    07/01/06 08:30:43      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1303)
    07/01/06 08:30:43      at oracle.toplink.queryframework.SQLCall.prepareStatement(SQLCall.java:185)
    07/01/06 08:30:43      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:636)
    07/01/06 08:30:43      at oracle.toplink.publicinterface.Session.executeCall(Session.java:793)
    07/01/06 08:30:43      at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
    07/01/06 08:30:43      at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
    07/01/06 08:30:43      at oracle.toplink.internal.queryframework.CallQueryMechanism.selectOneRow(CallQueryMechanism.java:586)
    07/01/06 08:30:43      at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:776)
    07/01/06 08:30:43      at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:747)
    07/01/06 08:30:43      at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:364)
    07/01/06 08:30:43      at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
    07/01/06 08:30:43      at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java:125)
    07/01/06 08:30:43      at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
    07/01/06 08:30:43      at oracle.toplink.threetier.ClientSession.internalExecuteQuery(ClientSession.java:390)
    07/01/06 08:30:43      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    07/01/06 08:30:43      at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2223)
    07/01/06 08:30:43      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    07/01/06 08:30:43      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1038)
    07/01/06 08:30:43      at oracle.toplink.publicinterface.Session.readObject(Session.java:2492)
    07/01/06 08:30:43      at system.automat.AutomatKonverze.run(AutomatKonverze.java:149)

  • USE ROWID AS PRIMARY KEY OF ENTITY ON EJB3

    When we launch the Create Entities from Tables wizard, and create JPA (Java Persistence API) entities from existing database tables, if the table has no primary key and unique key field, you will get a warning. When you run, you will get the following information:
    Caused by: Exception [TOPLINK-7161] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: Entity class [class model.Test] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass.
    Actually, every row of oracle table has a ROWID field , I think it is a good “primary key field”. Add it into Entity Java bean file as following:
    @Id
    private ROWID rowid;
    And generate accessors, ok, run……
    GOOD, No problem.
    But when you insert a new row, got an exception:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00928: missing SELECT keyword
    Error Code: 928
    Call:INSERT INTO TEST (ROWID, B, A) VALUES (?, ?, ?)
         bind => [null, 555, 555]
    Query:InsertObjectQuery(model.Test@40979b)
    555~~~, what happened?! Somebody builds a wrong SQL …
    Don’t worry! I know (…) where is the “bug”.
    Find out the class
    oracle.toplink.essentials.internal.expressions. SQLInsertStatement
    which is included in the toplink-essentials.jar,
    decompile… , fix…, compile, and jar it back.
    Fix
    if(field.getTable().equals(getTable()) || !field.hasTableName())
    to
    if((field.getTable().equals(getTable()) || !field.hasTableName()) && !field.getName().equalsIgnoreCase("ROWID"))
    OK, it is running well.
    I suggest ORACLE fix it into his next version. Do you think it is a good idea?

    Do you think it is a good idea? Not really, but that's just my two cents.

  • What is optimize way of doing this

    Hi
    I have following tables
    T1
    Part number
    Model Year
    Program
    Lead Program
    sample data:
    123 P1 1978 N
    123 P1 1977 N
    123 P2 1978 N
    T2
    Program
    Model Year
    Active flag
    sample data:
    P1 1978 Y
    P1 1977 Y
    P2 1978 Y
    T3
    Program
    Model Year
    Date
    sample data:
    P1 1978 12/10/2006
    P1 1977 20/10/2008
    P2 1978 30/10/2007
    Processing Steps:
    1. Identify all Distinct Part Numbers from T1
    2. For each Part Number , Find all Distinct (Program Model, Year)
    3. From T2, identify and remove inactive records with (Program Model, Year) combination
    4. For all active (Program Model, Year), extract date from T3
    5. Identify one (Program Model, Year) combination with min date.
    6. For all records from T1 , matching individual distinct part number, update Lead Program to Y for (Program Model, Year) identified in step 5.
    I was thinking about
    a. define cursor for 1st step
    b. for each part in cursor , will execute join qry for 2,3,4 (on T1,T2,T3) & store results in temp table
    c. Include rownum condition in above qry to return one program,model year with min date
    d. update lead pgm field in T1 for corresponding program, model year combn
    Can anybody suggest any other way of optimizing this?I feel since my first cursor may contain thousands/millions of record, will there be any performance problem?

    Safari > Preferences > Security > Enable Java

  • CMP support for Weblogic 8 in Oracle 10g?

    Is the CMP support for Weblogic 8 included in Oracle Toplink 10g?

    I am using 10g and have problem compiling CMP EJB for WL 8.1. I got the following exception:
    Exception in thread "main" java.lang.NoSuchMethodError: weblogic.ejb20.persistence.spi.RoleSource.getName()Ljava/lang/String;
    at oracle.toplink.internal.ejb.cmp.wls.WlsDescriptorBuilder.getEjbNameForRoleSource(WlsDescriptorBuilder.java:219)
    at oracle.toplink.internal.ejb.cmp.wls.WlsDescriptorBuilder.buildRelationshipRoleDescriptor(WlsDescriptorBuilder.java:206)
    at oracle.toplink.internal.ejb.cmp.wls.WlsDescriptorBuilder.buildRelationshipDescriptors(WlsDescriptorBuilder.java:177)
    at oracle.toplink.internal.ejb.cmp.wls.WlsDescriptorBuilder.buildRelationships(WlsDescriptorBuilder.java:157)
    at oracle.toplink.internal.ejb.cmp.api.impl.DescriptorBuilder.buildDescriptor(DescriptorBuilder.java:153)
    at oracle.toplink.internal.ejb.cmp.wls.WlsDescriptorBuilder.addOldDescriptors(WlsDescriptorBuilder.java:33)
    at oracle.toplink.internal.ejb.cmp.wls.WlsProjectDeployment.convertOldEntityDescriptors(WlsProjectDeployment.java:65)
    at oracle.toplink.internal.ejb.cmp.PersistenceManagerBase.initialize(PersistenceManagerBase.java:72)
    at oracle.toplink.internal.ejb.cmp.wls.WlsCMPDeployer.initializePersistenceManager(WlsCMPDeployer.java:135)
    at weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:112)
    at weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(EJB20CMPCompiler.java:64)
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:245)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:397)
    at weblogic.ejbc20.runBody(ejbc20.java:519)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.ejbc.main(ejbc.java:29)
    I looked in the weblogic.ejb20.persistence.spi.RoleSource class and see the method getEjbName, but no method getName found. What am I missing ? Thanks
    -Tuan

  • Jboss v Application Server

    Hi,
    Our company is currently looking at creating a large java web based system that will have users in the 100's-1000's. I have experience with Tomcat (about 2 years ago), but since then I have been involved in Oracle EBusiness suite and Oracle AS and Database.
    I have recently noticed the JBoss software Application server and would like to know if anybody out there has had experience with both systems and what the benifits of Oracle Application Server over Jboss?
    I am experience with 10gAS and would prefer to develop on this system, but have to present an appropriate business case in order to justify not using JBoss (which is hard given the initial outlay is $0 regardless of size of deployment.
    Thanks in advance.
    Ben

    Be careful about how you assess "free." If you can afford to run JBoss without support from them, then it is mostly free. But if you purchase support and you want the core app server with Hibernate, for example, it will be difficult for you to price in under $30K per year.
    I heard from a colleague last week that they purchased a "small" OAS license that includes OAS and Toplink (roughly equal to the above JBoss config) and it was only $6K-$7K or so. As my colleague correctly stated, "it will take a long time for those two lines to cross." :)
    Vaughn

  • Eclipse Relational Mapping + wrong name exception

    Dears,
    I wanna ask three questions:
    - I understand that TopLink will be replaced by EclipseLink. EclipseLink will have JPA + Relational Mapping? or the Relational Mapping is there only for backward compatiblity and all new products should use EclipseLink JPA?
    - Is there any EclipseLink discussion forum?
    - I am using EclipseLink + EJB 3.0, I am getting the following Exception:
    [EL Finest]: 2009.03.08 14:07:18.453--ServerSession(27076478)--Thread(Thread[OC4J Launcher,5,main])--java.lang.ArrayIndexOutOfBoundsException: 27233
         at org.eclipse.persistence.internal.libraries.asm.ClassReader.readClass(ClassReader.java:943)
         at org.eclipse.persistence.internal.libraries.asm.ClassReader.accept(ClassReader.java:259)
         at org.eclipse.persistence.internal.weaving.PersistenceWeaver.transform(PersistenceWeaver.java:85)
         at com.evermind.server.ejb.persistence.PersistenceUnitInfoImpl$ClassPreprocessorWrapper.processClass(PersistenceUnitInfoImpl.java:392)
         at oracle.classloader.util.ClassPreprocessorSequence.processClass(ClassPreprocessorSequence.java:116)
         at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2222)
         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.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.getDeclaredMethods0(Native Method)
         at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
         at java.lang.Class.getMethod0(Class.java:2611)
         at java.lang.Class.getMethod(Class.java:1579)
         at com.evermind.server.ejb.LifecycleManager.buildLifecycleMethod(LifecycleManager.java:353)
         at com.evermind.server.ejb.LifecycleManager.initialize(LifecycleManager.java:319)
         at com.evermind.server.ejb.deployment.BeanDescriptor.initialize(BeanDescriptor.java:293)
         at com.evermind.server.ejb.deployment.ExposableBeanDescriptor.initialize(ExposableBeanDescriptor.java:173)
         at com.evermind.server.ejb.deployment.SessionBeanDescriptor.initialize(SessionBeanDescriptor.java:225)
         at com.evermind.server.ejb.deployment.EJBPackage.initialize(EJBPackage.java:995)
         at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:852)
         at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:217)
         at com.evermind.server.Application.setConfig(Application.java:438)
         at com.evermind.server.Application.setConfig(Application.java:339)
         at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1895)
         at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1651)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1034)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
         at java.lang.Thread.run(Thread.java:595)
    09/03/08 14:07:18 WARNING: Application.setConfig Application: current-workspace-app is in failed state as initialization failed.
    oracle.classloader.util.AnnotatedNoClassDefFoundError:
         Missing class: com.its.tabs.ptf.ugm.dal.group.GroupEntity (wrong name: org.eclipse.persistence.internal.libraries.asm.attrs.LocalVariableTypeTableAttribute)
         Dependent class: com.its.tabs.ptf.ugm.dal.group.GroupEntity
         Loader: current-workspace-app.root:0.0.0
         Code-Source: /D:/dev/TopLink11g-JPA/Platform/classes/
         Configuration: <ejb> in unknown
    The missing class is not available from any code-source or loader in the system.
    For sure I am not using any Arrays in my Entity.
    Thanks
    Edited by: Javatizer on Mar 8, 2009 5:11 AM

    Javatizer wrote:
    - I understand that TopLink will be replaced by EclipseLink. EclipseLink will have JPA + Relational Mapping? or the Relational Mapping is there only for backward compatibility and all new products should use EclipseLink JPA?We have transitioned our development to open source with EclipseLink offering JPA as well as continued support for our native relational mappings. The TopLink product continues to exist as Oracle commercial offering including EclipseLink. Those wanting professional support for their use of EclipseLink can get it through licensing of Oracle TopLink. In addition to the inclusion of EclipseLink our TopLink product also includes the original packaging of TopLink for backwards compatibility (including utilities) and TopLink Grid (Coherence integration).
    Customers using TopLink's native relational mappings can upgrade to using EclipseLink's packages (using the package renamer) and continue to leverage the same functionality they are used to. As we add new features we endeavor to make them easily usable through the JPA interface but the native usage is always available.
    Javatizer wrote:
    - Is there any EclipseLink discussion forum?
    There is a newsgroup and mailing lists hosted at eclipse.org - http://www.eclipse.org/eclipselink/community.php
    Javatizer wrote:
    - I am using EclipseLink + EJB 3.0, I am getting the following Exception:
    I would recommend filing a bug for this issue. I'll ask some others to take a look as well to see if they have seen this.
    Doug

Maybe you are looking for

  • Updating Issue with iTunes 7.0.1.8

    A few weeks ago I made the jump to the newly released iTunes 7.0. I had a slew of issues with this update (which by the way Apple has still not provided a working solution for), which I addressed in detail in this post: http://discussions.apple.com/t

  • Cleared document showing on Parked document list

    Dear all, We have a custom report that shows the list of all parked and blocked documents. A certain invoice which has been paid for and cleared is appearing on the parked/blocked list. Could any of you give me some insight on why this might be happe

  • SMTP service Migration on MDM server

    Hello We are migrating the SMTP services on the MDM server. Do we need to make changes to the MDM configuration files, if any ? I had installed MDM earlier and I don't remember any config file changes. Please guide me. Thanks Prakash

  • Creating a Primary Key in SSMS without Also Creating a Clustered Index

    In the course of development (SQL Server Express 2012) I'm creating various tables which should not have a clustered index on the primary key. However, it seems as if SSMS is obsessed with always doing so. I cannot seem to find a way through the simp

  • Photoshop CS5 Crashes on Save/Save as/Save for web

    Using win7 64bit, I7 950, ATI 6970, 12GB RAM Photoshop keeps crashing not in a continues way, it happen suddenly, not every time whe trying to save/save as/save for web. Tried reinstalling PS, didnt solve the issue, Tried reinstalling entire Adobe De