on 11-12-2008 4:23 PM
Dear all,
I am a bit new to java beans programming and cannot solve that
Situation:
- Create a EAR 5.0 project as frame
- I created a dictionary project in NWSD with a table zbp_master (just an id and some strings)
- Created an EJB 3.0 project added persistence and generated the entities
- Finally i created a separate EJB 3.0. for a service bean to be exposed as web service
the service bean (stateless session bean) has just a method createPartner
and a Persistence context ( working fine so far.)
@Stateless
public class ZBP_Manager_WSBean implements ZBP_Manager_WSRemote {
@PersistenceContext(unitName="SAP/ZBP_MANAGER_UNIT") EntityManager EntM;
public void createPartner(){
When i tried to fill the method issues started:
Just added those lines
ZbpMaster lr_partner = new ZbpMaster( );
EntM.persist(lr_partner);
This throws an exception IllegalArgument
"The class >>com.sap.demo.ZBP_Manager_Entities.ZbpMaster<< is not a valid entity"
here is the class definition start:
@Entity
@Table(name="ZBP_MASTER")
public class ZbpMaster implements Serializable {
@Id
@GeneratedValue(strategy=GenerationType.TABLE, generator = "GENERATOR")
@TableGenerator(name="GENERATOR", table = "ZBP_GEN")
private String id;
....
Any idea ?
Thanks in advance
Hi guys,
this is just to close this thread.
We decided to replace CAF with ABAP BO persistence,
because of performance and maintenance issues.
And a small remark to administration out there.. :
Could anybody please stop those indian guys for spamming the threads with
useless links to documents and other threads that are far away of the topic?
Thanks & br,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marcel,
You can have alook at the following [article|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b030e7fb-2662-2b10-0dab-c4aa52c3550b].
The first part of the tutotrial explains in detail the use of Entity Calsses with EJB 3.0.
Regards,
Alka.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yordan,
Благодаря..
I checked all that and it looks like it has some dead references.
Anyway i deiced to just use CAF business objects instead of doing it the straight way.
Thanks for you help anyway .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marcel,
A few possible reasons come to my mind...
Did you organize the imports in your entity class file and your bean implementation?
Did you specify the persistence unit name (SAP/ZBP_MANAGER_UNIT) in the persistence.xml file of your EJB project?
More info: http://help.sap.com/saphelp_nwce10/helpdata/en/46/96ec3c33621e5ce10000000a1553f6/frameset.htm
Regards,
Yordan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.