Locking Entity Service
Any one can provide me some good doc regarding Locking Entity Service apart from that is in help.sap.com?
Entity in CAF is implemented as a Java Data Object (JDO). So the concurrency control is probably implemeted at that level. So if Transaction 1 is updating a record and Transaction 2 tries to update it at the same time, then it might be locked pessimistically (and hence you get the error). Here's the link that provides some insights. If you notice, the isOptimistic is set to false.
http://help.sap.com/saphelp_nw04s/helpdata/en/3a/d60a00803111d5992f00508b6b8b11/frameset.htm
Thanx,
Mahesh
Similar Messages
-
Access to Entity Service from Portal Application
Hi Experts,
I have a hybrid application which will be making use of both Web Dynpro and Portal Applications. I decided to use Entity Services to store my back-end data and can access it fine from the Web Dynpro project. I have included the public part of my CAF project into the Used DCs of my Portal project and while I am able to call the methods of the Entity Service at compile time, at runtime I receive an error message on the page:
An exception occurred while processing a request
I know in order to get this to work for Web Dynpro I had to include sap.com/tccolapi.sap.com/cafruntimeuicouplingapilib as a Library Reference and a few Used DCs, but while I have added the Used DCs to the Portal project, I am unsure of how to add the Library Reference. I assume this has to be added to portalapp.xml, but I don't know the syntax.
Could somehow please reply with how to do this and whether this is all that is required in order to call Entity Service methods from Portal applications?
Thanks,
JPHi Smith,
Write click on the Project then goto the Properties=>Webdynpro References=>Library references
add
caf/eu/gp/api
sap.com/cafruntimeuicouplingapilib
And add the following DC in your project.
1> External in caf/eu/gp/api (CAF domain)
2> caf/eu/gp/api/wd (CAF domain)
3> com.sap.security.api.sda (SAP-JEE)
portalapp.xml
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal, SAPJ2EE::library:cafeugp~api"/>
</application-config>
<components/>
Check this thread .
Using CAF GP API in Portal Application project
Regards,
Mithu -
Using different RFC's in one Application / Entity Service?
Hello *,
I just want to create my first Composite Application Service but before I begin I have some questions.
The service will read out material master data from PLM. For that it has some findBy-operations with full-text search (creationDate, MatNr. ...) which return a result list and one operation which returns the material object for a given MatNr.
For this operations I need to call different RFC's which are imported by external services.
Now my questions:
1. What kind of service should wrap my external services and provide the operations? Should I use one or more entity service to wrap external services and then realize the operations in an application service? Or should I just take an application service without entity services?
2. The created service should not only be an internal CAF service but also a Web service? How can I realize this?
Thanks for your answers.
Best regards
JoschiOk, thanks a lot. So nearly everything's clear now. Only one question remains:
> 6. mark the entity service as "remote" and create a
> web service from it
> (note: this requires NW04s SP8)
Is this possible? I can't find any checkbox to mark an entity service as "remote" like in an application service (NWDS 7.0.07 and NW04s SP8).
So I have to map the findBy operations to an application service and create a web service from it!?
Regards
Joschi -
Error while building the DC for CAF entity services
Hi all,
I am trying to create entity services in CAS and following the following help document from help.
http://help.sap.com/saphelp_nw04s/helpdata/en/05/3a0741b5b7ee6fe10000000a1550b0/frameset.htm
But While building I am getting following imports errors:
Error:
com.sap.caf.rt.bol.IPersistentBusinessObject cannot be resolved or is not a valid superinterface
com.sap.caf.rt.services.eventing cannot be resolved (or is not a valid type) for the field CarJDO
com.sap.caf.rt.bol.da.jdo.JDODADataAccessService cannot be resolved or is not a type
changedData cannot be resolved ,CarJDO.java
com.sap.caf.rt.bol.da.DataAccessFactory.DATASOURCE_LOCAL_DA cannot be resolved CarJDO.java
The method removeACL(String, String) is undefined for the type CAFPermission CarServiceBean.java
loadByCustomKeys(Car) is undefined for the type IDataAccessService CarServiceBean.java
Can anyone help.Hi all,
I am trying to create entity services in CAS and following the following help document from help.
http://help.sap.com/saphelp_nw04s/helpdata/en/05/3a0741b5b7ee6fe10000000a1550b0/frameset.htm
But While building I am getting following imports errors:
Error:
com.sap.caf.rt.bol.IPersistentBusinessObject cannot be resolved or is not a valid superinterface
com.sap.caf.rt.services.eventing cannot be resolved (or is not a valid type) for the field CarJDO
com.sap.caf.rt.bol.da.jdo.JDODADataAccessService cannot be resolved or is not a type
changedData cannot be resolved ,CarJDO.java
com.sap.caf.rt.bol.da.DataAccessFactory.DATASOURCE_LOCAL_DA cannot be resolved CarJDO.java
The method removeACL(String, String) is undefined for the type CAFPermission CarServiceBean.java
loadByCustomKeys(Car) is undefined for the type IDataAccessService CarServiceBean.java
Can anyone help. -
Error while testing the created entity service
Hi
I have an error "access forbidden.please login again" while testing the entity service in the service browser.Please help.
Regards
ms.Hi,
I think this is not a problem from your end. You please check for another entity service. If you get the same error then this is the problem from server side. If possible please restart the server and try it again.
Thanks
Chandan -
Error after Deploying a new Entity Service
After deploying an entity service and testing it via the testtool the following error occured. Do you have an idea about the reason for this strange behaviour?
Thanks in advance.
ERROR. Exception thrown in method create. The transaction is marked for rollback.: javax/jdo/InstanceCallbacks -
Loader Info -
ClassLoader name: [siemens.com/sm3kshtlog] Parent loader name: [Frame ClassLoader] References: common:service:http;service:servlet_jsp service:ejb common:service:iiop;service:naming;service:p4;service:ts service:jmsconnector library:jsse library:servlet common:library:IAIKSecurity;library:activation;library:mail;library:tcsecssl library:ejb20 library:j2eeca library:jms library:opensql common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:adminadapter;service:basicadmin;service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:userstore interface:resourcecontext_api interface:webservices interface:cross interface:ejbserialization sap.com/cafcore library:cafmetamodellib library:cafruntimeapilib sap.com/cafruntimeear Resources: C:\usr\sap\P7D\JC00\j2ee\cluster\server0\apps\siemens.com\sm3kshtlog\EJBContainer\clientjars\clientsiemens.comsm3kshtlogejbmodule.jar C:\usr\sap\P7D\JC00\j2ee\cluster\server0\apps\siemens.com\sm3kshtlog\EJBContainer\applicationjars\siemens.comsm3kshtlogejbmodule.jar C:\usr\sap\P7D\JC00\j2ee\cluster\server0\apps\siemens.com\sm3kshtlog\src.zip Loading model: {parent,references,local} -
The error occurred while trying to load "com.siemens.sm3k.shtlog.besrv.sigdatsource.SigDatSourceJDO".:Hi Samir,
you could be right...
it could be, that our metadata are inconsistent, because we had before problems with the automatic code generation.
What should we do, if we have such a inconsistency of our ejbmodule, dictionary and metadata model?
is there a way to repair the project?
Undeploy and Redeploy doesn't have an effect on this.
We cannot start again, because we put in 10days of development?
Thanks for any help.
Greetings Jens -
Error while "Project Code Generation" in Entity service
Hi SDN's,
I have created an entity service which is the help documentaion of NWDS. After completion of all steps while generating project code i am getting an error called "AbstractStringBuffer not reachable"
Can any body help me in solving this issue.
Thanks in advanceHi Raju,
it seems like you have a version problem, try to use jdk 1.4 or higher and try.
Or go to
Prefrences --> Java --> Installed JRE's here change the Jdk to the latest,compatable version
Sometimes reinstallation also solves such problems.
Award pts if help full
Cheers
Souza -
Error while testing entity service
Hi all,
I created a CAF Development component and an entity service for the same. While trying test the entity service through service browser i get the follwing error :
Application error occurred during request processing.
Details:com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create deployable object 'sap.com/cafUIservicebrowser' since it is not of a Web Dynpro object.
Exception id: [0014225F392C006100000013000009A400042388306C40DD]
Please help...
Regards,
Sharmila
Message was edited by:
Sharmila SHi Sharmila,
It looks like your WAS does not have CAF deployed.
Regards,
Shubham -
Problem in data source mapping - CAF entity service.
Hi,
I created an external service for the bapi given below.
It has 2 tables as input parameters.
In entity service I created attributes(for input parameters) for table1 and table2. but in data source i couldn't map more than one attribute to the MATNRSELECTION and PLANTSELECTION.The attributes of the bapi are under the same collection.
I'm using NWDS version 7.0.06.
BAPI_MATERIAL_GETLIST (To List all Materials for a Particular Plant)
Input Parameters:
Table1: MATNRSELECTION
MATNRSELECTION-SIGN
MATNRSELECTION-OPTION
MATNRSELECTION-MATNR_LOW
Table 2: PLANTSELECTION
PLANTSELECTION-SIGN
PLANTSELECTION-OPTION
PLANTSELECTION-PLANT_LOW
Regards,
Shobhendrain your entity if you did create 2 attributes for one material number and one for plant, you can map them to the corresponding MATNRSELECTION-MATNR_LOW and PLANTSELECTION-PLANT_LOW.
For the sign and option, you should uncheck the IsNull parameter in the "Entity to External Operation parameters" mapping window of the Datasource Tab of your entity. And you should set default values like sign = I and option = EQ or something like that.
But if you want to pass a list of material numbers or plants, I do have a recollection from last year experiments of some limitation using collections as input parameters. maybe somebody else had better success with that -
In application services i am using entity services
hi all
i have created application services in entity services i have created findAll ()method that method i have accessed in application services by
getEntityServices.findAll .and i have made application service as a webservices but when i am testing this method in wsnavigator
this method gives error.please reply soon
com.sap.engine.services.webservices.wsnavigator.WSNavigatorException: null
Exception id: [02004C4F4F50004E000006FA00000E4000042DBF06435C4C]Hi, I tested the application using the CAF Runtime Configuration service test and it was an authorization Issue. The entity was set to check permissions. I disabled this in NWDS and it works fine now
-
Using application or entity services as model?
Hello,
is it a bad decision to access the CRUD and findBy operations of my entity services with UI patterns?
The book "SAP xApps and the Composite Application Framework" says, only application services should be used to handle with the UI, according to the MVC principles. But in carpool examples also entity services are used. So why should I map the needed entity service operations to application services?
What is the pro and contra?
Thanks and regards
JoschiHello Joachim,
I would also add that when the book states that "only application services should be used to handle the UI", the main point is that no business logic should be put in the UI and it should only be put in the application service. Once business logic is put in the UI, then you can not web service enable this logic. So in general, all business logic should be put in the Application Service.
If there is no business logic between the UI and the Entity (like in the carpool example), then there is no need to create a redundant application service. Since it is impossible to put business logic in the CAF UI Patterns, they can always directly call Entity Services without violating this design principle.
Regards,
Austin. -
Entity Services: readByCustomKeys operation mapped to External Service
Hello *,
in my CAF application I'd like to read a product from SAP PLM. Within my Entity Service materialNumber is my custom key and therefore a corresponding operation exists: readByCustomKeys.
I map this operation to my External Service (Web service provided by XI).
As I can't test this operation directly with the Service Browser (deosn't appear there), I wrap my Entity Service with an Application Service where I use the readByCustomKeys operation from Entity Service.
Now when I test the Application Service operation I get the following error message in Service Browser:
ERROR. Invalid type value :
In XI I can see that there was no error and I got well defined XML data as response. So the problem must occur anywhere in the mapping back from External Service data to Entity Service attributes.
Wrong data type mapping can be excluded as I already tested this possibility.
Does anyone know what could be the reason?
Thanks for your answers and best regards
JoschiHello Joachim,
I dont have a lot of experience with readByCustomKeys (one experience which failed) but uou can also use read itself. If you have defined materialNumber as a key in your entity service, then this field can be used in read operations as well (I have a lot of positve experiences with this approach). You will find materialNumber while mapping read with your external service and you need not map the key field generated by Entity Service.
For testing entity services, we have had several positive experiences with the config browser, specially for a findBy, read and even update operation. It was very easy to have a prototype UI to check the entity services.
I know this isnt the answer to your question, but just sharing my experiences.
All the best!!!
Regards,
Parag. -
Error when Building DC Project for CAF Entity Service
Hi All,
I got the following error message when Im building my CAF DC Project for Entity Services:
01.02.2008 12:09:10 /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] ERROR: ewrdata/metadata: Failed to read component definition from local file MyComponents:com.cas.elisa.gp/ewrdata/metadata : Cannot read component definition. File does not exist: C:\Documents and Settings\tfelp4\.dtc\LocalDevelopment\DCs\com.cas.elisa.gp\ewrdata\metadata\_comp\.dcdef (Cannot read component definition. File does not exist: C:\Documents and Settings\tfelp4\.dtc\LocalDevelopment\DCs\com.cas.elisa.gp\ewrdata\metadata\_comp\.dcdef)
But ".dcdef" file exists, its an XML file.
My NWDS environment is 7.0.13.
I used the tutorial exactly how it was written in the tutorial from SAP:
http://help.sap.com/saphelp_nw04s/helpdata/en/05/3a0741b5b7ee6fe10000000a1550b0/frameset.htm
What could be the problem?
Thanks for helping me...
SteveHi Chandan,
Can you do person.getRelatedModelObjects() and get the contact object, to check whether it is null, also check in the CAF DB whether the data you entered is present.
I am not sure the code is actually adding the contact model object to person.
Go thru this SDN Blog on usage of the CMI API's, there is a link for CMI documentation in it which might help you get the right code for adding the contact object.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115.
award points if info is helpful
Regards,
Anish -
Table Name Issue of CAF Entity Service
Hi All
I have a problem in the following scenario :--
I have created a CAF project named xflit_01 in local development. Another CAF project xflit_02 is created in local development of another machine's NWDS but both the project has a same entity service name,'Flight'. But one interesting observation from persistency tab of the entity service'Flight' is that for tables generated for both the entity services are same name, 'XAP_XFL_FLIGHT0001' where "XAP_XFL_" is namespace and "FLIGHT0001" is names. Both entity services are mapped with same external service.
Next I have deployed that two projects such as xflit_01 and xflit_02 in same central WAS from different machine's NWDS one by one. but how two tables with same name, 'XAP_XFL_FLIGHT0001' would be handle by WAS? But after the deployment we need to configure external service. So in External Service configuration window we are getting error when the link Service Registry is clicked.
Any idea will highly be appreciated.
Thanks
ChandanSolved by myself. Reason is for same db and CAF table naming convention
-
How to design CAF Entity service?
hello,
here is my question.
how to design CAF Entity service?
i got employees data and departments data.
an employee can join over one department, and of course, a department had many employee.
in tradition RDBMS(relational database management system), i'll create three tables and named "Employee", "Department" and "DepEmp". the table "DepEmp" is a kind of table for N to N relaction.
but when i use CAF's entity service, i can't do like RDBMS.
i can create three entity services, named "Employee", "Department" and "DepEmp". i can make service refence(pull service from left side of windows), but the information about Key(in properties) cannot be "true".
how can i do?
is there a different normalization way i have to learn.thank you so much, it really help.
but when the issue more complicated.
a employee can join multiple departments, and he/she got different job title in each department. case will like fallow.
Vic is a software engineer in XX company's IT department, and he is a MIS engineer in XX company's HR department.
the db( i'm sorry for take this for example) structure will like..
=======================================
table:employee
column:
employeeCode PK
name
phone
table:department
column:
departmentCode PK
name
location
table:jobTitle
column:
titleCode PK
name
description
table:deptEmployee
column:
employeeCode PK FK
departmentCode PK FK
titleCode PK FK
=======================================
my SAP NetWeaver Developer Studio is version 7.0
1. how i make sure that three keys be mapped each other?(empCode,deptCode,titleCode)
2. is there have any "IUD abnormality" risk?
3. if there have, how can i avoid it?
thank you again, i'm sorry for ask much, because the way to design CAF Entity Service is that i didn't learn before. it really make me confused.
have a nice day
Maybe you are looking for
-
Is it still impossible to do bootcamp and VMWare or Parallels?
I use bootcamp extensively to run several windows programs, mostly MS Office 2010. I also need to use Office 2011 so being able to switch back and forth between OS X and Win 7 is essential (I do this because I'm a consultant and curriculum developer-
-
I just bought an Apple TV and am trying to set it up. I am connected to wireless, is having difficulties setting time and date. When I try to connect to iTunes and sharing. It keeps telling me that there is a problem with my apple ID and password. I
-
hello,I have a question. I am building a tool by Visual C++.net 2003. When I wrote the source just like sample code, the query went well. now I just changed that into methods of class. then, other things for example putDocument, etc, went well, but I
-
Power charging works at random
Charging works randomly. By this, I mean the amber light does not come on. I turn it over, straighten the cable, unplug, replug, and finally it might work. When it does go amber, it does charge the macbook air, but the power supply is wack. I want to
-
FF_6 drastically slowed connections to links. How to fix?
FF-4 was fast. Upgraded to FF-6 and immediately downloads of links slowed drastically. Contacted support (GURUAID) who tried to sell me on paid service and refused to put me back to 4. They refused to give contact tel. no. for Mozilla authority and w