2016-08-16 5 views
0

は私がhibernateのSessionFactoryを使用してJavaアプリケーションで次のT-SQLスクリプトを実行して問題を抱えているが、しかし、このSQLコードは動作します:休止状態データ例外(JavaのWebアプリケーション)

​​

次はEclipseのコンソールからのエラーです:javaのを通じて、このSQLを実行している場合は

* ERROR 2016-08-16 11:36:18,753 No value specified for parameter 1. (SqlExceptionHelper.java [qtp1843774775-20]) 
* ERROR 2016-08-16 11:36:18,760 Error while executing action (ExceptionInterceptor.java [qtp1843774775-20]) 
org.hibernate.exception.DataException: could not execute statement 
at  org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:135) 
at  org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) 
at  org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) 


Caused by: org.postgresql.util.PSQLException: No value specified for parameter 1. 
at  org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:225) 
at  org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:190) 
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424) 
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161) 
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133) 
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105) 
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186) 
... 124 more 
+0

開始セミコロンは奇妙に見えます。あなたはそれなしで試みることができますか? –

+0

はい、私は疲れましたが、うまくいきませんでした。 – Sulton

答えて

1

::鋳物の "誤解" があります。

'[^0-9]*' ,'0')::integer'[^0-9]*' ,'0')\\:\\:integerに置き換えてください。正しく動作するはずです。

+0

それは働いて、ありがとう)) – Sulton