Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Professional Java for Web Applications
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 12th, 2014, 07:39 AM
Authorized User
Points: 52, Level: 1
Points: 52, Level: 1 Points: 52, Level: 1 Points: 52, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:52 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.