[size=7]Boa tarde, Pessoal !
sou novo no desenvolvimento Java e estou fazendo uma pequena aplicação, ao criar um novo evento para chamar outro Form esta dando o seguinte erro:
run:
[TopLink Info]: 2010.01.11 04:50:04.969–ServerSession(511811991)–TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
[TopLink Info]: 2010.01.11 04:50:05.466–ServerSession(511811991)–file:/C:/Desenvolvimento/Netbeans/siscom/build/classes/-siscomjavaPU login successful
Exception in thread “AWT-EventQueue-0” java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:209)
at br.com.siscom.view.CartaoView.initComponents(CartaoView.java:46)
at br.com.siscom.view.CartaoView.(CartaoView.java:29)
at br.com.siscom.view.CartaoView$1.run(CartaoView.java:272)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: Exception [TOPLINK-8034] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: Error compiling the query [SELECT c FROM Cartao c]. Unknown abstract schema type [Cartao].
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.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:189)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:153)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.(EJBQueryImpl.java:114)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.(EJBQueryImpl.java:99)
at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.(EJBQueryImpl.java:86)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:204)
… 11 more
Fiz esta alteração em Inspetor Query, coloquei da seguinte forma e também não funcionou:
SELECT c.COD_CARTAO,c.NOME_CARTAO, c.TAXA_CARTAO FROM Cartao c
SELECT COD_CARTAO,NOME_CARTAO,TAXA_CARTAO FROM Cartao
select cod_cartao, nome_cartao, taxa_cartao from cartao
Nenhum destes esta funcionado
Esta dando o seguinte erro no ultimo:
run:
[TopLink Info]: 2010.01.11 09:27:20.422–ServerSession(176065613)–TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
[TopLink Info]: 2010.01.11 09:27:20.927–ServerSession(176065613)–file:/C:/Desenvolvimento/Netbeans/siscom/build/classes/-siscomjavaPU login successful
Exception in thread “AWT-EventQueue-0” java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:209)
at br.com.siscom.view.CartaoView.initComponents(CartaoView.java:46)
at br.com.siscom.view.CartaoView.(CartaoView.java:29)
at br.com.siscom.view.CartaoView$1.run(CartaoView.java:272)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: Exception [TOPLINK-8028] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: Syntax error parsing the query [select cod_cartao, nome_cartao, taxa_cartao from cartao], line 1, column 56: unexpected end of query.
Internal Exception: line 1:56: unexpected token: null
at oracle.toplink.essentials.exceptions.EJBQLException.unexpectedEOF(EJBQLException.java:419)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.handleANTLRException(EJBQLParser.java:346)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.addError(EJBQLParser.java:278)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.reportError(EJBQLParser.java:378)
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.rangeVariableDeclaration(EJBQLParser.java:1742)
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.identificationVariableDeclaration(EJBQLParser.java:1621)
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.fromClause(EJBQLParser.java:454)
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.selectStatement(EJBQLParser.java:179)
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.document(EJBQLParser.java:135)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.parse(EJBQLParser.java:166)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParseTree(EJBQLParser.java:127)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:215)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:189)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:153)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.(EJBQueryImpl.java:114)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.(EJBQueryImpl.java:99)
at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.(EJBQueryImpl.java:86)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:204)
… 11 more
Caused by: line 1:56: unexpected token: null
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.rangeVariableDeclaration(EJBQLParser.java:1727)
… 24 more
CONSTRUÍDO COM SUCESSO (tempo total: 32 segundos)