Wrox Programmer Forums
|
BOOK: Professional Java for Web Applications
This is the forum to discuss the Wrox book Professional Java for Web Applications by Nicholas S. Williams; ISBN: 978-1-118-65646-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Java for Web Applications section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2014, 07:39 AM
Authorized User
 
Join Date: Apr 2014
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default JPA Call Oracle Stored Procedure

Hi,

looking on the net i've found the annotation @NamedStoredProcedureQuery so in my Entity i've defined

Code:
@Entity
@Table(name = "Ticket_TM")
@NamedStoredProcedureQueries(
		@NamedStoredProcedureQuery(
				name = "getEmp",
				procedureName = "GET_EMP",
				returnsResultSet = false
		)
		
)
public class My Class implements Serializable {...}
In my service, i've defined

Code:
@Service
public class MyService implements IMyService
{
  @PersistenceContext EntityManager entityManager;
 
 @Override
 @Transactional
	public void callProcedure() 
	{
		StoredProcedureQuery query = entityManager.createNamedStoredProcedureQuery("getEmp");
		query.execute();
		
		log.info("Procedure executed");
	}
}
But i get the error No @NamedStoredProcedureQuery was found with that name : getEmp





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call stored procedure in mysql morteza Pro PHP 0 September 27th, 2010 02:12 AM
How to call a Oracle Stored Procedure in VB6 krratnesh Pro VB Databases 1 February 19th, 2006 11:56 AM
To call oracle stored procedure in vb6 krratnesh Pro VB 6 0 February 1st, 2006 10:26 AM
Call a Stored Procedure Macsood ASP.NET 1.0 and 1.1 Basics 1 October 31st, 2005 11:29 AM
call oracle stored procedures from C# k_kosaraju ADO.NET 1 October 21st, 2004 03:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.