-->
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: Help with this formula
PostPosted: Thu May 12, 2005 5:08 am 
Regular
Regular

Joined: Thu Feb 24, 2005 2:34 pm
Posts: 80
Hibernate version:3.03
Please i have this formula
Code:
<many-to-one name="spedizioni" class="vo.as400.CSpedizioniVO" lazy="false" update="false" insert="false"   not-null="true">
      <column name="GGSP$A"/>
      <column name="MMSP$A"/>
      <column name="AASP$A"/>
      <formula>20</formula>
      <formula>'V'</formula>
      <formula>( (cast(TRIM(SUBSTR(NDOC$A,1,8))as integer)) )</formula>
      
      
   </many-to-one>


but why hibernate resolve in this way, as integer it's a reserved word?,
can you help me please
Devis
Code:
Hibernate: select this_.cbar$a as cbar1_1_, this_.fili$a as fili2_1_, this_.numt$a as numt3_1_, this_.stag$a as stag4_8_1_, this_.mode$a as mode5_8_1_, this_.mate$a as mate6_8_1_, this_.colo$a as colo7_8_1_, this_.vari$a as vari8_8_1_, this_.cdtg$a as cdtg9_8_1_, this_.tgsi$a as tgsi10_8_1_, this_.pven$a as pven11_8_1_, this_.pacq$a as pacq12_8_1_, this_.de20$a as de13_8_1_, this_.dcol$a as dcol14_8_1_, this_.dcmp$a as dcmp15_8_1_, this_.ggsp$a as ggsp16_8_1_, this_.mmsp$a as mmsp17_8_1_, this_.aasp$a as aasp18_8_1_, this_.ndoc$a as ndoc19_8_1_, this_.GGSP$A as GGSP20_8_1_, this_.MMSP$A as MMSP21_8_1_, this_.AASP$A as AASP22_8_1_, 20 as formula5_1_, 'V' as formula6_1_, ( (cast(TRIM(SUBSTR(this_.NDOC$A,1,8))this_.as integer)) ) as formula7_1_, sped1_.ggosbt as ggosbt0_, sped1_.mmosbt as mmosbt0_, sped1_.aaosbt as aaosbt0_, sped1_.soosbt as soosbt0_, sped1_.sbspbt as sbspbt0_, sped1_.nbspbt as nbspbt0_, sped1_.magpbt as magpbt10_0_, sped1_.magcbt as magcbt10_0_ from sdgtwb_dat.aynau00f this_ inner join sdgtwb_dat.bspte00f sped1_ on this_.GGSP$A=sped1_.ggosbt and this_.MMSP$A=sped1_.mmosbt and this_.AASP$A=sped1_.aaosbt and 20=sped1_.soosbt and 'V'=sped1_.sbspbt and ( (cast(TRIM(SUBSTR(this_.NDOC$A,1,8))this_.as integer)) )=sped1_.nbspbt where this_.cbar$a=? and this_.fili$a=? and sped1_.magpbt=?

10:06:49,631  WARN JDBCExceptionReporter:71 - SQL Error: -104, SQLState: 42601

3515 [Thread-5] WARN org.hibernate.util.JDBCExceptionReporter  - SQL Error: -104, SQLState: 42601

10:06:49,631 ERROR JDBCExceptionReporter:72 - [SQL0104] Token THIS_ non valido. Token validi: + -.

3515 [Thread-5] ERROR org.hibernate.util.JDBCExceptionReporter  - [SQL0104] Token THIS_ non valido. Token validi: + -.

10:06:49,631  WARN JDBCExceptionReporter:71 - SQL Error: -104, SQLState: 42601

3515 [Thread-5] WARN org.hibernate.util.JDBCExceptionReporter  - SQL Error: -104, SQLState: 42601

10:06:49,662 ERROR JDBCExceptionReporter:72 - [SQL0104] Token THIS_ non valido. Token validi: + -.

3546 [Thread-5] ERROR org.hibernate.util.JDBCExceptionReporter  - [SQL0104] Token THIS_ non valido. Token validi: + -.

10:06:49,662 FATAL html:59 - could not execute query

3546 [Thread-5] FATAL logs.html  - could not execute query

org.hibernate.exception.SQLGrammarException: could not execute query

   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59)

   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

   at org.hibernate.loader.Loader.doList(Loader.java:1565)

   at org.hibernate.loader.Loader.list(Loader.java:1545)

   at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)

   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1316)

   at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)

   at org.hibernate.impl.CriteriaImpl$Subcriteria.list(CriteriaImpl.java:141)

   at dao.as400.CScontrinoDAO.getProduct(CScontrinoDAO.java:51)

   at workflow.WFShop.getBarcode(WFShop.java:17)

   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:324)

   at flashgateway.adapter.java.JavaBeanAdapter.invokeFunction(JavaBeanAdapter.java:65)

   at flashgateway.filter.AdapterFilter.invoke(AdapterFilter.java:117)

   at flashgateway.filter.MessageSecurityFilter.invoke(MessageSecurityFilter.java:144)

   at flashgateway.filter.ServiceNameFilter.invoke(ServiceNameFilter.java:101)

   at flashgateway.filter.EnvelopeFilter.invoke(EnvelopeFilter.java:102)

   at flashgateway.filter.SessionFilter.invoke(SessionFilter.java:28)

   at flashgateway.filter.LicenseFilter.invoke(LicenseFilter.java:57)

   at flashgateway.filter.ErrorFilter.invoke(ErrorFilter.java:39)

   at flashgateway.filter.LogFilter.invoke(LogFilter.java:46)

   at flashgateway.filter.BatchProcessFilter.invoke(BatchProcessFilter.java:63)

   at flashgateway.filter.PacketSecurityFilter.invoke(PacketSecurityFilter.java:68)

   at flashgateway.filter.DebugFilter.invoke(DebugFilter.java:38)

   at flashgateway.filter.SerializationFilter.invoke(SerializationFilter.java:89)

   at flashgateway.Gateway.invoke(Gateway.java:217)

   at flashgateway.controller.GatewayServlet.service(GatewayServlet.java:69)

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

   at filter.GZIPFilter.doFilter(GZIPFilter.java:39)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)

   at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

   at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

   at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)

   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

   at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

   at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)

   at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)

   at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

   at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

   at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)

   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)

   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)

   at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)

   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)

   at java.lang.Thread.run(Thread.java:534)

Caused by: java.sql.SQLException: [SQL0104] Token THIS_ non valido. Token validi: + -.

   at com.ibm.as400.access.JDError.throwSQLException(JDError.java:533)

   at com.ibm.as400.access.JDError.throwSQLException(JDError.java:504)

   at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatement.java:1302)

   at com.ibm.as400.access.AS400JDBCPreparedStatement.<init>(AS400JDBCPreparedStatement.java:182)

   at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:1805)

   at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:1628)

   at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:185)

   at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:278)

   at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:383)

   at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:321)

   at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:86)

   at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1129)

   at org.hibernate.loader.Loader.doQuery(Loader.java:373)

   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210)

   at org.hibernate.loader.Loader.doList(Loader.java:1562)

   ... 59 more




Top
 Profile  
 
 Post subject:
PostPosted: Fri May 13, 2005 4:58 am 
Regular
Regular

Joined: Thu Feb 24, 2005 2:34 pm
Posts: 80
please, any suggestion?, if it's not possibile, how i can around this problem or bug, please guy.
Devis


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.