-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Problem with Hibernate mapping and Oracle DB
PostPosted: Mon Sep 11, 2006 3:13 pm 
Newbie

Joined: Wed Sep 06, 2006 10:06 am
Posts: 11
Location: Lisbon, Portugal
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: hibernate 3.2.0.cr2

Mapping documents:Annotations



The code bellow belongs a method of my session bean:
Code:
   public List findAll(int pages) {
      log.debug("getting all TInscri instances");
      try {
         Query qry = entityManager.createQuery("from TAvaluno ta");
         qry.setMaxResults(100);
         qry.setFirstResult(pages*100);
         List res = qry.getResultList();
         log.debug("get successful");
         return res;
      } catch (RuntimeException re) {
         log.error("get failed", re);
         throw re;
      }
   }


This code returns the following stack trace everytime i try to execute it because of a bad mapping. It seems to me that he is trying to map the column tavaluno0_.CD_LECTIVO as CD3_25_ as a Short but it is a String in the entity and it's a VARCHAR2(2) in the Database.

I mapped my DB using the eclipse tools.

Is this a bug ?


Full stack trace of any exception that occurs:
2006-09-11 19:55:37,161 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select tavaluno0_.CD_CURSO as CD1_25_, tavaluno0_.CD_ALUNO as CD2_25_, tavaluno0_.CD_LECTIVO as CD3_25_, tavaluno0_.CD_DISCIP as CD4_25_, tavaluno0_.CD_DURACAO as CD5_25_, tavaluno0_.CD_GRU_AVA as CD6_25_, tavaluno0_.CD_AVALIA as CD7_25_, tavaluno0_.CD_LIVRO as CD8_25_, tavaluno0_.PROTEGIDO as PROTEGIDO25_, tavaluno0_.REGISTER_ID as REGISTER10_25_, tavaluno0_.DT_AVALIA as DT11_25_, tavaluno0_.NR_AVALIA as NR12_25_, tavaluno0_.CD_STA_EPO as CD13_25_, tavaluno0_.CD_FINAL as CD14_25_, tavaluno0_.CD_LOCAL as CD15_25_, tavaluno0_.NIA as NIA25_, tavaluno0_.NR_PONDERA as NR17_25_, tavaluno0_.SQ_AVALIA as SQ18_25_, tavaluno0_.CD_QUAL_AVA as CD19_25_ from CSE.T_AVALUNO tavaluno0_]
java.sql.SQLException: Excesso de Dados Numéricos
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleStatement.getShortValue(OracleStatement.java:4420)
at oracle.jdbc.driver.OracleResultSetImpl.getShort(OracleResultSetImpl.java:517)
at oracle.jdbc.driver.OracleResultSet.getShort(OracleResultSet.java:1517)
at org.jboss.resource.adapter.jdbc.WrappedResultSet.getShort(WrappedResultSet.java:846)
at org.hibernate.type.ShortType.get(ShortType.java:28)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
at org.hibernate.type.ComponentType.hydrate(ComponentType.java:506)
at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:229)
at org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:95)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:1983)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1372)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1300)
at org.hibernate.loader.Loader.getRow(Loader.java:1197)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:569)
at org.hibernate.loader.Loader.doQuery(Loader.java:689)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53)
at model.ejbs.TAvalunoHome.findAll(TAvalunoHome.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
at $Proxy144.findAll(Unknown Source)
at servlet.CalculatorActionServlet.doit(CalculatorActionServlet.java:110)
at servlet.CalculatorActionServlet.doPost(CalculatorActionServlet.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)

Name and version of the database you are using: Oracle 92

Debug level Hibernate log excerpt:
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select << begin [level=1, statement=select]
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.tree.FromElement] FromClause{level=1} : model.ejbs.TAvaluno (ta) -> tavaluno0_
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select : finishing up [level=1, statement=select]
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] processQuery() : ( SELECT ( FromClause{level=1} CSE.T_AVALUNO tavaluno0_ ) )
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] Derived SELECT clause created.
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] Using FROM fragment [CSE.T_AVALUNO tavaluno0_]
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select >> end [level=1, statement=select]
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.AST] --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (CSE.T_AVALUNO)
+-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
| +-[SELECT_EXPR] SelectExpressionImpl: 'tavaluno0_.CD_CURSO as CD1_25_, tavaluno0_.CD_ALUNO as CD2_25_, tavaluno0_.CD_LECTIVO as CD3_25_, tavaluno0_.CD_DISCIP as CD4_25_, tavaluno0_.CD_DURACAO as CD5_25_, tavaluno0_.CD_GRU_AVA as CD6_25_, tavaluno0_.CD_AVALIA as CD7_25_' {FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=ta,role=null,tableName=CSE.T_AVALUNO,tableAlias=tavaluno0_,origin=null,colums={,className=model.ejbs.TAvaluno}}}
| \-[SQL_TOKEN] SqlFragment: 'tavaluno0_.CD_LIVRO as CD8_25_, tavaluno0_.PROTEGIDO as PROTEGIDO25_, tavaluno0_.REGISTER_ID as REGISTER10_25_, tavaluno0_.DT_AVALIA as DT11_25_, tavaluno0_.NR_AVALIA as NR12_25_, tavaluno0_.CD_STA_EPO as CD13_25_, tavaluno0_.CD_FINAL as CD14_25_, tavaluno0_.CD_LOCAL as CD15_25_, tavaluno0_.NIA as NIA25_, tavaluno0_.NR_PONDERA as NR17_25_, tavaluno0_.SQ_AVALIA as SQ18_25_, tavaluno0_.CD_QUAL_AVA as CD19_25_'
\-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[ta], fromElementByTableAlias=[tavaluno0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
\-[FROM_FRAGMENT] FromElement: 'CSE.T_AVALUNO tavaluno0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=ta,role=null,tableName=CSE.T_AVALUNO,tableAlias=tavaluno0_,origin=null,colums={,className=model.ejbs.TAvaluno}}

2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] HQL: from model.ejbs.TAvaluno ta
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select tavaluno0_.CD_CURSO as CD1_25_, tavaluno0_.CD_ALUNO as CD2_25_, tavaluno0_.CD_LECTIVO as CD3_25_, tavaluno0_.CD_DISCIP as CD4_25_, tavaluno0_.CD_DURACAO as CD5_25_, tavaluno0_.CD_GRU_AVA as CD6_25_, tavaluno0_.CD_AVALIA as CD7_25_, tavaluno0_.CD_LIVRO as CD8_25_, tavaluno0_.PROTEGIDO as PROTEGIDO25_, tavaluno0_.REGISTER_ID as REGISTER10_25_, tavaluno0_.DT_AVALIA as DT11_25_, tavaluno0_.NR_AVALIA as NR12_25_, tavaluno0_.CD_STA_EPO as CD13_25_, tavaluno0_.CD_FINAL as CD14_25_, tavaluno0_.CD_LOCAL as CD15_25_, tavaluno0_.NIA as NIA25_, tavaluno0_.NR_PONDERA as NR17_25_, tavaluno0_.SQ_AVALIA as SQ18_25_, tavaluno0_.CD_QUAL_AVA as CD19_25_ from CSE.T_AVALUNO tavaluno0_
2006-09-11 19:55:37,114 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-09-11 19:55:37,114 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-09-11 19:55:37,114 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2006-09-11 19:55:37,114 DEBUG [org.hibernate.SQL] select * from ( select row_.*, rownum rownum_ from ( select tavaluno0_.CD_CURSO as CD1_25_, tavaluno0_.CD_ALUNO as CD2_25_, tavaluno0_.CD_LECTIVO as CD3_25_, tavaluno0_.CD_DISCIP as CD4_25_, tavaluno0_.CD_DURACAO as CD5_25_, tavaluno0_.CD_GRU_AVA as CD6_25_, tavaluno0_.CD_AVALIA as CD7_25_, tavaluno0_.CD_LIVRO as CD8_25_, tavaluno0_.PROTEGIDO as PROTEGIDO25_, tavaluno0_.REGISTER_ID as REGISTER10_25_, tavaluno0_.DT_AVALIA as DT11_25_, tavaluno0_.NR_AVALIA as NR12_25_, tavaluno0_.CD_STA_EPO as CD13_25_, tavaluno0_.CD_FINAL as CD14_25_, tavaluno0_.CD_LOCAL as CD15_25_, tavaluno0_.NIA as NIA25_, tavaluno0_.NR_PONDERA as NR17_25_, tavaluno0_.SQ_AVALIA as SQ18_25_, tavaluno0_.CD_QUAL_AVA as CD19_25_ from CSE.T_AVALUNO tavaluno0_ ) row_ where rownum <= ?) where rownum_ > ?
2006-09-11 19:55:37,130 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2006-09-11 19:55:37,130 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[model.ejbs.TAvaluno#component[cdCurso,cdAluno,cdLectivo,cdDiscip,cdDuracao,cdGruAva,cdAvalia]{cdGruAva=1, cdLectivo=198990, cdCurso=1, cdAluno=132, cdAvalia=99, cdDuracao=S2, cdDiscip=24}]
2006-09-11 19:55:37,161 INFO [org.hibernate.type.ShortType] could not read column value from result set: CD3_25_; Excesso de Dados Numéricos
2006-09-11 19:55:37,161 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
2006-09-11 19:55:37,161 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-09-11 19:55:37,161 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2006-09-11 19:55:37,161 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2006-09-11 19:55:37,161 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select tavaluno0_.CD_CURSO as CD1_25_, tavaluno0_.CD_ALUNO as CD2_25_, tavaluno0_.CD_LECTIVO as CD3_25_, tavaluno0_.CD_DISCIP as CD4_25_, tavaluno0_.CD_DURACAO as CD5_25_, tavaluno0_.CD_GRU_AVA as CD6_25_, tavaluno0_.CD_AVALIA as CD7_25_, tavaluno0_.CD_LIVRO as CD8_25_, tavaluno0_.PROTEGIDO as PROTEGIDO25_, tavaluno0_.REGISTER_ID as REGISTER10_25_, tavaluno0_.DT_AVALIA as DT11_25_, tavaluno0_.NR_AVALIA as NR12_25_, tavaluno0_.CD_STA_EPO as CD13_25_, tavaluno0_.CD_FINAL as CD14_25_, tavaluno0_.CD_LOCAL as CD15_25_, tavaluno0_.NIA as NIA25_, tavaluno0_.NR_PONDERA as NR17_25_, tavaluno0_.SQ_AVALIA as SQ18_25_, tavaluno0_.CD_QUAL_AVA as CD19_25_ from CSE.T_AVALUNO tavaluno0_]
java.sql.SQLException: Excesso de Dados Numéricos
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleStatement.getShortValue(OracleStatement.java:4420)
at oracle.jdbc.driver.OracleResultSetImpl.getShort(OracleResultSetImpl.java:517)
at oracle.jdbc.driver.OracleResultSet.getShort(OracleResultSet.java:1517)
at org.jboss.resource.adapter.jdbc.WrappedResultSet.getShort(WrappedResultSet.java:846)
at org.hibernate.type.ShortType.get(ShortType.java:28)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
at org.hibernate.type.ComponentType.hydrate(ComponentType.java:506)
at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:229)
at org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:95)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:1983)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1372)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1300)
at org.hibernate.loader.Loader.getRow(Loader.java:1197)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:569)
at org.hibernate.loader.Loader.doQuery(Loader.java:689)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53)
at model.ejbs.TAvalunoHome.findAll(TAvalunoHome.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
at $Proxy144.findAll(Unknown Source)
at servlet.CalculatorActionServlet.doit(CalculatorActionServlet.java:110)
at servlet.CalculatorActionServlet.doPost(CalculatorActionServlet.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)



Thank's in advance,

António Silva[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 10:39 am 
Newbie

Joined: Wed Sep 06, 2006 10:06 am
Posts: 11
Location: Lisbon, Portugal
Hi all,

Since no one answers to my problem i put here de code of my entity beans and a more complete stack trace i hope that someone could help me.

As you can see bellow an sql error (Numeric Overflow) is happening due to a column identified as CD_Aluno that is a VARCHAR2(7) in the DDL and a String in the Object model.

Although it's described as a String and a Varchar the values in the database is always a Number with 7 characters but what really seems strange is this line in the stack trace :
Quote:
2006-09-13 14:51:03,531 INFO [org.hibernate.type.ShortType] could not read column value from result set: CD3_1_; Excesso de Dados Numéricos

cause it seems that the varchar column is being interpertred as a short! This is strange.

"Excesso de Dados Numéricos" is portuguese and means means Numeric Overflow

Entities:
Code:
/**
* TAvalunoId generated by hbm2java
*/
@Embeddable
public class TAvalunoId implements java.io.Serializable {

   // Fields   

   private short cdCurso;

   private Integer cdAluno;

   private String cdLectivo;

   private Integer cdDiscip;

   private String cdDuracao;

   private byte cdGruAva;

   private byte cdAvalia;

   // Constructors

   /** default constructor */

   /** full constructor */


   // Property accessors

   
}


/**
* TAvaluno generated by hbm2java
*/
@Entity
@Table(name = "T_AVALUNO", uniqueConstraints = {
      @UniqueConstraint(columnNames = { "SQ_AVALIA" }),
      @UniqueConstraint(columnNames = { "CD_LECTIVO", "NIA" }) })
public class TAvaluno implements java.io.Serializable {

   // Fields   

   private TAvalunoId id;

   private TInscri TInscri;

   private Date dtAvalia;

   private BigDecimal nrAvalia;

   private byte cdStaEpo;

   private char cdFinal;

   private String cdLivro;

   private char protegido;

   private Short cdLocal;

   private long nia;

   private BigDecimal nrPondera;

   private BigDecimal sqAvalia;

   private BigDecimal registerId;

   private Byte cdQualAva;

   // Constructors

   /** default constructor */

   /** minimal constructor */

   /** full constructor */

   // Property accessors
   @EmbeddedId
   @AttributeOverrides( {
         @AttributeOverride(name = "cdCurso", column = @Column(name = "CD_CURSO", unique = false, nullable = false, insertable = true, updatable = true, precision = 4, scale = 0)),
         @AttributeOverride(name = "cdAluno", column = @Column(name = "CD_ALUNO", unique = false, nullable = false, insertable = true, updatable = true, precision = 8, scale = 0)),
         @AttributeOverride(name = "cdLectivo", column = @Column(name = "CD_LECTIVO", unique = false, nullable = false, insertable = true, updatable = true, length = 7)),
         @AttributeOverride(name = "cdDiscip", column = @Column(name = "CD_DISCIP", unique = false, nullable = false, insertable = true, updatable = true, precision = 7, scale = 0)),
         @AttributeOverride(name = "cdDuracao", column = @Column(name = "CD_DURACAO", unique = false, nullable = false, insertable = true, updatable = true, length = 2)),
         @AttributeOverride(name = "cdGruAva", column = @Column(name = "CD_GRU_AVA", unique = false, nullable = false, insertable = true, updatable = true, precision = 2, scale = 0)),
         @AttributeOverride(name = "cdAvalia", column = @Column(name = "CD_AVALIA", unique = false, nullable = false, insertable = true, updatable = true, precision = 2, scale = 0)) })
   public TAvalunoId getId() {
      return this.id;
   }

   public void setId(TAvalunoId id) {
      this.id = id;
   }

   @ManyToOne(cascade = {}, fetch = FetchType.LAZY)
   @JoinColumns( {
         @JoinColumn(name = "CD_LECTIVO", unique = false, nullable = false, insertable = false, updatable = false),
         @JoinColumn(name = "CD_DURACAO", unique = false, nullable = false, insertable = false, updatable = false),
         @JoinColumn(name = "CD_DISCIP", unique = false, nullable = false, insertable = false, updatable = false),
         @JoinColumn(name = "CD_CURSO", unique = false, nullable = false, insertable = false, updatable = false),
         @JoinColumn(name = "CD_ALUNO", unique = false, nullable = false, insertable = false, updatable = false) })
   public TInscri getTInscri() {
      return this.TInscri;
   }

   public void setTInscri(TInscri TInscri) {
      this.TInscri = TInscri;
   }

        /* More Getters and Setters */
   
}



DDL :
Code:
-- Create table
create table CSE.T_AVALUNO
(
  CD_LECTIVO  VARCHAR2(7),
  CD_CURSO    NUMBER(4),
  CD_ALUNO    NUMBER(8),
  CD_DISCIP   NUMBER(7),
  CD_DURACAO  VARCHAR2(2) default 'A',
  CD_GRU_AVA  NUMBER(2),
  CD_AVALIA   NUMBER(2),
  DT_AVALIA   DATE,
  NR_AVALIA   NUMBER(6,2),
  CD_STA_EPO  NUMBER(2) default 1,
  CD_FINAL    CHAR(1) default 'N',
  CD_LIVRO    VARCHAR2(10),
  PROTEGIDO   CHAR(1) default 'N',
  CD_LOCAL    NUMBER(4),
  NIA         NUMBER(10),
  NR_PONDERA  NUMBER(7,2),
  SQ_AVALIA   NUMBER,
  REGISTER_ID NUMBER,
  CD_QUAL_AVA NUMBER(2)
)


Exception:

Code:
2006-09-13 14:51:03,109 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] parse() - HQL: from model.ejbs.TAvaluno ta
2006-09-13 14:51:03,140 DEBUG [org.hibernate.hql.ast.AST] --- HQL AST ---
\-[QUERY] 'query'
    \-[SELECT_FROM] 'SELECT_FROM'
       \-[FROM] 'from'
          \-[RANGE] 'RANGE'
             +-[DOT] '.'
             |  +-[DOT] '.'
             |  |  +-[IDENT] 'model'
             |  |  \-[IDENT] 'ejbs'
             |  \-[IDENT] 'TAvaluno'
             \-[ALIAS] 'ta'

2006-09-13 14:51:03,140 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-09-13 14:51:03,249 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select << begin [level=1, statement=select]
2006-09-13 14:51:03,343 DEBUG [org.hibernate.hql.ast.tree.FromElement] FromClause{level=1} :  model.ejbs.TAvaluno (ta) -> tavaluno0_
2006-09-13 14:51:03,343 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select : finishing up [level=1, statement=select]
2006-09-13 14:51:03,343 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] processQuery() :  ( SELECT ( FromClause{level=1} CSE.T_AVALUNO tavaluno0_ ) )
2006-09-13 14:51:03,359 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] Derived SELECT clause created.
2006-09-13 14:51:03,390 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] Using FROM fragment [CSE.T_AVALUNO tavaluno0_]
2006-09-13 14:51:03,390 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select >> end [level=1, statement=select]
2006-09-13 14:51:03,390 DEBUG [org.hibernate.hql.ast.AST] --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT'  querySpaces (CSE.T_AVALUNO)
    +-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
    |  +-[SELECT_EXPR] SelectExpressionImpl: 'tavaluno0_.CD_CURSO as CD1_1_, tavaluno0_.CD_ALUNO as CD2_1_, tavaluno0_.CD_LECTIVO as CD3_1_, tavaluno0_.CD_DISCIP as CD4_1_, tavaluno0_.CD_DURACAO as CD5_1_, tavaluno0_.CD_GRU_AVA as CD6_1_, tavaluno0_.CD_AVALIA as CD7_1_' {FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=ta,role=null,tableName=CSE.T_AVALUNO,tableAlias=tavaluno0_,origin=null,colums={,className=model.ejbs.TAvaluno}}}
    |  \-[SQL_TOKEN] SqlFragment: 'tavaluno0_.CD_LIVRO as CD8_1_, tavaluno0_.PROTEGIDO as PROTEGIDO1_, tavaluno0_.REGISTER_ID as REGISTER10_1_, tavaluno0_.DT_AVALIA as DT11_1_, tavaluno0_.NR_AVALIA as NR12_1_, tavaluno0_.CD_STA_EPO as CD13_1_, tavaluno0_.CD_FINAL as CD14_1_, tavaluno0_.CD_LOCAL as CD15_1_, tavaluno0_.NIA as NIA1_, tavaluno0_.NR_PONDERA as NR17_1_, tavaluno0_.SQ_AVALIA as SQ18_1_, tavaluno0_.CD_QUAL_AVA as CD19_1_'
    \-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[ta], fromElementByTableAlias=[tavaluno0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
       \-[FROM_FRAGMENT] FromElement: 'CSE.T_AVALUNO tavaluno0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=ta,role=null,tableName=CSE.T_AVALUNO,tableAlias=tavaluno0_,origin=null,colums={,className=model.ejbs.TAvaluno}}

2006-09-13 14:51:03,390 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-09-13 14:51:03,421 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] HQL: from model.ejbs.TAvaluno ta
2006-09-13 14:51:03,421 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select tavaluno0_.CD_CURSO as CD1_1_, tavaluno0_.CD_ALUNO as CD2_1_, tavaluno0_.CD_LECTIVO as CD3_1_, tavaluno0_.CD_DISCIP as CD4_1_, tavaluno0_.CD_DURACAO as CD5_1_, tavaluno0_.CD_GRU_AVA as CD6_1_, tavaluno0_.CD_AVALIA as CD7_1_, tavaluno0_.CD_LIVRO as CD8_1_, tavaluno0_.PROTEGIDO as PROTEGIDO1_, tavaluno0_.REGISTER_ID as REGISTER10_1_, tavaluno0_.DT_AVALIA as DT11_1_, tavaluno0_.NR_AVALIA as NR12_1_, tavaluno0_.CD_STA_EPO as CD13_1_, tavaluno0_.CD_FINAL as CD14_1_, tavaluno0_.CD_LOCAL as CD15_1_, tavaluno0_.NIA as NIA1_, tavaluno0_.NR_PONDERA as NR17_1_, tavaluno0_.SQ_AVALIA as SQ18_1_, tavaluno0_.CD_QUAL_AVA as CD19_1_ from CSE.T_AVALUNO tavaluno0_
2006-09-13 14:51:03,421 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-09-13 14:51:03,468 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-09-13 14:51:03,468 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2006-09-13 14:51:03,468 DEBUG [org.hibernate.SQL] select * from ( select row_.*, rownum rownum_ from ( select tavaluno0_.CD_CURSO as CD1_1_, tavaluno0_.CD_ALUNO as CD2_1_, tavaluno0_.CD_LECTIVO as CD3_1_, tavaluno0_.CD_DISCIP as CD4_1_, tavaluno0_.CD_DURACAO as CD5_1_, tavaluno0_.CD_GRU_AVA as CD6_1_, tavaluno0_.CD_AVALIA as CD7_1_, tavaluno0_.CD_LIVRO as CD8_1_, tavaluno0_.PROTEGIDO as PROTEGIDO1_, tavaluno0_.REGISTER_ID as REGISTER10_1_, tavaluno0_.DT_AVALIA as DT11_1_, tavaluno0_.NR_AVALIA as NR12_1_, tavaluno0_.CD_STA_EPO as CD13_1_, tavaluno0_.CD_FINAL as CD14_1_, tavaluno0_.CD_LOCAL as CD15_1_, tavaluno0_.NIA as NIA1_, tavaluno0_.NR_PONDERA as NR17_1_, tavaluno0_.SQ_AVALIA as SQ18_1_, tavaluno0_.CD_QUAL_AVA as CD19_1_ from CSE.T_AVALUNO tavaluno0_ ) row_ where rownum <= ?) where rownum_ > ?
2006-09-13 14:51:03,468 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2006-09-13 14:51:03,484 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[model.ejbs.TAvaluno#component[cdCurso,cdAluno,cdLectivo,cdDiscip,cdDuracao,cdGruAva,cdAvalia]{cdGruAva=1, cdLectivo=198990, cdCurso=1, cdAluno=132, cdAvalia=99, cdDuracao=S2, cdDiscip=24}]
2006-09-13 14:51:03,531 INFO  [org.hibernate.type.ShortType] could not read column value from result set: CD3_1_; Excesso de Dados Numéricos
2006-09-13 14:51:03,531 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
2006-09-13 14:51:03,531 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-09-13 14:51:03,531 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2006-09-13 14:51:03,531 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2006-09-13 14:51:03,531 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select tavaluno0_.CD_CURSO as CD1_1_, tavaluno0_.CD_ALUNO as CD2_1_, tavaluno0_.CD_LECTIVO as CD3_1_, tavaluno0_.CD_DISCIP as CD4_1_, tavaluno0_.CD_DURACAO as CD5_1_, tavaluno0_.CD_GRU_AVA as CD6_1_, tavaluno0_.CD_AVALIA as CD7_1_, tavaluno0_.CD_LIVRO as CD8_1_, tavaluno0_.PROTEGIDO as PROTEGIDO1_, tavaluno0_.REGISTER_ID as REGISTER10_1_, tavaluno0_.DT_AVALIA as DT11_1_, tavaluno0_.NR_AVALIA as NR12_1_, tavaluno0_.CD_STA_EPO as CD13_1_, tavaluno0_.CD_FINAL as CD14_1_, tavaluno0_.CD_LOCAL as CD15_1_, tavaluno0_.NIA as NIA1_, tavaluno0_.NR_PONDERA as NR17_1_, tavaluno0_.SQ_AVALIA as SQ18_1_, tavaluno0_.CD_QUAL_AVA as CD19_1_ from CSE.T_AVALUNO tavaluno0_]
java.sql.SQLException: Excesso de Dados Numéricos
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
   at oracle.jdbc.driver.OracleStatement.getShortValue(OracleStatement.java:4527)
   at oracle.jdbc.driver.OracleResultSetImpl.getShort(OracleResultSetImpl.java:517)
   at oracle.jdbc.driver.OracleResultSet.getShort(OracleResultSet.java:1584)
   at org.jboss.resource.adapter.jdbc.WrappedResultSet.getShort(WrappedResultSet.java:846)
   at org.hibernate.type.ShortType.get(ShortType.java:28)
   at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
   at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
   at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
   at org.hibernate.type.ComponentType.hydrate(ComponentType.java:506)
   at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:229)
   at org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:95)
   at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:1983)
   at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1372)
   at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1300)
   at org.hibernate.loader.Loader.getRow(Loader.java:1197)
   at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:569)
   at org.hibernate.loader.Loader.doQuery(Loader.java:689)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53)
   at model.ejbs.TAvalunoHome.findAll(TAvalunoHome.java:97)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
   at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
   at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
   at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
   at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
   at $Proxy87.findAll(Unknown Source)
   at servlet.CalculatorActionServlet.doit(CalculatorActionServlet.java:109)
   at servlet.CalculatorActionServlet.doPost(CalculatorActionServlet.java:57)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
   at java.lang.Thread.run(Thread.java:595)
2006-09-13 14:51:03,531 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 17026, SQLState: null
2006-09-13 14:51:03,531 ERROR [org.hibernate.util.JDBCExceptionReporter] Excesso de Dados Numéricos
2006-09-13 14:51:03,531 ERROR [model.ejbs.TAvalunoHome] get failed
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
   at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:567)
   at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:56)
   at model.ejbs.TAvalunoHome.findAll(TAvalunoHome.java:97)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
   at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
   at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
   at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
   at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
   at $Proxy87.findAll(Unknown Source)
   at servlet.CalculatorActionServlet.doit(CalculatorActionServlet.java:109)
   at servlet.CalculatorActionServlet.doPost(CalculatorActionServlet.java:57)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
   at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
   at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
   at org.hibernate.loader.Loader.doList(Loader.java:2148)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53)
   ... 51 more
Caused by: java.sql.SQLException: Excesso de Dados Numéricos
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
   at oracle.jdbc.driver.OracleStatement.getShortValue(OracleStatement.java:4527)
   at oracle.jdbc.driver.OracleResultSetImpl.getShort(OracleResultSetImpl.java:517)
   at oracle.jdbc.driver.OracleResultSet.getShort(OracleResultSet.java:1584)
   at org.jboss.resource.adapter.jdbc.WrappedResultSet.getShort(WrappedResultSet.java:846)
   at org.hibernate.type.ShortType.get(ShortType.java:28)
   at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
   at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
   at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
   at org.hibernate.type.ComponentType.hydrate(ComponentType.java:506)
   at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:229)
   at org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:95)
   at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:1983)
   at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1372)
   at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1300)
   at org.hibernate.loader.Loader.getRow(Loader.java:1197)
   at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:569)
   at org.hibernate.loader.Loader.doQuery(Loader.java:689)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   ... 59 more
Code:
Quote:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.