Named queries vs. named queries

Kodo 3's named query support is vastly different than the named-query
support that's being discussed for JDO 2. Should we think about renaming
our named query concept to address the confusion early rather than once we
provide support for metadata-based named queries?
-Patrick
Patrick Linskey
SolarMetric Inc.

Oops, ignore this post. I posted to the wrong newsgroup.
-Patrick
On Thu, 16 Oct 2003 12:38:25 -0400, Patrick Linskey wrote:
Kodo 3's named query support is vastly different than the named-query
support that's being discussed for JDO 2. Should we think about renaming
our named query concept to address the confusion early rather than once we
provide support for metadata-based named queries?
-Patrick--
Patrick Linskey
SolarMetric Inc.

Similar Messages

  • Deployment error - Errors in named queries in weblogic 10

    Hi, All.
    I got the error message when I tried to deploy my webapp to weblogic 10 & 10.1(10M1).
    Stacktrace:
    <May 19, 2008 11:51:14 AM EDT> <Error> <Console> <BEA-240003> <Console encounter
    ed the following error weblogic.application.ModuleException:
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:314)
    at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedM
    oduleDriver.java:176)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
    leListenerInvoker.java:93)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
    oymentCallbackFlow.java:360)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:26)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
    loymentCallbackFlow.java:56)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
    loymentCallbackFlow.java:46)
    at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja
    va:615)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:26)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j
    ava:191)
    at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme
    ntStateChecker.java:147)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App
    ContainerInvoker.java:61)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr
    eateAndPrepareContainer(ActivateOperation.java:189)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do
    Prepare(ActivateOperation.java:87)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr
    epare(AbstractOperation.java:217)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym
    entPrepare(DeploymentManager.java:719)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy
    mentList(DeploymentManager.java:1186)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare
    (DeploymentManager.java:248)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre
    pare(DeploymentServiceDispatcher.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
    ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
    ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
    ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
    gWorkManagerImpl.java:464)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Caused by: java.lang.Throwable: Substituted for missing class org.hibernate.Hibe
    rnateException - Errors in named queries: SpotType.findById, Spot.findByTopic, T
    argetAudience.findById, SpotOrder.findById, SpotAuditDetails.findById, ProjectOf
    ficer.findById, SpotOrderAvailable.findById, ProjectOfficer.findByStatus, SpotOr
    derTopic.findById, Topic.findById, findAllSpots, SpotOrderDetails.findById, find
    AllCategory, SME.findById, SpotAudit.findById, ContactInfo.findById, SpotCategor
    y.findById, SpotOrderTopicSpot.findById, ProjectTopic.findById, NetworkType.find
    ById, Source.findById, NetworkType.findByStatus, RecordStatus.findById, SpotType
    .findByStatus, findAllClient, Spot.findByTitle, findAllRecordStatus, SMETopicCom
    ments.findById, ContractInfo.findById, Channel.findById, Client.findById, findAl
    lSource, SMETopic.findById, Project.findById, SpotComments.findById, SpotOrderCo
    mments.findById, ContactInfoComments.findById, Spot.findById
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:
    365)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
    a:1300)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(Annotat
    ionConfiguration.java:859)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Con
    figuration.java:669)
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFa
    ctory(HibernatePersistence.java:132)
    at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactor
    y(PersistenceUnitInfoImpl.java:264)
    at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInf
    oImpl.java:110)
    at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(
    AbstractPersistenceUnitRegistry.java:316)
    at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDe
    scriptors(AbstractPersistenceUnitRegistry.java:96)
    at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersis
    tenceUnitRegistry.java:53)
    at weblogic.servlet.internal.WebAppModule.initPURegistry(WebAppModule.ja
    va:1151)
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:304)
    >
    I included named queries on orm.xml file and also in each entities using annotations like following.
    orm.xml>
    <?xml version="1.0" encoding="UTF-8"?>
    <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
         version="1.0">
         <!-- WE PLACE LARGER AND JOIN QUERIES STATEMENTS HERE -->
         <named-query name="findAllClient">
    <query><![CDATA[SELECT e FROM Client e ORDER BY e.clientName]]></query>
    </named-query>
    <named-query name="findAllSource">
    <query><![CDATA[SELECT e FROM Source e ORDER BY e.sourceDesc]]></query>
    </named-query>
    <named-query name="findAllCategory">
    <query><![CDATA[SELECT e FROM SpotCategory e ORDER BY e.spotCategoryDesc]]></query>
    </named-query>
    <named-query name="findAllRecordStatus">
    <query><![CDATA[SELECT e FROM RecordStatus e ORDER BY e.id]]></query>
    </named-query>
    <named-query name="findAllSpots">
    <query><![CDATA[SELECT e FROM Spot e ORDER BY e.id]]></query>
    </named-query>
    </entity-mappings>
    entity example:
    @Entity
    @Table(name = "SPOTTYPE")
    @NamedQueries( { @NamedQuery(name = "SpotType.findById", query = "SELECT e FROM SpotType e WHERE e.id = :id"),
         @NamedQuery(name = "SpotType.findByStatus", query = "SELECT e FROM SpotType e WHERE e.recordStatus.id = :status") })
    public class SpotType implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(generator = "spotTypeSeq")
    @SequenceGenerator(name = "spotTypeSeq", sequenceName = "SEQ_SPOTTYPE", allocationSize = 1)
    @Column(name = "SPOTTYPEID", nullable = false, length = 2)
    private Long id;
    @Column(name = "SPOTTYPESHRTNM", nullable = false, length = 2)
    private String spotTypeShortName;
    @Column(name = "SPOTTYPELONGNM", nullable = false, length = 35)
    everything works until I clicked the activate the change button. I tried to override libs by putting libs I'm using in my domain, still I have the same error message.
    Libs that I have:
    Name 5 Size Type Date Modified
    antlr-2.7.6.jar 434 KB ALZip jar File 2/13/2008 5:28 PM
    asm.jar 26 KB ALZip jar File 2/13/2008 5:28 PM
    asm-attrs.jar 17 KB ALZip jar File 3/17/2005 4:05 PM
    cglib-2.1.3.jar 276 KB ALZip jar File 2/13/2008 5:28 PM
    commons-beanutils-1.7.0.jar 185 KB ALZip jar File 12/15/2007 7:12 PM
    commons-codec-1.3.jar 46 KB ALZip jar File 12/15/2007 7:12 PM
    commons-collections-3.1.jar 547 KB ALZip jar File 4/24/2008 10:28 AM
    commons-digester-1.8.jar 141 KB ALZip jar File 12/15/2007 7:13 PM
    commons-discovery-0.4.jar 75 KB ALZip jar File 12/15/2007 9:08 PM
    commons-el-1.0.jar 110 KB ALZip jar File 5/15/2008 1:11 PM
    commons-logging-1.0.4.jar 38 KB ALZip jar File 7/4/2004 4:49 AM
    dom4j-1.6.1.jar 307 KB ALZip jar File 2/13/2008 5:28 PM
    ehcache-1.2.jar 116 KB ALZip jar File 2/13/2008 5:28 PM
    ejb3-persistence.jar 52 KB ALZip jar File 3/14/2008 4:45 PM
    hibernate3.jar 2,222 KB ALZip jar File 2/6/2008 9:31 PM
    hibernate-annotations.jar 274 KB ALZip jar File 3/14/2008 4:44 PM
    hibernate-commons-annotatio... 65 KB ALZip jar File 3/14/2008 4:45 PM
    hibernate-entitymanager.jar 116 KB ALZip jar File 3/14/2008 8:07 PM
    jaas.jar 102 KB ALZip jar File 6/3/2004 11:31 AM
    javassist.jar 449 KB ALZip jar File 2/13/2008 5:28 PM
    jaxen-1.1-beta-7.jar 222 KB ALZip jar File 8/16/2005 2:04 PM
    jboss-archive-browsing.jar 13 KB ALZip jar File 2/13/2008 5:28 PM
    jhighlight-1.0.jar 92 KB ALZip jar File 12/20/2007 4:51 PM
    jsf-facelets.jar 294 KB ALZip jar File 9/27/2007 12:20 PM
    jstl-1.2.jar 405 KB ALZip jar File 5/15/2008 1:12 PM
    jta.jar 9 KB ALZip jar File 6/3/2004 11:31 AM
    junit-4.4.jar 158 KB ALZip jar File 5/15/2008 1:12 PM
    log4j-1.2.11.jar 343 KB ALZip jar File 8/13/2005 3:28 PM
    myfaces-api-1.2.2.jar 319 KB ALZip jar File 1/22/2008 3:40 PM
    myfaces-impl-1.2.2.jar 739 KB ALZip jar File 1/22/2008 3:40 PM
    nekohtml-0.9.5.jar 104 KB ALZip jar File 12/20/2007 4:42 PM
    ojdbc14.jar 1,322 KB ALZip jar File 2/13/2008 5:30 PM
    readme.txt 1 KB Text Document 5/15/2008 3:58 PM
    richfaces-api-3.2.0.GA.jar 150 KB ALZip jar File 3/31/2008 4:23 PM
    richfaces-impl-3.2.0.GA.jar 1,372 KB ALZip jar File 3/31/2008 4:23 PM
    richfaces-ui-3.2.0.GA.jar 2,215 KB ALZip jar File 3/31/2008 4:50 PM
    spring.jar 2,604 KB ALZip jar File 5/15/2008 1:12 PM
    xerces-2.6.2.jar 988 KB ALZip jar File 12/19/2004 6:14 PM
    xml-apis.jar 121 KB ALZip jar File 6/3/2004 11:31 AM
    This can be deployed to tomcat 6 without any problems.
    Thank you in advance for reading and your help.
    Edited by gzson at 05/19/2008 9:07 AM

    Follow the below link:
    http://www.hibernate.org/250.html#A25

  • Named SQL queries without a descriptor in the workbench

    Hi,
    I want to call some named query SQLs from my DAO by using
    result = (ResultSet)Session. executeQuery(String queryName, Vector paramList);
    The way I have done it now in the mapping workbench I have defined all named queries and SQL with a class descriptor, even though that class doean't have any mappings. I couldn't find any other way of defining named query SQLs in mapping workbench, other than attaching to a class descriptor. But I think because I'm using this API of calling executeQuery instead of getting the domain class too..I'm running into the following exception -
    Exception [TOPLINK-6026] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.QueryException
    Exception Description: Query named [FIND_MUTUAL_FUND_SINGLE_SYMBOL] 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)
    What is the proper way of defining a named query with our a descriptor in the workbench, so that I can use above mentioned API from my DAO? Any where in the doc? Is it Session events?
    Any sort of sample example would be deeply appreciated.

    To execute a named query for a paticular class/descriptor you need to call the Session.executeQuery(String queryName, Class descriptorClass, ...) API. The API that does not take a class is only for session-level named queries.
    i.e.
    List employees = (List) session.executeQuery("findAll", Employee.class);
    Currently the Mapping Workbench does not support defining session-level queries, so if you wish to define queries not related to any descriptor, you need to define these through code (if you are using a sessions.xml to define your session, you can add the queries through a SessionCustomizer (10.1.3), or use a SessionEventListener and the preLogin event (9.0.4)).
    You can execute named queries on any Session class (ClientSession, UnitOfWork, DatabaseSession, SessionBroker). But you need to define the queries in the ServerSession or DatabaseSession before login.
    i.e.
    ReadAllQuery query = new ReadAllQuery(Employee.class);
    serverSession.addQuery("findAllEmployees", query);
    List employees = (List) clientSession.executeQuery("findAllEmployees");

  • Named Queries and Finders

    Hi, I would like to know if is there a way (in JDev 10.1.3 or in standalone TopLink Workbench) to generate, during mapping, automatic Named Queries that are finders for the table. In example if I have a table with id, name, surname I would like to have in automatic the Named Queries getById(Long id), getByName(String name), getBySurname(String surname). On I project we used Firestorm DAO, which generate automatically these methods, that are quite useful.
    Thanks in advance,
    Stefano E.

    If you are using TopLink 10.1.3 CMP2 in OC4J 10.1.3 then the CMP runtime will automatically define finders for any finder of the format, "findBy<field>" where <field> is the name of a bean cmf. You do not need to define these finders in the Mapping Workbench nor deployment XML.
    You can use the Mapping Workbench do define these finders as well, but there is nothing in the Mapping Workbench that allows automatic generation of these finders.

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • Named Parameters in Queries - the spec vs the Java EE 5 Tutorial

    Hi,
    I've been studying the topic about the named parameters in JPA and found one inconsistency between the spec and the Java EE 5 Tutorial. Could anyone lend me a helping hand understanding it?
    The Java Persistence API spec (ejb-3_0-fr-spec-persistence.pdf) 3.6.3 "Named Parameters" at page 69 reads:
    The use of named parameters applies to the Java Persistence query language, and is not defined for native queries.
    whereas the Java EE 5 Tutorial in the section Named Parameters in Queries (http://java.sun.com/javaee/5/docs/tutorial/doc/PersistenceIntro3.html#wp81563) of The EntityManager reads:
    Named parameters are case-sensitive, and may be used by both dynamic and static queries.
    I think that the reality is that every JPA provider supports named parameters in dynamic and static queries, but it's not fully supported by the spec (yet not forbidden).
    Jacek
    Jacek Laskowski
    http://www.jaceklaskowski.pl

    Hi Jacek,
    These are not conflicting statements. Named parameters apply to the Java Persistence
    Query language only, not to native queries. There are two ways to specifiy
    Java Persistence Query Language queries : dynamically and statically. You can
    either pre-define the query string using @NamedQuery
    static :
    @NamedQuery(name="findPersonByName",
    query="SELECT OBJECT(p) FROM Person p WHERE p.name LIKE :pName")
    OR, pass the query string in at runtime using EntityManger.createQuery
    dynamic :
    em.createQuery("SELECT OBJECT(p) FROM Person p WHERE p.name LIKE :pName")
    The dynamic approach allows you to construct portions of the query string at runtime.
    My example doesn't do that but the point is that use of the createQuery()
    API is considered the dynamic approach.
    The crux of the Java EE 5 Tutorial statement you referenced is that named parameters apply to
    both the static and dynamic use of Java Persistence Query Language queries.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • OAS 10G WAR file deployment error (Errors in named queries)

    Hi again,
    I setup a 10G 10.1.3.1 Application Server and tried deploying my WAR file. In tomcat the WAR file deployment works fine. however in OAS I get this error and currently I'm clueless as to what causes the error.
    [Oct 24, 2007 6:03:37 PM] Operation failed with error: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.HibernateException: Errors in named queries: Book_List_By_RegisterDate ... (other named queries)
    My ApplicationContext.xml file contains this
    <bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="persistenceUnitManager" ref="persistenceUnitManager" />
    <property name="persistenceUnitName" value="BookStudy" />
    <property name="dataSource" ref="dataSource" />
    <property name="jpaVendorAdapter">
    <bean
    class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
    <property name="database" value="ORACLE" />
    <property name="showSql" value="true" />
    </bean>
    </property>
    </bean>
    And a sample named query in the hbm.xml file is this
    <query name="Book_List_By_RegisterDate">
              from BookData
              where to_char(regdate, 'MM/dd/yyyy') = to_char(:regdate, 'MM/dd/yyyy')
              order by Author.author_name desc, bookname desc
    </query>
    Thanks,

    Uncomment, or add, the following line in your application's orion-web.xml file:
    <web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true" />
    See njr28's comments @ http://forum.hibernate.org/viewtopic.php?t=951324&highlight=oc4j

  • Migrating to SAP Web AS - HibernateException: Errors in named queries

    Hi folks!
    We are migrating our web application to SAP Web AS (Netweaver CE SR5) but we are having some problems with hibernate: org.hibernate.HibernateException: Errors in named queries (see the stack below).
    It´s important to point out that this same application runs fine in Tomcat 5.5
    I followed the instructions in the following weblog but the problem continues:
    I also have read the following posts:
    I don´t know if our application-service.xml file is correctly configured (I used an example found in the SDN) so I will paste it below:
    (SessionFactoryImpl.java:364)
         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
         at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:816)
         at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:734)
         at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1333)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1299)
         ... 159 more

    Hi all!
    I´ve found the problem in my case.
    As stated in the links below, the application.xml version should refer to the Java 1.5:
    (look for the Vladimir Pavlov´s post on Jun 2, 2007 6:01 PM in the second page)
    In my case, I was using the Java 1.3 version.
    Now the problem is not happening anymore.
    My application.xml now looks as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    Regards.
    Ballock.

  • Named Queries

    Hi All,
    I am using TL 4.6 Build 418, Oracle 8.1 & WLS 7.0.
    I am having a hard time getting Named Queries working. Specifically I can't seem to get Toplink to Bind my parameter(s). I have tried to use both EJBQL and plain SQL with no luck using either. The error I get when I use SQL is that from Oracle or JDBC that not all parameters are bound, when I change the stmt to be EJBQL then I get a null where the bound parameter should go. The stmt is super simple.
    EJBQL = SELECT OBJECT(sysuser) FROM SystemUser sysuser WHERE sysuser.username = ?1
    or as
    SQL = SELECT * FROM SystemUser WHERE username = ?1
    For a test I took the mapping work bench code that is generated into java source and pasted it into a test servlet below.
    ReadObjectQuery namedQuery0 = new ReadObjectQuery(com.aravo.security.biz.usermgmt.SystemUser.class);
    namedQuery0.setEJBQLString("SELECT OBJECT(sysuser) FROM SystemUser sysuser WHERE sysuser.username = ?1");
    namedQuery0.setName("getSystemUserwithUserName");
    namedQuery0.setCascadePolicy(1);
    namedQuery0.setQueryTimeout(0);
    namedQuery0.setShouldUseWrapperPolicy(false);
    namedQuery0.setShouldBindAllParameters(true);
    namedQuery0.setShouldCacheStatement(false);
    namedQuery0.setSessionName("security");
    namedQuery0.setShouldMaintainCache(true);
    namedQuery0.setShouldRefreshIdentityMapResult(false);
    namedQuery0.setLockMode((short)0);
    namedQuery0.addArgument("uname", java.lang.String.class);
    clientSession.addQuery("getSystemUserwithUserName", namedQuery0);
    Vector theArgs = new Vector() ;
    theArgs.addElement("[email protected]") ;
    SystemUser su = (SystemUser) clientSession.executeQuery("getSystemUserwithUserName",theArgs) ;
    What I then see is the following in the console. Any ideas why NULL is there instead of [email protected]?
    SELECT PASSWORD, USERNAME, SYSTEMUSERID FROM SYSTEMUSER WHERE (USERNAME = ?)
    bind => [null]
    Thanks,
    Jerry

    It looks like you have a small error in your setup.
    Is see your EJBQL =
    namedQuery0.setEJBQLString("SELECT OBJECT(sysuser) FROM SystemUser sysuser WHERE sysuser.username = ?1");
    But then you pass the argument =
    namedQuery0.addArgument("uname", java.lang.String.class);
    It should be =
    namedQuery0.addArgument("1", java.lang.String.class);
    In other words, the name of the argument from the argument list should be the same as the one in the EJBQL.

  • SetAdditionalJoinExpression and Named Queries...

    Hi, is it possible to use DescriptorQueryManager.setAdditionalJoinExpression() to append additional filters to sql statement named queries?
    I've tried this but it doesn't seem to have any effect. If this is not possible, do you know of any alternative methods?
    Thanks for you help!
    -Tim Watson

    Yes, if you set the DescriptorQueryManager additionalJoinExpression the expression will be anded will all queries for that descriptor.
    Ensure that you set the additionalJoinExpression before you login.

  • Named Queries and QueryByExample

    Folks,
    Is it possible to register a named query w/ a descriptors QueryManager AND perform QueryByExample queries?
    If so, can you post an example of UnitOfWork call?

    No, named queries are static, they have a fixed selection criteria and number of parameters. Query by example is dynamic.

  • Implement a technical naming convention for queries depending on user

    Hello,
    I'd like to implement a technical naming convention for queries depending on the user, because I want to make sure that the users are taking care of the naming conventions.
    For example a user defines a query and would like to save this query.
    During the save process he should only have the possibility to save the query with the name C_Name-of-Infoprovider_Text.
    The C should be unchageable for the user.
    The Name-of-Infoprovider should set automatically (if possible).
    The Text could be defined by the user.
    Another user would have this naming convention: X_Name-of-Infoprovider_Text
    Is there a possibility to implement such a function? (or just a part of this)
    Thank you.

    Thank you for your answer!
    Your answer helped me to implement a part of the naming conventions.
    Maybe some as an idea to implement the rest of the naming convention.
    --> Technical query name depending on technical name of the InfoProvider.
    Has anyone an idea?

  • Forcing naming convention for queries and views

    Hello Friends,
    Can anyone tell me how to Force user to save queries with starting letter 'Q' and all views with 'V'.
    I know how to restrict queries ..
    Please tell me how to Froce Views to save with first letter 'V'.
    Thanks,
    Ram

    you need these values in your role to restrict them save queries with starting letter 'Q' and all views with 'V'.
    S_RS_COMP
             RSZCOMPID-Q*
             RSZCOMPTP - REP
    S_RS_COMP
             RSZCOMPID-V*
             RSZCOMPTP - QVW
    S_RS_COMP1
             RSZCOMPID-Q, V
             RSZCOMPTP - REP,QVW
    and as you know activity will be 01 for giving create ability, don't forget to restrict on infocube and infoarea. one thing you have to rethink is why you want to use Q, V as a starting letter, I would prefer Y,Z.
    and lot of companies do restrict for different naming conventions on different infoarea/infoprovider. just a casual suggestion, it will be better for your company in future, if you restrict the reporting component's naming conventions more specific. something like Zinfoprovider name_reporting component_*.
    regards
    Message was edited by:
            Keerti Vemulapalli

  • Naming standards for BW queries

    where could i get the naming standards for BW queries? Can somebody email me at singhpra(at)yahoo.com. thank you.

    Hi Prakash,
    in our company we use the following convention:
    <Project_ID>_<CUBE>_Q<authorization>N
    The Project ID is a 2-digit code for the project, the cube consists of 5 digits. After the Q there's one letter for special authorization purposes, N is a 2-digit-number starting at 01.
    Example: P1_STMX1_QA01
    This works fine for all our cases.
    Greetings,
    Daniel

  • New query naming convention for Queries in Prod (Y-queries)

    Hi,
    We are trying to implement a new naming convention for ad-hoc queries in production.  Currently we do not allow queries to be created in Production. Users would like to create Y-queries in production.  Using security we can allow users to create Y-queries, without being able to create or change Z-queries (z's are official queries). 
    Can we also allow users to create Y-Calculated or restricted key figures?  Is there anything else we need to be aware of?
    Thanks,
    Mike

    Hi Mike,
    When we create Y queries in production, we have trouble using Z calculated key figures in those queries.  When we try to save the Y query (containing Z calculated key figures) we receive an error "The query could not be saved due to a problem in the transport".  I believe it is due to the fact that our Z calculated key figures are transported.  To work around this, we recreate the calculated key figure and save it as a Y key figure and then save the query.  Not sure if this will happen to you as well, but it may be worth testing to determine if you will need to grant access for your users to create calculated key figures.
    Regards,
    Charla

Maybe you are looking for

  • Can't see printer name in the print dialog box as the printer name is too long

    This is actually causing siginificant pain as I am using a tablet and moving around a number of floors/buildings needing to be able to print from where I am. When printing from Acrobat reader, the print dialog box that comes up does not have a horizo

  • Acrobat 8 Pro - Toolbar Problem

    Hi, 2 days ago I bought a new Dell T5400 precision workstation.  I am using XP Pro SP3. No anti-virus software yet. After installing everything (Office, Quark, PageMaker, CS3) I launched Acrobat and all seemed well until I used the cropping tool. At

  • The column name "PERNR" has two meanings. ABAP/4 Open SQL statement.

    Hi All, Could anyone advise on what are the error I encountered at below code. I get the error in " The column name "PERNR" has two meanings. ABAP/4 Open SQL statement." . This errors happen to all the key fields I have selected in below code (eg: pe

  • Data types and Data object

    Can Any one give me Clear definition of Data type and Data objects. Concept i know clearly.. but unable to explain it.. Regards, Prasanna

  • Acess some website

    Hi I have just brought a N6700 and when i go online to access some chat sites, it won't let me access it.  A message pop up and said "Unsupported Content Type"  These site i'm going on are not dodgy sites, just normal chat site.  My previous phone (d