XML Event casuing EJB cache limit to be reached
I am running WLS 6.1 (sp2) and WLI 2.1 (sp2). My workflows are completely XML event
driven. After the workflow is started a number of events are created that wait
for different state changes to be posted th the JMS queue. During testing this
seemed to work fine. However, I have now moved to production and things are falling
apart.
I have 100+ active workflows at any given time. They all have the same XML event
active, which checks a conditional field to determine if it should handle the
event. When the number of active workflows reached 100 I start receiving CacheFullException
whenever the workflow engine attempts to process the event.
Is there some way to increase the default EJB cache size for the WLI beans? How
does WLI process these events so that the cache limit comes into play? Is there
some way to change the structure of my workflow so that this limit is no longer
a problem?
Any suggestions will be greatly appreciated.
Thanks,
Pete Giesin
I am running WLS 6.1 (sp2) and WLI 2.1 (sp2). My workflows are completely XML event
driven. After the workflow is started a number of events are created that wait
for different state changes to be posted th the JMS queue. During testing this
seemed to work fine. However, I have now moved to production and things are falling
apart.
I have 100+ active workflows at any given time. They all have the same XML event
active, which checks a conditional field to determine if it should handle the
event. When the number of active workflows reached 100 I start receiving CacheFullException
whenever the workflow engine attempts to process the event.
Is there some way to increase the default EJB cache size for the WLI beans? How
does WLI process these events so that the cache limit comes into play? Is there
some way to change the structure of my workflow so that this limit is no longer
a problem?
Any suggestions will be greatly appreciated.
Thanks,
Pete Giesin
Similar Messages
-
Query performance problem - events 2505-read cache and 2510-write cache
Hi,
I am experiencing severe performance problems with a query, specifically with events 2505 (Read Cache) and 2510 (Write Cache) which went up to 11000 seconds on some executions. Data Manager (400 s), OLAP data selection (90 s) and OLAP user exit (250 s) are other the other event with noticeable times. All other events are very quick.
The query settings (RSRT) are
persistent cache across each app server -> cluster table,
update cache in delta process is checked ->group on infoprovider type
use cache despite virtual characteristics/key figs checked (one info-cube has1 virtual key figure which should have a static result for a day)
=>Do you know how I can get more details than what's in 0TCT_C02 to break down the read and write cache events time or do you have any recommandation?
I have checked and no dataloads were in progres on the info-providers and no master data loads (change run). Overall system performance was acceptable for other queries.
ThanksHi,
Looks like you're using BDB, not BDB JE, and this is the BDB JE forum. Could you please repost here?:
Berkeley DB
Thanks,
mark -
Deployment issues, how is weblogic-ejb-jar.xml linked to ejb-jar.xml
Hey guys,
I'm getting the following error I think because i have something configured incorrectly in my xml files. Instead of yousing activationConfig properties in my MDB I wanted to set them in the ejb-jar.xml file manually. The following error I'm getting is...
Unable to deploy EJB: MyMDB from MDBtest2:
[EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment.
weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'inQueue' declared in the ejb-jar.xml descriptor has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor.
at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641)
at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:330)
at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1097)
at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:991)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1273)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:372)
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>MDBtest2</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>MyMDB</ejb-name>
<ejb-class>cms.crown.mdb.MyMDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-destination-link>omg</message-destination-link>
<resource-ref>
<res-ref-name>weblogic.jms.XAConnectionFactory</res-ref-name>
<res-type>javax.jms.XAConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-env-ref>
<resource-env-ref-name>inQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MyMDB</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
weblogic-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-ejb-jar xmlns:wls="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
<!--weblogic-version:10.0-->
<wls:message-destination-descriptor>
<!--lookup-method:JNDI-->
<wls:message-destination-name>omg</wls:message-destination-name>
<wls:destination-jndi-name>inQueue</wls:destination-jndi-name>
<wls:initial-context-factory>weblogic.jms.XAConnectionFactory</wls:initial-context-factory>
<wls:provider-url>http://localhost:8010</wls:provider-url>
</wls:message-destination-descriptor>
</wls:weblogic-ejb-jar>
Hope this is readable, thanks for any assistanceHi,
It looks like first thing you are using EJB3 but your XML files are still pointing to version="2.1" and very old.
<font color=red>
<ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
</font><br>
*try this: In below "ejb-jar.xml" file*
QCF = your Connection factory JNDI Name
TestQ = your Queue JNDI Name
Transaction Attribute is ByDefault = Required ...so no need to add it here.
<?xml version='1.0' encoding='UTF-8'?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="true">
<enterprise-beans>
<message-driven>
<ejb-name>MyMDB</ejb-name>
<mapped-name>TestQ</mapped-name>
<ejb-class>cms.crown.mdb.MyMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value><b><font color=maroon>javax.jms.Queue</font></b></activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>connectionFactoryJndiName</activation-config-property-name>
<activation-config-property-value><b><font color=maroon>QCF</font></b></activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationJndiName</activation-config-property-name>
<activation-config-property-value><b><font color=maroon>TestQ</font></b></activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
<assembly-descriptor></assembly-descriptor>
</ejb-jar>
"weblogic-ejb-jar.xml":
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/weblogic-ejb-jar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-ejb-jar http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd">
<font color=maroon><b> Now u need to Just define the Provider URL here...if you want a remote provider...else not required<BR> JNDI names are already defined in the ejb-jar.xml file</b></font><BR>
</weblogic-ejb-jar>
Some Links which you can refer:
To Generate the Deployment Descriptors ...in case of EJB3 Applications: *http://jaysensharma.wordpress.com/2010/04/02/generating-ejb3-clientjar/*
MDB3.0 Sample: *http://jaysensharma.wordpress.com/2009/08/17/mdb3-0-sample-for-weblogic-application-server/*
Thanks
Jay SenSharma -
Ejb-jar.xml and orion-ejb-jar.xml configuration issue
Chris,
We have an application that uses the Oracle 10g Application Server and WebSphere MQ v5.3 w/ fixpack 9.
Our application is a J2EE messaging system which essentially consists of Message Driven Beans, the EJB
realization of the J2EE Java Message Service (JMS) API. Our application has Message Driven Beans which
listen to queues and send messages to queues -- a simple messaging system. Currently we can listen to queues, but
cannot send messages to queues in the Oracle 10g Application Server environment.
Any J2EE application server has its own implementation of Java Naming Directory Interface (JNDI) API that
deployed J2EE applications utilize to lookup resources such as Data Sources, JMS Destinations (i.e. MQ Queue),
JMS QueueConnectionFactories (i.e. MQ QManagers).
Our application uses the 3rd party JMS Provider, WebSphere MQ.
MQ ships with a JMSAdmin tool which allows one to create JMS administered objects (i.e. objects a java
application searches for in some JNDI directory) that reside in some JNDI context. We create a JNDI context for
MQ resources, queues and QManagers. We configure the MQ provided
JMSAdmin tool with two property name/value pairs:
PROVIDER_URL=file:/opt/mqm/JNDI-Directory
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
A resultant .bindings file is created in /opt/mqm/JNDI-Directory which represents our JDNI context
containing our JMS administered objects. A standalone java application that needs to directly access this
JNDI context can simply conduct a JNDI lookup on the following context: "java:comp/resource/MQSeries/". An
example of how a standalone application would lookup a JMS administered object named "qNumber1" would be to
lookup "java:comp/resource/MQSeries/qNumber1". This lookup would result in the standalone java application
having a JMS reference to an MQ Queue.
There is a major difference in how an enterprise EJB application deployed into a J2EE Container (Oracle 10g App Server)
conducts a JNDI lookup on a 3rd party resource such as MQ as a JMS Provider. A typical EJB application deployed
into a J2EE container as an .ear (enterprise archive) file has implicit access to the application server's own
JNDI context. This JNDI context is usually "java:comp/env/". Looking up the Application Server's own Data Source or
it's own JMS Resources is easy. An application that needs references to these Application Server provided resources
simply conducts a lookup for "java:comp/env/jms/someQ" or "java:comp/env/jdbc/myDataSource".
The problem we face is mapping our MQ JNDI context to the Oracle App Server's own JNDI context. We believe this is
accomplished through mappings defined in both the ejb-jar.xml (EJB Descriptor) and the application server specific
counterpart, orion-ejb-jar.xml. Note that Oracle 10g Application Server uses the popular orion J2EE container for
hosting J2EE enterpise applications.
Our Message Driven Beans (MDBs)currently listen to the Queue at the JNDI location "prodQ". Our problem is that we cannot
get our MDB to send messages to any queues. Note that the MQ implementation of the queues and Queue Managers work
flawlessly with standalone java applications. It's safe to say that the MQ objects are working.
We are looking for a solid example of how the ejb-jar.xml and the orion-ejb-jar.xml map 3rd party JMS provider
JNDI locations to the App Server's JNDI context.
Below is how we have attempted to configure our own ejb-jar.xml and orion-ejb-jar.xml:
ejb-jar.xml begin >>>>>>>>>>>>>>><?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>Production Message Driven Bean</display-name>
<enterprise-beans>
<message-driven>
<display-name>prodMdb</display-name>
<ejb-name>prodMdb</ejb-name>
<ejb-class>message.handler.AIDMSMessageConsumerBean</ejb-class>
<transaction-type>Bean</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref>
<res-ref-name>prodQCF</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>prodQ</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>prodR</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>
</enterprise-beans>
</ejb-jar>
<<<<<<<< ejb-jar.xml end <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
begin orion-ejb-jar.xml >>>>>>>>>>>>>>>>>>>>>>>>>>><orion-ejb-jar>
<enterprise-beans>
<message-driven-deployment name="prodMdb" connection-factory-location="java:comp/resource/MQSeries/prodQCF" destination-location="java:comp/resource/MQSeries/prodR">
<resource-ref-mapping location="prodQ" name="prodQ">
<lookup-context location="java:comp/resource/MQSeries/" >
<!-- <context-attribute name="java.naming.factory.initial"
value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
</lookup-context>
</resource-ref-mapping>
<resource-ref-mapping location="prodR" name="prodR">
<lookup-context location="java:comp/resource/MQSeries/" >
<!-- <context-attribute name="java.naming.factory.initial"
value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
</lookup-context>
</resource-ref-mapping>
</message-driven-deployment>
</enterprise-beans>
</orion-ejb-jar>
<<<<<<<<< end orion-ejb-jar.xml <<<<<<<<<<<<<<<<<<<<<<<<If you look at the contents of a deployment plan (Plan.xml) when you have it generated
<deployment-plan ...>
<module-override>
<module-name>ejb.jar</module-name>
<module-type>ejb</module-type>
<module-descriptor external="true">
<root-element>weblogic-ejb-jar</root-element>
<uri>META-INF/weblogic-ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>ejb-jar</root-element>
<uri>META-INF/ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="true">
<root-element>persistence-configuration</root-element>
<uri>META-INF/persistence-configuration.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>persistence</root-element>
<uri>META-INF/persistence.xml</uri>
</module-descriptor>
</module-override>
</deployment-plan>You can see which files can be external and which can be not. The weblogic-ejb-jar.xml can be external
but in this case you need a deployment plan to point weblogic to the file. The ejb-jar.xml cannot be
external (see external=false)
The benefit of storing the weblogic-ejb-jar.xml is that your administrator can fine tune certain
configurations by using a deployment plan, instead of having to extract the contents from the jar file
and then repackage it again.
No need to worry about a clustered environment, you can place the jar and the deployment plan
on the server where the admin server is located, when you deploy an application you deploy it to
the cluster and everything is taken care off.
More information on deployment plans can be found here: http://download.oracle.com/docs/cd/E11035_01/wls100/deployment/config.html -
How to trigger a WLPI workflow by sending XML event
Hi,
I try to trigger a workflow in WLPI 2.1 by sending an XML Event from another application.
But I don't know where to send it and how (i.e. via JMS or not).
Any idea how to do it or where I can find helpful documentation (standard BEA
WLPI docs didn't help much on that topic)?
Regards,
JörgHi,
Still, what is so specific about this ACE_DISPATCHER in CRM? Can you explain a bit more about you problem. I am quite sure that not that many people in this workflow forum is familiar with this concept.
Is there some problem in triggering the batch job itself? I still cannot see any reason why you couldn't use the check function module? If you cannot use check function module, what makes you think that some other solution would work. Eventually you will use the same code - the place where you trigger the code might be different, but it will be the same code.
Regards,
Karri -
Store XML data in java cache (hashmap as a key value pair)
Hi,
I have to store a xml file in java cache so that I can resue it .The flow is like this :
DAO layer reads database ,create an xml and sends to --> IBM MQ-->our java code should read this xml file over MQ and store it in a cache (preferably hashmap).The file contain unique id for every customer.
How can we achieve this.One way is to store the xml as an string as key is "id" and value is whole xml.Is this a good way or any other way is available.Please suggest.
Sample xml:
<Client>
<ClientId>1234</ClientId>
<ClientName>STechnology</ClientName>
<ID>10</ID>
<ClientStatus>ACTIVE</ClientStatus>
- <LEAccount>
<ClientLE>678989</ClientLE>
<LEId>56743</LEId>
- <Account>
<AccountNumber>9876543678</AccountNumber>
</Account>
</LEAccount>
- <Service>
<Cindicator>Y2Y</Cindicator>
<PrefCode>980</PrefCode>
<BSCode>876</BSCode>
<MandatoryContent>MSP</MandatoryContent>
</Service>
</Client>
Thanks
SumitA HashMap can work, but then still store the customer related data in a bean (and perhaps it will have some child objects as well, if for example the service subelement can repeat). So you get a HashMap of Customer objects, with the clientID as the index into the hashmap.
-
Listening to several xml-events within one workflow
We are running WLI20 and are using Sybase(11.5) as a respository database. We are
having the following problem with eventnodes.
1: Within one template we are using the action 'post external xml' to post three
unique messages to the destination JMSQueue "com.bea.wlpi.EventQueue".
2: In the same template we have added three eventnodes which are listening for
the unique messages. The number of unique messages is the same as the number of
eventnodes.
We get the following result:
All messages are sent to the JMSQueue(this is verified).
Often one or more of the eventnodes does not receive the xml-message. It is no
obvious pattern in which eventnode that doesn't receive the message. Once in a
while all three eventnodes get their messages.
Attached is a test template that will raise the problem.
Have you got any ideas of how to solve this problem?
[test.xml]I am also getting exactly the same behaviour. In one template I have 4
tasks. each task posts intenral xml event and waits for the response with a
unique key value.
Sometimes the all the steps in the workflow get completed and with the same
message input, one of the event does not invoked even though the XML message
does contain the key-value that matches that event. I even verified this
with the EventWatch table..
Looks like there is problem. Pls WLI guys test it out.
- Jagdish
"tony lodge" <[email protected]> wrote in message
news:[email protected]..
Stian
Although I do not have any idea what is causing the problem please try
using addressed messaging and see what happens. Also, can you log asupport
case so that I can create a debug version of the event listener so we can
see what is actually making into WLI
Tony
"Stian Dahle" <[email protected]> wrote in message
news:3b681540$[email protected]..
We are running WLI20 and are using Sybase(11.5) as a respository
database.
We are
having the following problem with eventnodes.
1: Within one template we are using the action 'post external xml' to
post
three
unique messages to the destination JMSQueue "com.bea.wlpi.EventQueue".
2: In the same template we have added three eventnodes which are
listening
for
the unique messages. The number of unique messages is the same as thenumber of
eventnodes.
We get the following result:
All messages are sent to the JMSQueue(this is verified).
Often one or more of the eventnodes does not receive the xml-message. Itis no
obvious pattern in which eventnode that doesn't receive the message.
Once
in a
while all three eventnodes get their messages.
Attached is a test template that will raise the problem.
Have you got any ideas of how to solve this problem? -
Do shared photo streams have a cache limit or revolving cache?
I stopped using shared photo streams a few months ago because I noticed that the photos were stored locally on my phone and in iCloud. When I checked my storage usage in settings I noticed that 500mb+ was taken up by the shared photo stream storage. I have since started using Flickr, but miss the convenience of shared photo streams to create quick albums.
Does anyone know if there is a revolving cache that limits the data that shared photo streams store on a device? If shared photo streams start to replace its own data after 500mb I'd be happy to give up that space for convenience.
Does anyone know if there is a cache limit to shared photo streams, and if so, what that limit might be, and if it is revolving?All photos that you want to share to a stream have to be kept on your device as well for syncing with iCloud. There are limits to how many photos you can share to the shared streams, however. See:
iCloud: Photo Stream limits -
I am trying to send an XML event to BPM. The XML's root node has a namespace associated
with it (for example, <bea:Employee>) where "bea" is defined as a namespace in
the top of the document. It looks like BPM does not support namespaces in start
nodes or event nodes. Is there any way to indicate in my workflow that the incoming
document will use a namespace?Doug
As you have pointed out Namespaces are not supported at this point
Tony
"Doug Haas" <[email protected]> wrote in message
news:3c90b4a3$[email protected]..
>
I am trying to send an XML event to BPM. The XML's root node has anamespace associated
with it (for example, <bea:Employee>) where "bea" is defined as anamespace in
the top of the document. It looks like BPM does not support namespaces instart
nodes or event nodes. Is there any way to indicate in my workflow thatthe incoming
document will use a namespace? -
SQL Cache/Procedure Cache Limit
Does anyone know if there is a memory limit for cache memory of a table? The reason for me asking is that I have an stored procedure that returns a ORA-22813. It appears that the in cache table memory has reached its full capacity (30K). Is there a way to increase cache table size?
Does anyone know if there is a memory limit for cache memory of a table? The reason for me asking is that I have an stored procedure that returns a ORA-22813. It appears that the in cache table memory has reached its full capacity (30K). Is there a way to increase cache table size?
-
CTAS causes ORA-31061: XDB error: XML event error
The query works, the CTAS fails:
CREATE TABLE Moocows AS
ERROR at line 1:
ORA-31061: XDB error: XML event error
ORA-19202: Error occurred in XML processing
In line 1 of orastream:
LPX-00245: extra data after end of document
CREATE TABLE Moocows AS
WITH
XML(Document)
AS
SELECT
--Amazon_PAPI.Get_Response(Amazon_PAPI.ItemLookup('032244047145', 'UPC', 'Toys', '5011363525517', 'EAN', 'Toys'))
--Amazon_PAPI.Get_Response(Amazon_PAPI.ItemLookup('032244047145', 'UPC', 'All', '5011363525517', 'EAN', 'All'))
Amazon_PAPI.Get_Response(Amazon_PAPI.ItemSearch('Hungry Hungry Hippos', 'All', '', '', '', 'Mastermind', 'All', '', '', ''))
FROM
Dual
SELECT
Items.Id,
Items.Code,
Items.Message,
Items.Isvalid,
Item.Id Item_Id,
Item.ASIN,
Item.DetailPageURL,
XMLAGG(Item.ItemLink) ItemLink,
Item.SmallImage_URL,
Item.SmallImage_Height,
Item.SmallImage_Height_Units,
Item.SmallImage_Width,
Item.SmallImage_Width_Units,
Item.MediumImage_URL,
Item.MediumImage_Height,
Item.MediumImage_Height_Units,
Item.MediumImage_Width,
Item.MediumImage_Width_Units,
Item.LargeImage_URL,
Item.LargeImage_Height,
Item.LargeImage_Height_Units,
Item.LargeImage_Width,
Item.LargeImage_Width_Units,
XMLAGG(Item.ImageSet) ImageSet,
XMLAGG(Item.Actor) Actor,
XMLAGG(Item.Artist) Artist,
Item.AspectRatio,
Item.AudienceRating,
XMLAGG(Item.AudioFormat) AudioFormat,
XMLAGG(Item.Author) Author,
Item.Binding,
Item.Brand,
XMLAGG(Item.CatalogNumberListElement) CatalogNumberListElement,
XMLAGG(Item.Category) Category,
Item.CEROAgeRating,
Item.ClothingSize,
Item.Color,
XMLAGG(Item.Creator) Creator,
XMLAGG(Item.Director) Director,
Item.EAN,
XMLAGG(Item.EANListElement) EANListElement,
Item.Edition,
XMLAGG(Item.EISBN) EISBN,
Item.EpisodeSequence,
Item.ESRBAgeRating,
XMLAGG(Item.Feature) Feature,
XMLAGG(Item.Format) Format,
Item.Genre,
Item.HardwarePlatform,
Item.HazardousMaterialType,
Item.IsAdultProduct,
Item.IsAutographed,
Item.ISBN,
Item.IsEligibileForTrade,
Item.IsMemorabilia,
Item.IssuesPerYear,
XMLAGG(Item.ItemDimensions) ItemDimensions,
Item.ItemPartNumber,
Item.Label,
XMLAGG(Item.Langauge) Langauge,
Item.LegalDisclaimer,
Item.ListPrice,
Item.MagazineType,
Item.Manufacturer,
Item.ManufacturerMaximumAge,
Item.ManufacturerMinimumAge,
Item.ManufacturerPartsWarrantyDesc,
Item.MediaType,
Item.Model,
Item.ModelYear,
Item.MPN,
Item.NumberOfDiscs,
Item.NumberOfIssues,
Item.NumberOfItems,
Item.NumberOfPages,
Item.NumberOfTracks,
Item.OperatingSystem,
Item.PackageDimensions_Height,
Item.PackageDimensions_Height_Units,
Item.PackageDimensions_Length,
Item.PackageDimensions_Length_Units,
Item.PackageDimensions_Weight,
Item.PackageDimensions_Weight_Units,
Item.PackageDimensions_Width,
Item.PackageDimensions_Width_Units,
Item.PackageQuantity,
Item.PartNumber,
XMLAGG(Item.PictureFormat) PictureFormat,
XMLAGG(Item.Platform) Platform,
Item.ProductGroup,
Item.ProductTypeName,
Item.ProductTypeSubcategory,
Item.PublicationDate,
Item.Publisher,
Item.RegionCode,
Item.ReleaseDate,
Item.RunningTime,
Item.SeikodoProductCode,
Item.Item_Size,
Item.SKU,
Item.Studio,
Item.SubscriptionLength,
Item.Title,
Item.TrackSequence,
Item.TradeInValue,
Item.UPC,
XMLAGG(Item.UPCListElement) UPCListElement,
Item.Warranty,
Item.WEEETaxValue
FROM
XMLTABLE
XMLNAMESPACES(DEFAULT 'http://webservices.amazon.com/AWSECommerceService/2011-08-01'),
'//OperationRequest/Errors/Error
| //Items'
PASSING
(SELECT Document FROM XML)
COLUMNS
Id FOR ORDINALITY,
Code VARCHAR2(0050) PATH 'Code',
Message VARCHAR2(4000) PATH 'Message',
IsValid VARCHAR2(005) PATH 'Request/IsValid',
Item XMLTYPE PATH 'Item'
) Items
LEFT JOIN
XMLTABLE
XMLNAMESPACES(DEFAULT 'http://webservices.amazon.com/AWSECommerceService/2011-08-01'),
'/Item'
PASSING
Items.Item
COLUMNS
Id FOR ORDINALITY,
ASIN VARCHAR2(0010) PATH 'ASIN',
DetailPageURL VARCHAR2(0256) PATH 'DetailPageURL',
ItemLink XMLTYPE PATH 'ItemLinks/ItemLink',
SmallImage_URL VARCHAR2(0256) PATH 'SmallImage/URL',
SmallImage_Height NUMBER(4) PATH 'SmallImage/Height',
SmallImage_Height_Units VARCHAR2(0006) PATH 'SmallImage/Height/@Units',
SmallImage_Width NUMBER(4) PATH 'SmallImage/Width',
SmallImage_Width_Units VARCHAR2(0006) PATH 'SmallImage/Width/@Units',
MediumImage_URL VARCHAR2(0256) PATH 'MediumImage/URL',
MediumImage_Height NUMBER(4) PATH 'MediumImage/Height',
MediumImage_Height_Units VARCHAR2(0006) PATH 'MediumImage/Height/@Units',
MediumImage_Width NUMBER(4) PATH 'MediumImage/Width',
MediumImage_Width_Units VARCHAR2(0006) PATH 'MediumImage/Width/@Units',
LargeImage_URL VARCHAR2(0256) PATH 'LargeImage/URL',
LargeImage_Height NUMBER(4) PATH 'LargeImage/Height',
LargeImage_Height_Units VARCHAR2(0006) PATH 'LargeImage/Height/@Units',
LargeImage_Width NUMBER(4) PATH 'LargeImage/Width',
LargeImage_Width_Units VARCHAR2(0006) PATH 'LargeImage/Width/@Units',
ImageSet XMLTYPE PATH 'ImageSets/ImageSet',
Actor XMLTYPE PATH 'ItemAttributes/Actor',
Artist XMLTYPE PATH 'ItemAttributes/Artist',
AspectRatio VARCHAR2(0020) PATH 'ItemAttributes/AspectRatio',
AudienceRating VARCHAR2(0020) PATH 'ItemAttributes/AudienceRating',
AudioFormat XMLTYPE PATH 'ItemAttributes/AudioFormat',
Author XMLTYPE PATH 'ItemAttributes/Author',
Binding VARCHAR2(0050) PATH 'ItemAttributes/Binding',
Brand VARCHAR2(4000) PATH 'ItemAttributes/Brand',
CatalogNumberListElement XMLTYPE PATH 'ItemAttributes/CatalogNumberList/CatalogNumberListElement',
Category XMLTYPE PATH 'ItemAttributes/Category',
CEROAgeRating VARCHAR2(0020) PATH 'ItemAttributes/CEROAgeRating',
ClothingSize VARCHAR2(0050) PATH 'ItemAttributes/ClothingSize',
Color VARCHAR2(0100) PATH 'ItemAttributes/Color',
Creator XMLTYPE PATH 'ItemAttributes/Creator',
Department VARCHAR2(0050) PATH 'ItemAttributes/Department',
Director XMLTYPE PATH 'ItemAttributes/Director',
EAN NUMBER(15) PATH 'ItemAttributes/EAN',
EANListElement XMLTYPE PATH 'ItemAttributes/EANList/EANListElement',
Edition VARCHAR2(0020) PATH 'ItemAttributes/Edition',
EISBN XMLTYPE PATH 'ItemAttributes/EISBN',
EpisodeSequence VARCHAR2(0020) PATH 'ItemAttributes/EpisodeSequence',
ESRBAgeRating VARCHAR2(0020) PATH 'ItemAttributes/ESRBAgeRating',
Feature XMLTYPE PATH 'ItemAttributes/Feature',
Format XMLTYPE PATH 'ItemAttributes/Format',
Genre VARCHAR2(0050) PATH 'ItemAttributes/Genre',
HardwarePlatform VARCHAR2(0020) PATH 'ItemAttributes/HardwarePlatform',
HazardousMaterialType VARCHAR2(0050) PATH 'ItemAttributes/HazardousMaterialType',
IsAdultProduct VARCHAR2(0005) PATH 'ItemAttributes/IsAdultProduct',
IsAutographed VARCHAR2(0005) PATH 'ItemAttributes/IsAutographed',
ISBN VARCHAR2(0013) PATH 'ItemAttributes/ISBN',
IsEligibileForTrade VARCHAR2(0005) PATH 'ItemAttributes/IsEligibileForTrade',
IsMemorabilia VARCHAR2(0005) PATH 'ItemAttributes/IsMemorabilia',
IssuesPerYear VARCHAR2(0050) PATH 'ItemAttributes/IssuesPerYear',
ItemDimensions XMLTYPE PATH 'ItemAttributes/ItemDimensions',
ItemPartNumber VARCHAR2(0255) PATH 'ItemAttributes/ItemPartNumber',
Label VARCHAR2(4000) PATH 'ItemAttributes/Label',
Langauge XMLTYPE PATH 'ItemAttributes/Languages/Langauge',
LegalDisclaimer VARCHAR2(4000) PATH 'ItemAttributes/LegalDisclaimer',
ListPrice VARCHAR2(0020) PATH 'ItemAttributes/ListPrice',
MagazineType VARCHAR2(0020) PATH 'ItemAttributes/MagazineType',
Manufacturer VARCHAR2(4000) PATH 'ItemAttributes/Manufacturer',
ManufacturerMaximumAge VARCHAR2(0050) PATH 'ItemAttributes/ManufacturerMaximumAge',
ManufacturerMinimumAge VARCHAR2(0050) PATH 'ItemAttributes/ManufacturerMinimumAge',
ManufacturerPartsWarrantyDesc VARCHAR2(4000) PATH 'ItemAttributes/ManufacturerPartsWarrantyDesc',
MediaType VARCHAR2(0020) PATH 'ItemAttributes/MediaType',
Model VARCHAR2(0100) PATH 'ItemAttributes/Model',
ModelYear NUMBER(4) PATH 'ItemAttributes/ModelYear',
MPN VARCHAR2(0255) PATH 'ItemAttributes/MPN',
NumberOfDiscs NUMBER(3) PATH 'ItemAttributes/NumberOfDiscs',
NumberOfIssues NUMBER(3) PATH 'ItemAttributes/NumberOfIssues',
NumberOfItems NUMBER(7) PATH 'ItemAttributes/NumberOfItems',
NumberOfPages NUMBER(4) PATH 'ItemAttributes/NumberOfPages',
NumberOfTracks NUMBER(3) PATH 'ItemAttributes/NumberOfTracks',
OperatingSystem VARCHAR2(20) PATH 'ItemAttributes/OperatingSystem',
PackageDimensions_Height NUMBER(6) PATH 'ItemAttributes/PackageDimensions/Height',
PackageDimensions_Height_Units VARCHAR2(0018) PATH 'ItemAttributes/PackageDimensions/Height/@Units',
PackageDimensions_Length NUMBER(6) PATH 'ItemAttributes/PackageDimensions/Length',
PackageDimensions_Length_Units VARCHAR2(0018) PATH 'ItemAttributes/PackageDimensions/Length/@Units',
PackageDimensions_Weight NUMBER(6) PATH 'ItemAttributes/PackageDimensions/Weight',
PackageDimensions_Weight_Units VARCHAR2(0018) PATH 'ItemAttributes/PackageDimensions/Weight/@Units',
PackageDimensions_Width NUMBER(6) PATH 'ItemAttributes/PackageDimensions/Width',
PackageDimensions_Width_Units VARCHAR2(0018) PATH 'ItemAttributes/PackageDimensions/Width/@Units',
PackageQuantity NUMBER(5) PATH 'ItemAttributes/PackageQuantity',
PartNumber VARCHAR2(0100) PATH 'ItemAttributes/PartNumber',
PictureFormat XMLTYPE PATH 'ItemAttributes/PictureFormat',
Platform XMLTYPE PATH 'ItemAttributes/Platform',
ProductGroup VARCHAR2(0050) PATH 'ItemAttributes/ProductGroup',
ProductTypeName VARCHAR2(4000) PATH 'ItemAttributes/ProductTypeName',
ProductTypeSubcategory VARCHAR2(50) PATH 'ItemAttributes/ProductTypeSubcategory',
PublicationDate VARCHAR2(20) PATH 'ItemAttributes/PubliucationDate',
Publisher VARCHAR2(0255) PATH 'ItemAttributes/Publisher',
RegionCode VARCHAR2(20) PATH 'ItemAttributes/RegionCode',
ReleaseDate VARCHAR2(20) PATH 'ItemAttributes/ReleaseDate',
RunningTime VARCHAR2(20) PATH 'ItemAttributes/RunningTime',
SeikodoProductCode VARCHAR2(50) PATH 'ItemAttributes/SeikodoProductCode',
Item_Size VARCHAR2(50) PATH 'ItemAttributes/Size',
SKU VARCHAR2(0255) PATH 'ItemAttributes/SKU',
Studio VARCHAR2(0255) PATH 'ItemAttributes/Studio',
SubscriptionLength VARCHAR2(20) PATH 'ItemAttributes/SubscriptionLength',
Title VARCHAR2(4000) PATH 'ItemAttributes/Title',
TrackSequence VARCHAR2(0100) PATH 'ItemAttributes/TrackSequence',
TradeInValue VARCHAR2(4000) PATH 'ItemAttributes/TradeInValue',
UPC NUMBER(12) PATH 'ItemAttributes/UPC',
UPCListElement XMLTYPE PATH 'ItemAttributes/UPCList/UPCListElement',
Warranty VARCHAR2(4000) PATH 'ItemAttributes/Warranty',
WEEETaxValue VARCHAR2(0100) PATH 'ItemAttributes/WEEETaxValue'
) Item
ON
1 = 1
GROUP BY
Items.Id,
Items.Code,
Items.Message,
Items.Isvalid,
Item.Id,
Item.ASIN,
Item.DetailPageURL,
Item.SmallImage_URL,
Item.SmallImage_Height,
Item.SmallImage_Height_Units,
Item.SmallImage_Width,
Item.SmallImage_Width_Units,
Item.MediumImage_URL,
Item.MediumImage_Height,
Item.MediumImage_Height_Units,
Item.MediumImage_Width,
Item.MediumImage_Width_Units,
Item.LargeImage_URL,
Item.LargeImage_Height,
Item.LargeImage_Height_Units,
Item.LargeImage_Width,
Item.LargeImage_Width_Units,
Item.AspectRatio,
Item.AudienceRating,
Item.Binding,
Item.Brand,
Item.CEROAgeRating,
Item.ClothingSize,
Item.Color,
Item.EAN,
Item.Edition,
Item.EpisodeSequence,
Item.ESRBAgeRating,
Item.Genre,
Item.HardwarePlatform,
Item.HazardousMaterialType,
Item.IsAdultProduct,
Item.IsAutographed,
Item.ISBN,
Item.IsEligibileForTrade,
Item.IsMemorabilia,
Item.IssuesPerYear,
Item.ItemPartNumber,
Item.Label,
Item.LegalDisclaimer,
Item.ListPrice,
Item.MagazineType,
Item.Manufacturer,
Item.ManufacturerMaximumAge,
Item.ManufacturerMinimumAge,
Item.ManufacturerPartsWarrantyDesc,
Item.MediaType,
Item.Model,
Item.ModelYear,
Item.MPN,
Item.NumberOfDiscs,
Item.NumberOfIssues,
Item.NumberOfItems,
Item.NumberOfPages,
Item.NumberOfTracks,
Item.OperatingSystem,
Item.PackageDimensions_Height,
Item.PackageDimensions_Height_Units,
Item.PackageDimensions_Length,
Item.PackageDimensions_Length_Units,
Item.PackageDimensions_Weight,
Item.PackageDimensions_Weight_Units,
Item.PackageDimensions_Width,
Item.PackageDimensions_Width_Units,
Item.PackageQuantity,
Item.PartNumber,
Item.ProductGroup,
Item.ProductTypeName,
Item.ProductTypeSubcategory,
Item.PublicationDate,
Item.Publisher,
Item.RegionCode,
Item.ReleaseDate,
Item.RunningTime,
Item.SeikodoProductCode,
Item.Item_Size,
Item.SKU,
Item.Studio,
Item.SubscriptionLength,
Item.Title,
Item.TrackSequence,
Item.TradeInValue,
Item.UPC,
Item.Warranty,
Item.WEEETaxValue
ORDER BY
Items.Id,
Item.Id;By using //, i am able to use the same query for both. Is there a better way?If using a single query is a must, then I guess it's OK.
Ideally, however, i would like the text of each (without tags), separated by commas.The fn:string-join() function can do that, e.g. :
ItemLinkDesc VARCHAR2(4000) PATH 'fn:string-join(ItemLinks/ItemLink/Description, ";")'But I'm not sure it's a good idea because you'll be losing the structured nature of the data.
Maybe it would be better to collect repeating elements into a collection of SQL object types, but again it all depends on how you want to use the data later.
So, following your advice, i removed the XMLAGGs and GROUP BY clause, but, again the query works, the CTAS does not:Strange...
Works for me :
SQL> select * from v$version;
BANNER
Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
SQL>
SQL> CREATE TABLE Moocows AS
2 SELECT
3 Items.Id,
4 Items.Code,
5 Items.Message,
6 Items.Isvalid,
7 Item.Id Item_Id,
8 Item.ASIN,
9 Item.DetailPageURL,
10 Item.ItemLink,
11 Item.SmallImage_URL,
12 Item.SmallImage_Height,
13 Item.SmallImage_Height_Units,
14 Item.SmallImage_Width,
15 Item.SmallImage_Width_Units,
16 Item.MediumImage_URL,
17 Item.MediumImage_Height,
18 Item.MediumImage_Height_Units,
19 Item.MediumImage_Width,
20 Item.MediumImage_Width_Units,
21 Item.LargeImage_URL,
22 Item.LargeImage_Height,
23 Item.LargeImage_Height_Units,
24 Item.LargeImage_Width,
25 Item.LargeImage_Width_Units,
26 Item.ImageSet,
27 Item.Actor,
28 Item.Artist,
29 Item.AspectRatio,
30 Item.AudienceRating,
31 Item.AudioFormat,
32 Item.Author,
33 Item.Binding,
34 Item.Brand,
35 Item.CatalogNumberListElement,
36 Item.Category,
37 Item.CEROAgeRating,
38 Item.ClothingSize,
39 Item.Color,
40 Item.Creator,
41 Item.Director,
42 Item.EAN,
43 Item.EANListElement,
44 Item.Edition,
45 Item.EISBN,
46 Item.EpisodeSequence,
47 Item.ESRBAgeRating,
48 Item.Feature,
49 Item.Format,
50 Item.Genre,
51 Item.HardwarePlatform,
52 Item.HazardousMaterialType,
53 Item.IsAdultProduct,
54 Item.IsAutographed,
55 Item.ISBN,
56 Item.IsEligibileForTrade,
57 Item.IsMemorabilia,
58 Item.IssuesPerYear,
59 Item.ItemDimensions,
60 Item.ItemPartNumber,
61 Item.Label,
62 Item.Langauge,
63 Item.LegalDisclaimer,
64 Item.ListPrice,
65 Item.MagazineType,
66 Item.Manufacturer,
67 Item.ManufacturerMaximumAge,
68 Item.ManufacturerMinimumAge,
69 Item.ManufacturerPartsWarrantyDesc,
70 Item.MediaType,
71 Item.Model,
72 Item.ModelYear,
73 Item.MPN,
74 Item.NumberOfDiscs,
75 Item.NumberOfIssues,
76 Item.NumberOfItems,
77 Item.NumberOfPages,
78 Item.NumberOfTracks,
79 Item.OperatingSystem,
80 Item.PackageDimensions_Height,
81 Item.PackageDimensions_Height_Units,
82 Item.PackageDimensions_Length,
83 Item.PackageDimensions_Length_Units,
84 Item.PackageDimensions_Weight,
85 Item.PackageDimensions_Weight_Units,
86 Item.PackageDimensions_Width,
87 Item.PackageDimensions_Width_Units,
88 Item.PackageQuantity,
89 Item.PartNumber,
90 Item.PictureFormat,
91 Item.Platform,
92 Item.ProductGroup,
93 Item.ProductTypeName,
94 Item.ProductTypeSubcategory,
95 Item.PublicationDate,
96 Item.Publisher,
97 Item.RegionCode,
98 Item.ReleaseDate,
99 Item.RunningTime,
100 Item.SeikodoProductCode,
101 Item.Item_Size,
102 Item.SKU,
103 Item.Studio,
104 Item.SubscriptionLength,
105 Item.Title,
106 Item.TrackSequence,
107 Item.TradeInValue,
108 Item.UPC,
109 Item.UPCListElement,
110 Item.Warranty,
111 Item.WEEETaxValue
112 FROM
113 XMLTABLE
114 (
115 XMLNAMESPACES(DEFAULT 'http://webservices.amazon.com/AWSECommerceService/2011-08-01'),
116 '//OperationRequest/Errors/Error
117 | //Items'
118 PASSING get_document()
119 COLUMNS
120 Id FOR ORDINALITY,
121 Code VARCHAR2(0050) PATH 'Code',
122 Message VARCHAR2(4000) PATH 'Message',
123 IsValid VARCHAR2(005) PATH 'Request/IsValid',
124 Item XMLTYPE PATH 'Item'
125 ) Items
126 LEFT JOIN
127 XMLTABLE
128 (
129 XMLNAMESPACES(DEFAULT 'http://webservices.amazon.com/AWSECommerceService/2011-08-01'),
130 '/Item'
131 PASSING
132 Items.Item
133 COLUMNS
134 Id FOR ORDINALITY,
135 ASIN VARCHAR2(0010) PATH 'ASIN',
136 DetailPageURL VARCHAR2(0256) PATH 'DetailPageURL',
137 ItemLink XMLTYPE PATH 'ItemLinks/ItemLink',
138 SmallImage_URL VARCHAR2(0256) PATH 'SmallImage/URL',
139 SmallImage_Height NUMBER(4) PATH 'SmallImage/Height',
140 SmallImage_Height_Units VARCHAR2(0006) PATH 'SmallImage/Height/@Units',
141 SmallImage_Width NUMBER(4) PATH 'SmallImage/Width',
142 SmallImage_Width_Units VARCHAR2(0006) PATH 'SmallImage/Width/@Units',
143 MediumImage_URL VARCHAR2(0256) PATH 'MediumImage/URL',
144 MediumImage_Height NUMBER(4) PATH 'MediumImage/Height',
145 MediumImage_Height_Units VARCHAR2(0006) PATH 'MediumImage/Height/@Units',
146 MediumImage_Width NUMBER(4) PATH 'MediumImage/Width',
147 MediumImage_Width_Units VARCHAR2(0006) PATH 'MediumImage/Width/@Units',
148 LargeImage_URL VARCHAR2(0256) PATH 'LargeImage/URL',
149 LargeImage_Height NUMBER(4) PATH 'LargeImage/Height',
150 LargeImage_Height_Units VARCHAR2(0006) PATH 'LargeImage/Height/@Units',
151 LargeImage_Width NUMBER(4) PATH 'LargeImage/Width',
152 LargeImage_Width_Units VARCHAR2(0006) PATH 'LargeImage/Width/@Units',
153 ImageSet XMLTYPE PATH 'ImageSets/ImageSet',
154 Actor XMLTYPE PATH 'ItemAttributes/Actor',
155 Artist XMLTYPE PATH 'ItemAttributes/Artist',
156 AspectRatio VARCHAR2(0020) PATH 'ItemAttributes/AspectRatio',
157 AudienceRating VARCHAR2(0020) PATH 'ItemAttributes/AudienceRating',
158 AudioFormat XMLTYPE PATH 'ItemAttributes/AudioFormat',
159 Author XMLTYPE PATH 'ItemAttributes/Author',
160 Binding VARCHAR2(0050) PATH 'ItemAttributes/Binding',
161 Brand VARCHAR2(4000) PATH 'ItemAttributes/Brand',
162 CatalogNumberListElement XMLTYPE PATH 'ItemAttributes/CatalogNumberList/CatalogNumberListElement',
163 Category XMLTYPE PATH 'ItemAttributes/Category',
164 CEROAgeRating VARCHAR2(0020) PATH 'ItemAttributes/CEROAgeRating',
165 ClothingSize VARCHAR2(0050) PATH 'ItemAttributes/ClothingSize',
166 Color VARCHAR2(0100) PATH 'ItemAttributes/Color',
167 Creator XMLTYPE PATH 'ItemAttributes/Creator',
168 Department VARCHAR2(0050) PATH 'ItemAttributes/Department',
169 Director XMLTYPE PATH 'ItemAttributes/Director',
170 EAN NUMBER(15) PATH 'ItemAttributes/EAN',
171 EANListElement XMLTYPE PATH 'ItemAttributes/EANList/EANListElement',
172 Edition VARCHAR2(0020) PATH 'ItemAttributes/Edition',
173 EISBN XMLTYPE PATH 'ItemAttributes/EISBN',
174 EpisodeSequence VARCHAR2(0020) PATH 'ItemAttributes/EpisodeSequence',
175 ESRBAgeRating VARCHAR2(0020) PATH 'ItemAttributes/ESRBAgeRating',
176 Feature XMLTYPE PATH 'ItemAttributes/Feature',
177 Format XMLTYPE PATH 'ItemAttributes/Format',
178 Genre VARCHAR2(0050) PATH 'ItemAttributes/Genre',
179 HardwarePlatform VARCHAR2(0020) PATH 'ItemAttributes/HardwarePlatform',
180 HazardousMaterialType VARCHAR2(0050) PATH 'ItemAttributes/HazardousMaterialType',
181 IsAdultProduct VARCHAR2(0005) PATH 'ItemAttributes/IsAdultProduct',
182 IsAutographed VARCHAR2(0005) PATH 'ItemAttributes/IsAutographed',
183 ISBN VARCHAR2(0013) PATH 'ItemAttributes/ISBN',
184 IsEligibileForTrade VARCHAR2(0005) PATH 'ItemAttributes/IsEligibileForTrade',
185 IsMemorabilia VARCHAR2(0005) PATH 'ItemAttributes/IsMemorabilia',
186 IssuesPerYear VARCHAR2(0050) PATH 'ItemAttributes/IssuesPerYear',
187 ItemDimensions XMLTYPE PATH 'ItemAttributes/ItemDimensions',
188 ItemPartNumber VARCHAR2(0255) PATH 'ItemAttributes/ItemPartNumber',
189 Label VARCHAR2(4000) PATH 'ItemAttributes/Label',
190 Langauge XMLTYPE PATH 'ItemAttributes/Languages/Langauge',
191 LegalDisclaimer VARCHAR2(4000) PATH 'ItemAttributes/LegalDisclaimer',
192 ListPrice VARCHAR2(0020) PATH 'ItemAttributes/ListPrice',
193 MagazineType VARCHAR2(0020) PATH 'ItemAttributes/MagazineType',
194 Manufacturer VARCHAR2(4000) PATH 'ItemAttributes/Manufacturer',
195 ManufacturerMaximumAge VARCHAR2(0050) PATH 'ItemAttributes/ManufacturerMaximumAge',
196 ManufacturerMinimumAge VARCHAR2(0050) PATH 'ItemAttributes/ManufacturerMinimumAge',
197 ManufacturerPartsWarrantyDesc VARCHAR2(4000) PATH 'ItemAttributes/ManufacturerPartsWarrantyDesc',
198 MediaType VARCHAR2(0020) PATH 'ItemAttributes/MediaType',
199 Model VARCHAR2(0100) PATH 'ItemAttributes/Model',
200 ModelYear NUMBER(4) PATH 'ItemAttributes/ModelYear',
201 MPN VARCHAR2(0255) PATH 'ItemAttributes/MPN',
202 NumberOfDiscs NUMBER(3) PATH 'ItemAttributes/NumberOfDiscs',
203 NumberOfIssues NUMBER(3) PATH 'ItemAttributes/NumberOfIssues',
204 NumberOfItems NUMBER(7) PATH 'ItemAttributes/NumberOfItems',
205 NumberOfPages NUMBER(4) PATH 'ItemAttributes/NumberOfPages',
206 NumberOfTracks NUMBER(3) PATH 'ItemAttributes/NumberOfTracks',
207 OperatingSystem VARCHAR2(20) PATH 'ItemAttributes/OperatingSystem',
208 PackageDimensions_Height NUMBER(6) PATH 'ItemAttributes/PackageDimensions/Height',
209 PackageDimensions_Height_Units VARCHAR2(0018) PATH 'ItemAttributes/PackageDimensions/Height/@Units',
210 PackageDimensions_Length NUMBER(6) PATH 'ItemAttributes/PackageDimensions/Length',
211 PackageDimensions_Length_Units VARCHAR2(0018) PATH 'ItemAttributes/PackageDimensions/Length/@Units',
212 PackageDimensions_Weight NUMBER(6) PATH 'ItemAttributes/PackageDimensions/Weight',
213 PackageDimensions_Weight_Units VARCHAR2(0018) PATH 'ItemAttributes/PackageDimensions/Weight/@Units',
214 PackageDimensions_Width NUMBER(6) PATH 'ItemAttributes/PackageDimensions/Width',
215 PackageDimensions_Width_Units VARCHAR2(0018) PATH 'ItemAttributes/PackageDimensions/Width/@Units',
216 PackageQuantity NUMBER(5) PATH 'ItemAttributes/PackageQuantity',
217 PartNumber VARCHAR2(0100) PATH 'ItemAttributes/PartNumber',
218 PictureFormat XMLTYPE PATH 'ItemAttributes/PictureFormat',
219 Platform XMLTYPE PATH 'ItemAttributes/Platform',
220 ProductGroup VARCHAR2(0050) PATH 'ItemAttributes/ProductGroup',
221 ProductTypeName VARCHAR2(4000) PATH 'ItemAttributes/ProductTypeName',
222 ProductTypeSubcategory VARCHAR2(50) PATH 'ItemAttributes/ProductTypeSubcategory',
223 PublicationDate VARCHAR2(20) PATH 'ItemAttributes/PubliucationDate',
224 Publisher VARCHAR2(0255) PATH 'ItemAttributes/Publisher',
225 RegionCode VARCHAR2(20) PATH 'ItemAttributes/RegionCode',
226 ReleaseDate VARCHAR2(20) PATH 'ItemAttributes/ReleaseDate',
227 RunningTime VARCHAR2(20) PATH 'ItemAttributes/RunningTime',
228 SeikodoProductCode VARCHAR2(50) PATH 'ItemAttributes/SeikodoProductCode',
229 Item_Size VARCHAR2(50) PATH 'ItemAttributes/Size',
230 SKU VARCHAR2(0255) PATH 'ItemAttributes/SKU',
231 Studio VARCHAR2(0255) PATH 'ItemAttributes/Studio',
232 SubscriptionLength VARCHAR2(20) PATH 'ItemAttributes/SubscriptionLength',
233 Title VARCHAR2(4000) PATH 'ItemAttributes/Title',
234 TrackSequence VARCHAR2(0100) PATH 'ItemAttributes/TrackSequence',
235 TradeInValue VARCHAR2(4000) PATH 'ItemAttributes/TradeInValue',
236 UPC NUMBER(12) PATH 'ItemAttributes/UPC',
237 UPCListElement XMLTYPE PATH 'ItemAttributes/UPCList/UPCListElement',
238 Warranty VARCHAR2(4000) PATH 'ItemAttributes/Warranty',
239 WEEETaxValue VARCHAR2(0100) PATH 'ItemAttributes/WEEETaxValue'
240 ) Item
241 ON
242 1 = 1
243 ORDER BY
244 Items.Id,
245 Item.Id;
Table created -
Hello,
we have the phenomena that when an application is commiting a transaction and then terminating,
often not all events regarding Data Cache are dispatched by the TCP kodo.RemoteCommitProvider.
It seems that the JVM on termination is not waiting until RemoteCommitProvider has dispatched all events regarding Data
Cache. In this way we sometimes loose some cache synchronization and some of our customers run into serious problems.
Is there a way to guarantee that all Data Cache events are dispatched before the aplciation terminates
(maybe implementing a shutdown hook?).
best regards
Guenther Demetz
Wuerth-Phoenix SRLHi,
as nobody answered to my question I try to explain it more simple:
Are the TCP-kodo.RemoteCommitProvider threads acting as user threads or as threads of type 'deamon' ?
I hope that soon someon can answer
best regards
Guenther Demetz
Wuerth-Phoenix SRL
G.Demetz wrote:
Hello,
we have the phenomena that when an application is commiting a transaction and then terminating,
often not all events regarding Data Cache are dispatched by the TCP kodo.RemoteCommitProvider.
It seems that the JVM on termination is not waiting until RemoteCommitProvider has dispatched all events regarding Data
Cache. In this way we sometimes loose some cache synchronization and some of our customers run into serious problems.
Is there a way to guarantee that all Data Cache events are dispatched before the aplciation terminates
(maybe implementing a shutdown hook?).
best regards
Guenther Demetz
Wuerth-Phoenix SRL -
Post XML event to a JMS queue on another server
Hi All,
How do post an XML event to a JMS queue that is registered on another server
from the studio?.
This functionality supposed to be available in WLI 2.0 as an enhancement
from WLPI 1.2.1.
Any ideas?
- JagdishJagdish
Sorry, I am on vacation and trying to have some time to myself. If the
Topic or Queue is on another server in a cluster then you use the JNDI name,
however, if it not available via JNDI then you need to write some code to
connect to the remote machine and do it that way.
Tony
"Jagdish" <[email protected]> wrote in message
news:[email protected]..
Hi Tony,
Can one of you guys reply to this please?
- Jagdish
"Jagdish" <[email protected]> wrote in message
news:3b6ac305$[email protected]..
Hi All,
How do post an XML event to a JMS queue that is registered on anotherserver
from the studio?.
This functionality supposed to be available in WLI 2.0 as an enhancement
from WLPI 1.2.1.
Any ideas?
- Jagdish -
I am working on upgrading an application that has been in use for many years. The application is written in VB6 and I have been tasked with upgrading the current application to Crystal Reports for Visual Studio. I am using Crystal Reports for VS Version 13.0.12.1494. The system's database is a Sybase SQL Anywhere 16 database with an ODBC connection using integrated login. Each of the reports has the database connection set up from within the report. There is only once database server, so each of the reports are pointing to the same DB. The database server is currently installed as a "Personal Server" with a limit of 10 connections.
I have implemented the CR viewer as part of a COM-callable wrapper that exposes a COM interface for VB6 to interact with. Inside of my viewer component is a Winform that embeds the Crystal's Report viewer. The COM interface basically maps the basic Crystal apis to methods that the VB6 can call (i.e., Load Report, Set Field Text, Update SQL Query, etc). This architecture is working as designed and the reports are displaying correctly and responding correctly to changes in queries, etc.
The issue is that after I open 9 reports, the tenth one will respond with an error indicating that the database connection limit has been reached. The database connections used by the reports aren't released until after the application is closed. The application is designed for a secure environment that prohibits the non-administrative user from accessing the systems desktop, so asking the user tor restart the application after 10 reports isn't a viable option.
I have checked and database connection pooling is turned off for the SQL Anywhere 16 driver.
I have been digging on this for a few days and have tried adding code in the FormClosed event to close and dispose of the Report Document as follows:
ReportDocument reportDoc= (ReportDocument) crystalReportViewer1.ReportSource;
reportDoc.Close();
reportDoc.Dispose();
GC.Collect(); // Force garbage collection on disposed items
I have also tried the following (as well as maybe 20 or so other permutations) trying to fix the issue with no success.
ReportDocument reportDoc= (ReportDocument) crystalReportViewer1.ReportSource;
foreach (Table table in reportDoc.Database.Tables)
table.Dispose();
crystalReportViewer1.ReportSource = null;
reportDoc.Database.Dispose();
reportDoc.Close();
reportDoc.Dispose();
reportDoc = (ReportDocument)crystalReportViewer1.ReportSource;
GC.Collect(); // Force garabe collection on disposed items
Any ideas or suggestions would be greatly appreciated. I have been pulling my hair out on this one!Hi Ludek,
Thanks so much for the quick reply. Unfortunately I did not have time to work on the reporting project Friday afternoon, but did a quick test this morning with some interesting results. I'm hoping if I describe what I'm doing, you can show me the error of my ways. This is really my first major undertaking with Crystal Reports.
If I simply load the report, then close and dispose, I don't hit the limit of 10 files. Note that I do not logon manually in my code as the logon parameters are all defined within the reports themselves. The logon happens when you actually view the report. Loading the report doesn't seem to actually log in to the DB.
What I did was create a very simple form with a single button that creates the WinForm class which contains the Crystal Viewer. It then loads the report, sets the ReportSource property on the CrystalReportsViewer object contained in the WInForm and shows the report. The report does show correctly, until the 10 reports limit is reached.
The relevant code is shown below. More than I wanted to post, but i want to be as complete and unambiguous as possible.
This code displays the same behavior as my earlier post (after 10 reports we are unable to create another connection to the DB).
// Initial Form that simply has a button
public partial class SlectReport : form
public SelectReport()
InitializeComponent();
private void button1_Click(object sender, EventArgs e)
ReportDocument rd = new ReportDocument();
ReportForm report = new ReportForm();
try
rd.Load(@"Test.rpt");
report.ReportSource = rd;
report.Show();
catch (Exception ex)
MessageBox.Show(ex.Message);
// The WinForm containing the Crystal Reports Viewer
public partial class ReportForm : Form
public ReportForm()
InitializeComponent();
private void Form1_Load(object sender, EventArgs e)
this.crystalReportViewer1.RefreshReport();
this.FormClosed += new FormClosedEventHandler(ReportForm_FormClosed);
void ReportForm_FormClosed(object sender, FormClosedEventArgs e)
ReportDocument rd;
rd = (ReportDocument)crystalReportViewer1.ReportSource;
rd.Close();
rd.Dispose();
public object ReportSource
set { crystalReportViewer1.ReportSource = value; }
Again, any guidance would be greatly appreciated. -
I have an Script mostly that is generated by SSMS which works with-out issue on SQL Server 2008, but when I attempt to run it on a new fresh install of SQL Server 2012 I get an Msg 8631. Internal error: Server stack limit has been reached. Please look for
potentially deep nesting in your query, and try to simplify it.
The script itself doesn't seem to be all that deep or nested. The script is large 2600 lines and when I remove the bulk of the 2600 lines, it does run on SQL Server 2012. I'm just really baffled why something that SQL Server generated with very
few additions/changes AND that WORKS without issue in SQL Server 2008 R2 would suddenly be invalid in SQL Server 2012
I need to know why my script which is working great on our current SQL Server 2008 R2 servers suddenly fails and won't run on an new SQL Server 2012 server. This script is used to create 'bulk' Replications on a large number of DBs saving a tremendous
amount of our time doing it the manual way.
Below is an 'condensed' version of the script which fails. I have removed around 2550 lines of specific sp_addarticle statements which are mostly just copy and pasted from what SQL Management Studio 'scripted' for me went I when through the Replication
Wizard and told it to save to script.
declare @dbname varchar(MAX), @SQL nvarchar(MAX)
declare c_dblist cursor for
select name from sys.databases WHERE name like 'dbone[_]%' order by name;
open c_dblist
fetch next from c_dblist into @dbname
while @@fetch_status = 0
begin
print @dbname
SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
use ['+@dbname+']
exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
use ['+@dbname+']
exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
-- Adding the transactional publication
use ['+@dbname+']
exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
'''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
= N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
@immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
@frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
-- There are around 2400 lines roughly the same as this only difference is the tablename repeated below this one
use ['+@dbname+']
exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script =
null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N''manual'', @destination_table = N''TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false'', @ins_cmd = N''CALL sp_MSins_dboTABLE_ONE'',
@del_cmd = N''CALL sp_MSdel_dboTABLE_ONE'', @upd_cmd = N''SCALL sp_MSupd_dboTABLE_ONE''
EXEC sp_executesql @SQL
SET @dbname = REPLACE(@dbname, 'dbone_', 'dbtwo_');
print @dbname
SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
use ['+@dbname+']
exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
use ['+@dbname+']
exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
-- Adding the transactional publication
use ['+@dbname+']
exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
'''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
= N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
@immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
@frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
-- There are around 140 lines roughly the same as this only difference is the tablename repeated below this one
use ['+@dbname+']
exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''DB_TWO_TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''DB_TWO_TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script
= null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N''manual'', @destination_table = N''DB_TWO_TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false''
EXEC sp_executesql @SQL
fetch next from c_dblist into @dbname
end
close c_dblist
deallocate c_dblist
George P Botuwell, ProgrammerHi George,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
If you have any feedback on our support, please click
here.
Allen Li
TechNet Community Support
Maybe you are looking for
-
Hi, I have recently been asked to generate a program that reports of payroll postings to FI. This involves creating a giant select statement from the ppoix table to gather all the postings. My select statement is as follows: SELECT pernr
-
Hi, I've got a requirement, wherein I need to display a few fields of the ALV page, as the header data, and the remaining as line items. How do I do. I'm able to get all the data fields to a ALV report, how do I go?? Please help me. Thank you, in Ad
-
Can an intel core duo 2Ghz iMac handle a 12Mbps internet connection?
Is a 12 Mbps internet connection speed too fast for an Intel core duo 2 GHz Imac?
-
TOAD has a nice, integrated feature called CodeXpert. It evaluates pl/sql code and recommends possible changes according to a set of programming rules and standards. I'm trying to find an alternative for this feature in SqlDeveloper. Maybe a plug-in
-
Hi all, I am trying to pass dynamic information as parameters to the transitionManager.start method. Something like this works just fine: TransitionManager.start(a_mc, {type:mx.transitions.Wipe, easing:mx.transitions.easing.Bounce.easeOut, duration:2