Hi there,
I am working with toplink essentials for almost 2 weeks now, just basics, plain tables only, no advanced stuff.
I wanted to create a NamedQuery which returns a resultList with rows between two dates.
It throws the following exception and I don't know whats wrong:
[i][TopLink Info]: 2007.10.10 10:11:34.432--ServerSession(28027784)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b03-fcs (10/03/2007))
Exception in thread "main" Local Exception Stack:
Exception [TOPLINK-8034] (Oracle TopLink Essentials - 2.0.1 (Build b03-fcs (10/03/2007))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: Error compiling the query [mrp.getByDate: SELECT o FROM t_umgrevision o WHERE o.time_stamp BETWEEN :dateStart AND :dateEnd]. Unknown abstract schema type [t_umgrevision].
at oracle.toplink.essentials.exceptions.EJBQLException.unknownAbstractSchemaType(EJBQLException.java:494)
at oracle.toplink.essentials.internal.parsing.ParseTreeContext.classForSchemaName(ParseTreeContext.java:163)
at oracle.toplink.essentials.internal.parsing.SelectNode.getClassOfFirstVariable(SelectNode.java:366)
at oracle.toplink.essentials.internal.parsing.SelectNode.getReferenceClass(SelectNode.java:354)
at oracle.toplink.essentials.internal.parsing.ParseTree.getReferenceClass(ParseTree.java:463)
at oracle.toplink.essentials.internal.parsing.ParseTree.adjustReferenceClassForQuery(ParseTree.java:103)
at oracle.toplink.essentials.internal.parsing.EJBQLParseTree.populateReadQueryInternal(EJBQLParseTree.java:127)
at oracle.toplink.essentials.internal.parsing.EJBQLParseTree.populateQuery(EJBQLParseTree.java:108)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:219)
at oracle.toplink.essentials.queryframework.EJBQLPlaceHolderQuery.processEjbQLQuery(EJBQLPlaceHolderQuery.java:111)
at oracle.toplink.essentials.internal.sessions.AbstractSession.processEJBQLQueries(AbstractSession.java:2059)
at oracle.toplink.essentials.internal.sessions.AbstractSession.processEJBQLQueries(AbstractSession.java:2046)
at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:724)
at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:604)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
at MailRevisionTest.getResult(MailRevisionTest.java:20)
at MailRevisionTest.main(MailRevisionTest.java:14)[/i]
A similar class and persistence class works fine, but without a NamedQuery... I've tried the milestone build of toplink essentials and also the promoted build... JDK is 1.5.0.11, OS is Ubuntu Feisty Fawn...
I've detached my test classes from the project and attached them to this post, hope someone will give a hint... Due to the limit of 2 files my persistence.xml is not attached, but I'm sure this file is well configured.
Thanks in advance.
[Message sent by forum member 'saschaf' (saschaf)]
http://forums.java.net/jive/thread.jspa?messageID=239258