EJBQL problem

I downloaded the latest OC4J which claims support of EJBQL. But, when I deployed ejb-jar.xml, I always got error message:
java.lang.RuntimeException: No method found for XML query element: Ambiguous or
invalid <query-method>
at com.sun.enterprise.deployment.xml.EjbNode.parseQueries(EjbNode.java:6
23)
at com.sun.enterprise.deployment.xml.EjbNode.completeLoadingDescriptor(E
jbNode.java:596)
at com.sun.enterprise.deployment.xml.EjbBundleNode.completeLoadingDescri
ptor(EjbBundleNode.java:469)
at com.sun.enterprise.deployment.EjbBundleDescriptorFactory.makeEjbBundl
eDescriptor(EjbBundleDescriptorFactory.java:44)
at com.evermind.server.ejb.deployment.EJBPackage.init(EJBPackage.java:19
43)
at com.evermind.server.ServerComponent.init(ServerComponent.java:224)
at com.evermind.server.ejb.EJBPackageDeployment.getPackage(EJBPackageDep
loyment.java:645)
at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:513)
at com.evermind.server.Application.postInit(Application.java:429)
at com.evermind.server.Application.setConfig(Application.java:136)
at com.evermind.server.ApplicationServer.addApplication(ApplicationServe
r.java:1479)
at com.evermind.server.ApplicationServer.initializeApplications(Applicat
ionServer.java:1436)
at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.jav
a:1099)
at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLa
uncher.java:93)
at java.lang.Thread.run(Thread.java:484)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:49)
Error in application sponsoradmin: Error loading package at file:/C:/Oracle/9iAS
Core/oc4j/j2ee/home/applications/sponsoradmin/ejb/, Failure to initialize EJBQL
descriptors: java.lang.RuntimeException: No method found for XML query element:
Ambiguous or invalid <query-method>
I checked the file few times and could not find any errors. I used the standard QUERY method such as:
     <query>
          <query-method>
               <method-name>findByOwner</method-name>
               <method-params><method-param>java.lang.String</method-param></method-params>
          </query-method>
          <ejb-ql>
               <![CDATA[ SELECT OBJECT(a) FROM contact AS a WHERE owner = ?1 ]]>
          </ejb-ql>
     </query>

I think EJB-QL is by default disabled in the version available on OTN. If you want to use EJB-QL please start OC4J as follows:
java -Denable.ejbql=true -jar oc4j.jar
I tested just now with my sample apps and it works fine.
regards
Debu Panda
Oracle

Similar Messages

  • EJBQL deployment problems

    When I deploy my application with a CMP bean that uses EJBQL I always get this error:
         Deployment failed: Nested exception
    Root Cause: deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Error initializing ejb-module; Exception Failure to initialize EJBQL descriptors: com.sun.enterprise.deployment.xml.ParseException: Connection timed out: connect
    Resolution: . deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Error initializing ejb-module; Exception Failure to initialize EJBQL descriptors: com.sun.enterprise.deployment.xml.ParseException: Connection timed out: connect
    Any ideas why?
    I am using oracle 10g app server. I added the -Denable.ejbql=true to the java args for my oc4j instance, but I don't see why I would have too.
    Anyways, I continue to get this error, please help.

    did you find an answer to this, cause we have the same problem ?

  • EJBQL query problem in JPA

    I am developing an Enterprise application that uses JPA and toplink as the persistence provider. It uses MYSQL 5.1.
    The query used in the Entity class is :
    @NamedQueries({@NamedQuery(name = "AirtravelsDynamic.findAllEconomyFlights", query = "select NEW com.inter.transfer.Response(rf.flightno,d.economyseats,rf.ecofare,rf.arrtime,rf.depttime) from AirtravelsDynamic d LEFT JOIN d.refId rf where rf.source=?1 and rf.destination=?2 and d.availdate between ?3 and ?4") })
    This application is giving the following exception:
    Exception Description: Error compiling the query [AirtravelsDynamic.findAllEconomyFlights: select NEW com.inter.transfer.Response(rf.flightno,d.economyseats,rf.ecofare,rf.arrtime,rf.depttime) from AirtravelsDynamic d LEFT JOIN d.refId rf where rf.source=?1 and rf.destination=?2 and d.availdate between ?3 and ?4], line 1, column 40: invalid navigation expression [rf.flightno], cannot navigate expression [rf] of type [int] inside a query.
    Local Exception Stack:
    Exception [TOPLINK-8029] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
    Exception Description: Error compiling the query [AirtravelsDynamic.findAllEconomyFlights: select NEW com.inter.transfer.Response(rf.flightno,d.economyseats,rf.ecofare,rf.arrtime,rf.depttime) from AirtravelsDynamic d LEFT JOIN d.refId rf where rf.source=?1 and rf.destination=?2 and d.availdate between ?3 and ?4], line 1, column 40: invalid navigation expression [rf.flightno], cannot navigate expression [rf] of type [int] inside a query.
    at oracle.toplink.essentials.exceptions.EJBQLException.invalidNavigation(EJBQLException.java:430)
    at oracle.toplink.essentials.internal.parsing.DotNode.checkNavigation(DotNode.java:141)
    at oracle.toplink.essentials.internal.parsing.DotNode.validate(DotNode.java:97)
    at oracle.toplink.essentials.internal.parsing.ConstructorNode.validate(ConstructorNode.java:97)
    at oracle.toplink.essentials.internal.parsing.SelectNode.validate(SelectNode.java:329)
    at oracle.toplink.essentials.internal.parsing.ParseTree.validate(ParseTree.java:229)
    at oracle.toplink.essentials.internal.parsing.ParseTree.validate(ParseTree.java:211)
    at oracle.toplink.essentials.internal.parsing.ParseTree.validate(ParseTree.java:201)
    at oracle.toplink.essentials.internal.parsing.EJBQLParseTree.populateReadQueryInternal(EJBQLParseTree.java:134)
    at oracle.toplink.essentials.internal.parsing.EJBQLParseTree.populateQuery(EJBQLParseTree.java:108)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:219)
    at oracle.toplink.essentials.queryframework.EJBQLPlaceHolderQuery.processEjbQLQuery(EJBQLPlaceHolderQuery.java:111)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.processEJBQLQueries(AbstractSession.java:2059)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.processEJBQLQueries(AbstractSession.java:2046)
    at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:724)
    at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:604)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
    Any help is appreciated.
    Thanks in advance.

    What are you trying to do exactly? The way you've used LEFT JOIN is not correct if d.refId is an integer. LEFT JOIN is used to retrieve a set of entities where that set may not exist. It doesn't look like refId is a set of anything, just an integer.
    It looks like maybe you intended to have a foreign key relationship between AirtravelsDynamic and some other entity. In that case you probably want to model your AirtravelsDynamic entity as having a many-to-one relationship with the entity (let's call it ref.)
    The relationship would look something like:
    @Entity
    public class AirtravelsDynamic
       @ManyToOne
       @JoinColumn(name="refId")
       private Ref ref;
    }Then your query would read:
    SELECT new com.inter.transfer.Response(d.ref.flightno, d.economyseats,
                                           d.ref.ecofare, d.ref.arrtime,
                                           d.ref.depttime)
      FROM AirtravelsDynamic d
    WHERE d.ref.source = :refSource
       AND d.ref.destination = :refDest
       AND d.availDate between :lowDate and :highDateIf I'm misunderstanding your intent, let me know and I'll try to help you resolve the problem.

  • EJBQL 3 Problem

    I looked up an example for what I wanted and was shown the following:
    select new Family(mother, mate, offspr)
    from DomesticCat as mother
    join mother.mate as mate
    left join mother.kittens as offspr
    my query looks like the following
    select New gov.tennessee.humanserv.childcare.raccs.wrapper.Test(person, role, provider)
    from Persons person
    left join person.personRolesCollection roles
    left join roles.providers provider
    where UPPER(person.persFirstName) like :firstName
    and UPPER(person.persLastName) like :lastName")
    when I try to run it I receive the following error:
    Syntax error parsing the query [select New gov.tennessee.humanserv.childcare.raccs.wrapper.Test(person, role, provider) from Persons person left join person.personRolesCollection roles left join roles.providers provider where UPPER(person.persFirstName) like :firstName and UPPER(person.persLastName) like :lastName], unexpected token [,].
    but if I ask for person.lastName, person.firstName and others it has no problem with the "," so what do I need to do? I need to pass the entire object(s) to the constructor not just the fields of the object.
    Thanks for any help you can provide.
    Thom

    Hello Thom,
    Which version are you using? This was added as a feature
    https://glassfish.dev.java.net/issues/show_bug.cgi?id=1421
    And so should be in TopLink essentials builds after 9.1pe_b28
    Best Regards,
    Chris

  • EJBQL joining entity problem

    Dear all,
    I have written the following EJBQL:
    select o from Commitment o join o.invoiceStat i where o.companyCode = 'HKC' and o.item = 'ABCD01' and i.year = 2008
    The entity class is as follows:
    public class Commitment implements Serializable {
    @Column(name="commitment_amt",nullable = false)
    private Double commitmentAmt;
    @Id
    @Column(name="item_code",nullable = false)
    private String item;
    @Id
    @Column(name="institution_code",nullable = false)
    private String companyCode;
    @OneToMany(mappedBy = "commitment")
    private List<InvoiceStatistic> invoiceStat;
    I join the invoiceStat in the EJBQL and also I need to filter, ie. i.year = 2008,
    but maybe because of invoiceStat is a OneToMany List Object, the EJBQL didn't filter using i.year=2008.
    How could I filter the OneToMany ? Please help
    Thanks.

    from Commitment c
    left join fetch c.invoiceStat s
    where s.year = 2008
    something like that?

  • Problems with string literals in ejb-ql's

    I have a couple EJB-QL's that look like:
    <![CDATA[SELECT OBJECT(o) FROM AssignedStatus AS o WHERE o.recipientID = ?1 AND o.statusID = ?2 AND o.state <> 'r']]>
    which used to work in Orion without a problem but in OC4J I get the following errors:
    com/sun/ejb/ejbql/StringLiteral
    EJB QL statement : 'SELECT OBJECT(o) FROM AssignedStatus AS o WHERE o.recipientID = ?1 AND o.statusID = ?2 AND o.state <> 'r'
    EJB QL method : public abstract com.mongoosetech.reputation.ejb_entity.AssignedStatus com.mongoosetech.reputation.ejb_enti
    ty.AssignedStatusHome.findByRecipientIDAndStatusIDNotRevoked(java.lang.String,java.lang.String) throws javax.ejb.FinderExcept
    ion,java.rmi.RemoteException
    at com.sun.ejb.ejbql.parser.EjbQLParser.parse(EjbQLParser.java:226)
    at com.sun.ejb.ejbql.EjbQLDriver.parse(EjbQLDriver.java:86)
    at com.sun.ejb.sqlgen.SQLGenerator.generateSQLForEjbQLQueries(SQLGenerator.java:628)
    at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:270)
    at com.evermind.server.ejb.deployment.EJBPackage.init(EJBPackage.java:1947)
    at com.evermind.server.ServerComponent.init(ServerComponent.java:199)
    at com.evermind.server.ejb.EJBPackageDeployment.getPackage(EJBPackageDeployment.java:645)
    at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:513)
    at com.evermind.server.Application.postInit(Application.java:429)
    at com.evermind.server.Application.setConfig(Application.java:136)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1479)
    at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1436)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1099)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
    at java.lang.Thread.run(Thread.java:479)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:49)
    Error in application ACME Portal: Error loading package at file:/C:/dev/staging/portalstudio/ee/image/deploy/portal/portal-ej
    b.jar, Failure to initialize EJBQL descriptors: com/sun/ejb/ejbql/StringLiteral
    EJB QL statement : 'SELECT OBJECT(o) FROM AssignedStatus AS o WHERE o.recipientID = ?1 AND o.statusID = ?2 AND o.state <> 'r'
    EJB QL method : public abstract com.mongoosetech.reputation.ejb_entity.AssignedStatus com.mongoosetech.reputation.ejb_enti
    ty.AssignedStatusHome.findByRecipientIDAndStatusIDNotRevoked(java.lang.String,java.lang.String) throws javax.ejb.FinderExcept
    ion,java.rmi.RemoteException
    Am I doing something wrong here? These QL's work in several other App Servers so I am lost as to why this doesn't work.

    Kevin,
    We are aware of this bug in the developer's preview and will be fixed when next version of OC4J 9.0.3 will be released.
    regards
    Debu Panda
    Oracle

  • EJB 3.0: EJBQL aggregate functions not working properly

    Hi!
    We are experiencing problems when using aggregate functions within EJBQL queries. In my case, we have to use max() function to retrieve the max start_date from a specific table. In order to do this, we wrote the following code:
    String strQuery = "select max(o.dt_fim) from Questionario o";
    Query queryTeste = em.createQuery(strQuery);
    List x = queryTeste.getResultList();
    OBS: dt_fim is an Oracle 10g datetime column, with its corresponding entity attribute in Questionario entity class.
    AFAIK, the query above should return only one record (object instance) containing the date value, right? However, it brougth a list of the entity objects, corresponding to all records in the table, as we had just run "select o from Questionario o".
    Examining the server log we can see this behavior:
    [TopLink Fine]:2006.09.12 01:47:55.526--
    ServerSession(7119662)--Connection(7048401)--Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])
    --SELECT ID_QUEST, DT_INICIO, DT_FIM, DS_QUEST, DT_CRIACAO, TP_QUEST, NM_QUEST, COD_SEGMENTO, ID_GRUPO FROM TBBOP_QUEST
    Are anyone experiencing this issue?
    Is there any workaround?
    Any help would be much appreciated, since we need to deploy the application for user testing asap.
    Thanks in advance.
    Best regards,
    Gustavo
    PS: We are using JDeveloper 10.1.3.0.4(SU4)
    Message was edited by:
    Gustavo Lopes Sobral

    The 10.1.3.0 versions of JDeveloper contain our early preview of EJB 3.0 JPA functionality. One limitation is that the query language is not complete (released before the spec was finalized).
    You can use TopLink Essentials (JPA Reference implementation) whihc contains a complete compliant implementation of the final specification.
    http://otn.oracle.com/jpa
    The 10.1.3.1 JDeveloper preview ships with TopLink Essentials.
    Doug

  • EJBQL syntax in OC4J

    Hi,
    I am migrating an application from Weblogic to OC4J. I'm getting an error while using a SQL statement for EJB-QL in Oc4J. It works fine from Weblogic app server. The EJB-QL SQL used in ejb-jar.xml is something like the following:
    <ejb-ql>SELECT      OBJECT(o) FROM tableA AS o WHERE (o.column1 = ?1 OR (?1 IS NULL AND o.column1 IS NULL)) AND     (o.column2 = ?2 OR ( ?2 IS NULL AND o.column2 IS NULL)) AND (o.column3 = ?3 OR ( ?3 IS NULL AND o.colum3 IS NULL)) AND (o.column4 = ?4 OR ( ?4 IS NULL AND o.column4 IS NULL)) AND     (o.column5 = ?5 OR ( ?5 IS NULL AND o.column5 IS NULL))</ejb-ql>
    Can somebody point out what could be wrong in the SQL? The same EJB-QL SQL executes properly from the SQL*Plus command. Is there a syntax error in the statement?
    How can I modify this so that it does not affect the result of the SQL? There is some problem with the use of brackets. I tried some combinations but no luck.
    When deploying the EJB to OC4J with the above SQL as EJB QL SQL, I got the following error:
    com.evermind.client.orion.AdminCommandException: Deploy error: deploy failed!: ; nested exception is:
         oracle.oc4j.admin.internal.DeployerException: Error initializing ejb-module; Exception Error translating EJBQL: Encountered "?1 IS" at line 1, column 31.
    Was expecting one of:
    "NOT" ...
    "+" ...
    "IdentificationVar" ...
    <CHAR_LITERAL> ...
    <STRING_LITERAL> ...
    <INPUT_PARAM> "*" ...
    <INPUT_PARAM> "/" ...
    <INPUT_PARAM> "+" ...
    <INPUT_PARAM> "-" ...
    <INPUT_PARAM> ")" ...
    <INPUT_PARAM> "NOT" ...
    <INPUT_PARAM> "BETWEEN" ...
    <INPUT_PARAM> "MEMBER" ...
    "CONCAT" ...
    "SUBSTRING" ...
    "LOCATE" ...
    "LENGTH" ...
    "ABS" ...
    "SQRT" ...
    EJB QL statement : 'SELECT      OBJECT(o) FROM tableA AS o WHERE (o.column1 = ?1 OR (?1 IS NULL AND o.column1 IS NULL)) AND     (o.column2 = ?2 OR ( ?2 IS NULL AND o.column2 IS NULL)) AND (o.column3 = ?3 OR ( ?3 IS NULL AND o.colum3 IS NULL)) AND (o.column4 = ?4 OR ( ?4 IS NULL AND o.column4 IS NULL)) AND     (o.column5 = ?5 OR ( ?5 IS NULL AND o.column5 IS NULL))
    Thanks for your help.
    vadi.

    Hi,
    Can somebody please give me few pointers or clues?
    Thanks,
    Vadi

  • OC4J EJBQL and EJB 2.0 features

    Hello Debu Panda and All
    I've got all howtos and I mangaged to get some parts of OC4J [Oracle9iAS (9.0.3.0.0) Containers for J2EE (build 020323.1689)] working.
    There are still some issues that are stalling our development. Could you please comment on them, maybe providing an estimate of when they will be solved/implemented?
    First of all, a little background. Our application uses many Java Swing application clients that connect to the EAR application in the container.
    The ear application has the following structure:
    All database access (Oracle 8i, located in its own server) is done exclusively by means of CMP entity beans. A entity bean may access other entity beans. There are workflow session beans (stateful and stateless) that access the entity beans. All clients see only the workflow session beans (session beans fagade).
    Our applicatoin is complex, having more than 80 session beans and more than 25 entity beans (not counting entity beans that exist only to represent relationships among entity beans).
    There goes the questions:
    1) It seems that entity beans cannot currently be referenced by remote interfaces. We couldn't deploy our application using it. Since we could use only local interfaces fot entity beans, thats what is been done now.
    2) There is no CMR supported. Is this true?
    3) EJBQL seems to be very limited. In the howto examples there are EJBQL statements that compare two numbers. However, when we tried to use String comparisons, it didn't work. Here is the statement:
    "SELECT DISTINCT OBJECT(p) FROM Person p WHERE p.name = ?1"
    If I compile, package and deploy the ear applicatin with the above EJBQL statement, OC4J generates an exception when executing the finder method. The exception is:
    "java.rmi.NoSuchObjectException: Session has timed out
    at com.evermind.server.ejb.StatefulSessionEJBObject.throwPassivisat
    ception(StatefulSessionEJBObject.java:188)
    at Cad023Remote_StatefulSessionBeanWrapper0.obterPessoasPorParteNom
    023Remote_StatefulSessionBeanWrapper0.java:754)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:8
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)"
    If I remove the where clause, the expection is gone. However, I get all records. ;-)
    4) It seems that all EJBQL clauses must be capitalized. Is this true?
    FINALY)
    Is there a newer OC4J build that could use to get the development going? Do you know where there will be one? Is there any way of contacting the OC4J development team to report bugs?
    If you would like, we could discuss it in private e-mail (please use my private mail [email protected]).
    Thanks for your attention,
    Luis Fernando Soeiro
    Hi !! OC4J 9.0.3 developer's preview has most features of EJB 2.0. We are working on updating on our docs and samples for EJB 2.0
    Please look at the following URL that has some How Tos on EJB 2.0 features such Local Interfacea, EJB QL, etc : http://otn.oracle.com/tech/java/oc4j/htdocs/oc4j-how-to.html#ejb
    regards
    Debu Panda
    Oracle --------------------------
    Luis Soeiro <mailto:[email protected]> <mailto:[email protected]>Type : Question Date : Apr 11, 2002 15:15 PT Hello
    Some colleagues and I are trying to port a large project from JBOSS to OC4J. We used JBOSS 3.0 (beta) in order to evaluate EJB2.0 features and see if we could use it. We already have OC4J in production, but only as a JSP/Servlet container. The next step would be to deploy our EJB application to OC4J.
    We have read the material and it is written that OC4J (developers preview) is EJB 2.0 compliant. However, the specific documentation and the examples don't show how to specify OC4J specifc XML files. We absolutely need CMR and Local Interfaces, because we don't have the time required to downgrade our JBoss EJB2.0 application to the EJB 1.1 specification. We have over 80 Session Beans and over 20 Entity Beans.
    Is there anybody there that can confirm that OC4J developer's preview is really EJB2.0 compliant? If so, could you send me some pointers to information about OC4J container specifc deployment descriptors? The docs listed at the web site don't have EJB2.0 features listed, nor does the Oracle samples.
    Thanks for your attention,
    desperately,
    Luis Fernando Soeiro

    HI,
    I worked out CMR and EJB-QL with single bean.
    Using CMR, it is possible to get one bean reference through other bean, but
    When I tried EJB-QL with bean to bean navigation then I run into problem.

  • EJBQL IN or not IN?

    I'm trying to develop an EJBQL query, and I can't seem to express what I want - there may be a way, please let me know what you think.
    The schema: I have a table called 'Vouchers', and a table called 'Courses'. There is a many-to-many relationship between the two, represented by a join table - 'VouchersCourses'. But some vouchers always relate to all courses; these vouchers have field 'courseCoverage' set to 3, and are not represented in the join table.
    The finder: I want to find all the vouchers for a given courseID. The result should include all the vouchers that specifically reference the course, plus all the vouchers that are valid for all courses.
    I tried the following:
    * @ejb.finder
    *           view-type = "local"
    *           signature="Collection findByCourse(java.lang.String crsId)"
    *      query="SELECT DISTINCT OBJECT(v) FROM VoucherSchema v, IN (v.courses) AS c WHERE v.courseCoverage = 3 OR c.id = ?2"But the resulting Collection ignores all those with courseCoverage = 3. I guess this is because these vouchers are not IN v.courses!
    How do I retrieve all the relevant vouchers in v.courses, PLUS all those that are not in v.courses, but have courseCoverage = 3?
    Thank you for your help.
    Bruno.

    Correction - the query should read:
    *      query="SELECT DISTINCT OBJECT(v) FROM VoucherSchema v, IN (v.courses) AS c WHERE v.courseCoverage = 3 OR c.id = ?1"But the problem remains.
    Hope someone can suggest a solution.
    Bruno.

  • Problem with findAll method in CMP

    I have successfully deployed the CMP entity bean and am testing the findAll method
    when I reaslised that the result returned to the collection is limited to 100
    records, although I have 150 records in the database.
    When I restarted the WLS and ran the test again, the first time I ran findAll,
    it returned 150 records. But when I ran it a second time, it was limited to 100
    again. It seems that the findAll method only works on the first time after I restart
    the WLS.
    Any idea what could be wrong? I am using WLS6.1 and the EJBQL is as follows:
    FROM UnitsEBean var
    Any help would be appreciated. Thanks.
    Chris

    The setting for max heap size is dependent on how your application behaves.
    If you create alot of small temporary objects and you use a large heap size
    such as 512mb then when the full garbage collection runs in the JVM your
    application is completely suspended while GC runs. In practice I have seen
    this take upwards of 15 seconds or more at 512MB. If you have this problem
    you also likely have memory leaks (implicit references to onbjects left
    around) so that the GC does not free up this memory. In practice I have
    experienced better results by running more weblogic instances with smaller
    JVMs than running few weblogic instances with large JVMs.
    The sun Java site has alot of useful documentation on tuning the JVM.
    Francis Sommers
    "Cameron Purdy" <[email protected]> wrote in message
    news:3c1a8284$[email protected]..
    Up your max beans in cache to 10000.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    Tangosol Coherence: Clustered Coherent Cache for J2EE
    Information at http://www.tangosol.com/
    "Chris Yeo" <[email protected]> wrote in message
    news:3c19e569$[email protected]..
    I have successfully deployed the CMP entity bean and am testing thefindAll method
    when I reaslised that the result returned to the collection is limited
    to
    100
    records, although I have 150 records in the database.
    When I restarted the WLS and ran the test again, the first time I ranfindAll,
    it returned 150 records. But when I ran it a second time, it was limitedto 100
    again. It seems that the findAll method only works on the first time
    after
    I restart
    the WLS.
    Any idea what could be wrong? I am using WLS6.1 and the EJBQL is asfollows:
    FROM UnitsEBean var
    Any help would be appreciated. Thanks.
    Chris

  • Problem with a 1:M relationship between two entity beans

    I am having trouble trying to implement a 1:M relationship between two EJB2.0 entity beans using and EJBQL query. I have an ApplicantEJB, which contains a collection of phone numbers. The applicant table in the database has one primary key, applicant_id. The applicant_phones database table has a compound primary key--applicant_id and phone_type_id--so I have implemented a custom PK class to represent this, PhonePK. I have implemented a findByNameAndPhone method in my ejb-jar.xml file with the following syntax:
    SELECT object(a) FROM applicants a, applicant_phones p where a.applicantID = p.applicantID and a.name = ?1 and p.phoneNumber = ?2
    If I deploy this, Orion/OC4J translates the query in the orion-ejb-jar.xml with an incorrect reference to the applicant_phones.applicant_id column:
    SELECT a.applicant_id FROM applicants a , applicant_phones p WHERE ((a.applicant_id = p.applicantID ) AND (a.name = ?) AND (p.phone_number = ? ))
    I must have something wrong with the ApplicantEJB and PhoneEJB primary key mappings in my orion-ejb-jar.xml file, but I have tried many different combinations of values and keep getting them overwritten by the container with each deployment. Why is Orion/OC4J defaulting the applicant_id reference to the ob[i]Long postings are being truncated to ~1 kB at this time.

    I have posted excerpts from my orion-ejb-jar.xml file in this posting: Problem mapping a 1:M relationship between two entity EJBs w/ a compound PK
    Sorry for the duplicate postings, but I was getting errors on the submission.
    April

  • EJBQL or HQL transformator

    Hello,
    I have the following problem - I should change some part of query in application. E.g. application should add something in where clause (depends on tables). I use EJB and this chanhes I can do only in EJB (or Hibernate, for future). So I need something that can parse and change EJBQL and/or HQL statement.
    Any suggestion?
    Thanks in advance.

    Hard to tell what your question is but as a guess the answer is .... no you can't do that.
    At least for hibernate is allows you a way to pass through sql directly. And that is probably what you need. Depending on where EJBQL is these days (and what you are using) either you are going to be looking for the same functionality or you need to roll your own queries.

  • EJBQL DB Keys - Oracle DB Tables

    Q: Cisco Prime Infrastructure 2.0 - CLI Template with DB Variables;
    I'm working on a CLI template with DB variables and looking for a translation table between the EJBQL DB keys that are used in the CLI template and the real Oracle Table names (which seems to be different)
    I can't find such information in the regular CPI docs i.e. cisco.com
    thanks in advance for your kind help!

    No I don't have this information (yet) Cisco doesn't want to share this :-(
    However to solve the problem you describe, you don't need to use DB variables in your Prime Infrastructure template. Simply create a user defined group for either/or IOS and NXOS devices and use that same device group in your template deployment (or design a CLI template specificaly for this type type as additional critera)
    Kind Regards,
    Frank

  • EJBQL "myBoolVar = FALSE" compiled as "myBoolVar=0", fails with Postgres

    Hi,
    I have an EJBQL query that contains a test on a boolean variable:
    "select... where myBoolVar=FALSE"
    This query is compiled by Weblogic as :
    "select... where myBoolVar=0"
    which works fine under Oracle and MssqlServer but fails on Postgres (which manages
    a db type "bool").
    I could define this type as int on Postgres side but Postgres doesn't accept a
    resulset.getBoolean() on an int type... Is there a way to specify on Weblogic
    side that a java type should be handled as a specific sql type?
    Thanx for the answer.
    Etienne

    Problem is Fixed !!!
    We were having this problem because IFS installation was not recognising a separate tablespace which we created for IFS, so we started using default USERS tablespace after which the installation was successful.
    Thanks.

Maybe you are looking for

  • Hide a colum in bex report

    Hi All, I have a report with 12 column which is displaying 12 months sales data. Now I want to hide a column which is not haveing any data. please help me Thanks Billy

  • Get back to Mac from Win 7

    I'm not sure how I managed to do this but... I deleted my VmareFusion partition with win7, and vmware fusion. Then I upgraded to Lion. Then... I created a new partition using Bootcamp assistant and then re-installed Win7. At some point, when I was aw

  • Finding the Max Number

    Hi All,                  I have table from which i have to find out the site and its max number.i fetch all the data in ITAB. now i am not understanding wat to do to find the max number.here is my problem... Site              Number 1001            

  • Upgrade to 7.0.98.0

    I just upgrade my WISM's to 7.0.98.0. Since then my users have called saying that they get error messages on their 7925's and Vocera badges "searching for AP's". I don't see anything in the release notes for this. Any ideas?

  • Best modem for comcast voice?

    I'm currently leasing a tier 3 gateway device, and it's garbage! Can someone recomend the best modem (retail) that can be used with comcast voice? Also. I'm not actually using the phone line, only got it to get a lower price on the 105 mpbs speeds. C