Invalid Query Key when using ReadAllQuery.addOrdering()

Hi,
I have an object called Request mapped to the Request table and a field within it called creator which is mapped to the User object with a 1-1 mapping. the User object is mapped to the user table.
Now when I do addOrdering() with an expression as below and execute the ReadAllQuery, I get an exception which says "Invalid Query Key[lastName]".
raq.addOrdering(raq.getExpressionBuilder().get("creator").get("lastName").ascending());
where raq is an instance of ReadAllQuery.
Have anyone experienced this? Any help would be much appreciated.
Thank you,
Sanjay Mathew.

I double checked and the attribute names look ok.
Please see the code below:
SearchCriteria p_searchCriteria = new SearchCriteria();
sc.setSortAttribute (
"m_creatorUser.m_lastName,m_creatorUser.m_firstName");
sc.setSortOrder(SearchCriteria.ASCENDING);
ReadAllQuery raq = new ReadAllQuery(Request.class, queryExpression);
if (p_searchCriteria.getSortAttribute() != null &&
p_searchCriteria.getSortAttribute().trim().length() > 0) {
StringTokenizer st1 =
new StringTokenizer(p_searchCriteria.getSortAttribute(), ",");
while (st1.hasMoreTokens()) {
ExpressionBuilder eb = raq.getExpressionBuilder();
String sortattr = st1.nextToken();
StringTokenizer st2 = new StringTokenizer(sortattr, ".");
Expression orderexpr = null;
while (st2.hasMoreTokens()) {
String st2Str = st2.nextToken();
if (orderexpr == null)
orderexpr = eb.get(st2Str);
else
orderexpr = orderexpr.get(st2Str);
if (p_searchCriteria.getSortOrder() == null ||
(p_searchCriteria.getSortOrder() != null &&
p_searchCriteria.getSortOrder().equals(SearchCriteria.
ASCENDING))) {
orderexpr = orderexpr.ascending();
} else {
orderexpr = orderexpr.descending();
raq.addOrdering(orderexpr);
I tried creating the expression with hard coded attribute names as well like this:
raq.getExpressionbuilder().get("m_creatorUser").get("m_lastName").ascending()
In both cases I get "Invalid query key" exception.
Sanjay.

Similar Messages

  • Invalid query key/Mapping View

    Hi,
    I am mapping a view without any primary key to a ValueObject. I am selecting three fields as primary keys such that the values are unique. I am getting an exception like
    EXCEPTION DESCRIPTION: Invalid query key [lookupType] in expression.
    The expression I am having is
    Expression contactTypeExpr = builder.get("lookupType").equal("COUNTRIES");
    constantsCol = tcaServerSession.readAllObjects(ConstantsLookupVO.class, contactTypeExpr);
    Pls help me regarding this problem.
    I have created a new Class mapping in which also I am facing the same problem.
    Is there any other parameters that I have to consider while mapping objects to DB View.
    Regards
    Solomon

    This error generally occurs when the mapping for this attribute does not exists. Please ensure that the attribute you are attempting to use in the expression has a valid mapping.
    --Gordon

  • ReadObjectQuery - Invalid query key

    Hello again :)
    A have still stuck on TopLink :(
    I created very simple example:
    DB:
    create table TESTIK
    ID NUMBER not null,
    NAZEV VARCHAR2(255),
    VERSION NUMBER
    I created new project in TopLink WorkBench, created new session.. I mean, there is no problem (but I'm not sure :) ) .
    I created new Dynamic WebApplication in Eclipse, using Glassfish server and framework JSF...
    My source:
    This is my entity, represent table TESTIK
    Testik.class:
    package toplink.model.entity;
    import java.io.Serializable;
    public class Testik implements Serializable { // implements Serializable
         private int id;
         private String nazev;
         private int version;
         public Testik() {
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getNazev() {
              return nazev;
         public void setNazev(String nazev) {
              this.nazev = nazev;
         public int getVersion() {
              return version;
         public void setVersion(int version) {
              this.version = version;
    This is for create session - i don't now, is it rights? :)
    SessionSetting.class:
    package toplink.services.settings;
    import oracle.toplink.sessions.Project;
    import oracle.toplink.threetier.Server;
    import oracle.toplink.tools.workbench.XMLProjectReader;
    public class SessionSetting extends oracle.toplink.platform.xml. jaxp.JAXPPlatform {
         public SessionSetting() {
         public Server getSession(){
         System.setProperty("toplink.xml.platform", "oracle.toplink.platform.xml.jaxp.JAXPPlatform");
              Project myProject = XMLProjectReader.read("c:/ecl_work/TopLink_Intro/src/META-INF/TopLink_Intro.xml", Thread.currentThread().getContextClassLoader());
              Server serverSession = myProject.createServerSession();
              return serverSession;
    And if I want used some query:
    public Testik findById(int id) {
              SessionSetting ss = new SessionSetting();
              Server session = ss.getSession();
    Testik testik = (Testik) session.readObject(Testik.class, new ExpressionBuilder().get("id").equal(1));
              return testik;
    But this return Exception:
    javax.servlet.ServletException: #{testikManagedBean.najdiTestik}: Exception [TOPLINK-6015] (Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)): oracle.toplink.exceptions.QueryException
    Exception Description: Invalid query key [id] in expression.
    Query: ReadObjectQuery(toplink.model.entity.Testik)
    Where testikManagedBean.najdiTestik call findById(int id) !
    I tried used StoredProcedureCall, ReadObjectQuery, ValueReadQuery, ReadAllQuery and nothing works :(
    Example:
    public Collection<Testik> findAll(){
              SessionSetting ss = new SessionSetting();
              Server session = ss.getSession();
              Collection<Testik> testiky = session.readAllObjects(Testik.class);
              return testiky;
    but in this example, it works a long time and return:
    javax.servlet.ServletException: #{testikManagedBean.vsechnyTestiky}: Exception [TOPLINK-4002] (Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Exception input/output: The Network Adapter could not establish the connection
    Error Code: 17002
    Query: ReadAllQuery(toplink.model.entity.Testik)
    I know what it means in this problem, but I do not know where is it, because in the workbench I can normally connect to the database... Is this problem in sessions or where?
    Please, I tried some very simple example, how to use TopLink and Queries and i'm still stuck.. I'm newbie in toplink and I do not know your advice...
    Please, could you help me with my problem?
    Thanks in advance

    I still cannot find a problem :(
    My Toplink_Intro.xml source is here :
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)" xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>TopLink_Intro</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>toplink.model.entity.Testik</opm:class>
    <opm:alias>Testik</opm:alias>
    <opm:primary-key>
    <opm:field table="TESTIK" name="ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy"/>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TESTIK" name="ID" xsi:type="opm:column"/>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>nazev</opm:attribute-name>
    <opm:field table="TESTIK" name="NAZEV" xsi:type="opm:column"/>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>version</opm:attribute-name>
    <opm:read-only>true</opm:read-only>
    <opm:field table="TESTIK" name="VERSION" xsi:type="opm:column"/>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:locking xsi:type="toplink:version-locking-policy">
    <toplink:version-field table="TESTIK" name="VERSION" xsi:type="opm:column"/>
    </toplink:locking>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:tables>
    <toplink:table name="TESTIK"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    </opm:class-mapping-descriptors>
    <toplink:login xsi:type="toplink:database-login">
    <toplink:platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</toplink:platform-class>
    <toplink:user-name>tpl</toplink:user-name>
    <toplink:password>90412C7B7643C5A83BC1D672E05E1D31</toplink:password>
    <toplink:driver-class>oracle.jdbc.OracleDriver</toplink:driver-class>
    <toplink:connection-url>jdbc:oracle:thin:@172.17.2.69:1521:ORCL</toplink:connection-url>
    </toplink:login>
    </toplink:object-persistence>
    and sessions.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink-sessions version="11g (11.1.1.0.0)" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <session xsi:type="database-session">
    <name>MyDBSession</name>
    <event-listener-classes/>
    <logging xsi:type="toplink-log">
    <log-level>fine</log-level>
    </logging>
    <primary-project xsi:type="xml">C:/ecl_work/TopLink_Intro/src/META-INF/TopLink_Intro.xml</primary-project>
    <login xsi:type="database-login">
    <platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</platform-class>
    <user-name>tpl</user-name>
    <password>90412C7B7643C5A83BC1D672E05E1D31</password>
    <sequencing>
    <default-sequence xsi:type="table-sequence">
    <name>Default</name>
    </default-sequence>
    </sequencing>
    <driver-class>oracle.jdbc.OracleDriver</driver-class>
    <connection-url>jdbc:oracle:thin:@172.17.2.69:1521:ORCL</connection-url>
    <struct-converters/>
    </login>
    </session>
    </toplink-sessions>
    Any idea, why I have still this exception:
    javax.servlet.ServletException: #{testikManagedBean.najdiTestik}: Exception [TOPLINK-6015] (Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)): oracle.toplink.exceptions.QueryException
    Exception Description: Invalid query key [id] in expression.
    Query: ReadObjectQuery(toplink.model.entity.Testik)
    in this code?
    Testik testik = (Testik) session.readObject(Testik.class, new ExpressionBuilder().get("id").equal(1));
    Thanks in advance
    Edit:
    And if I used this code:
    Collection<Testik> testiky = session.readAllObjects(Testik.class);
    then returns this exception:
    javax.servlet.ServletException: #{testikManagedBean.vsechnyTestiky}: Exception [TOPLINK-4002] (Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00936: missing word
    Error Code: 936
    Call: SELECT FROM TESTIK
    Query: ReadAllQuery(toplink.model.entity.Testik)
    Edited by: KLD on Nov 10, 2008 12:34 AM

  • Invalid query key

    I have the following class hierarchy
    A has a one-to-many relationship with B, B has a one-to-one relationship with C, C has a one-to-one relationship with D and D has a one-to-one relationship with E. B, C, D, and E each have a derived class B1, C1, D1 and E1 respectively.
    I am getting Invalid Query Key exception while trying to access a query key defined in E1 using the following toplink code
    ExpressionBuilder.get("A").anyOf("B").get("C").get("D").get("E").get("aFieldInE1");
    Any help on this will be greatly appreciated.
    Thanks,
    Milan Dattawade.

    I assume by "derived class" you mean subclass. If so, then this query breaks polymorphism. Although you may know that you only want A's that have an E that is specifically E1, the language doesn't know that.
    Luckily there is an easy way to handle this. You can create a Query Key in the class E that has the information about the subclass attribute in E1 that you want to be able to query through. In other words, hint to TopLink that you'd like to occasionally query and break polymorphism by assuming you're querying on specific subclass attributes.
    See:
    http://download-west.oracle.com/docs/cd/B10464_01/web.904/b10313/queries.htm#1108755
    (or search your PDF for Foundation Library for "DirectQueryKey") See Javadoc for DirectQueryKey too.
    - Don

  • QueryException Invalid query key in expression.

    Hi, I'm trying to run this select
    Query q = em.createQuery("SELECT R.receivedOn, COUNT(R)) FROM Responders R,"+ "ConsumerHistory ch WHERE ch.jobid = "+job.getJobid()+" and ch.trackid = R.trackid"+ "GROUP BY R.receivedOn");
    the[i] job.getJobid() is a parameter, the exception it throws
    Exception [TOPLINK-6015] (Oracle TopLink Essentials - 9.1 (Build b33e-beta)): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Invalid query key [jobid] in expression.
    Query: ReportQuery(com.a2mks.scimark.entidad.Responders)
         at oracle.toplink.essentials.exceptions.QueryException.invalidQueryKeyInExpression(QueryException.java:608)
         at oracle.toplink.essentials.internal.expressions.QueryKeyExpression.validateNode(QueryKeyExpression.java:657)
         at oracle.toplink.essentials.expressions.Expression.normalize(Expression.java:2562)
         at oracle.toplink.essentials.internal.expressions.DataExpression.normalize(DataExpression.java:343)
         at oracle.toplink.essentials.internal.expressions.QueryKeyExpression.normalize(QueryKeyExpression.java:440)
    The ConsumerHistory Class implementacion is
    @Entity(name = "ConsumerHistory")
    @Table(schema = "SCIMARK", name = "CONSUMER_HISTORY")
    public class ConsumerHistory implements Serializable {
    @Id
    @Column(name = "HISTORYID", nullable = false, length = 20)
    private long historyid;
    @Column(name = "JOBID")
    private long jobid;
    @Column(name = "TRACKID")
    private String trackid;
    Can any body give me some ideas.... thanks

    The specification states that "A property or field name specified as an orderby_item must correspond to a basic persistent property
    or field of the associated class or embedded class within it", so you cannot use type.code since it does not represent a property in Item.
    Please file a feature request if you wish to have this added to EclipseLink as an extension to JPA.

  • EJB3 / TopLink EntityManager - invalid query key in expression

    with Glassfish and TopLinka s the entity manager, I'm getting an QueryException that I don't understand. The complaint is that my key (enamelId) is invalid. However I can use the same key in a different query successfully.
    Any thoughts?
    this query gets no complaints:
    SELECT sh FROM Showpiece as sh WHERE sh.enamelId = '0301'
    this query fails:
    SELECT ex FROM Exhibition as ex, Showpiece as sh WHERE sh.enamelId = '0301' AND ex.id = sh.showId
    Exception [TOPLINK-6015] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Invalid query key [enamelId] in expression.
    Query: ReportQuery(com.schwarcz.enamels.model.Exhibition)
    at oracle.toplink.essentials.exceptions.QueryException.invalidQueryKeyInExpression(QueryException.java:608)
    at oracle.toplink.essentials.internal.expressions.QueryKeyExpression.validateNode(QueryKeyExpression.java:657)
    at oracle.toplink.essentials.expressions.Expression.normalize(Expression.java:2542)
    at oracle.toplink.essentials.internal.expressions.DataExpression.normalize(DataExpression.java:343)

    I don't remember the specifics of my solution. The base cause was indeed an error in my code. I dimly remember that I had written something so that TopLink was trying to generate a join table and I had defined one as a POJO as well. What I do remember was what I did to find a solution...
    I switched to using the Hibernate entity manager, got some different error messages and was able to correct my code. I now routinely switch back and forth between TopLink and Hibernate. Both seem to me to be pretty likely to produce error messages that are vague and not too helpful.

  • Invalid query key - JPA

    Hello,
    I'm trying to create a select which has 5 different tables and i'm getting the following error:
    Exception [TOPLINK-6015] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Invalid query key [
    Query Key usuarioSubgrupoPK
    Base entity.Usuario] in expression.
    Query: ReportQuery(entity.Usuario)
         oracle.toplink.essentials.exceptions.QueryException.invalidQueryKeyInExpression(QueryException.java:608)
         oracle.toplink.essentials.internal.expressions.ObjectExpression.getDescriptor(ObjectExpression.java:209)
         oracle.toplink.essentials.internal.expressions.QueryKeyExpression.getContainingDescriptor(QueryKeyExpression.java:213)
         oracle.toplink.essentials.internal.expressions.QueryKeyExpression.getQueryKeyOrNull(QueryKeyExpression.java:325)
         oracle.toplink.essentials.internal.expressions.QueryKeyExpression.isAttribute(QueryKeyExpression.java:366)
    My select is:
    List<Projeto> pList = em.createQuery(
    "select p "+
    " from "+
    " Usuario u, "+
    " UsuarioSubgrupo usb, "+
    " Subgrupo sb, "+
    " Grupo g, "+
    " Projeto p "+
    " where usb.usuarioSubgrupoPK.cdUsuar = u.cdUsuar "+
    " and usb.usuarioSubgrupoPK.cdSubgr = sb.cdSubgr "+
    " and sb.grupo = g "+
    " and g.projeto = p "+
    " and g.stAdmin = 1 "+
    " and u.cdUsuar = 1 ").getResultList();
    Relevant code:
    Usuario.class
    @Id
    @Column(name = "CD_USUAR", nullable = false)
    @SequenceGenerator(name="SqUsuario",sequenceName="SQ_USUARIO", allocationSize=20)
    @GeneratedValue(strategy=javax.persistence.GenerationType.SEQUENCE, generator="SqUsuario")
    private Long cdUsuar;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "usuario")
    private java.util.Collection <entity.UsuarioSubgrupo> usuarioSubgrupoCollection;
    UsuarioSubgrupo.class
    @EmbeddedId
    protected UsuarioSubgrupoPK usuarioSubgrupoPK;
    @JoinColumn(name = "CD_USUAR", referencedColumnName = "CD_USUAR", updatable=false, insertable=false)
    @ManyToOne
    private Usuario usuario;
    @JoinColumns({
    @JoinColumn(name = "CD_GRUPO", referencedColumnName = "CD_GRUPO", updatable=false, insertable=false),
    @JoinColumn(name = "CD_SUBGR", referencedColumnName = "CD_SUBGR", updatable=false, insertable=false)
    @ManyToOne
    private Subgrupo subgrupo;
    UsuarioSubgrupoPK.class
    @Id
    @Column(name = "CD_USUAR", nullable = false)
    private Long cdUsuar;
    @Id
    @Column(name = "CD_SUBGR", nullable = false)
    private Long cdSubgr;
    Subgrupo.class
    @Id
    @Column(name="CD_GRUPO", nullable = false, insertable = false, updatable = false)
    private Long cdGrupo;
    @Id
    @Column(name="CD_SUBGR", nullable = false)
    @SequenceGenerator(name="SqSubgrupo",sequenceName="SQ_SUBGRUPO", allocationSize=20)
    @GeneratedValue(strategy=javax.persistence.GenerationType.SEQUENCE, generator="SqSubgrupo")
    private Long cdSubgr;
    @ManyToOne
    @JoinColumn(name = "CD_GRUPO", referencedColumnName = "CD_GRUPO")
    private Grupo grupo;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "subgrupo")
    private java.util.Collection <entity.UsuarioSubgrupo> usuarioSubgrupoCollection;
    Could someone give me a hand, please?
    Thanks a lot!
    !_Let's share ideas_!

    Is UsuarioSubgrupoPK.class annotated as @Embeddable? If not, that is required.
    Also, try removing the @Id annotations within the UsuarioSubgrupoPK and instead use basic mappings (the default). The @EmbeddedId annotation in UsuarioSubgrupo should be enough to make those fields IDs.

  • Does DPM 2012 R2 still needs DataSourceGroups.xml and MaxAllowedParallelBackups key when using Hyper-V VSS Software Writer to backup Server 2012 R2 Cluster

    Hi,
    Does DPM 2012 R2 still needs DataSourceGroups.xml and MaxAllowedParallelBackups key when using Hyper-V VSS Software Writer to backup Server 2012 R2 Hyper-V Cluster with CSV's? Can't find a clear answer somewhere.
    Thanx for helping me out.
    DJITS.

    Configure CSV backups
    If you are running Hyper-V on Windows Server 2008 R2 and you’re backing up multiple clusters with DPM, you need to ensure that only one backup uses the same CSV at any one time. To do this, follow the instructions in
    Serialize virtual machine backups.
    If you’re using software VSS with Hyper-V on Windows Server 2008 R2, do the following
    Serialize virtual machine backups per node            
    Serialize virtual machine backups per CSV LUN            
    Have a nice day !!!

  • Disable the need of the function key when using the control key

    I'm often using the F1-12 keys when using an IDE for developing. Those IDE's use the CTR+F1-12 shortcuts quite a bit and it's always needed to use FN+CTR+F1-12 which is ridiculous and redundant. Is there a way to keep using the functions assigned to F1-12 (Adjust volume, brightness...) without pressing the function key and be able of using CTR or ALT +F1-12 without the need of pressing the function key?

    According to the system help text it is possible. And for me it works as described in the help text on my MacBook Pro.
    But on my  Mac Pro (late 2013) the relevant control (“Use all F1, F2, etc. keys as standard function keys”) is missing form System Preferences >> Keyboard >> Keyboard.
    From the help text for the topic "Use keyboard function keys:"
    If you frequently use the alternate function of a function key, you can switch the keyboard so that the function keys perform the alternate function without your pressing Fn. You then hold down Fn to use a function key’s original hardware control function. If your keyboard doesn’t have an Fn key, try holding down the Control key.
    Choose Apple menu > System Preferences, then click Keyboard.
    Open Keyboard preferences
    Select the “Use all F1, F2, etc. keys as standard function keys” checkbox.

  • Invalide identifier error, when use subselect

    Hi all,
    I got "ORA-0094: sp.spriden_pidm invalid identifier "error when runing the following query.
    select (select t.name from
    (select rownum row_number, s.spriden_last_name name
    from spriden s
    where s.spriden_pidm = sp.spriden_pidm) t
    where t.row_number = 1) last_name
    from spriden sp
    where sp.spriden_pidm = 70105;
    Any one has an idea why this is happening?
    Thanks

    Unless I am missing something here, this looks like a straight pivot query to me.
    SQL> with my_test AS (SELECT 1 id, 'June' contact_name FROM dual UNION ALL
      2                   SELECT 1, 'Email' FROM dual UNION ALL
      3                   SELECT 1, 'Mark' FROM dual UNION ALL
      4                   SELECT 2, 'Tom' FROM dual),
      5       my_test_2 AS (SELECT 1 id, trunc(sysdate) act_date FROM dual UNION ALL
      6                     SELECT 1, trunc(sysdate-1) FROM dual UNION ALL
      7                     SELECT 2, trunc(sysdate-1) FROM dual)
      8  SELECT id, act_date,
      9         MAX(DECODE(rn, 1, contact_name)) nc1,
    10         MAX(DECODE(rn, 2, contact_name)) nc2,
    11         MAX(DECODE(rn, 3, contact_name)) nc3
    12  FROM (SELECT m.id, contact_name, act_date,
    13               ROW_NUMBER() OVER (PARTITION BY m.id
    14                                  ORDER BY contact_name) rn
    15        FROM my_test m, my_test_2 m2
    16        WHERE m.id = m2.id and
    17              m2.act_date = trunc(sysdate-1))
    18  GROUP BY id, act_date;
            ID ACT_DATE    NC1   NC2   NC3
             1 11-Sep-2008 Email June  Mark
             2 11-Sep-2008 TomAssuming that you have a known maximum number of possible values in my_test for a given id this should work. You may need to use something other than the contact_name in the order by in the row_number function if you require the values in specific columns, but given your sample data, I have no idea what that might be.
    John

  • License Key When Using Executable Windows Installer

    Post Author: Robert Flaherty
    CA Forum: Deployment
    When using the executable Windows Installer for installing the Crystal 2008 runtime files on client PC, do you need to enter your license key?  If you leave the field blank, what happens?

    It sounds like the key you are trying to use is for setting up a KMS, not for activating a windows server station.
    If you want to use a KMS, use the following key:
    http://technet.microsoft.com/en-us/library/jj612867.aspx
    Also be sure to create the service record for the KMS in DNS:
    http://technet.microsoft.com/en-us/library/ff793405.aspx

  • Kodo 3.4.1: how to limit # of sql query params when using collection param

    Hi,
    We have a problem when using Kodo 3.4.1 against SQL Server 2005, when we execute query:
              Query query = pm.newQuery( extent, "IdList.contains( this )" );
              query.declareParameters( "Collection IdList" );
              query.declareImports( "import java.util.Collection;" );
              return (List) query.execute( list );
    We got:
    com.microsoft.sqlserver.jdbc.SQLServerException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:354)
    at com.solarmetric.jdbc.PoolConnection$PoolPreparedStatement.executeQuery(PoolConnection.java:341)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:352)
    at com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1106)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:352)
    at kodo.jdbc.runtime.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1730)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:339)
    at kodo.jdbc.sql.Select.execute(Select.java:1581)
    at kodo.jdbc.sql.Select.execute(Select.java:1533)
    at kodo.jdbc.runtime.SelectResultObjectProvider.open(SelectResultObjectProvider.java:102)
    at com.solarmetric.rop.EagerResultList.<init>(EagerResultList.java:22)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:1081)
    at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:836)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:799)
    It seems that there're too many ids in the list, and Kodo didn't limit the # of sql parameters when craft the sql query. Is there a way to ask Kodo to use multiple queries with smaller # of sql parameters instead of using one big sql query?
    Thanks

    Hi,
    Sadly, there is no way to do that in Kodo currently. The closest is the inClauseLimit DBDictionary setting, but that setting just breaks things up into multiple IN statements put together with an OR clause. In your case, it looks like the network transport, not the SQL parser, is complaining about size limits.
    You could force the query to run in-memory, but that would probably be prohibitively slow, unless the data set that you're querying against is relatively small.
    -Patrick

  • Invalid SOAP action when using java ws WebService

    Hi all,
    this is a slightly more detailed error for a problem i posted recently. I am connecting to a web service that was generated from WSDL. It has two methods "HelloWorld" and "HelloSayFirstName". As defined in the WSDL, the methods use the SOAP action document style. I want to add a cookie to the http header, so after the port is created, I use the following to add the header to the requestContext:
              BindingProvider bindingProvider = (BindingProvider) servicePort;
              Map<String, Object> requestContext = bindingProvider.getRequestContext();
              List<String> cookies = new ArrayList<String>();
              cookies.add("mycookie=mytoken");
              HashMap<String, List<String>> httpHeaders = new HashMap<String, List<String>>();
              httpHeaders.put(HTTPConstants.HEADER_COOKIE, cookies);
              requestContext.put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders);
    This works when I call the first method (HelloWorld) - the first activity message sent to the server contains the following:
    <HttpRequest>
    <Method>POST</Method>
    <QueryString></QueryString>
    <WebHeaders>
    <Cache-Control>no-cache</Cache-Control>
    <Connection>keep-alive</Connection>
    <Pragma>no-cache</Pragma>
    <Transfer-Encoding>chunked</Transfer-Encoding>
    <Content-Type>text/xml; charset=UTF-8</Content-Type>
    <Accept>*</Accept>
    <Cookie>mycookie=mytoken</Cookie>
    <Host>exampleHost</Host>
    <User-Agent>Java/1.5.0_14</User-Agent>
    <SOAPAction>"http://tempuri.org/IMyService/HelloWorld"</SOAPAction>
    </WebHeaders>
    </HttpRequest>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://exampleHost/WebServices/WCFService/Service.svc</To>
    <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/IMyService/HelloWorld</Action>
    </s:Header>
    <soap:Body>
    <HelloWorld xmlns="http://tempuri.org/" xmlns:ns2="http://schemas.datacontract.org/2004/07/" xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/">
    <myValue1>world</myValue1>
    </HelloWorld>
    </soap:Body>
    </soap:Envelope>
    However, after this method, the httpHeaders in the requestContext object have been updated to include the "Accept" header and the "SOAPAction" header - which is the incorrect action! Now, when I call the method "HelloSayFirstName" I get the following:
    <HttpRequest>
    <Method>POST</Method>
    <QueryString></QueryString>
    <WebHeaders>
    <Cache-Control>no-cache</Cache-Control>
    <Connection>keep-alive</Connection>
    <Pragma>no-cache</Pragma>
    <Transfer-Encoding>chunked</Transfer-Encoding>
    <Content-Type>text/xml; charset=UTF-8</Content-Type>
    <Accept>*</Accept>
    <Cookie>mycookie=mytoken</Cookie>
    <Host>exampleHost</Host>
    <User-Agent>Java/1.5.0_14</User-Agent>
    <SOAPAction>"http://tempuri.org/IMyService/HelloWorld"</SOAPAction>
    </WebHeaders>
    </HttpRequest>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://exampleHost/WebServices/WCFService/Service.svc</To>
    <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/IMyService/HelloWorld</Action>
    </s:Header>
    <soap:Body>
    <HelloSayFirstName xmlns="http://tempuri.org/" xmlns:ns2="http://schemas.datacontract.org/2004/07/" xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/">
    <dataContractValue></dataContractValue>
    </HelloSayFirstName>
    </soap:Body>
    </soap:Envelope>
    It seems that the SOAPAction in the http header and the soap header is incorrect. Is there any reason why the requestContext would keep hold of the action that was previously called, and not use the new action? I'm stumped here - any help would be greatly appreciated.
    Cheers.

    Does not only happen when using JAX-WS.
    the following servlet code is enough to reproduce the problem :
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("text/xml;charset=\"utf-8\"");
    It only occurs on 10.1.3.4.0 (works fine on 10.1.3.3.0 and 11.1.1.1.0 TP4)
    Regards

  • Why do I get a invalid WEP key when installing my printer?

    Product specific document -
    http://h10025.www1.hp.com/ewfrf/wc/document?lc=en&​cc=us&docname=c00772798&dlc=en
    DaniW
    HP Forum Admin
    --Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"
    This question was solved.
    View Solution.

    This also works (pretty much) with the J6480 printer.  I was using a Linksys wireless 'G' router which creates 4 WEP keys letting you choose which one to use.  I was sending key #2 and it would not accept it.  The only way i could get it to work was to disable wireless security-not my idea of a good option.  After numerious emails and 1 voice call to support with no ideas i decided to look here and finally got it to accept the WEP key.  I ended up uninstalling/reinstalling completely to get everything to work 100% but now it works like a charm.  For those of you with a similar problem, using a router that generates more than 1 WEP key, try using(sending) key #1
    note to HP: your email/voice support should be as good as your on-line forum support
    thanks to DaniW-now I'm a happy camper

  • Handling query errors when using ADO connection in MSAccess

    Hello,
    I'm working on enhancing a data pull from a terrabyte sized Oracle database for use within an MSAccess front end. The current plan is to append and update tables within Oracle using ODBC pass through queries or ADO connection objects, then copy the resulting much smaller data set to Access for further processing.
    Oracle client: 11g
    Access DB: 2010
    Tnsnames.ora in place
    Connection via ADO connection, or DAO/ODBC pass thru queries
    connect string:
    "ODBC;DSN=dbname;UID=username;PWD=password;DBQ=dbname;"
    i have also tried:
    "ODBC;driver={Oracle};DSN=dbname;UID=username;PWD=password;DBQ=dbname;"
    there are two issues i'm facing:
    1) comparing performance with the SQL developer, where for some runs, Access is significantly slower, other times its fine
    2) trapping errors, where it appears that all i get is the query timeout error, rather than a more informative error, such as a key violation.
    in the first instance, creating about 6000 rows in the Oracle table takes about a 2 seconds using the SQL developer, and sometimes about 6 minutes with either ADO or DAO methods of queriing, but then sometimes its nearly as quick (?). Is there any way to figure out how to make the performance equivalent or consistent? This is probably not the forum, but maybe someone could post a link to where people are doing this more often (my google searches are returning spotty results)
    But in addition, it seems like if there is an error in the query, such as a key violation, the query will wait all the way until the timeout value in many cases before returning just the timeout error, which tells me nothing. I need to keep that value pretty high, as sometimes the client will pull a lot more than 6000 records. Its also inconsistent, sometimes i get the key violation in 5-6 minutes, other times its all the way to 10 minutes before the timeout error happens, rather than almost immediatly with SQLdeveloper. is there any way to return error messages more quickly?
    thanks much for the help - I'm going round in circles here.

    Hi,
    I am working on OLAP catalog. I created one cube and 6 Dim. And OEM Console mgs showing this as valid CUbe. When I m trying to create Presentation after selecting my Measure it gives this error:-
    oracle.dss.dataSource.common.QueryRuntimeException: BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.ExpressServerExceptionError class: OLAPI
    Server error descriptions:
    DPR: Unable to execute the query, Generic at TxsOqCursorManager::fetchInitialBlocks
    SEL: Unexpected error occurred. Contact Oracle Support!, Generic at null
    java.lang.CloneNotSupportedException: BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.ExpressServerExceptionError class: OLAPI
    Server error descriptions:
    DPR: Unable to execute the query, Generic at TxsOqCursorManager::fetchInitialBlocks
    SEL: Unexpected error occurred. Contact Oracle Support!, Generic at null
         void oracle.dss.dataSource.common.QueryDataDirector.addDataDirectorListener(oracle.dss.util.DataDirectorListener)
              QueryDataDirector.java:687
         void oracle.dss.dataView.ModelAdapter.setDataDirector(oracle.dss.util.DataDirector)
              ModelAdapter.java:145
         void oracle.dss.crosstab.CrosstabModelAdapter.setDataSource(oracle.dss.util.DataSource)
              CrosstabModelAdapter.java:49
         void oracle.dss.dataView.Dataview.setDataSource(oracle.dss.util.DataSource)
              Dataview.java:386
         void oracle.dss.addins.wizard.presentation.PresentationWizardState.applyQuery()
              PresentationWizardState.java:106
         void oracle.dss.addins.wizard.presentation.PresentationWizardDialog.wizardFinished(oracle.bali.ewt.wizard.WizardEvent)
    It is little urgent.
    JDev version is 9.0.3.3 (Build 1205)
    Business Comp Version 9.0.3.11.50
    OS Win 2000 Proff
    DOwn Loaded BIBean9032 and bibeans90321 patch

Maybe you are looking for

  • Report Generation Toolkit: Table of Contents in MS Word

    Hello forum users, I would like to add a table of contents to a MS Word document, using the Report Generation Toolkit. I couldn't find a VI in the toolkit that does that, so I tried to modify the VI "Word Insert Field.vi". Doing so, I could access a

  • ProRes files act crazy and transcoding to Animation codec gets ugly

    So, allegedly, the Animation codec is lossless. However, when I take something encoded with Apple ProRes 422 HQ and transcode to Animation within the Quicktime Pro software, I see noticeable differences. Including: color change and increased aliasing

  • Need Major Help! Powerbook G4. PLEASE HELP

    I have a Powerbook G4 running OS X 10.5.8 and for some reason I can't get it to lanch apps or anything. The finder got corrupted and I've tried everything to get to disk utility but I can't. I tried safe mode. So I figured I might just make a partiti

  • How to configure, push and test Idoc from XI to R/3

    Assuming mapping between imported Idoc and some file structure is fine ,I have to configure XI and R/3 for pushing Idocs from Xi to r/3. I have to make sure they talk. -I have done this long time ago for pushing Idocs from R/3 to XI but I wonder if i

  • System is generating PR

    Dear Guru's, I have done all the settings with respect to generate schedule lines as a result of MRP Run for a material but system is generating PR instead of schedule lines. Data Maintained as followings: 1) Scheduling Agreement(Released) 2) Vendor