Named query not found for NamedPLSQLStoredProcedureQuery

200 Views Asked by At

I'm trying to use EclipseLink to call a stored procedure (in Oracle database) and when I tried to call I always got the named query not found.

I tried with entityManager.createNamedQuery, createdNamedStoredProcedureQuery, and JpaEntityManager create query methods as well.

My declaration is:

@NamedPLSQLStoredProcedureQueries({@NamedPLSQLStoredProcedureQuery( name = "ChangeTheStatusForTheLoadedARTransactions"
                                                                  , procedureName = "OALEDU_LC_API_PKG.DERIVE_CD_DATA"
                                                                  , parameters = {@PLSQLParameter( name = "p_ar_data"
                                                                                                 , direction = Direction.IN
                                                                                                 , databaseType = "OALEDU_LC_API_PKG.T_AR_TYPE" )}  
                                                                   )})
@Embeddable
@Struct( name = "LOADED_AR_TRANSACTIONS"
       , fields = {"INTERFACE_LINE_ATTRIBUTE1, INTERFACE_STATUS, INTERFACE_LINE_ID"})
@PLSQLRecord( name = "OALEDU_LC_API_PKG.T_AR_REC"
            , compatibleType = "OALEDU_LC_API_PKG.T_AR_REC"
            , javaType = LoadedArTransaction.class
            , fields={ @PLSQLParameter(name = "INTERFACE_LINE_ATTRIBUTE1", databaseType = "NUMBERIC_TYPE")
                     , @PLSQLParameter(name = "INTERFACE_STATUS")
                     , @PLSQLParameter(name = "INTERFACE_LINE_ID", databaseType = "NUMBERIC_TYPE")})
public class LoadedArTransaction {...}

If somebody has experience with it, and can tell me, what I missed or did wrong, I'll appreciate it!

0

There are 0 best solutions below