[
https://issues.apache.org/jira/browse/JCR-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jukka Zitting resolved JCR-1322.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.4.1
You're right, good point!
Fixed as suggested in revision 628291. Merged to the 1.4 branch in revision
628294.
> Cluster information is not persisted to database when connected to case
> sensitive MS SQL Server 2005
> ----------------------------------------------------------------------------------------------------
>
> Key: JCR-1322
> URL: https://issues.apache.org/jira/browse/JCR-1322
> Project: Jackrabbit
> Issue Type: Bug
> Components: clustering, jackrabbit-core
> Affects Versions: 1.4
> Environment: Microsoft SQL Server 2005 on Windows Server. Database is
> setup to be case-sensitive.
> Reporter: Vijai Kalyan
> Assignee: Jukka Zitting
> Fix For: 1.4.1
>
>
> After a call to Session::save, we observed that cluster information was not
> written to the ${schemaObjectPrefix}JOURNAL and
> ${schemaObjectPrefix}GLOBAL_REVISION tables. We tested against Oracle 10
> database servers and MS Sql Server 2005 servers. The problem was noticed only
> with MS Sql Server 2005.
> Initially, the problem was masked since the test was written as part of our
> unit test environment and the exceptions generated by JDBC were not showing
> up in the logs. A separate test with was carried out as shown by the code
> below
> <pre>
> import java.io.FileInputStream;
> import javax.jcr.Node;
> import javax.jcr.Repository;
> import javax.jcr.Session;
> import javax.jcr.SimpleCredentials;
> import org.apache.jackrabbit.core.TransientRepository;
> import org.apache.jackrabbit.core.config.RepositoryConfig;
> public class Main
> {
> public static void main(String[] args)
> throws Exception
> {
> System.setProperty("org.apache.jackrabbit.core.cluster.node_id",
> "testid");
>
> RepositoryConfig config = RepositoryConfig.create(new
> FileInputStream("repository.xml"), "repository");
>
> Repository repository = new TransientRepository();
>
> Session session = repository.login(new SimpleCredentials("username",
> "password".toCharArray()));
>
> Node root = session.getRootNode();
>
> root.addNode("node1");
> root.addNode("node2");
> root.addNode("node3");
>
> session.save();
> }
> }
> </pre>
> The configuration file used to configure the repository is attached.
> After debugging this, we obtained the exceptions that were previously not
> visible. Note that, JackRabbit continues to run (is that because the cluster
> code is running in a separate thread?) even after this exception. The problem
> was that the 'revision_id' field did not exist. The mssql.ddl schema file
> sets up the table names in capitals. However, at least two of the SQL
> statements in DatabaseJournal use lower case table names. For example:-
> <pre>
> updateGlobalStmt = con.prepareStatement(
> "update " + schemaObjectPrefix + "global_revision " +
> "set revision_id = revision_id + 1");
> selectGlobalStmt = con.prepareStatement(
> "select revision_id " +
> "from " + schemaObjectPrefix + "global_revision");
> </pre>
> An additional error is that the mssql.ddl file is missing the following:
> <pre>
> # Inserting the one and only revision counter record now helps avoiding race
> conditions
> insert into ${schemaObjectPrefix}GLOBAL_REVISION VALUES(0)
> </pre>
> Fixing the above two issues, fixed the problem with MS SQL Server 2005.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.