[jboss-jira] [JBoss JIRA] Commented: (JBESB-281) Fix conosle import.sql script execution for HSQLDB
jarkko Lietolahti (JIRA)
jira-events at jboss.com
Fri Jan 12 06:23:52 EST 2007
[ http://jira.jboss.com/jira/browse/JBESB-281?page=comments#action_12350658 ]
jarkko Lietolahti commented on JBESB-281:
-----------------------------------------
This can be fixed by adding RAWTOHEX (which seems to be some kind of SQL standard spec) into the inset clauses:
insert into transformationresourceparameter (id, name, value, transresource_id) values (1, 'restype', RAWTOHEX('xsl'), 1);
..
delete from participant;
delete from messagecontract;
delete from transformationresourceparameter;
delete from transformationresource;
delete from transformationresourceparameterspec;
delete from transformationresourcespec;
--########################################################################
--# Sample Message Exchange Participants.
--########################################################################
INSERT INTO participant (id, name) VALUES (1, 'DVDStore:OrderDispatchService');
INSERT INTO participant (id, name) VALUES (2, 'DVDWarehouse_1:OrderHandlingService');
INSERT INTO participant (id, name) VALUES (3, 'DVDWarehouse_2:OrderHandlingService');
INSERT INTO participant (id, name) VALUES (4, 'DataWarehouse:OrderTrackingService');
--########################################################################
--# Sample Message Contracts.
--########################################################################
INSERT INTO messagecontract (id, participant, usage, mime, namespace, messagedescription) VALUES (1, 'DVDStore:OrderDispatchService', 'PRODUCES', 'text/xml', 'fullFillOrder', 'http://org.acme/OrderDispatchService/fullFillOrder.xsd');
INSERT INTO messagecontract (id, participant, usage, mime, namespace, messagedescription) VALUES (2, 'DVDWarehouse_1:OrderHandlingService', 'CONSUMES', 'text/xml', 'shipOrder', 'http://org.acme/OrderHandlingService/shipOrder-post.dtd');
INSERT INTO messagecontract (id, participant, usage, mime, namespace, messagedescription) VALUES (3, 'DVDWarehouse_2:OrderNotificationService', 'CONSUMES', 'application/EDI-X12', 'notifyCustomer', 'http://org.acme/OrderHandlingService/notifyCustomer.xsd');
INSERT INTO messagecontract (id, participant, usage, mime, namespace, messagedescription) VALUES (4, 'DataWarehouse:OrderTrackingService', 'CONSUMES', 'text/xml', 'recordOrder', 'http://org.acme/OrderTrackingService/recordOrder.xsd');
--########################################################################
--# Templating cdu-creators.
--########################################################################
insert into transformationresource (id, name, path, selector, useragent) values (1, '* XSLT Content Delivery Unit Creator (This resource is targeted at all Message Exchanges and is required for interpreting "xsl" resource types)', 'org.milyn.templating.xslt.XslContentDeliveryUnitCreator', 'cdu-creator', '*');
insert into transformationresourceparameter (id, name, value, transresource_id) values (1, 'restype', RAWTOHEX('xsl'), 1);
insert into transformationresource (id, name, path, selector, useragent) values (2, '* StringTemplate Content Delivery Unit Creator (This resource is targeted at all Message Exchanges and is required for interpreting "st" resource types)', 'org.milyn.templating.stringtemplate.StringTemplateContentDeliveryUnitCreator', 'cdu-creator', '*');
insert into transformationresourceparameter (id, name, value, transresource_id) values (2, 'restype', RAWTOHEX('st'), 2);
--########################################################################
--# XSLT Templatelet Resource Template.
--########################################################################
insert into transformationresourcespec (id, name, path, description, reference) values (1, 'XSLT (Templatelet)', 'See ''resdata'' parameter value', RAWTOHEX('Perform an XML Fragment Transform using an XSLT Templatelet. The targeted XML fragment is transformed using the XSLT Templatelet and the transformation result is used in accordance with the value of the "action" parameter. Can be used in conjunction with the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Javabean Cartridge</a> Cartridge. <p/>Examples of using this resource can be seen on the <a href="http://milyn.codehaus.org/Tutorials">Milyn Smooks</a> website.<p/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Templating Cartridge</a> to be installed.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/templating/org/milyn/templating/xslt/XslContentDeliveryUnitCreator.html');
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (1, 'resdata', RAWTOHEX(''), RAWTOHEX('Resource Data. The XSLT Templatelet code. Just define the body of the xsl <template> - no need for the outer <stylesheet> or <template> tags.'), true, 1);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (2, 'action', RAWTOHEX(''), RAWTOHEX('Action to be performed with the transformation result relative to the targeted XML Fragment. Possible values: "replace", "addto", "insertbefore", "insertafter".'), true, 1);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (3, 'restype', RAWTOHEX('xsl'), RAWTOHEX('Resource Type.'), false, 1);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (4, 'is-xslt-templatelet', RAWTOHEX('true'), RAWTOHEX('Is this XSLT resource an XSLT Templatelet.'), false, 1);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (5, 'visitBefore', RAWTOHEX('false'), RAWTOHEX('Should the template be applied before (true) or after (false) Smooks visits the child elements of the target element.'), false, 1);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (6, 'encoding', RAWTOHEX('UTF-8'), RAWTOHEX('XSLT Character Encoding.'), false, 1);
--########################################################################
--# StringTemplate Resource Template.
--########################################################################
insert into transformationresourcespec (id, name, description, reference) values (2, 'StringTemplate', RAWTOHEX('Perform an XML Fragment Transform using an <a href="http://www.stringtemplate.org">StringTemplate</a> Template. The targeted XML fragment is transformed using the <a href="http://www.stringtemplate.org">StringTemplate</a> Template and the transformation result is used in accordance with the value of the "action" parameter. Used in conjunction with the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Javabean Cartridge</a>. <p/>Examples of using this resource can be seen on the <a href="http://milyn.codehaus.org/Tutorials">Milyn Smooks</a> website.<p/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Templating and Javabean Cartridges</a> to be installed.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/templating/org/milyn/templating/stringtemplate/StringTemplateContentDeliveryUnitCreator.html');
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (7, 'action', RAWTOHEX(''), RAWTOHEX('Action to be performed with the transformation result relative to the targeted XML Fragment. Possible values: "replace", "addto", "insertbefore", "insertafter".'), true, 2);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (8, 'visitBefore', RAWTOHEX('false'), RAWTOHEX('Should the template be applied before (true) or after (false) Smooks visits the child elements of the target element.'), false, 2);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (9, 'encoding', RAWTOHEX('UTF-8'), RAWTOHEX('XSLT Character Encoding.'), false, 2);
--########################################################################
--# CSV Message Parser Template.
--########################################################################
insert into transformationresourcespec (id, name, path, selector, description, reference) values (3, 'CSV Message Parser', 'org.milyn.csv.CSVParser', 'org.xml.sax.driver', RAWTOHEX('Set the SAX Parser for a Comma Separated Value (CSV) message. This resource sets the Smooks SAX Parser for the targeted CSV message, allowing the CSV message to be interpretted as an XML DOM. <p/>Examples of using this resource can be seen on the <a href="http://milyn.codehaus.org/Tutorials">Milyn Smooks</a> website.<p/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks CSV Cartridge</a> to be installed.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/csv/org/milyn/csv/CSVParser.html');
insert into transformationresourceparameterspec (id, name, value, type, description, required, resourcespec_id) values (10, 'fields', RAWTOHEX(''), 'string-list', RAWTOHEX('Comma Separated list of field names that map to the CSV fields expected in the message. This field names are mapped to the element names in the DOM produced by this parser. See Reference docs.'), true, 3);
--########################################################################
--# Message Exchange Parameter
--########################################################################
insert into transformationresourcespec (id, name, path, selector, description, reference) values (4, 'Message Exchange Parameter', 'N/A', 'device-parameters', RAWTOHEX('Set a Message Exchange specific parameter/property value. This parameter value will be accessible to all <a href="http://milyn.codehaus.org/javadoc/smooks/org/milyn/delivery/ElementVisitor.html">ElementVisitor</a> derived resource instances via the <a href="http://milyn.codehaus.org/javadoc/smooks/org/milyn/cdr/ParameterAccessor.html">ParameterAccessor</a> class. This allows you to configure parameters that cut across message profiles.'), 'http://milyn.codehaus.org/javadoc/smooks/org/milyn/cdr/ParameterAccessor.html');
insert into transformationresourceparameterspec (id, value, description, required, resourcespec_id) values (11, RAWTOHEX(''), RAWTOHEX('Parameter Name and Value.'), false, 4);
--########################################################################
--# JavaBean Populators
--########################################################################
insert into transformationresourcespec (id, name, path, description, reference) values (5, 'JavaBean Create - Assembly Phase', 'org.milyn.javabean.AssemblyPhaseBeanPopulator', RAWTOHEX('Create a JavaBean instance for population with data from an XML message during the message processing <a href="http://milyn.codehaus.org/javadoc/smooks/org/milyn/delivery/SmooksXML.html">Assembly Phase</a>. The populated beans can be used in XSLT and StringTemplate transformation (see <a href="http://milyn.codehaus.org/Tutorials">Smooks Templating Tutorials</a>). The populated beans <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html">HasMap</a> is also set on the Message Body (key="EXTRACTED_BEANS_HASH"), allowing them to be accessed by downstream action processors.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AbstractBeanPopulator.html');
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (12, 'beanId', RAWTOHEX('Bean Identifier.'), true, 5);
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (13, 'beanClass', RAWTOHEX('Bean Class Name (see <a href="http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AssemblyPhaseBeanPopulator.html">Javadoc</a>).'), false, 5);
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (14, 'addToList', RAWTOHEX('Accumulate multiple bean instances (see <a href="http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AssemblyPhaseBeanPopulator.html">Javadoc</a>).'), false, 5);
insert into transformationresourcespec (id, name, path, description, reference) values (6, 'JavaBean Create - Processing Phase', 'org.milyn.javabean.ProcessingPhaseBeanPopulator', RAWTOHEX('Create a JavaBean instance for population with data from an XML message during the message processing <a href="http://milyn.codehaus.org/javadoc/smooks/org/milyn/delivery/SmooksXML.html">Processing Phase</a>. The populated beans can be used in XSLT and StringTemplate transformation (see <a href="http://milyn.codehaus.org/Tutorials">Smooks Templating Tutorials</a>). The populated beans <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html">HasMap</a> is also set on the Message Body (key="EXTRACTED_BEANS_HASH"), allowing them to be accessed by downstream action processors.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AbstractBeanPopulator.html');
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (15, 'beanId', RAWTOHEX('Bean Identifier.'), true, 6);
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (16, 'beanClass', RAWTOHEX('Bean Class Name (see <a href="http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AssemblyPhaseBeanPopulator.html">Javadoc</a>).'), false, 6);
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (17, 'addToList', RAWTOHEX('Accumulate multiple bean instances (see <a href="http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AssemblyPhaseBeanPopulator.html">Javadoc</a>).'), false, 6);
insert into transformationresourcespec (id, name, path, description, reference) values (7, 'JavaBean Populate - Assembly Phase', 'org.milyn.javabean.AssemblyPhaseBeanPopulator', RAWTOHEX('Populate a JavaBean instance with data from an XML message during the message processing <a href="http://milyn.codehaus.org/javadoc/smooks/org/milyn/delivery/SmooksXML.html">Assembly Phase</a>. The populated beans can be used in XSLT and StringTemplate transformation (see <a href="http://milyn.codehaus.org/Tutorials">Smooks Templating Tutorials</a>). The populated beans <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html">HasMap</a> is also set on the Message Body (key="EXTRACTED_BEANS_HASH"), allowing them to be accessed by downstream action processors.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AbstractBeanPopulator.html');
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (18, 'beanId', RAWTOHEX('Bean Identifier.'), true, 7);
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (19, 'setterName', RAWTOHEX('Explicitly specify the bean setter method name (see <a href="http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AssemblyPhaseBeanPopulator.html">Javadoc</a>).'), false, 7);
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (20, 'attributeName', RAWTOHEX('DOM Element attribute name - for extracting a value from a DOM Element attribute (see <a href="http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AssemblyPhaseBeanPopulator.html">Javadoc</a>).'), false, 7);
insert into transformationresourcespec (id, name, path, description, reference) values (8, 'JavaBean Populate - Processing Phase', 'org.milyn.javabean.ProcessingPhaseBeanPopulator', RAWTOHEX('Populate a JavaBean instance with data from an XML message during the message processing <a href="http://milyn.codehaus.org/javadoc/smooks/org/milyn/delivery/SmooksXML.html">Processing Phase</a>. The populated beans can be used in XSLT and StringTemplate transformation (see <a href="http://milyn.codehaus.org/Tutorials">Smooks Templating Tutorials</a>). The populated beans <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html">HasMap</a> is also set on the Message Body (key="EXTRACTED_BEANS_HASH"), allowing them to be accessed by downstream action processors.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AbstractBeanPopulator.html');
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (21, 'beanId', RAWTOHEX('Bean Identifier.'), true, 8);
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (22, 'setterName', RAWTOHEX('Explicitly specify the bean setter method name (see <a href="http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AssemblyPhaseBeanPopulator.html">Javadoc</a>).'), false, 8);
insert into transformationresourceparameterspec (id, name, description, required, resourcespec_id) values (23, 'attributeName', RAWTOHEX('DOM Element attribute name - for extracting a value from a DOM Element attribute (see <a href="http://milyn.codehaus.org/javadoc/smooks-cartridges/javabean/org/milyn/javabean/AssemblyPhaseBeanPopulator.html">Javadoc</a>).'), false, 8);
--########################################################################
--# XSLT Templatelet Resource Template.
--########################################################################
insert into transformationresourcespec (id, name, path, description, reference) values (9, 'XSLT (Full Stylesheet)', 'See ''resdata'' parameter value', RAWTOHEX('Perform an XML Fragment Transform using a fully XSLT Stylesheet. The targeted XML fragment is transformed using the XSLT Stylesheet and the transformation result is used in accordance with the value of the "action" parameter. Can be used in conjunction with the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Javabean Cartridge</a> Cartridge. <p/>Examples of using this resource can be seen on the <a href="http://milyn.codehaus.org/Tutorials">Milyn Smooks</a> website.<p/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Templating Cartridge</a> to be installed.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/templating/org/milyn/templating/xslt/XslContentDeliveryUnitCreator.html');
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (24, 'resdata', RAWTOHEX(''), RAWTOHEX('Resource Data. The XSLT Stylesheet.'), true, 9);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (25, 'action', RAWTOHEX(''), RAWTOHEX('Action to be performed with the transformation result relative to the targeted XML Fragment. Possible values: "replace", "addto", "insertbefore", "insertafter".'), true, 9);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (26, 'restype', RAWTOHEX('xsl'), RAWTOHEX('Resource Type.'), false, 9);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (27, 'is-xslt-templatelet', RAWTOHEX('false'), RAWTOHEX('Is this XSLT resource an XSLT Templatelet.'), false, 9);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (28, 'visitBefore', RAWTOHEX('false'), RAWTOHEX('Should the template be applied before (true) or after (false) Smooks visits the child elements of the target element.'), false, 9);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (29, 'encoding', RAWTOHEX('UTF-8'), RAWTOHEX('XSLT Character Encoding.'), false, 9);
--########################################################################
--# Rename Element.
--########################################################################
insert into transformationresourcespec (id, name, path, description, reference) values (10, 'Rename Element', 'org.milyn.cdres.trans.RenameElementTU', RAWTOHEX('Rename Element.<br/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Misc Cartridge</a> to be installed.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/misc/org/milyn/cdres/trans/RenameElementTU.html');
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (30, 'replacementElement', RAWTOHEX(''), RAWTOHEX('New name for the element.'), true, 10);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (31, 'keepChildContent', RAWTOHEX(''), RAWTOHEX('Copy the target element child content to the replacement element.<br/>Default is "true".'), false, 10);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (32, 'keepAttributes', RAWTOHEX(''), RAWTOHEX('Copy the target element attributes to the replacement element.<br/>Default is "true".'), false, 10);
--########################################################################
--# Set Attribute.
--########################################################################
insert into transformationresourcespec (id, name, path, description, reference) values (11, 'Set Attribute', 'org.milyn.cdres.trans.SetAttributeTU', RAWTOHEX('Set Element Attribute. Allows you add/overwrite an attribute on the target Element.<br/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Misc Cartridge</a> to be installed.'),'http://milyn.codehaus.org/javadoc/smooks-cartridges/misc/org/milyn/cdres/trans/SetAttributeTU.html');
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (33, 'attributeName', RAWTOHEX(''), RAWTOHEX('New attribute name.'), true, 11);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (34, 'attributeValue', RAWTOHEX(''), RAWTOHEX('Attribute Value.'), true, 11);
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (35, 'overwrite', RAWTOHEX(''), RAWTOHEX('Ovcerwrite existing attributes of the same name.<br/>Default is "false".'), false, 11);
--########################################################################
--# Remove Element.
--########################################################################
insert into transformationresourcespec (id, name, path, description, reference) values (12, 'Remove Element', 'org.milyn.cdres.trans.RemoveElementTU', RAWTOHEX('Remove Element.<br/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Misc Cartridge</a> to be installed.'),'http://milyn.codehaus.org/javadoc/smooks-cartridges/misc/org/milyn/cdres/trans/RemoveElementTU.html');
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (36, 'keepChildContent', RAWTOHEX(''), RAWTOHEX('Keep the target element''s child content.<br/>Default is "true".'), false, 12);
--########################################################################
--# Remove Attribute.
--########################################################################
insert into transformationresourcespec (id, name, path, description, reference) values (13, 'Remove Attribute', 'org.milyn.cdres.trans.RemoveAttributeTU', RAWTOHEX('Remove an attribute from the target element.<br/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Misc Cartridge</a> to be installed.'), 'http://milyn.codehaus.org/javadoc/smooks-cartridges/misc/org/milyn/cdres/trans/RemoveAttributeTU.html');
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values (37, 'attributeName', RAWTOHEX(''), RAWTOHEX('The name of the attribute to be removed from the target element.'), true, 13);
> Fix conosle import.sql script execution for HSQLDB
> --------------------------------------------------
>
> Key: JBESB-281
> URL: http://jira.jboss.com/jira/browse/JBESB-281
> Project: JBoss ESB
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Tooling
> Affects Versions: 4.0 CR1
> Reporter: Tom Fennelly
> Assigned To: Tom Fennelly
> Fix For: 4.0
>
>
> Hibernate/HSQLDB (possibly the Hibernate HSQLDB dialect impl) throws an exception when executing the import.sql script (it's just a seeding script - load of insert statements). Syas there are characters in the script the it down't like. Same script runs fine on postgres.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list