Thanks Rajesh, I'll give this a try
Regards,
Patrick
Rajesh Kartha wrote:
Hi Patrick,
The Insert you mentioned in your mail works fine in Derby when run
under the ij tool separately:
ij version 10.1
ij> connect 'jdbc:derby:testdb;create=true';
WARNING 01J01: Database 'testdb' not created, connection made to
existing database instead.
ij> CREATE TABLE JOURNALTEMPLATE(COMPANYID VARCHAR(75) NOT
NULL,TEMPLATEID VARCHAR(75) NOT NULL,GROUPID VARCHAR(75) NOT
NULL,USERID VARCHAR(75) NOT NULL,USERNAME VARCHAR(75),CREATEDATE
TIMESTAMP,MODIFIEDDATE TIMESTAMP,STRUCTUREID VARCHAR(75
),NAME VARCHAR(75),DESCRIPTION LONG VARCHAR,XSL LONG VARCHAR,LANGTYPE
VARCHAR(75),SMALLIMAGE SMALLINT,SMALLIMAGEURL VARC
HAR(75),CONSTRAINT SPKJOURNALTEMPLATE PRIMARY KEY(COMPANYID,TEMPLATEID));
0 rows inserted/updated/deleted
ij>
INSERT INTO JOURNALTEMPLATE
VALUES('liferay.com','ABOUTUS-NEWS','2','admin','Joe
Bloggs','2006-04-05 22:59:21.108','2006
-04-05 22:59:21.108','ABOUTUS-NEWS','About Us News','Custom template
for News','<?xml version="1.0"?>\u000a\u000a<xsl:st
ylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> \u000a <xsl:template match="/"> \u000a <li
nk rel="alternate" type="application/rss+xml" title="Liferay RSS Feed"
href="http://@portal_url@/cms/servlet/news-rss-fe
ed?mimeType=application/rss+xml"/> \u000a <xsl:if
test="root/[EMAIL PROTECTED]''main-text'']/dynamic-content !=
''''">\u000a <xsl:value-of disable-output-escaping="yes"
select="root/[EMAIL PROTECTED]''main-text'']/dynamic
-content"/> \u000a <br/>\u000a <br/>\u000a
</xsl:if>\u000a <xsl:variable name="articles" select="documen
t(''http://@portal_url@/c/journal/get_articles?templateId=BASIC-RSS-ITEM&delta=4&orderBy=displayDate'')/result-s
et/result"/> \u000a <xsl:for-each select="$articles"> \u000a
<b> \u000a <a> \u000a <xsl:attribu
te name="href"> \u000a <xsl:value-of
disable-output-escaping="yes" select="root/[EMAIL PROTECTED]''link'
']/dynamic-content"/> \u000a </xsl:attribute>
\u000a <xsl:value-of disable-output-escaping="yes" sele
ct="reserved-info/title"/> \u000a </a> \u000a </b>
\u000a <br/> \u000a <font color="#777777"> \u
000a <xsl:text>(</xsl:text> \u000a <xsl:value-of
disable-output-escaping="yes" select="root/dynamic-eleme
[EMAIL PROTECTED]''creator'']/dynamic-content"/> \u000a
<xsl:text>)</xsl:text> \u000a </font> \u000a <br/> \
u000a <xsl:value-of disable-output-escaping="yes"
select="root/[EMAIL PROTECTED]''description'']/dynamic-conte
nt"/> \u000a <br/> \u000a <br/> \u000a </xsl:for-each>
\u000a </xsl:template> \u000a</xsl:stylesheet>','
xsl',0,'');
1 row inserted/updated/deleted
ij> select * from JOURNALTEMPLATE;
COMPANYID
|TEMPLATEID
|GROUPID
|USERID
|USERNAME
|CREATEDATE
|MODIFIEDDATE |STRUCTUREID
|NAME
|DESCRIPTION
|XSL
|LANGTYPE
|SMALL&|SMALLIMAGEURL
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------
liferay.com
|ABOUTUS-NEWS
|2
|admin
|Joe Bloggs
|2006-04-05 22:59:21.108 |2006-04-05
22:59:21.108 |ABOUTUS-NEWS
|About Us
News
|Custom templat
e for
News
|<?xml
version="1.0"?>\u000a\u000a<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
\u000a <xs
l:&|xsl
|0 |
1 row selected
In your case, the error "Syntax error: Encountered "\'" at line 1,
column 844." seem to be coming from
<snip>......<xsl:variable name="articles" select="document('
.....</snip>. in the statement, which works fine when run as a SQL
statement
in ij.
Also, I noticed you are using the Apache ddlUtils, is it possible to
run the migration separately outside using ddlUtils without the
Spring framework.
Maybe the following link will be useful is doing so:
http://db.apache.org/derby/integrate/db_ddlutils.html
Regards,
Rajesh