db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Villacorta <pvillaco...@exist.com>
Subject Syntax error: Encountered "\'" at line 1, column 844.
Date Fri, 07 Jul 2006 08:26:13 GMT
Hi,

I'm trying to convert an HSQL SQL script to Derby SQL syntax. I've 
gotten stuck with this error: "Syntax error: Encountered "\'" at line 1, 
column 844.". Any insight on what's going on?


Here's the Stack trace:

jvm 1    | org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'liferaySchemaCreator' defined in file 
[C:\logicblaze\source\fuse\target\fuse-1.2-SNAPSHOT\components\jndi\jndi-xbean.xml]: 
Initialization of bean failed; nested exception is 
org.apache.ddlutils.DynaSqlException: Error while executing SQL 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:stylesheet 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">  \u000a  
<xsl:template match="/"> \u000a    <link rel="alternate" 
type="application/rss+xml" title="Liferay RSS Feed" 
href="http://@portal_url@/cms/servlet/news-rss-feed?mimeType=application/rss+xml"/>  
\u000a    <xsl:if 
test="root/dynamic-element[@name=''main-text'']/dynamic-content != 
''''">\u000a      <xsl:value-of disable-output-escaping="yes" 
select="root/dynamic-element[@name=''main-text'']/dynamic-content"/> 
\u000a      <br/>\u000a      <br/>\u000a    </xsl:if>\u000a    
<xsl:variable name="articles" 
select="document(''http://@portal_url@/c/journal/get_articles?templateId=BASIC-RSS-ITEM&amp
jvm 1    | org.apache.ddlutils.DynaSqlException: Error while executing 
SQL 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:stylesheet 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">  \u000a  
<xsl:template match="/"> \u000a    <link rel="alternate" 
type="application/rss+xml" title="Liferay RSS Feed" 
href="http://@portal_url@/cms/servlet/news-rss-feed?mimeType=application/rss+xml"/>  
\u000a    <xsl:if 
test="root/dynamic-element[@name=''main-text'']/dynamic-content != 
''''">\u000a      <xsl:value-of disable-output-escaping="yes" 
select="root/dynamic-element[@name=''main-text'']/dynamic-content"/> 
\u000a      <br/>\u000a      <br/>\u000a    </xsl:if>\u000a    
<xsl:variable name="articles" 
select="document(''http://@portal_url@/c/journal/get_articles?templateId=BASIC-RSS-ITEM&amp
jvm 1    |      at 
org.apache.ddlutils.platform.PlatformImplBase.evaluateBatch(PlatformImplBase.java:218)
jvm 1    |      at 
org.apache.ddlutils.platform.PlatformImplBase.evaluateBatch(PlatformImplBase.java:160)
jvm 1    |      at 
org.logicblaze.soa.SchemaCreator.afterPropertiesSet(SchemaCreator.java:89)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
jvm 1    |      at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
jvm 1    |      at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
jvm 1    |      at 
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:83)
jvm 1    |      at 
org.apache.xbean.server.deployer.FileDeployer.createServiceForFile(FileDeployer.java:344)
jvm 1    |      at 
org.apache.xbean.server.deployer.FileDeployer.processDirectory(FileDeployer.java:277)
jvm 1    |      at 
org.apache.xbean.server.deployer.FileDeployer.processDirectory(FileDeployer.java:288)
jvm 1    |      at 
org.apache.xbean.server.deployer.FileDeployer.afterPropertiesSet(FileDeployer.java:88)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
jvm 1    |      at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
jvm 1    |      at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
jvm 1    |      at 
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
jvm 1    |      at 
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
jvm 1    |      at 
org.apache.xbean.server.spring.main.SpringBootstrap.loadMain(SpringBootstrap.java:265)
jvm 1    |      at 
org.apache.xbean.server.spring.main.SpringBootstrap.boot(SpringBootstrap.java:287)
jvm 1    |      at 
org.apache.xbean.server.spring.main.SpringBootstrap.main(SpringBootstrap.java:90)
jvm 1    |      at 
org.logicblaze.soa.BootstrapMain.main(BootstrapMain.java:41)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
jvm 1    |      at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
jvm 1    |      at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:585)
jvm 1    |      at org.logicblaze.soa.Main.runTaskClass(Main.java:164)
jvm 1    |      at org.logicblaze.soa.Main.main(Main.java:76)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
jvm 1    |      at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
jvm 1    |      at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:585)
jvm 1    |      at 
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:197)
jvm 1    |      at java.lang.Thread.run(Thread.java:595)
jvm 1    | Caused by: SQL Exception: Syntax error: Encountered "\'" at 
line 1, column 844.
jvm 1    |      at 
org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java)
jvm 1    |      at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java)
jvm 1    |      at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java)
jvm 1    |      at 
org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java)
jvm 1    |      at 
org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java)
jvm 1    |      at 
org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java)
jvm 1    |      at 
org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(EmbedStatement.java)
jvm 1    |      at 
org.apache.ddlutils.platform.PlatformImplBase.evaluateBatch(PlatformImplBase.java:202)
jvm 1    |      ... 37 more
wrapper  | <-- Wrapper Stopped


Here's the complete SQL statement:

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:stylesheet 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">  \u000a  
<xsl:template match="/"> \u000a    <link rel="alternate" 
type="application/rss+xml" title="Liferay RSS Feed" 
href="http://@portal_url@/cms/servlet/news-rss-feed?mimeType=application/rss+xml"/>  
\u000a    <xsl:if 
test="root/dynamic-element[@name=''main-text'']/dynamic-content != 
''''">\u000a      <xsl:value-of disable-output-escaping="yes" 
select="root/dynamic-element[@name=''main-text'']/dynamic-content"/> 
\u000a      <br/>\u000a      <br/>\u000a    </xsl:if>\u000a    
<xsl:variable name="articles" 
select="document(''http://@portal_url@/c/journal/get_articles?templateId=BASIC-RSS-ITEM&amp;delta=4&amp;orderBy=displayDate'')/result-set/result"/>
 
\u000a    <xsl:for-each select="$articles"> \u000a      <b> 
\u000a        <a> \u000a          <xsl:attribute name="href"> 
\u000a            <xsl:value-of disable-output-escaping="yes" 
select="root/dynamic-element[@name=''link'']/dynamic-content"/> 
\u000a          </xsl:attribute>  \u000a          <xsl:value-of 
disable-output-escaping="yes" select="reserved-info/title"/> 
\u000a        </a> \u000a      </b>  \u000a      <br/>  \u000a      
<font color="#777777"> \u000a        <xsl:text>(</xsl:text>  
\u000a        <xsl:value-of disable-output-escaping="yes" 
select="root/dynamic-element[@name=''creator'']/dynamic-content"/>  
\u000a        <xsl:text>)</xsl:text> \u000a      </font>  \u000a      
<br/>  \u000a      <xsl:value-of disable-output-escaping="yes" 
select="root/dynamic-element[@name=''description'']/dynamic-content"/>  
\u000a      <br/>  \u000a      <br/> \u000a    </xsl:for-each> \u000a  
</xsl:template> \u000a</xsl:stylesheet>','xsl',0,'');


The create table statement might help:

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 VARCHAR(75),CONSTRAINT SPKJOURNALTEMPLATE PRIMARY 
KEY(COMPANYID,TEMPLATEID));


Thanks,
Patrick


Mime
View raw message