Query on interface

I am getting "The parameter name [startDate] in the query's selection criteria does not match any parameter name defined in the query" error when querying on interface using TopLink 11g (11.1.3). The interface is implemented by many classes MyImplementationClass being one of them. The query works in TopLink 10g. Is this a bug in 11g? Thanks.
Here is my code:
+// subquery+
ExpressionBuilder subqueryBuilder = new ExpressionBuilder();
ReportQuery subQuery = new ReportQuery(MySubQueryClass.class, subqueryBuilder);
+// Main read query+
ReadAllQuery namedQuery1 = new ReadAllQuery(MyInterface.class);
ExpressionBuilder expBuilder1 = namedQuery1.getExpressionBuilder();
subQuery.addAttribute("primaryKey");
subQuery.setSelectionCriteria(
subqueryBuilder.get("operationDate").between(
subqueryBuilder.getParameter("startDate"),
subqueryBuilder.getParameter("endDate")).and(
subqueryBuilder.get("primaryKey").equal(expBuilder1.get("primaryKey))));
namedQuery1.setSelectionCriteria(expBuilder1.get("valueDate")
+.between(expBuilder1.getParameter("startDate"),+
expBuilder1.getParameter("endDate")).and(
expBuilder1.get("primaryKey").notExists(subQuery)));
namedQuery1.addArgument("startDate", java.sql.Date.class);+
namedQuery1.addArgument("endDate", java.sql.Date.class);+
// Stack trace
DEBUG 15:52:54 - ClientSession(27122014)--Exception [TOPLINK-6094] (Oracle TopLink - 11g Release 1 (11.1.1.3.0) (Build 100323)): oracle.toplink.exceptions.QueryException
Exception Description: The parameter name [startDate] in the query's selection criteria does not match any parameter name defined in the query.
Query: ReadAllQuery(*myPackage.MyImplementationClass*)Local Exception Stack:
Exception [TOPLINK-6094] (Oracle TopLink - 11g Release 1 (11.1.1.3.0) (Build 100323)): oracle.toplink.exceptions.QueryException
Exception Description: The parameter name [startDate] in the query's selection criteria does not match any parameter name defined in the query.
Query: ReadAllQuery(myPackage.MyImplementationClass)
at oracle.toplink.exceptions.QueryException.parameterNameMismatch(QueryException.java:996)
at oracle.toplink.internal.expressions.ParameterExpression.getValue(ParameterExpression.java:227)
at oracle.toplink.internal.databaseaccess.DatabaseCall.translate(DatabaseCall.java:914)
at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:179)
at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:250)
at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:583)
at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2483)
at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2441)
at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:467)
at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:874)
at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:674)
at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:835)
at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:445)
at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2265)
at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1079)
at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1063)
at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1022)
at oracle.toplink.descriptors.InterfacePolicy.selectAllObjectsUsingMultipleTableSubclassRead(InterfacePolicy.java:171)
at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:462)
at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:874)
at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:674)
at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:835)
at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:445)
at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2265)
at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1079)
at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1063)
at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1037)

Try using the outer query for the parameters,
change,
subqueryBuilder.getParameter("startDate"),
to,
expBuilder1.getParameter("startDate"),
If that does not work, try the query without the sub-query to determine if the sub-query is the cause.
It could be a bug with the sub-query, if you can recreate it on EclipseLink you could log a bug, or contact Oracle support.
James : http://www.eclipse.org/eclipselink/

Similar Messages

  • Querying on interface

    I noticed that Kodo 3.3 supports query on interface - is it part of JDO 2.0
    persistent interface support? What else is implemented? Can we associate
    Interface with Implementation to do the rest of the staff?

    >I noticed that Kodo 3.3 supports query on interface - is it part of JDO 2.0
    persistent interface support? What else is implemented? Can we associate
    Interface with Implementation to do the rest of the staff?We've had querying on interfaces for a long time!
    The Kodo implementation is currently different than JDO 2, in that JDO 2
    requires you to explicitly list your persistent interfaces in metadata, along
    with which classes implement them. Kodo currently just dynamically tracks which
    persistent classes implement which interfaces, and turns any query on an
    interface into a query on the set of the implementing classes.

  • Query on Interface Descriptor

    Hi
    I have a simple question about querying on Interfaces.
    I have an interface called Entity, and 2 implementing classes called Service and ServiceProvider (mapped to tables Services (pk serviceId) and ServiceProviders (pk serviceProviderId)). serviceId and serviceProviderId have independent sequences. In Workbench, both classes are specified as implementing the Entity interface. The Entity interface currently specifies an accessor method getEntityId(), and entityId is a common query key for both classes.
    I want to query against the Entity interface to obtain a single instance, by knowing the entityId and class name.
    How can I formulate a readObject query so that Toplink generates the appropriate SQL:
    select * from services where serviceId = ? or
    select * from serviceProviders where serviceProviderId = ?
    Sorry for the trivial nature of this question - I can't find any examples of querying against interface descriptors in a search of tutorials or the developers guide. The developers guide simply says "If there are multiple implementors of the interfaces, the query returns instances of all implementing classes." and this sounds like it would translate to a UNION ALL SQL query.
    I also have in a separate class a variable one to one mapping where I can specify a class indicator (entityTypeId values). Somehow I feel that I need something like this for the Entity interface descriptor.
    James

    Frankly, this just isn't something that is done that often. In the past decade I can only think of a couple of customers who've asked me about this. I always feel a bit uncomfortable with how querying through interfaces really tends to break polymorphism -- it just doesn't seem very natural from an OO perspective. Now, if instead of an interface you had used a common superclass, that makes more sense. I guess the fact that interfaces don't have state makes this whole area a bit of an OOAD research topic. :)
    That being said, I don't expect TopLink would do an "or" query like you've shown, but would do a UNION.
    My recommendation is to experiement with the queries, perhaps take a look at query-keys (they may be of some help here), and contact support with any feature suggestions you have in this area.
    - Don

  • ACE - Query VLAN Interfaces Status

    Hi,
    I am wondering what the status of the query vlan interface means in the command 'show ft peer detail':
    Query Vlan IF State          : UP, Manual validation - please ping peer
    I am pretty sure that I did not see this status when I configured query vlan last time. Current version is A2(2.3).
    Unfortunately this status does not seem to be documented anywhere on CCO.
    I appreciate any help!
    Thanks,
    Daniel

    Hi Daniel,
    The FT Query VLAN interface is an optional, yet very good, feature to be used when using redundant ACE modules or appliances. Without it, if the FT VLAN was to go down, the standby ACE will no longer receive FT heartbeats from the active ACE and therefore take the active role.  However, if the active ACE is still running fine in the active role, then you don't want the standby ACE to take over as active because that will put them into an active/active scenario, which may lead to connectivity issues.
    This is where the FT Query VLAN interface comes in.  If the FT VLAN goes down, the standby ACE will notice this, but before taking the active role, it will ping it's peer IP address configured on the interface that is designated as the FT Query VLAN.  If the ping is successful, then it will stay in the standby role, thereby saving you some headaches.
    The status that you are seeing is the ACE's way of telling you that the interface is UP, but if you want to know if it can successfully ping the peer IP address, then you would have to manually ping the peer IP address from the CLI.  The ACE does not periodically check the ping connectivity through any automatic mechanism.  The automatic mechanism is only triggered by the FT VLAN going down.
    Does this help?
    Sean

  • Query/Read Interface for API

    Is there a query/read interface from the HRMS API's or from the TCA API's?
    We are using customers online to maintain data , but I want to have a custom application to view the data.
    Obvious choice would be through the TCA API's but I cannot find any Query/Read Interfaces there.
    Oracle's Docs seem to say it's possible so could somebody point me in the right direction please
    cheers
    Dominic

    Anyone have any idea of it ?

  • Query all interfaces

    Hi,
    Would really appreciate some assistance in what I 'thought' is a simple task
    This is what I want to do via TCL / EEM :
    1.)  Enumerate all interfaces on the switch or just query the running config
    2.)  Query each interface config
    3.)  If the interface config doesn't contain the sting 'authentication port-control auto' - send an email with the resulting interface name etc
    I'm starting to lose my mind trying to do this 
    Thanks and regards,
    Bill

    Try this:
    event manager applet intf-auth
    event none
    action 001  cli command "enable"
    action 002  cli command "show ip int brie"
    action 003  set output "$_cli_result"
    action 004  set intfs ""
    action 005  foreach line "$output" "\n"
    action 006   string trim $line
    action 007   set line $_string_result
    action 008   string length $line
    action 009   if $_string_result eq 0
    action 010    continue
    action 011   end
    action 012   regexp "^Interface" "$line"
    action 013   if $_regexp_result eq "1"
    action 014    continue
    action 015   end
    action 016   regexp "#" "$line"
    action 017   if $_regexp_result eq "1"
    action 018    continue
    action 019   end
    action 020   regexp "^([^[:space:]]+)" "$line" match intf
    action 021   cli command "show run interface $intf"
    action 022   regexp "authentication port-control auto" "$_cli_result"
    action 023   if $_regexp_result eq "0"
    action 024    append intfs " $intf"
    action 025   end
    action 026  end
    action 027  string length "$intfs"
    action 028  if $_string_result gt "0"
    action 029   mail from "[email protected]" to "[email protected]" server "10.1.1.1" subject "Interfaces missing auth port-control" body "The following interfaces are missing 'auth port-control auto': $intfs"
    action 030  end

  • Query abt interface

    hi all,
    my query is on outbound interface, i have already an idoc which has data i have to retrieve it from z_tp_idocread function module.and i have to map the fields with idoc fields those idoc fields i can find from zrmd_a07 for custom fields and hrmd_a07 for normal fields.so i have to map in the format of header trailer and body and i have to send it ti flat file
    through outbound interface.
    i want an example program for this.its very urgent.
                   try to help me in this asap.
                               thanking you,

    and how do we .. create a connection pooling

  • LMS 4.2.3 Query on Interface utilization report

    Hi All,
    Interface Utilization report displays the interface utilization data for each device polled for the Interface Utilization
    template. The information is presented using the percentage specifier.
    For eg its displayed % (Rx Max%,Rx Avg%,RxMin%,
    Tx Max%,Tx Avg%,TxMin%)
    I wants report should have the data(interface utilization In Bytes of data)
    Can we display the data instead of the percentage?? is it possible ???
    Regards,
    Channa

    Hi Channa,
    log into dbreader using the following::
    http://servername : 1741/dbreader/dbreader.html
    or
    https:// servername : 443/dbreader/dbreader.html
    user Id is DBA
    Database Name is upm
    password :: user defined (by default password is c2ky2k)
    1.       Here is the query to get the pollerwise managed MIBObjects:
    "select count (*), PollerName from Poller_Details_Table a,Poller_Definition_Table b where a.PollerId = b.PollerId and b.Poller_State NOT IN (1) Group by b.PollerName;"
    2.       Here is the query to get the total mibobject count for the active pollers
    “select count (*) from Poller_Details_Table a,Poller_Definition_Table b where a.PollerId =
    b.PollerId and b.Poller_State NOT IN (1);”
    Hope it will help
    Thanks-
    Afroz
    ***Ratings Encourages Contributors ***

  • Named Query in Interface

    HI,
    I’ve a named query in a class descriptor set in workbench and if I call the method
    Object executeQuery(java.lang.String queryName, java.lang.Class domainClass, java.util.Vector argumentValues)
    Works fine. My domain class implements an interface and I don’t want to expose the domain class to my caller. For this to work is there a way to associate the named query to the interface so that the interface can be passed in the above method instead of concrete class?
    If not how can I set the query in Toplink so that I can use the following method
    executeQuery(java.lang.String queryName, java.lang.Object arg1)
    In the current setup when I try to use the above method I’m getting following exception
    Exception [TOPLINK-6026] (OracleAS TopLink - 10g (9.0.4.3) (Build 040412)): oracle.toplink.exceptions.QueryException
    Exception Description: Query named [retrieveBases] is not defined. Domain class: []
         at oracle.toplink.exceptions.QueryException.queryNotDefined(QueryException.java:587)
         at oracle.toplink.exceptions.QueryException.queryNotDefined(QueryException.java:580)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1020)
    Thanks
    -Mani

    If you associate the interface with the class' descriptor you should be able to execute queries against the interface and have it execute against the correct class.
    In the MW, in your descriptor use the advanced property "Interface Alias" and set the class' interface.
    Through the code API, you would use the interface policy,
    descriptor.getInterfacePolicy().addParentInterface(MyInterface.class);

  • Query Network interface with C#

    Hello,
    I'm developing a C# winforms application under Windows server 2008 (64bit)
    Is there a way to query all network interfaces installed in the PC and check their IP address and if there is an ethernet connection (connected \ not connected) ?
    I want to do it with Microsoft C# classes. 
    Best regards,
    Z.V

    Hi,
    Solution 1:>
    Step1:>
    UdpClient u = new UdpClient(remoteAddress, 1);
    IPAddress localAddr = ((IPEndPoint)u.Client.LocalEndPoint).Address;
    Step2:>
    foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
    IPInterfaceProperties ipProps = nic.GetIPProperties();
    // check if localAddr is in ipProps.UnicastAddresses
    Solution 2:>
    foreach(NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
    if(ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
    Console.WriteLine(ni.Name);
    foreach (UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)
    if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
    Console.WriteLine(ip.Address.ToString());
    Documentation:>
    NetworkInterface.GetAllNetworkInterfaces Method
    Good Tutorial:>
    http://www.codeproject.com/Articles/64975/Detect-Internet-Network-Availability
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • Af:query User interface changes

    I was wondering what user interface changes can i make to an af:query
    1) I was wondering if its possible to lock the disclosure button
    2) Move the search,reset and add fields button to the top rather than at the bottom
    3) remove tool tips?
    Thanks

    Hi.
    see the doc of the component http://docs.oracle.com/cd/E15523_01/apirefs.1111/e12419/tagdoc/af_query.html
    There you will see all the properties, such as modeButtonPosition

  • How to retrieve generated sql query from interface using groovy

    Hi All,
    I'm new to odi and i need the generated sql query code from the interface using groovy.

    Hi All,
    I'm new to odi and i need the generated sql query code from the interface using groovy.

  • Query on interface related to PP process

    Hi,
    We have IDOC postings for production order goods receipt from legacy system to SAP (inbond IDOC). This will be done through middleware software using flat file. We run batch job to post these IDOCs daily to SAP. once the IDOC posts successfully (status 53) this IDOC will not get reprocess again as per required.
    But we observed in some cases or IDOCs, even after successfull posting of IDOC (status 53) the same IDOC restart to get reprocess within 2 secs and post the material document once again. This happens very rarely through batch job and i observed such cases only once in 3 months or 6months. I checked and found no parallel batch jobs or varaints are running on same program.
    Can any one knows why this happens? Any possible causes if you know on thism if share it will be greatful.
    Thank you in advance,
    Sharat

    Are you sure that GR is getting posted TWICE ??
    Coz in some cases, an IDoc shows a status-53 even though it has some error inside & system does not post any document.
    For example, if during IDoc posting from Legacy to SAP, if any Production Order is being processed in some other way, interface would not b in position to post GR. Even after this, system shows IDoc status as 53.
    And then actual GR happens during re-processing of failed IDoc's.
    Revert back.
    REgards,
    Anup

  • Query On Interface Vs Session in Package

    Hi,
        I have five interface in a package linked serially using ok  But If I create 5 scenario of that 5 interfaces and then put them in a package using ok serially.
    Which will be better and why?
    Thanks
    Papai

    Linking interfaces in a package is better & recommended(at least in development environment) as it will be easier for you to understand flow of your steps & you will be able to edit the steps if required.
    Scenario is like a compiled version for your ODI objects & You can't change the code of a scenario. You need to regenerate the package/interface to have new changes in effect.
    Scenarios are nothing but ODI jobs that are scheduled & one object compiled with all required. So having 1 scenario for 1 interface doesn't make much sense.
    So its better to have simplicity in development.
    If this a Production environment, then its fine to have scenarios linked as users will be restricted to make the code changes, but ODI already has provision of that which is "Execution Work repository" where ODI jobs will only be executed & not modified.
    Hope this helps.
    Regards,
    Santy

  • Query on interface concept

    Class A{}
    Interface I{}
    public Class B
    Public static void main ( String[] xx)
    A a = new A();
    I ii = a; // it doesn?t ..
    I i = (I) a ; // it works WHY?
    // why this code compiles ?

    newbie_007 wrote:
    Class A{}
    Interface I{}
    public Class B
    Public static void main ( String[] xx)
    A a = new A();
    I ii = a; // it doesn?t ..
    I i = (I) a ; // it works WHY?
    // why this code compiles ?public class B
    public static void main ( String[] xx)
    A a = new A();
    A ii = a; // it doesn?t ..
    I i = (I) a ; // it works WHY?
    class A{}
    interface I{}
    but this compiles and I wonder too. But when I run it, it throus
    Exception in thread "main" java.lang.ClassCastException: A cannot be cast to I
         at B.main(B.java:15)
         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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
    interesting.
    Edited by: Tiko_dev on Apr 30, 2009 7:11 AM

Maybe you are looking for

  • What are the steps and how to run payroll for a person?

    Hi all, I have hired a person.  Hired with begda 01/01/2009. I have assigned the person to 0001, 0002, 0006, 0008. For this person how can I run payroll? Help me with the steps from begin of employee hiring to the employee payroll run. So that I can

  • Final Cut Pro X freezes during render when computer sleeps?

    So I'm experiencing something I've never had to deal with before. I'm running FCPX 10.0.5 on OSX 10.7.4. When I've left FCPX to render complicated sequences/effects everything works normally unless I leave and do not interact with the computer. My co

  • RAVPN on PIX is not working

    Hi, I have PIX with OS ver 7.2 and I am trying to setup RAVPN, however it keeps failing and I get the following error on the PIX when enabling the crypto debug commands: Apr 05 01:47:15 [IKEv1]: Group = ccie, IP = 192.1.24.114, Error: Unable to remov

  • Emulator/OTA Problem

    I am trying to test record store functionality in an application being deployed OTA. When exit the app the entire emulator closes. When I run it 'regular execution' the emulator just returns to the 'Choose a MIDlet' screen. Can I run my MIDlet suite

  • After upgrade Lion to Mavericks, can't run Windows 7 on boot camp because is hidden/disabled

    The question is about iMac (21.5-inch, Mid 2011) It was with Lion, there was a Windows 7 (32bit) partition created by Boot Camp v4. So, I made the upgrade to Mavericks (no clean install), after this when iMac start and holding "ALT" button no longer