jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsigmond Rab (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-2284) Table creation fails. mssql schema contains ${schemaObjectPrefix} and ${tableSpace}, but code only replaces ${schemaObjectPrefix}.
Date Fri, 16 Sep 2011 12:20:08 GMT

    [ https://issues.apache.org/jira/browse/JCR-2284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106021#comment-13106021
] 

Zsigmond Rab commented on JCR-2284:
-----------------------------------

Hi,

I could reproduce on version 2.2.8. The exception is:

Caused by: java.sql.SQLException: Unrecognized SQL escape 'tablespace' at line position 204.
	at net.sourceforge.jtds.jdbc.SQLParser.escape(SQLParser.java:957)
	at net.sourceforge.jtds.jdbc.SQLParser.parse(SQLParser.java:1063)
	at net.sourceforge.jtds.jdbc.SQLParser.parse(SQLParser.java:156)
	at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:684)
	at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1160)
	at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
	at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
	at org.apache.jackrabbit.core.util.db.ConnectionHelper.reallyExec(ConnectionHelper.java:274)
	at org.apache.jackrabbit.core.util.db.ConnectionHelper.access$000(ConnectionHelper.java:65)
	at org.apache.jackrabbit.core.util.db.ConnectionHelper$1.call(ConnectionHelper.java:260)
	at org.apache.jackrabbit.core.util.db.ConnectionHelper$1.call(ConnectionHelper.java:256)
	at org.apache.jackrabbit.core.util.db.ConnectionHelper$RetryManager.doTry(ConnectionHelper.java:450)
	at org.apache.jackrabbit.core.util.db.ConnectionHelper.exec(ConnectionHelper.java:256)
	at org.apache.jackrabbit.core.util.db.CheckSchemaOperation.run(CheckSchemaOperation.java:89)
	at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:197)
	... 43 more

Regards,
Zsigmond

> Table creation fails. mssql schema contains ${schemaObjectPrefix} and ${tableSpace},
but code only replaces ${schemaObjectPrefix}.
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-2284
>                 URL: https://issues.apache.org/jira/browse/JCR-2284
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.6.0
>         Environment: windows vista. jdk1.6.0_16. mssql 2005
>            Reporter: etirk
>            Priority: Blocker
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Table creation fails during startup.
> The mssql schema contains ${schemaObjectPrefix} and ${tableSpace}, but  the java code
only replaces ${schemaObjectPrefix}.
> Either wildcard replacement code is added like below, or the ${tableSpace} propertyHolder
in mssql.ddl must be removed.
> ...
> public class DatabaseFileSystem implements FileSystem {
> ...
>     protected static final String SCHEMA_OBJECT_PREFIX_VARIABLE =
>             "${schemaObjectPrefix}";
> ...
>                         sql = createSchemaSql(sql);
>                         stmt.executeUpdate(sql);
> ...
>     /**
>      * Replace wildcards.
>      */
>     protected String createSchemaSql(String sql) {
>         sql = Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix);
>         // Critical lines replaceing the rest of the wildcards should be placed here!!!
>         return sql;
>     }
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message