Query on CAF
Hi.
Im beginner to CAF, I have some more queries.
1.What is IServiceFacade?
2.What is difference between ModelNode and ValueNode?
3.What does ModelUtility.logExecute(IWDNode, IWDNode) method do?
4.what does these naming conventions represent?
a. AQProduct
b. PQProductFindAll
c. QQProductServiceAll
5. Any link to get more info on the attributes, methods related to IAspect, IQuery, IServiceModule, IServiceFacade etc?
Regards
Bala
I read somewhere that Teradata can also read
unicode.Anyway this column is set to Latin. And Im
able to directly insert records.
I view the records using teradata sql assistant - and
the records inserted by the java application have a ?
for french character whereas the ones I inseretd
manually are displayed correctly.Ok, so that lends more credit to one_dane's response. Somewhere in your Java code you are munging the string.
Similar Messages
-
Question about CAF Query.
Hi.
1、AnyOne can tell me if I can use sql in CAF?
2、If I can use advance Sql in CAF such as 'select count(*) from tab'?
3、if QueryFilter has method like this 'select * from table where col in('a','b')'?
Thanks
f
Edited by: hao fan on Jul 15, 2008 5:52 PMHi,
You can use only Queryfilter to from select queries.
Using findBy() methodes you can form the select query given in third point.
As per my knowledge, there is no direct way to from the query
'select count(*) from tab'. -
Error calling a Web Service in CAF
Hi Experts
I have develop an CAF project and in this project i call some Enterprise Services. One of this ES is CapacityLoadPlanningViewByCapacityLoadPlanningViewQueryResponse_In.
I import this service in CAF Project from SCM system. Then i did a default mapping to an Application Service.
I generate, build and deploy the project. When i test this service i have this message error:
Caused by: com.sap.caf.rt.exception.CAFServiceException: Connection IO Exception. Check nested exception for details.
Caused by: com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException: Parameter set failure. The runtime was not able to set some result parameter value. See nested exception for details
"failed to execute Operation query: String index out of range: 0"
In trabsaction SICF i can see the response xml of this service, and i see that one of returning attribute is empty and should be return some value because this attribute is required.
timeZoneCode and daylightSavingTimeIndicator
<ProductionPlanningOrderTotalCapacityLoad>
<ProductionPlanningOrderStartDateTime timeZoneCode="" daylightSavingTimeIndicator="">2010-01-12T16:48:13-02:00</ProductionPlanningOrderStartDateTime>
I try to change the xml schema to corretct this but nothing happend.
Cab someone help me about that issue?
Thanks and regards.
Marcos Brandao.Marcos,
This looks like the error message you have:
http://wiki.sdn.sap.com/wiki/display/JSTSG/%28NWA%29Problems-P050
Have you checked if this is related to a permission error?
Cheers. -
Consuming external web services in CAF
Hi there,
I am trying to set up a show case where a composite CAF app (exposed via WD or VC) uses SAP web services as well as external services. In this case, I chose to use the Fedex web services (http://fedex.com/developer).
Everything works fine, I am able to import the webservice using the locally stored WSDL into my composite app, apply the mapping and implement the application service......build, deploy...all good.
The problem occurs when trying to create the physical destination (under nwa/destination template management). NW expects a pointer/url to the wsdl or wsil file, but Fedex doesn't provide that via http. Putting the wsdl on a different web server doesn't help either as the SOAP call will be routed to the same host where the wsdl resides (in this case NOT the fedex system).
Is there any way to circumvent the WSDL retrieval with external web services in Netweaver ? One alternative solution could be to use the Netweaver Service registry and publish the fedex wsdl to that, but I would like to avoid that as we haven't configured the SR at the moment.
Thx, NickLooks like I don't need it necessarily.
There seems to be a bug in NW/CE 7.1. When defining a destination which points to a WSDL file which in turn points to a different server for SOAP messages (ServicePort), the endpoint URL is incorrectly defined.
WSDL URL: http://www.server1.com/test.wsdl
SOAP URL/Port: http://server2.com/webservices
the server tries to dispatch the SOAP call to http://server1.com/webservices which can't be found.
In CE 7.1.1. though, that bug is fixed, and everything works fine without the need to publish the remote service (wsdl) to the SR and to subsequently query it.
Nick -
How to sort web dynpro table wich data bind to CAF Entity Service
Hi
I created UI Table based on Model Node (CAF Entity).
When I try to sort this Table with using TableSorter, I get following in the trace log:
The error is: com.sap.caf.rt.exception.CAFBaseRuntimeException: Aspect does not support changing rows via its list interface
Have I met CAF limitation, or do I do something wrong?Hi Nikolai,
if you use the implementation
<code>
IServiceFacade serviceFacade = CAFServiceFactory.getServiceFacade(ts2Definition.class);
</code>
it means you use the typed access.
Possible in this sneak the
<code>
IServiceFacade serviceFacade = CAFServiceFactory.getServiceFacade();
</code>
does not work.
Try the following way - it must work.
<code>
private IServiceFacade getServiceFacade() {
final String method = "getServiceFacade()";
entering(method);
if (m_serviceFacade==null) {
try {
CoolConnectionProperties properties = new CoolConnectionProperties()
public String getCoolHost()
return "caf";
m_serviceFacade = CoolUtils.getServiceFacade(properties);
} catch (CoolConnectionPropertiesException e) {
wdComponentAPI.getMessageManager().reportException(e.getMessage(),false);
CAFUIPublicLogger.traceThrowable(Severity.ERROR, method, e) ;
} catch (CoolUtilsException e) {
wdComponentAPI.getMessageManager().reportException(e.getMessage(),false);
CAFUIPublicLogger.traceThrowable(Severity.ERROR, method, e) ;
exiting(method) ;
return m_serviceFacade;
</code>
Also do not sort in query. Sort the model node after you aspect binded. Use the method
node.sort(your_comparator) ;
the comparator like this:
<code>
public class YourComparator implements Comparator
public int compare(Object o1, Object o2)
IWDNodeElement nodeElement1 = (IWDNodeElement) o1 ;
IWDNodeElement nodeElement2 = (IWDNodeElement) o2 ;
String name1 = nodeElement1.getAttributeAsText(_attrName) ;
String name2 = nodeElement2.getAttributeAsText(_attrName) ;
if (name1 == null)
return -1 ;
if (name2 == null)
return 1 ;
if (_direction == "up")
return name1.compareToIgnoreCase(name2) ;
else if (_direction == "down")
return -name1.compareToIgnoreCase(name2) ;
return 0 ;
public void initilize(String attrName, String direction)
_attrName = attrName ;
_direction = direction ;
private String _attrName ;
private String _direction ;
</code>
Best regards,
Aliaksei. -
Problem in CAF- UI with web dynpro
Hi all.
I am creating a caf module . It has external service , entity and application service.
after i have designed all these three i have created the web dynpro model.
the model class has A , Q, P as suffix of the classes . Whai is the meaning odofthis A , P amd Q .?
also when i try to create an object of any of these after mapping it gives an error -
The <node> type cannot be instiantiated . What does this mean?
i need to map a UI screen to an search query function of the application service
and to call that serice on the click of button.
please help me in this regard
Thanks
points asured for helpHi Anish,
Thanks for your msil
I have 2 different landscapes to work on .
on one my caf project is working fine ,
but it is throwing the linkage error or also at times java.lang.IncompatibleClassChangeError
java.lang.IncompatibleClassChangeError
at com.sap.recaf.services.recaf.userservice.UserServiceProxy.serviceModule(UserServiceProxy.java:20)
at com.sap.recaf.services.recaf.userservice.UserServiceProxy.createCallbapiQuery(UserServiceProxy.java:43)
at com.sap.test.user.User.wdDoInit(User.java:101)
at com.sap.test.user.wdp.InternalUser.wdDoInit(InternalUser.java:224)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
... 28 more
it gives the hint ---
If the exception message indicates, that the modified class is part of the Web Dynpro Runtime (package com.sap.tc.webdynpro.*) then the running Web Dynpro Runtime is of a version that is not compatible with the Web Dynpro Designtime (Developer Studio or Component Build Server) which has been used to build + compile the application.
I think the problem is of the config settings ,
can u give any further suggestion?
bye -
Flashback 기능 관련 질문 드립니다.[FLASHBACK TRANSACTION QUERY]
flashback 기능을 공부 중에 있습니다.
테스트 환경 은 10GR1 입니다.
scott 에 dba 권한을 주구 쉽게 테스트 진행 중에
예제와 좀 다른 결과가 나와서, 좀 이상하게 생각이 되서요..
원래 이게 맞는지도 잘 모르겠네요..
제가 테스트 진행에 참고하는 문서는
Reviewed by Oracle Certified Master Korea Community
( http://www.ocmkorea.com http://cafe.daum.net/oraclemanager )
A REWIND BUTTON FOR ORACLE 10G DATABASE
– FLASHBACK BEST PRACTICES
입니다. 오타가 좀 있더군요..
아래와 같이 테스트를 진행 하였습니다.
### Test 시작
# sysdate check
--select sysdate from dual
--2007/02/21 20:14:57
# emp data check
--select * from emp
--7782 CLARK MANAGER 7839 1981/06/09 00:00:00 2450 10
--7788 SCOTT ANALYST 7566 1982/12/09 00:00:00 3000 20
--7839 KING PRESIDENT 1981/11/17 00:00:00 5000 10
--7844 TURNER SALESMAN 7698 1981/09/08 00:00:00 1500 0 30
--7876 ADAMS CLERK 7788 1983/01/12 00:00:00 1100 20
--7900 JAMES CLERK 7698 1981/12/03 00:00:00 950 30
--7902 FORD ANALYST 7566 1981/12/03 00:00:00 3000 20
--7934 MILLER CLERK 7782 1982/01/23 00:00:00 1300 10
## 3rows 삭제
--delete emp where empno in ( 7782,7788,7839 )
--commit
## 삭제 결과 확인
--select * from emp
--7844 TURNER SALESMAN 7698 1981/09/08 00:00:00 1500 0 30
--7876 ADAMS CLERK 7788 1983/01/12 00:00:00 1100 20
--7900 JAMES CLERK 7698 1981/12/03 00:00:00 950 30
--7902 FORD ANALYST 7566 1981/12/03 00:00:00 3000 20
--7934 MILLER CLERK 7782 1982/01/23 00:00:00 1300 10
## Sysdate Check
-- select sysdate from dual
-- 2007/02/21 20:16:19
## 원래 이부분은 원문은 where 절을 추가하여 아래와 같습니다.
SELECT version xid, ename
FROM emp
VERSIONS BETWEEN
TO_TIMESTAMP('03/15/2005 15:30:00', 'MM/DD/YYYY HH24:MI:SS') AND
TO_TIMESTAMP('03/15/2005 16:10:00', 'MM/DD/YYYY HH24:MI:SS')
WHERE empno = ‘7900’;
제가 테스트 한건 특정 시간에 delete 혹은 dml 에 의해서 변경된 전체를
찾는 다는 의미에서 where 절을 주지 않았습니다.
==> 이 부분이 맞는지 모르겠네요..
-- select versions_xid, ename from emp versions between timestamp
-- to_timestamp('2007.02.21 19:40:00','YYYY.MM.DD HH24:MI:SS') and
-- to_timestamp('2007/02/21 20:16:19','YYYY.MM.DD HH24:MI:SS')
## Return 된 결과
-- 0004002D0002F847 KING
--0004002D0002F847 SCOTT
--0004002D0002F847 CLARK
-- CLARK
-- SCOTT
-- KING
-- TURNER
-- ADAMS
-- JAMES
-- FORD
-- MILLER
## xid 값을 통해서 undo_sql 문장을 찾고 이를 통해서 손쉽게
복구가 가능하다고 하는데 실제로 return 되는 undo_sql 문장은
전체가 아닌 한 row 에 대한 undo_sql 문장만 return 되서요..
--SELECT operation, undo_sql
--FROM FLASHBACK_TRANSACTION_QUERY
--WHERE xid = HEXTORAW('0004002D0002F847');
--DELETE insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO")
-- values ('7782','CLARK','MANAGER','7839',TO_DATE('81/06/09', 'RR/MM/DD'),'2450',NULL,'10');
--BEGIN
==> undo 로 return 되는것은 한 row 에 대한 undo_sql 문 !!
# 이건 참고 문서 원문 입니다. xid 값을 통해서 원하는 문장 찾기
SELECT operation, undo_sql
FROM FLASHBACK_TRANSACTION_QUERY
WHERE xid = HEXTORAW(‘0400260021450000’);
## Test 끝
이것이 정상적인지 제가 miss 하고 가는 것이 있는지 조언
부탁드립니다.
좋은 하루 되세요 .
글 수정:
darkturtle
글 수정:
darkturtleflashback 기능은 9i때 도입된건 맞습니다. 다만 9i 때는 [flashback query] 만 제공 되었고,
10g 이후부터
lashback Database
Flashback Drop
Flashback Query
Flashback Version Query
Flashback Transaction Query
Flashback Table
모두 지원되며, 11g에서도 물론 지원됩니다.... 아마 더 추가된 flashback 기능이 있을 겁니다.. ^^ -
Using XI WebService in CAF as external service with Logical Destination?
Hello,
I created a scenario WebService -> XI -> WebService in a PI7.1 system. I used the Web Service Wizard in order to generate a WSDL. If I test it for example in XMLSpy it works fine.
We then imported this WSDL into CAF as external service. That also works.
Now we have to map the CAF Service to a logical Destination. This has to be maintained in NWA. But here we need a URL to the WSDL. I cannot use the local WSDL Filed which I from that WebService Wizard.
Is there any generic URL were I can get the WSDL for the WebService which calls the XI Interface?
Thanks and Best Regards
Katharina
Edited by: Katharina Seiz on Oct 6, 2008 6:19 PMGood Idea. I tried that. I added the WSDL to a Web Module and deployed it with the CAF ear module. It is now available via: http://vmw2469.wdf.sap.corp:50000/testxi/GLAccountPostingSync_Out_PI71.wsdl
If I test it directly in WSNavigator it works fine, but if I map my CAF Service to the logical Destination which is also using that URL, I get the following error:
com.sap.engine.services.webservices.espbase.query.exceptions.TechnicalException: Deserializing WSDL stream http://vmw2469.wdf.sap.corp:50000/testxi/GLAccountPostingSync_Out_PI71.wsdl failed
If I try to find the service via the function "Search by Logical Destination" I get the following error:
Invalid content type while requesting http://vmw2469.wdf.sap.corp:50000/testxi/GLAccountPostingSync_Out_PI71.wsdl. Expected Content-type: text/xml, received Content-type: content/unknown, used user to connect: most
Has someone any idea what the problem could be?
Thanks and Best Regards
Katharina
Edited by: Katharina Seiz on Oct 6, 2008 6:32 PM -
CAF case insensitve search using QueryFilter
Is it possible to do case insensitive search in CAF using QueryFilter? By default it does case sensitive searches in data elements of Entity Services.
I am using 7.0.
Also according to
http://help.sap.com/saphelp_nw70/helpdata/en/44/6359a603b13674e10000000a114a6b/content.htm
The code below searches between these 2 strings... What does that mean?
QueryFilter("STRING_SAMPLE", "!=");Hi,
QueryFilter("Hello", "Bye");
is true if the data queried is equal to one of the two values (or equal to "Hello" or equal to "Bye").
hope been helpful,
best regards,
Marco. -
Exception in CAF application service
Hi All
I am trying to access the BAPI bapi__mddataset__get__axis__info
from a CAF application service. But receive following exception. Any clue how to solve it.
at com.sap.caf.rt.bol.da.remote.MessageEntityConverter.createNewInstance(MessageEntityConverter.java:788)
at com.sap.caf.rt.bol.da.remote.MessageEntityConverter.retrieveElementValue(MessageEntityConverter.java:494)
at com.sap.caf.rt.bol.da.remote.MessageEntityConverter.retrieveMessageValue(MessageEntityConverter.java:447)
at com.ibm.cer_test.extsrv.MPConnector.process(MPConnector.java:65)
at com.ibm.cer_test.extsrv.bapi__mddataset__get__axis__info.BAPI__MDDATASET__GET__AXIS__INFOBean.BAPI__MDDATASET__GET__AXIS__INFO(BAPI__MDDATASET__GET__AXIS__INFOBean.java:40)
at com.ibm.cer_test.extsrv.bapi__mddataset__get__axis__info.BAPI__MDDATASET__GET__AXIS__INFOLocalLocalObjectImpl0.BAPI__MDDATASET__GET__AXIS__INFO(BAPI__MDDATASET__GET__AXIS__INFOLocalLocalObjectImpl0.java:115)
at com.ibm.cer_test.appsrv.mdapp.MdAppBean.getMdDataSet(MdAppBean.java:295)
at com.ibm.cer_test.appsrv.mdapp.MdAppLocalLocalObjectImpl0.getMdDataSet(MdAppLocalLocalObjectImpl0.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.caf.rt.services.serviceaccess.ServiceWrapper.findByDataObject(ServiceWrapper.java:269)
at com.sap.caf.rt.services.serviceaccess.CAFServiceAccessBeanImpl.findByDataObject(CAFServiceAccessBeanImpl.java:223)
at com.sap.caf.rt.services.serviceaccess.CAFServiceAccessLocalLocalObjectImpl20.findByDataObject(CAFServiceAccessLocalLocalObjectImpl20.java:875)
at com.sap.caf.rt.ui.cool.generic.AspectServiceAccess.findBy(AspectServiceAccess.java:275)
at com.sap.caf.rt.ui.cool.generic.Query.execute(Query.java:218)
at com.sap.caf.ui.servicebrowser.components.visualizer.controllers.TableViewCC.execute(TableViewCC.java:323)
at com.sap.caf.ui.servicebrowser.components.visualizer.controllers.TableViewCC.setup(TableViewCC.java:276)
at com.sap.caf.ui.servicebrowser.components.visualizer.controllers.wdp.InternalTableViewCC.setup(InternalTableViewCC.java:192)
at com.sap.caf.ui.servicebrowser.components.visualizer.views.ServiceBrowserCV.onActionExecuteQuery(ServiceBrowserCV.java:180)
at com.sap.caf.ui.servicebrowser.components.visualizer.views.wdp.InternalServiceBrowserCV.wdInvokeEventHandler(InternalServiceBrowserCV.java:215)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:330)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:707)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:661)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:229)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.ClassNotFoundException: com.ibm.cer_test.extsrv.bapi__mddataset__get__axis__info.output.AXIS__INFO
Loader Info -
ClassLoader name: [ibm.com/cer_test]
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/cafruntimeear
library:com.sap.guid
library:com.sap.util.monitor.jarm
sap.com/com.sap.jdo
library:cafmetamodellib
sap.com/caf~core
library:cafruntimeconnectivity
library:cafruntimeconnectivity~base
service:applocking
interface:security
library:cafruntimeapi~lib
service:tcsecdestinations~service
interface:tcsecdestinations~interface
Resources:
C:
usr
sap
J17
JC01
j2ee
cluster
server0
apps
ibm.com
cer_test
src.zip
C:
usr
sap
J17
JC01
j2ee
cluster
server0
apps
ibm.com
cer_test
EJBContainer
applicationjars
ibm.comcer_testejbmodule.jar
C:
usr
sap
J17
JC01
j2ee
cluster
server0
apps
ibm.com
cer_test
EJBContainer
clientjars
clientibm.comcer_testejbmodule.jar
Loading model: {parent,references,local}
at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:382)
at com.sap.caf.rt.bol.da.remote.MessageEntityConverter.createNewInstance(MessageEntityConverter.java:781)
... 50 more
Thanks in advance
SudipHi,
I too got an exception like that.
1. Instead of code
patentServiceLocal local = this.getpatentService();
local.update(OBJECT);
use the following
this.getpatentService().update(OBJECT);
I got by problem solved this way.
Regards,
Srinivasan Subbiah -
Selecting Key for Entity Services in CAF
Hello All,
I have a question. While creating attributes for an entity service, we have an option to select it as key or complex. Suppose if we choose many attributes as key , then will it be a composite key ?
Like if we created Entity "project", and then create following attributes
Dept (Key)
ProjectName (Key)
Description
Then will Dept and ProjectName together form a composite key ? or they will be individual keys for the project?
Thanks
Ashutosh RastogiHi Ashutosh,
I think they would form a composite key.
In fact the other day we were developing a PurchaseOrder entity service and by mistake chose poNo and vendorNo both as keys. Now we had a findByVendorNo operation which was returning a list of POs and we had only mapped the po from the BAPI to the attribute. Everything was hunky-dory during design time, we were able to build and deploy but while testing it using the service browser, on "execute query" CAF returned us an error. This was even though poNo was unique for every record.
Regards,
Parag. -
CAF case insensitve search QueryFilter
Is it possible to do case insensitive search in CAF using QueryFilter? By default it does case sensitive searches in data elements of Entity Services.
I am using 7.0.
Also according to
http://help.sap.com/saphelp_nw70/helpdata/en/44/6359a603b13674e10000000a114a6b/content.htm
The code below searches between these 2 strings... What does that mean?
QueryFilter("STRING_SAMPLE", "!=");Hi,
QueryFilter("Hello", "Bye");
is true if the data queried is equal to one of the two values (or equal to "Hello" or equal to "Bye").
hope been helpful,
best regards,
Marco. -
CAF specifying sort order in a findBy
I'm fairly new to CAF and was wondering if there is a way of specifying the sort order when doing a findBy query. I can't seem to find any information on this but it seems like a very basic need when querying a db.
Thanks,
CindyHi Cindy,
Unfortunately there's no way to specify order by or paging in CAF findBy operations. This will be available in the next major CAF release. -
U00AB DataAccessException u00BB when calling CAF web service
Hi expert,
When launching any operations through a web service created in CAF-CORE (release Portal EP 70 SPS12), I get the error message «PersistenceManager was closed » (see log).
While after launching the related methods in caf test tool, it works and enables further use of web service operations including the one that returned Persistence Manager error message.
It seems that launching the test tool enable the use of PersistenceManager.
This strange behaviour reveals only once after each restart of the portal.
Anyone has an idea to enable directly the persitence manager ?
Thanks a lot.
log :
Caught com.sap.caf.rt.exception.DataAccessException: PersistenceManager was closed.
at com.sap.caf.rt.bol.da.jdo.JDODADataAccessService.query(JDODADataAccessService.java:710)
at com.arcelor.supmgt_1.besrv.supplierdoc.SupplierDocServiceBean.findByMultipleParametersInternal(SupplierDocServiceBean.java:418)
at com.arcelor.supmgt_1.besrv.supplierdoc.SupplierDocServiceBean.findByMultipleParameters(SupplierDocServiceBean.java:320)
at com.arcelor.supmgt_1.besrv.supplierdoc.SupplierDocServiceBean.findByRamsesId(SupplierDocServiceBean.java:370)
at com.arcelor.supmgt_1.besrv.supplierdoc.SupplierDocServiceLocalLocalObjectImpl0_0.findByRamsesId(SupplierDocServiceLocalLocalObjectImpl0_0.java:920)
at com.arcelor.supmgt_1.appsrv.supdocmanager.SupDocManagerBean.findSupplierDocByRamsesId(SupDocManagerBean.java:1737)
at com.arcelor.supmgt_1.appsrv.supdocmanager.SupDocManagerBean.findSupplierDocByRamsesId_R(SupDocManagerBean.java:1705)
at com.arcelor.supmgt_1.appsrv.supdocmanager.SupDocManagerObjectImpl0_0.findSupplierDocByRamsesId_R(SupDocManagerObjectImpl0_0.java:3988)
at com.arcelor.supmgt_1.appsrv.supdocmanager.SupDocManager_Stub.findSupplierDocByRamsesId_R(SupDocManager_Stub.java:3475)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
at $Proxy185.findSupplierDocByRamsesId_R(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: javax.jdo.JDOFatalUserException: PersistenceManager was closed.
at com.sap.jdo.common.PersistenceManagerImpl.assertIsOpen(PersistenceManagerImpl.java:1220)
at com.sap.jdo.common.TransactionImpl.getNontransactionalRead(TransactionImpl.java:285)
at com.sap.jdo.common.state.PersistentNonTransactional.transitionReadField(PersistentNonTransactional.java:140)
at com.sap.jdo.common.state.StateManagerImpl.loadField(StateManagerImpl.java:1150)
at com.sap.jdo.common.state.StateManagerImpl.isLoaded(StateManagerImpl.java:1919)
at com.sap.caf.tc.besrv.simpletype.SimpleType.jdoGetprimitiveType(SimpleType.java)
at com.sap.caf.tc.besrv.simpletype.SimpleType.getPrimitiveType(SimpleType.java:538)
at com.sap.caf.tc.besrv.simpletype.SimpleType.getProperty(SimpleType.java:590)
at com.sap.caf.rt.bol.util.SimpleTypeHelper.getSimpleTypeByKey(SimpleTypeHelper.java:188)
at com.sap.caf.rt.bol.util.SimpleTypeHelper.parse(SimpleTypeHelper.java:140)
at com.arcelor.supmgt_1.besrv.supplierdoc.SupplierDocJDO.getCustomProperty(SupplierDocJDO.java:1057)
at com.arcelor.supmgt_1.besrv.supplierdoc.SupplierDocJDO.getProperty(SupplierDocJDO.java:978)
at com.sap.caf.rt.bol.da.jdo.JDOToPlainObjectsConverter.copyValues(JDOToPlainObjectsConverter.java:211)
at com.sap.caf.rt.bol.da.jdo.JDOToPlainObjectsConverter.convertJDOToPlainObject(JDOToPlainObjectsConverter.java:78)
at com.sap.caf.rt.bol.da.jdo.JDODADataAccessService.query(JDODADataAccessService.java:680)
... 39 moreMarcos,
This looks like the error message you have:
http://wiki.sdn.sap.com/wiki/display/JSTSG/%28NWA%29Problems-P050
Have you checked if this is related to a permission error?
Cheers. -
Hello,
I try to use JPA to query custom data source, but my persistence.xml is overwriten by CAF, so it will use the system datasource and I will always have the exception like following.
Persistence unit 'XXXXX' requested from archive 'XXXX~caf~ejbmodule.jar' is not present in application 'XXXX~caf~ear' or is not visible to the requested archive. Resolved PU root archive path is 'null', resolved PU name is 'null'.:
Is there any solution to enable multi-persistence unit with CAF?
Regards,
TSHi,
there is no chance to use the same persistence.xml as CAF. You cannot prevent CAF from overwriting the persistence.xml.
Ttry another persistence.xml inside another EJB DC and bundle it inside the same EAR.
According to section 7.1.1 "Responsibilities of the Container" in JPA 1.0 specification, JSR 220: Enterprise JavaBeans,Version 3.0, Java Persistence API, more than one jar with META-INF/persistence.xml inside the same EAR should work.
Regards
Rolf
Maybe you are looking for
-
Credit memo on billing posted to accounting
Hi... If I wanted created a credit memo on billing that already posted to accounting, do I need to cancel the billing first? This billing posted to acct on the previous closed fiscal year. Tq Henery
-
Is there a keyboard stroke for tagging photos in iPhoto?
I would like to learn of a keyboard stroke for tagging photos in iPhoto. I called apple a while back and was told there is no such shortcut. You have to manually click on "add a face." Then, if you want to tag multiple people in one photo, you hav
-
Very odd question...
My mother had received a message on her answering machine from our local police department yesterday saying that they needed her to call them, that it wasn't important, but that they needed to speak with her. Today, she called back, and the officer t
-
Need to call Smartform from MB90
Hi All, Ii need to call the custom smartoform for consignment goods issue ,could anybody please tell me the standard report to configure in nace. Thanks, Kumar
-
Indesign folio on a PC...
Hi all, First question I have has already been addressed but that was a year ago. I'm using InDesign on a PC and try to make a folio app for the iPhone. I can preview it in the dektopviewer but not my connected device. The popup -when you hover over