Hibernate version:1.2.0.2003 (spring.net http://www.springframework.net/download ... 6-0202.zip )
hello,
I try to excute a stored procedure with out parameters:
Quote:
Code:
CREATE OR REPLACE PROCEDURE MY_PROC( pin1 IN DECIMAL, pin2 IN DECIMAL, pout1 OUT DECIMAL ,pout2 OUT DECIMAL) is
Code:
<sql-query name="ExecMyProc">
<return-scalar column="pout1" type="Decimal" />
<return-scalar column="pout2" type="Decimal" />
call MY_PROC (:pin1, :pin2, pout1, pout2)
</sql-query>
</hibernate-mapping>
Code:
object o = session.GetNamedQuery("ExecMyProc")
.SetDecimal("pin1", 4)
.SetDecimal("pin2", 3)
.List();
I have an exception: ORA-06576 (innerException)
Quote:
[OracleException (0x80131938): ORA-06576: ceci n'est pas un nom de fonction ou de procédure valide
]
System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) +203
System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) +1018
System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals) +25
System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior) +142
System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +9
NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) +68
NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session) +271
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +280
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +83
NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +62
[UncategorizedAdoException: Hibernate operation: could not execute query
[ call MY_PROC(?, ?,pout1, pout2) ]
Name: pin1 - Value: 4
Name: pin2 - Value: 3
[SQL: call MY_PROC(?, ?,pout1, pout2)]; uncategorized DataException for SQL []; ErrorCode [<no error code>]; ORA-06576: ceci n'est pas un nom de fonction ou de procédure valide
]
Spring.Data.Support.FallbackExceptionTranslator.Translate(String task, String sql, Exception exception) +85
Spring.Data.Support.ErrorCodeExceptionTranslator.Translate(String task, String sql, Exception exception) +1323
Spring.Data.NHibernate.HibernateAccessor.ConvertAdoAccessException(ADOException ex) +108
Spring.Data.NHibernate.Generic.HibernateTemplate.Execute(IHibernateCallback`1 action, Boolean exposeNativeSession) +384
Spring.Data.NHibernate.Generic.HibernateTemplate.Execute(IHibernateCallback`1 action) +108
Spring.Data.NHibernate.Generic.HibernateTemplate.Execute(HibernateDelegate`1 del) +139
Orbis.Foodservices.Services.Consumers.PersonalOrdersService.GetOrCreateOrder(String consumerId, DateTime date, Int32 mealId) in C:\projets\Agfa\Orbis.Restauration\Services.Impl\Services\Consumers\PersonalOrdersServicePartial.cs:24
Consumers_Orders_Order.get_Order() in c:\projets\Agfa\Orbis.Restauration\WebSite\Consumers\Orders\Order.master.cs:61
Consumers_Orders_Order.OnInit(EventArgs e) in c:\projets\Agfa\Orbis.Restauration\WebSite\Consumers\Orders\Order.master.cs:22
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692
And with this mapping (it's dummy I'know):
Code:
<sql-query name="ExecMyProc">
<return-scalar column="pout1" type="Decimal" />
<return-scalar column="pout2" type="Decimal" />
call MY_PROC (:pin1, :pin2, :pin1, :pin2)
</sql-query>
</hibernate-mapping>
No exception but no result :(
Please help. I can't change this procedure..