Cross-Repository RQL Queries
Hi,
I have a customer that has an object type A stored in repository R1 containing a reference to an object type B stored in repository R2. They complain about receiving errors in version 9.4 if repositories R1 and R2 reside in different physical databases. According to my knowledge, a RQL query retrieving A-type objects filtering on B-type criteria should work. Are you aware of any problems with this?
Thanks in advance
You need to have cross schema tables permissions otherwise certain RQL queries fail.
For example if table T1 is in Schema A and T2 in schema B, in case of cross repository references there are some scenarios where the below query is triggered from DataSourceA
select * from T1,T2 where T1.id=T2.id
For above query, Schema A should have read permissions on tables of Schema B.
Peace
Shaik
Similar Messages
-
Cross-Repository Validation/Load
Assume that in the Product repository we have a qualified-lookup table which contains the Vendor/Pricing for a part.
In this case we have two master objects that are (somewhat)related... like a Purchase Info Record in R3 ERP. The Product and the Vendor (with cost..). Is there an established scenario where the Vendors are loaded in their respective repository and then a 'cross-repository' validation or load can be done to the Product repository. Is there an defined method/API/approach for this?Hi Tom,
Go to
https://websmp109.sap-ag.de/instguides
Installation and Upgrade guides -> SAP Netweaver ->Release 04-> Operations -> SAP MDM -> SAP Documentation Center
Look for
1.MDM 5.5 SP03 - Java API Library Reference Guide
2.MDM 5.5 SP03 - COM API Library Reference Guide
You need to have service market place id to view/download this file
Thanks and Regards
Subbu -
Cross-tab style queries...
As you may have guessed, I'm new to the Oracle flavour of SQL.
I'm trying to create a cross-tab query, do any of you guys know a good way of doing this?
Thanks very much.You can do like this. Its an ex. you can extend as you need
SELECT job,
sum(decode(deptno,10,sal)) DEPT10,
sum(decode(deptno,20,sal)) DEPT20,
sum(decode(deptno,30,sal)) DEPT30,
sum(decode(deptno,40,sal)) DEPT40
FROM scott.emp
GROUP BY job
Hari -
HI,
how we can apply cross joins on select query.plz help me .I am using tables ekko,ekpo and lfa1 .Plz help.Hi Amardeep,
as code given by one of guru's in the above joins statement is good when only if use the KEY-FIELDS in where condition if not it causes performance issue , so that you can use the FOR ALL ENTRIES IN statement which it gives good perfomance.
Table declarations
TABLES: ekko, "Purchasing Document Header
ekpo, "Purchasing Document Item
lfa1. "Vendor Master (General Section)
Declaration of types:
data: BEGIN OF tbl_ekko,
ebeln TYPE ebeln,
lifnr TYPE lifnr,
END OF tbl_ekko.
data: BEGIN OF tbl_ekpo,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
END OF tbl_ekpo.
data: BEGIN OF tbl_lfa1,
lifnr TYPE lifnr
ebelp TYPE ebelp,
END OF tbl_lfa1.
*Selection screen:
PARAMETERS: p_lifnr TYPE lifnr,
p_ebeln type ebeln.
Selection (JOIN):
START-OF-SELECTION.
SELECT lifnr
FROM lfa1
INTO table tbl_lfa1
WHERE lifnr EQ p_lifnr.
if sy-subrc = 0.
sort tbl_lfa1 by lifnr.
endif.
if not tbl_lifnr is initial.
SELECT ebeln lifnr
FROM ekko
INTO table tbl_ekko
FOR ALL INTRIES IN tbl_lfa1
WHERE ebeln EQ p_ebeln
AND lifnr EQ tbl_lfa1-lifnr.
if sy-subrc = 0.
sort tbl_ ekko by ebeln.
endif.
endif.
if not tbl_ekko is initial.
SELECT ebeln ebelp
FROM ekpo
INTO table tbl_ekpo
FOR ALL INTRIES IN tbl_ekko
WHERE ebeln EQ tbl_ekko-eblen.
if sy-subrc = 0.
sort tbl_ ekpo by ebeln.
endif.
endif.
END-OF-SELECTION.
Main program logic:
LOOP AT tbl_ekpo.
read table ekko with key ebeln = tbl_ekpo-ebeln BINARY SEARCH.
if sy-subrc = 0
WRITE: / tbl_ekko-ebeln,
tbl_ekko-ebelp,
tbl_ekpo-lifnr.
endif.
ENDLOOP.
<b>NOTE : use only KEY-FIELDS in WHERE condition for better perfomance</b>
In that above code you can change a/c to ur inputs availabe.
<b>Reward with points if helpful.</b>
Regards,
Vijay -
Cross Repository Duplicate Check
Dear Gurus,
We have a huge data migration that happens in 34 countires, the MDM is centrally connected and each country have their own repositories ( Vendor, Customer, Materials ).
My question is, is it possible to do a duplicate check on datas ( customer, vendor, materials )across repositories.
Bes Regards,
SKHi Sathya,
Since they are standalone repositories , unfortunatley it is not possible to check duplicates across them.
You can identify duplicates only in central and then send back to countires repositories. But still not possible across Customer, Vendor and Materials.
I guess with MDM 7 , it will be possible.
Hope this helps,
+ An -
How to copy a document from one CM Repository to another CM Repository?
I am trying to build a UI Command that similiar to the standard "Delete" UICommand, but the only thing is before the document get deleted in the current repository (say Default - it is a CM Repository with fsdb mode), it create a copy in another archive repository (say Default_Archieve - is is a it is a CM Repository with fsdb mode).
Here is some portion of my UICommand class (it is a modification of the standard "delete" UICommand)
Code Start----
import com.sapportals.wcm.command.CopyResourceCommand;
import com.sapportals.wcm.command.DeleteResourceCommand;
private IRenderingEvent execute(IResource res) throws WcmException {
String dispname = res.getDisplayName(true);
//Here we copy the resource to another repository before the delete the resource in the current repository.
CopyResourceCommand copyCommand = new CopyResourceComman();
copyCommand.setResource(res);
System.err.println("ArchiveResource:execute:" + dispname + " is set to be copied.");
String rid = res.getRID().toString();
System.err.println("ArchiveResource:execute:rid=" + rid);
String new_rid = rid.replaceAl("default","default_archive");
System.err.println("ArchiveResource:execute:new_rid=" + new_rid);
copyCommand.setTarget(newRID);
copyCommand.execute();
DeleteResourceCommand deleteCommand = new DeleteResourceCommand();
deleteCommand.setResource(res);
deleteCommand.execute();
if (deleteCommand.failed())
return new InfoEvent(StatusType.ERROR, deleteCommand.getMessage());
if (sendDeleteEvent())
return new DeleteEvent(
StatusType.OK,
getBundleString("xmsg_DeleteSuccessful",dispname));
else
return new InfoEvent(
StatusType.OK,
getBundleString("xmsg_DeleteSuccessful", dispname));
Code End----
If I change the target uri to be copied to the location in the same repository (default), this command work fine, it is just when it is copied cross repository, this cod doesn't work.
Thanks fo advice.
KentHi, Boris.
I try to do it with subfolder path as following:
Code----
String newRID ="/mbcokm_archive/" + resource.getDisplayName();
writeln(res, "newRID= " + newRID);
copyCommand.setTarget(newRID);
copyCommand.execute();
But still it does not take it.
If I change it to some location in the same repository, like the following:
Code----
String newRID ="/mbcokm/" + resource.getDisplayName();
writeln(res, "newRID= " + newRID);
copyCommand.setTarget(newRID);
copyCommand.execute();
So, I am pretty sure that something to do with the cross repostory copy.
I am trying to use the standard API to copy the resource, instead of using the com.sapportals.wcm.command.CopyResourceCommand.
Do you think you can do some testing on cross repository testing, and see how it will look for you.
Thanks a lot.
Kent -
From my understanding, the basic MDM package contains one repository for 'Product'. Has anyone thought about creating two repositories for product data - one for purchased materials and another one for produced materials? Would SAP support this type of repository structure? Can anyone think of any pitfalls with having two repositories?
Thanks in advance!Hi Suzanne,
SAP MDM comes with 5 standard repositories, which are similar/replica to R/3 structure.
1. Material
2. Vendor
3. Employee
4. Customer
5. Article.
The Product repository you are talking about, when you create a new Repository from MDM Console, which is a skelton to maintain Product catalog, but you can always customize/enhance by adding tables and fields according to u r needs.
In MDM you can maintain any kind of master data. It does not have any limitations.
In your case, Is "Purchased materials" and "Produced materials" are 2 different set of master data objects or does both have any commonality except few fileds?
As you might be knowing as of MDM SP3 there is no standard cross repository communication thru the existing tools. The only way you can communicate across the repositories using the API (Java/.Net).
I would suggest go thru some of the business scenarios available in SAP Service market place before you start.
Thanks and Regards
Subbu -
Is it possible to create a cross join between queries in Power Query?
I plan to use a table holding budgetlines that i want to cross join with a timetable to create monthly budgetlines.
Thanks, Menno van LeewenHi Menno,
Yes, it's possible to perform different kinds of join operations in Power Query, including a cross join. Please check out this page for more information on the different options,
http://office.microsoft.com/en-us/excel-help/table-join-HA104112136.aspx
The library specification also contains a description about the different Join Kinds (around page 164):
http://office.microsoft.com/en-us/excel-help/learn-about-power-query-formulas-HA104003958.aspx?CTT=5
According to your description, I think you will want to do a full outer join. It should look similar to this:
Table.Join(Customers, "CustomerID",Table.PrefixColumns(Orders, "Order"), "Order.CustomerID", JoinKind.FullOuter)
Thanks,
M. -
Hello Experts
We use ATG 10.1.1 and multisite capability to render international sites such as AU, NZ, HK, EU and UK. Some of these sites respond with HTTP 500 internal server error for about 10-15 minutes every Tuesday. The sites are back up after that and work normally.
We analyzed the server logs, thread dumps and memory utilization during this period. We found resource contentions occurring where one thread goes to TIMED_WAITING (transaction timeout is 600s) mode holding the lock on inventory repository item. The same thread is also holding the lock on the category item to set a transient property on it. All other threads are in BLOCKED state waiting to lock the category item to set a transient property on it.
The reason behind the transient property on category item
We have a requirement to not display gift card in any child categories but only in parent category. So there is a logic to determine if the child category contains gift card as SKU type and to hide it.
We are able to see a droplet reporting "missing inventory for sku and store" corresponding to the international site which goes down. We observed only AU and NZ going down last week. HK is slow but responsive. EU and UK worked normally without any hitch. We saw lot of partial GC happening at this interval (671). Our normal mini GC for the same length of time is only 73. The HEAP also seems to be getting closer to the max every second during this interval.
We also found that the catalog update and inventory update job runs at this time from our CA agent and pushes the update to commerce.
Question
Our code only runs a RQL to read values from inventory repository. If inventory repository is being cache invalidated and loaded with new cache, won't the RQL hit the database directly and proceed with the transaction? Our InventoryRepository cache-mode is distributed. Please see the thread trace below
"http-0.0.0.0-8080-14" daemon prio=10 tid=0x000000004d810000 nid=0x6e87 runnable [0x00000000573ed000]
java.lang.Thread.State: RUNNABLE
at atg.adapter.gsa.GSAItem.lookupItemTransactionState(GSAItem.java:2456)
- locked <0x000000079baef2d0> (a atg.adapter.gsa.GSAItem)
at atg.adapter.gsa.GSAItem.
getItemTransactionState(GSAItem.java:2337)
at atg.adapter.gsa.GSAItem.getItemTransactionState(GSAItem.java:2301)
at atg.adapter.gsa.GSAItemDescriptor.updateItem(GSAItemDescriptor.java:7305)
at atg.adapter.gsa.ItemTransactionState.updateItemState(ItemTransactionState.java:984)
at atg.adapter.gsa.GSATransaction.beforeCompletion(GSATransaction.java:452)
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)
- locked <0x00000007a3e79c60> (a java.lang.Object)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:160)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1431)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at atg.dtm.TransactionManagerWrapper.commit(TransactionManagerWrapper.java:438)
at atg.adapter.gsa.GSARepository.commitTransaction(GSARepository.java:7036)
at atg.adapter.gsa.GSAItem.setPropertyValue(GSAItem.java:1577)
at atg.adapter.gsa.GSAPropertyDescriptor.setPropertyValue(GSAPropertyDescriptor.java:538)
at atg.repository.RepositoryItemImpl.setPropertyValue(RepositoryItemImpl.java:249)
at atg.adapter.gsa.GSAItem.setPropertyValue(GSAItem.java:1536)
at com.llm.intl.repository.CategoryDisplayPropertyDescriptorIntl.checkInventoryStatus(CategoryDisplayPropertyDescriptorIntl.java:32)
"http-0.0.0.0-8080-14" daemon prio=10 tid=0x000000004d810000 nid=0x6e87 in Object.wait() [0x00000000573ee000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:978)
- locked <0x00000007e9252ab8> (a atg.repository.query.QueryCacheEntry)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:635)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:1172)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:230)
at atg.projects.store.inventory.LLMBaseInventoryManager.getInventoryItem(LLMBaseInventoryManager.java:54)
at atg.projects.store.inventory.LLMBaseInventoryManager.getInventoryInfo(LLMBaseInventoryManager.java:37)
at atg.projects.store.inventory.LLMInventoryManager.queryAvailabilityStatus(LLMInventoryManager.java:38)
at com.llm.repository.CategoryDisplayPropertyDescriptor.checkInventoryStatus(CategoryDisplayPropertyDescriptor.java:88)
at com.llm.repository.CategoryDisplayPropertyDescriptor.isCategoryDisplayable(CategoryDisplayPropertyDescriptor.java:60)
at com.llm.repository.CategoryDisplayPropertyDescriptor.getPropertyValue(CategoryDisplayPropertyDescriptor.java:47)
at atg.adapter.gsa.GSAItem.getPropertyValue(GSAItem.java:1453)
at atg.repository.RepositoryItemImpl.getPropertyValue(RepositoryItemImpl.java:151)
at atg.repository.nucleus.RepositoryItemPropertyMapper.getPropertyValue(RepositoryItemPropertyMapper.java:151)
at atg.beans.DynamicBeans.getPropertyValue(DynamicBeans.java:333)
at atg.servlet.DynamoHttpServletRequest.getObjectParameter(DynamoHttpServletRequest.java:4558)
at atg.servlet.DynamoHttpServletRequest.getObjectParameter(DynamoHttpServletRequest.java:4436)
at atg.servlet.DynamoHttpServletRequest.getObjectParameter(DynamoHttpServletRequest.java:4828)
at atg.servlet.DynamoHttpServletRequest.getObjectParameter(DynamoHttpServletRequest.java:4820)
at atg.taglib.dspjsp.GetValueOfTag.calculateValue(GetValueOfTag.java:271)
at atg.taglib.dspjsp.GetValueOfTag.doStartTag(GetValueOfTag.java:297)
at org.apache.jsp.elements.gadgets.leftNavigationItem_jsp._jspx_meth_dsp_005fgetvalueof_005f8(leftNavigationItem_jsp.java:750)
"http-0.0.0.0-8080-14" daemon prio=10 tid=0x000000004d810000 nid=0x6e87 waiting for monitor entry [0x00000000573ee000]
java.lang.Thread.State: BLOCKED (on object monitor)
at atg.adapter.gsa.GSAItem.lookupItemTransactionState(GSAItem.java:2456)
- waiting to lock <0x000000079e700270> (a atg.adapter.gsa.GSAItem)
at atg.adapter.gsa.GSAItem.getItemTransactionState(GSAItem.java:2337)
at atg.adapter.gsa.GSAItem.getItemTransactionState(GSAItem.java:2301)
at atg.adapter.gsa.GSAItem.getItemTransactionState(GSAItem.java:2287)
at atg.adapter.gsa.GSAItem.getItemTransactionStateUnchecked(GSAItem.java:2517)
at atg.adapter.gsa.GSAItem.setPropertyValue(GSAItem.java:1560)
at atg.adapter.gsa.GSAPropertyDescriptor.setPropertyValue(GSAPropertyDescriptor.java:538)
at atg.repository.RepositoryItemImpl.setPropertyValue(RepositoryItemImpl.java:249)
at atg.adapter.gsa.GSAItem.setPropertyValue(GSAItem.java:1536)
at com.llm.intl.repository.CategoryDisplayPropertyDescriptorIntl.checkInventoryStatus(CategoryDisplayPropertyDescriptorIntl.java:32)
The snippet which sets the transient property "containsGiftCard" on category item
if(sku.getPropertyValue("LLLSkuType") != null && ((String)sku.getPropertyValue("LLLSkuType")).equals("giftCard")){
repositoryItemImpl.setPropertyValue("containsGiftcard", true); //repositoryItemImpl is of childCategory. HTTP thread 14 has executed &holds lock on the category
}else{
repositoryItemImpl.setPropertyValue("containsGiftcard", false);
int status = getInventoryManager().queryAvailabilityStatus(sku.getRepositoryId(), "10056"); // the code of this method is below
The snippet which queries inventory
RepositoryView view = getRepository().getView(getItemType());
Object[] params = { pSkuId, pStoreId };
RepositoryItem[] items = getCatalogRefIdByStoreMatchQuery().executeQuery(view, params); //HTTP thread 14 goes to TIMED_WAITING mode
#property query
catalogRefIdByStoreMatchQuery=catalogRefId=?0 and storeId=?1
Very much appreciate your inputs.
Thanks,
SundarThe error clearly states that it is not able to find your schema
-------DATA IMPORT FAILED-------------------------------------------------------
Make sure you have configured the connection details and created the schema.
So please make sure that you have created all your schemas and are providing the correct connection details to the CIM.
~Gurvinder -
BI related Knowledge management question
Hi Gurus,
i am a BI consultat, new to knowledge management, I need some documents trlated to below mentioned
topics
*Content Management*
Using KM as repository for Queries,(web and Excel), Workbooks, Web Templates.
Publishing background report output to KM
KM ability to be the repository of unstructured data linked to BW (documents linked to transactions)
TREX
Google like search capabilities for Documentation including BW Metadata and Collaboration output published in Portal.
Collaboration
Rooms
Groupware
Instant Messaging
BOBJ interaction
Roles and responsibilities in doing the above
BI team, BW Administrators, BW Expert users
KM landscape
please help me ,
thanks in advance
DABHi check these links
KM Bible - What is KM
http://help.sap.com/saphelp_ep60sp2patch5/helpdata/en/4c/9d953fc405330ee10000000a114084/frameset.htm
Content Admin Objects in Content Administrattion
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9801b8f9-0701-0010-3f98-bceb17f62a4f
Collaboration Bible
https://www.sdn.sap.com/irj/sdn/nw-collaboration#section6
Standard Collaboration Functions
http://help.sap.com/saphelp_nw2004s/helpdata/en/da/2bfa40fd14f323e10000000a155106/frameset.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/6f23799d-0701-0010-eab5-877fa8771d5e
TREX stands for Text Retrival And Classification it provides software application with a wide
spectrum of intelligent search, retrieval, and classification functions for documentation development.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/81c1ca90-0201-0010-a2a1-b0412ec9cd1a
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ec4ee290-0201-0010-6c8d-98db9abff2cc
You may have to configure TREX for using external web search engines. Check these links.
https://www.sdn.sap.com/irj/sdn/thread?threadID=16210
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ec4ee290-0201-0010-6c8d-98db9abff2cc (Check last 2 pages)
https://www.sdn.sap.com/irj/sdn/thread?threadID=51640
Using the Instant Messenger
http://help.sap.com/saphelp_nw2004s/helpdata/en/d3/9621af15024274afacfe874d5798b8/frameset.htm
Groupware IntegrationBLOG-
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5461
) hummm tooo many questions at one time, )
Cheers!!
SJ -
Class Cast Exception in Pricing Engine with ATG 9.1
Hi All,
I'm getting the below exception when trying to deploy projects through BCC.
Basically this is getting called from some Out of the box scheduler service when project is deployed.
Any pointers on how to prevent this will be immensely helpful..
Thanks in advance.
[12/5/11 2:43:48:158 CST] 0000003f SystemOut O /atg/commerce/pricing/ShippingPricingEngine --- CONTAINER:atg.repository.RepositoryException: Attempt to execute or build a query with a Query or QueryExpression object that is null or was not created by this repository.; SOURCE:java.lang.ClassCastException: atg.repository.query.AndQuery incompatible with atg.adapter.gsa.query.Clause
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:7275)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:357)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:693)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:905)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:433)
at atg.repository.RepositoryViewImpl.executeQuery(RepositoryViewImpl.java:344)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:306)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:211)
at atg.commerce.pricing.PricingEngineService.findGlobalPromotions(PricingEngineService.java:488)
at atg.commerce.pricing.PricingEngineService.loadGlobalPromotions(PricingEngineService.java:531)
at atg.commerce.pricing.PricingEngineService.performScheduledTask(PricingEngineService.java:635)
at atg.service.scheduler.ScheduledJob.runJobs(ScheduledJob.java:441)
at atg.service.scheduler.Scheduler$2handler.run(Scheduler.java:760)
Caused by :java.lang.ClassCastException: atg.repository.query.AndQuery incompatible with atg.adapter.gsa.query.Clause
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:7271)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:357)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:693)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:905)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:433)
at atg.repository.RepositoryViewImpl.executeQuery(RepositoryViewImpl.java:344)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:306)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:211)
at atg.commerce.pricing.PricingEngineService.findGlobalPromotions(PricingEngineService.java:488)
at atg.commerce.pricing.PricingEngineService.loadGlobalPromotions(PricingEngineService.java:531)
at atg.commerce.pricing.PricingEngineService.performScheduledTask(PricingEngineService.java:635)
at atg.service.scheduler.ScheduledJob.runJobs(ScheduledJob.java:441)
at atg.service.scheduler.Scheduler$2handler.run(Scheduler.java:760)
[12/5/11 2:43:48:159 CST] 0000003f SystemOut O
[12/5/11 2:43:49:181 CST] 00000040 SystemOut O /atg/commerce/pricing/OrderPricingEngine --- CONTAINER:atg.repository.RepositoryException: Attempt to execute or build a query with a Query or QueryExpression object that is null or was not created by this repository.; SOURCE:java.lang.ClassCastException: atg.repository.query.AndQuery incompatible with atg.adapter.gsa.query.Clause
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:7275)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:357)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:693)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:905)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:433)
at atg.repository.RepositoryViewImpl.executeQuery(RepositoryViewImpl.java:344)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:306)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:211)
at atg.commerce.pricing.PricingEngineService.findGlobalPromotions(PricingEngineService.java:488)
at atg.commerce.pricing.PricingEngineService.loadGlobalPromotions(PricingEngineService.java:531)
at atg.commerce.pricing.PricingEngineService.performScheduledTask(PricingEngineService.java:635)
at atg.service.scheduler.ScheduledJob.runJobs(ScheduledJob.java:441)
at atg.service.scheduler.Scheduler$2handler.run(Scheduler.java:760)
Caused by :java.lang.ClassCastException: atg.repository.query.AndQuery incompatible with atg.adapter.gsa.query.Clause
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:7271)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:357)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:693)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:905)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:433)
at atg.repository.RepositoryViewImpl.executeQuery(RepositoryViewImpl.java:344)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:306)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:211)
at atg.commerce.pricing.PricingEngineService.findGlobalPromotions(PricingEngineService.java:488)
at atg.commerce.pricing.PricingEngineService.loadGlobalPromotions(PricingEngineService.java:531)
at atg.commerce.pricing.PricingEngineService.performScheduledTask(PricingEngineService.java:635)
at atg.service.scheduler.ScheduledJob.runJobs(ScheduledJob.java:441)
at atg.service.scheduler.Scheduler$2handler.run(Scheduler.java:760)
[12/5/11 2:43:49:181 CST] 00000040 SystemOut O
[12/5/11 2:45:17:941 CST] 00000042 SystemOut O /atg/commerce/pricing/ItemPricingEngine --- CONTAINER:atg.repository.RepositoryException: Attempt to execute or build a query with a Query or QueryExpression object that is null or was not created by this repository.; SOURCE:java.lang.ClassCastException: atg.repository.query.AndQuery incompatible with atg.adapter.gsa.query.Clause
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:7275)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:357)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:693)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:905)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:433)
at atg.repository.RepositoryViewImpl.executeQuery(RepositoryViewImpl.java:344)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:306)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:211)
at atg.commerce.pricing.PricingEngineService.findGlobalPromotions(PricingEngineService.java:488)
at atg.commerce.pricing.PricingEngineService.loadGlobalPromotions(PricingEngineService.java:531)
at atg.commerce.pricing.PricingEngineService.performScheduledTask(PricingEngineService.java:635)
at atg.service.scheduler.ScheduledJob.runJobs(ScheduledJob.java:441)
at atg.service.scheduler.Scheduler$2handler.run(Scheduler.java:760)
Caused by :java.lang.ClassCastException: atg.repository.query.AndQuery incompatible with atg.adapter.gsa.query.Clause
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:7271)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:357)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:693)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:905)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:433)
at atg.repository.RepositoryViewImpl.executeQuery(RepositoryViewImpl.java:344)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:306)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:211)
at atg.commerce.pricing.PricingEngineService.findGlobalPromotions(PricingEngineService.java:488)
at atg.commerce.pricing.PricingEngineService.loadGlobalPromotions(PricingEngineService.java:531)
at atg.commerce.pricing.PricingEngineService.performScheduledTask(PricingEngineService.java:635)
at atg.service.scheduler.ScheduledJob.runJobs(ScheduledJob.java:441)
at atg.service.scheduler.Scheduler$2handler.run(Scheduler.java:760)
[12/5/11 2:45:17:942 CST] 00000042 SystemOut OHi,
This error is happening due to these scheduled tasks running on a versioned (BCC) instance. They are not needed on the BCC and not designed to work in this situation.
You should just set the schedules on these 3 components to:
updateSchedule^=/Constants.null
in a .properties file.
Thanks.
Nick Glover
Oracle Support for ATG Products -
Class Cast exception in ItemPricingEnging, ShippingPricingEngine ATG 2007.1
Hi,
I have been getting following exception for a while, could not find the root cause yet. When I check out latest workspace from SVN, until couple of builds I do not see this issue. I thought, its has to do with my eclipse compiler (I am using 1.5 level) but not the case. Please let me know, if you have any solution for this.
2013-04-15 13:43:30,562 ERROR [nucleusNamespace.atg.commerce.pricing.ShippingPricingEngine]
CAUGHT AT:
CONTAINER:atg.repository.RepositoryException: Attempt to execute or build a query with a Query or QueryExpression object that is null or was not created by this repository.; SOURCE:java.lang.ClassCastException: atg.repository.query.AndQuery
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6616)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:317)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:682)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:894)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:432)
at atg.repository.RepositoryViewImpl.executeQuery(RepositoryViewImpl.java:344)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:266)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:211)
... (5 more)
Caused by: java.lang.ClassCastException: atg.repository.query.AndQuery
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6612)
... 12 more
SOURCE EXCEPTION:
java.lang.ClassCastException: atg.repository.query.AndQuery
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6612)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:317)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:682)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:894)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:432)
... (8 more)
2013-04-15 13:43:30,916 ERROR [nucleusNamespace.atg.commerce.pricing.OrderPricingEngine]
CAUGHT AT:
CONTAINER:atg.repository.RepositoryException: Attempt to execute or build a query with a Query or QueryExpression object that is null or was not created by this repository.; SOURCE:java.lang.ClassCastException: atg.repository.query.AndQuery
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6616)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:317)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:682)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:894)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:432)
at atg.repository.RepositoryViewImpl.executeQuery(RepositoryViewImpl.java:344)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:266)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:211)
... (5 more)
Caused by: java.lang.ClassCastException: atg.repository.query.AndQuery
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6612)
... 12 more
SOURCE EXCEPTION:
java.lang.ClassCastException: atg.repository.query.AndQuery
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6612)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:317)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:682)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:894)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:432)
... (8 more)
2013-04-15 13:43:44,921 ERROR [nucleusNamespace.atg.commerce.pricing.ItemPricingEngine]
CAUGHT AT:
CONTAINER:atg.repository.RepositoryException: Attempt to execute or build a query with a Query or QueryExpression object that is null or was not created by this repository.; SOURCE:java.lang.ClassCastException: atg.repository.query.AndQuery
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6616)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:317)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:682)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:894)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:432)
at atg.repository.RepositoryViewImpl.executeQuery(RepositoryViewImpl.java:344)
at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:266)
at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:211)
... (5 more)
Caused by: java.lang.ClassCastException: atg.repository.query.AndQuery
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6612)
... 12 more
SOURCE EXCEPTION:
java.lang.ClassCastException: atg.repository.query.AndQuery
at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6612)
at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:317)
at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:682)
at atg.repository.query.QueryCache.populateEntry(QueryCache.java:894)
at atg.repository.query.QueryCache.executeCachedQuery(QueryCache.java:432)
Thanks in advance,
SridharWe are getting the same exception on couple of other repositories as well but not on all repositories though.
THanks
Sridhar -
Servlet not forwarding a control to the jsp with req dspher
hi ppl,my servlet code is supposed to forward a control to a jsp page so as to display the value in the jsp.but the request dispatcher's forward is not forwarding the control to the jsp page.....here is my servlet code----
// Decompiled by DJ v3.4.4.74 Copyright 2003 Atanas Neshkov Date: 7/4/2003 12:37:00 PM
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: BdgtMaster.java
package publicity;
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class BdgtMaster extends HttpServlet
public synchronized void service(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)
throws ServletException, IOException
Object obj = null;
String s3 = "";
String s4 = "";
out = httpservletresponse.getOutputStream();
String s = "";
String s1 = "";
String s2 = httpservletrequest.getParameter("option");
s3 = httpservletrequest.getParameter("branch");
s4 = httpservletrequest.getParameter("publicity_code");
String s5 = httpservletrequest.getParameter("budget");
try
String s6 = "0";
String s7 = "0";
String s8 = "INSERT INTO Budget_Master(Branch,Publicity_Code,Budget_Alloted,Work_In_Progress,Amount_Paid) VALUES (?,?,?,?,?)";
String s9 = "update budget_master set old_budget = budget_alloted where branch='" + s3 + "' and publicity_code=" + s4;
String s10 = "UPDATE Budget_Master set budget_alloted=" + s5 + " where Branch='" + s3 + "' and publicity_code=" + s4;
datasource = "jdbc:odbc:budget";
con = DriverManager.getConnection(datasource);
int i = con.getTransactionIsolation();
con.setTransactionIsolation(2);
con.setAutoCommit(false);
if("new".equalsIgnoreCase(s2))
PreparedStatement preparedstatement = con.prepareStatement(s8);
preparedstatement.setString(1, s3);
preparedstatement.setString(2, s4);
preparedstatement.setString(3, s5);
preparedstatement.setString(4, s7);
preparedstatement.setString(5, s6);
preparedstatement.executeUpdate();
con.commit();
preparedstatement.close();
if("update".equalsIgnoreCase(s2))
Statement statement = con.createStatement();
statement.executeUpdate(s9);
statement.executeUpdate(s10);
con.commit();
con.setTransactionIsolation(0);
/*htmlStart(out, "BUDGET MASTER");
out.println("<p> </p><div align=\"left\">");
out.println("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"50%\">");
out.print("<tr>");
out.println("<td width=\"50%\"><strong><small><font face=\"Tahoma\">Branch </font></small></strong></td>");
out.println("<td width=\"50%\"><small><font color=\"#004080\" face=\"Tahoma\">" + s3 + "</font></small></td></tr><tr>");
out.println("<td width=\"50%\"><strong><small><font face=\"Tahoma\">Budget Alloted </font></small></strong></td>");
out.println("<td width=\"50%\"><small><font color=\"#004080\" face=\"Tahoma\">" + s5 + "</font></small></td></tr><tr>");
out.println("<td width=\"50%\"><small><strong><font face=\"Tahoma\">Publicity Code</font></strong></small></td>");
out.println("<td width=\"50%\"><small><font color=\"#004080\" face=\"Tahoma\">" + s4 + "</font></small></td></tr></table></div>");
htmlEnd(out);
con.close();
httpservletrequest.getRequestDispatcher("/pages/serview/BdgM.jsp").forward(httpservletrequest,httpservletresponse);
catch(SQLException sqlexception)
cleanUp();
printSQLException(sqlexception, out);
out.flush();
public void init(ServletConfig servletconfig)
throws ServletException
super.init(servletconfig);
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
return;
catch(ClassNotFoundException classnotfoundexception)
log("Couldn't load class sun.jdbc.odbc.JdbcOdbcDriver");
throw new ServletException(classnotfoundexception.getMessage());
static void printSQLException(SQLException sqlexception, ServletOutputStream servletoutputstream)
throws IOException
servletoutputstream.print("<b>SQLException</b>\n<p>\n\n");
for(; sqlexception != null; sqlexception = sqlexception.getNextException())
servletoutputstream.print("<b>SQLState:</b> " + sqlexception.getSQLState() + "<br>\n");
servletoutputstream.print("<b>Message:</b> " + sqlexception.getMessage() + "<br>\n");
servletoutputstream.print("<b>Vendor:</b> " + sqlexception.getErrorCode() + "<br>\n");
private static boolean checkForWarning(SQLWarning sqlwarning)
throws SQLException
boolean flag = false;
if(sqlwarning != null)
System.out.println("\n *** Warning ***\n");
flag = true;
for(; sqlwarning != null; sqlwarning = sqlwarning.getNextWarning())
System.out.println("SQLState: " + sqlwarning.getSQLState());
System.out.println("Message: " + sqlwarning.getMessage());
System.out.println("Vendor: " + sqlwarning.getErrorCode());
System.out.println("");
return flag;
/*void htmlStart(ServletOutputStream servletoutputstream, String s)
throws IOException
servletoutputstream.println("<html><head><title>" + s + "</title></head>");
servletoutputstream.println("<body topmargin=\"0\" leftmargin=\"0\" bgproperties=\"fixed\">");
servletoutputstream.println("<div align=\"left\"><table border=\"0\" width=\"100%\">");
servletoutputstream.println("<tr><td width=\"100%\" bgcolor=\"#DFDFFF\">");
servletoutputstream.println("<font face=\"Tahoma\" color=\"#000000\"><strong>B u d g e t M a s t e r - D e t a i l s E n t e r e d</strong></font></td>");
servletoutputstream.println("</tr></table>");
void htmlEnd(ServletOutputStream servletoutputstream)
throws IOException
servletoutputstream.print("<hr>");
servletoutputstream.print("</body></html>\n");
String link(String s, String s1)
return "<a href=\"" + s + "\">" + s1 + "</a>";
public String getServletInfo()
return "Display and SQL manipulate JDBC databases on the server.";
public void cleanUp()
throws IOException
if(con != null)
try
out.print("Closing database connection");
con.setTransactionIsolation(0);
con.close();
return;
catch(SQLException _ex)
return;
else
return;
public BdgtMaster()
private Connection con;
private String datasource;
private String user;
private String password;
private String base;
private ServletOutputStream out;
plz tell me where im wrong...
regards....a_josephHi,
Sorry to say this but it'd be lot simple if we can avoid cross posting similar Queries.
I'd appriciate if you can continue using with your post
http://forum.java.sun.com/thread.jspa?threadID=5208928
Hope there are no hard issues on this.
REGARDS,
RaHuL -
Permissions denied when trying to get a BCC project programatically...
Hi,
I wrote a servlet that extends atg.servlet.GenericServletService and in the service method, I am resolving the ATG component that is trying to query a BCC project with the given project Id.
The control is getting passed successfully to the ATG component but when it is trying to query, its throwing the following error:
14:46:02,741 ERROR [STDERR] javax.ejb.EJBException: QUERY_EXCEPTION_MESSAGE: RQL query: id = ?0, Args: ?0=prj2130001
14:46:02,743 ERROR [STDERR] at atg.repository.tojava.runtime.RJSupport.executeRqlStatementForOne(RJSupport.java:1110)
14:46:02,744 ERROR [STDERR] at atg.epub.project._ProjectHome_ReposImpl.findById(_ProjectHome_ReposImpl.java:70)
*14:46:02,761 ERROR [STDERR] Caused by: CONTAINER:atg.repository.RepositorySecurityException; SOURCE:atg.security.PermissionDeniedException: You do not have read access to the project item descriptor.*
14:46:02,762 ERROR [STDERR] at atg.adapter.secure.GenericSecuredRepository.checkAccess(GenericSecuredRepository.java:381)
14:46:02,763 ERROR [STDERR] at atg.adapter.secure.GenericSecuredRepositoryView.executeQuery(GenericSecuredRepositoryView.java:292)
14:46:02,763 ERROR [STDERR] at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:205)
14:46:02,764 ERROR [STDERR] at atg.repository.tojava.runtime.RJSupport.executeRqlStatementForOne(RJSupport.java:1099)
I am using the following API:
final ProjectHome projectHome = ProjectConstants.getPersistentHomes()
.getProjectHome();
Project project = projectHome.findById(projectId);
I am invoking this servlet from the web browser by passing the project ID as the parameter.
However, if I try to invoke the same component's method using a scheduler, its working fine.
Any help/pointers regarding this is greatly appreciated.
Thanks in advance.Have the below functionality in your method before executing logic.
personaPrefix and userName should be set as said by Gurvinder.
protected boolean assumeUserIdentity() {
if (getUserAuthority() == null)
return false;
User newUser = new User();
Persona persona = (Persona) getUserAuthority().getPersona(getPersonaPrefix() + getUserName());
if (persona == null)
return false;
newUser.addPersona(persona);
ThreadSecurityManager.setThreadUser(newUser);
return true;
HTH.
-karthik
Edited by: karthik.chopperla on Jul 20, 2011 2:52 AM -
Hi All,
We have installed MDMTECH_554_700 on our 2004s.
We also configured all post installation steps like
1)MDM Repositories
2)MDM Server Connections
3)Mdm Dbms Hosts
4)ABAP Implementation for MDM Version Support
5)MDM API Trace Configuration.
It seems all connection settings are fine.Is there anyway to test the connection properties/configuration?
We tried to execute MDM_ADMIN_RETRIEVE_ALL_REPS with
1) MDM Connection which we created in the above configuration steps.(i.e..,MDMTECH_554_700)
We are getting like "Error in repository configuration: MDMTECH_554_700 not found"
Please help us.You actually named your logical object name, MDMTECH_554_700? The logical object name that the function module is looking for is actually the key name that you supplied in transaction MDMAPIC when you setup your MDM Repository.
Also to use MDM_ADMIN_RETRIEVE_ALL_REPS, you also want to supply the DBMS information as well since you want cross repository information.
Actually the function module that I use to test MDM API ABAP connections is MDM_ADMIN_RETRIEVE_USERS. It has a simplier interface, in that you only have to specify the logical object name.
If you have any problems determining what the logical object name refers to, feel free to send me an email (it is in my SDN business card and also not too difficult to figure out standard SAP addresses). If you email me some screen shots of you configuration in MDMAPIC, I can tell you what value you should be using.
Maybe you are looking for
-
Find index number of an Object in an ArrayList
hi guys I have an array list of of products which contains 8 strings. say productList[0]= "asaaas1212" now i want to get a method which can find out at what index the string "asaaas1212" is situated on the productList. thanks Message was edited by: s
-
SAP report to see orders who have been TECO'ed
Hi All, I am looking for a sap report to see all the orders that have been TECO'ed by date & plant. I know i can use COOIS & CO26 but i need something that will give me more options to exclude report output by more status types. Using these reports i
-
Open multiple pdf's in one acrobat window
On my new Vista OS, I can't figure out how to set my adobe reader 8 back to where it opens multiple pdfs into one window so you can just click between them rather than multiple windows.
-
I have a 2200+ XP AMD CPU and a KTA4AV mobo. Problem is that windows xp says its a AMD 1500 running at 1.35Mhz ?? Bios is on Auto setting. Any idea how I can sort this out ? Thx
-
Why is screen blurry on Viewsonic 20'' display
A family member has had all kinds of problems moving from a cheapie Dell 15'', to a new Viewsonic 20''. The mac mini is about 3 years old, I can get the spec's if needed. What is the deal? Apple had my mom do an archive and install-&$%^&$ to drive an