Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/01/2016, 15:20
sbcuervo
 
Fecha de Ingreso: diciembre-2009
Mensajes: 31
Antigüedad: 15 años, 1 mes
Puntos: 0
Respuesta: Me ayudais en este codigo?

me da varios errores y termina la ejecucion, estos son los errores que me da:
Código Java:
Ver original
  1. ene 26, 2016 10:17:41 PM org.hibernate.hql.internal.QueryTranslatorFactoryInitiator initiateService
  2. INFO: HHH000397: Using ASTQueryTranslatorFactory
  3. ene 26, 2016 10:17:42 PM org.hibernate.hql.internal.ast.ErrorCounter reportError
  4. ERROR: line 1:32: unexpected token: idCategoria
  5. ene 26, 2016 10:17:42 PM org.hibernate.hql.internal.ast.ErrorCounter reportError
  6. ERROR: line 1:32: unexpected token: idCategoria
  7. line 1:32: unexpected token: idCategoria
  8.     at org.hibernate.hql.internal.antlr.HqlBaseParser.primaryExpression(HqlBaseParser.java:998)
  9.     at org.hibernate.hql.internal.antlr.HqlBaseParser.atom(HqlBaseParser.java:3530)
  10.     at org.hibernate.hql.internal.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:3383)
  11.     at org.hibernate.hql.internal.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:3255)
  12.     at org.hibernate.hql.internal.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2912)
  13.     at org.hibernate.hql.internal.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:597)
  14.     at org.hibernate.hql.internal.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2679)
  15.     at org.hibernate.hql.internal.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2540)
  16.     at org.hibernate.hql.internal.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2504)
  17.     at org.hibernate.hql.internal.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:2420)
  18.     at org.hibernate.hql.internal.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:2385)
  19.     at org.hibernate.hql.internal.antlr.HqlBaseParser.expression(HqlBaseParser.java:2098)
  20.     at org.hibernate.hql.internal.antlr.HqlBaseParser.logicalExpression(HqlBaseParser.java:1876)
  21.     at org.hibernate.hql.internal.antlr.HqlBaseParser.whereClause(HqlBaseParser.java:481)
  22.     at org.hibernate.hql.internal.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:736)
  23.     at org.hibernate.hql.internal.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:323)
  24.     at org.hibernate.hql.internal.antlr.HqlBaseParser.statement(HqlBaseParser.java:186)
  25.     at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:279)
  26.     at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:187)
  27.     at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142)
  28.     at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115)
  29.     at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:76)
  30.     at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:150)
  31.     at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:302)
  32.     at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:240)
  33.     at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1894)
  34.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  35.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  36.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  37.     at java.lang.reflect.Method.invoke(Unknown Source)
  38.     at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:338)
  39.     at com.sun.proxy.$Proxy22.createQuery(Unknown Source)
  40.     at daoImp.SubcategoriasDAOImp.filterSubcategoriasByCategoria(SubcategoriasDAOImp.java:88)
  41.     at tests.testSubcategorias.menu(testSubcategorias.java:58)
  42.     at tests.testSubcategorias.main(testSubcategorias.java:67)
  43.  
  44. error al listar unexpected token: idCategoria near line 1, column 32 [from pojos.Subcategorias where idCategoria:=buscar]
  45. Exception in thread "main" java.lang.NullPointerException
  46.     at tests.testSubcategorias.menu(testSubcategorias.java:58)
  47.     at tests.testSubcategorias.main(testSubcategorias.java:67)