jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Re : ERROR - failed to write node state
Date Tue, 19 Sep 2006 12:55:12 GMT
could be a driver-related issue. did you also test with the
microsoft jdbc driver?

cheers
stefan

On 9/18/06, senthilkumar sivanandam <krsenthil@yahoo.com> wrote:
> Hi,
>
> I am using Microsoft SQL Server  2000 - 8.00.194
> Service Pack 2 and trying to setup repository. I am
> getting the below exception and not sure what is
> wrong.
>
>
> Here is the debug info.
>
> DEBUG - Initializing transient repository
> INFO - Starting repository...
> INFO - LocalFileSystem initialized at path
> c:\temp\myrepo\repository
> DEBUG - node type
> '{http://www.jcp.org/jcr/nt/1.0}base' is already
> contained.
> DEBUG - node type
> '{http://www.jcp.org/jcr/mix/1.0}referenceable' is
> already contained.
> DEBUG - node type
> '{http://www.jcp.org/jcr/nt/1.0}base' is already
> contained.
> DEBUG - node type
> '{http://www.jcp.org/jcr/nt/1.0}unstructured' is
> already contained.
> INFO - no custom node type definitions found
> INFO - LocalFileSystem initialized at path
> c:\temp\myrepo\version
> INFO - LocalFileSystem initialized at path
> c:\temp\myrepo\version\blobs
> ERROR - failed to write node state:
> deadbeef-face-babe-cafe-babecafebabe
> java.sql.DataTruncation: Data truncation
>         at
> net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:379)
>         at
> net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
>         at
> net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
>         at
> net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
>         at
> net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)
>         at
> net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
>         at
> net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)
>         at
> org.apache.jackrabbit.core.state.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:471)
>         at
> org.apache.jackrabbit.core.state.AbstractPersistenceManager.store(AbstractPersistenceManager.java:67)
>         at
> org.apache.jackrabbit.core.state.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:332)
>         at
> org.apache.jackrabbit.core.version.VersionManagerImpl.<init>(VersionManagerImpl.java:154)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:306)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:245)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:498)
>         at
> org.apache.jackrabbit.core.TransientRepository$1.getRepository(TransientRepository.java:186)
>         at
> org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
>         at
> org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
>         at
> org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
>         at Secondhop.main(Secondhop.java:19)
> javax.jcr.RepositoryException: failed to write node
> state: deadbeef-face-babe-cafe-babecafebabe: failed to
> write node state: deadbeef-face-babe-cafe-babecafebabe
>         at
> org.apache.jackrabbit.core.version.VersionManagerImpl.<init>(VersionManagerImpl.java:169)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:306)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:245)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:498)
>         at
> org.apache.jackrabbit.core.TransientRepository$1.getRepository(TransientRepository.java:186)
>         at
> org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
>         at
> org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
>         at
> org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
>         at Secondhop.main(Secondhop.java:19)
> Caused by:
> org.apache.jackrabbit.core.state.ItemStateException:
> failed to write node state:
> deadbeef-face-babe-cafe-babecafebabe
>         at
> org.apache.jackrabbit.core.state.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:478)
>         at
> org.apache.jackrabbit.core.state.AbstractPersistenceManager.store(AbstractPersistenceManager.java:67)
>         at
> org.apache.jackrabbit.core.state.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:332)
>         at
> org.apache.jackrabbit.core.version.VersionManagerImpl.<init>(VersionManagerImpl.java:154)
>         ... 8 more
> Caused by: java.sql.DataTruncation: Data truncation
>         at
> net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:379)
>         at
> net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
>         at
> net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
>         at
> net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
>         at
> net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)
>         at
> net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
>         at
> net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)
>         at
> org.apache.jackrabbit.core.state.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:471)
>         ... 11 more
> org.apache.jackrabbit.core.state.ItemStateException:
> failed to write node state:
> deadbeef-face-babe-cafe-babecafebabe
>         at
> org.apache.jackrabbit.core.state.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:478)
>         at
> org.apache.jackrabbit.core.state.AbstractPersistenceManager.store(AbstractPersistenceManager.java:67)
>         at
> org.apache.jackrabbit.core.state.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:332)
>         at
> org.apache.jackrabbit.core.version.VersionManagerImpl.<init>(VersionManagerImpl.java:154)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:306)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:245)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:498)
>         at
> org.apache.jackrabbit.core.TransientRepository$1.getRepository(TransientRepository.java:186)
>         at
> org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
>         at
> org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
>         at
> org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
>         at Secondhop.main(Secondhop.java:19)
> Caused by: java.sql.DataTruncation: Data truncation
>         at
> net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:379)
>         at
> net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
>         at
> net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
>         at
> net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
>         at
> net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)
>         at
> net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
>         at
> net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)
>         at
> org.apache.jackrabbit.core.state.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:471)
>         ... 11 more
> Exception in thread "main"
>
>
>
> ****************************************************
>
> Here is my repository.xml
>
>
> <Repository>
>         <!--
>                 virtual file system where the repository stores
> global state
>                 (e.g. registered namespaces, custom node types,
> etc.)
>         -->
>         <FileSystem
>
> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>                 <param name="path" value="${rep.home}/repository" />
>         </FileSystem>
>
>         <!--
>                 security configuration
>         -->
>         <Security appName="Jackrabbit">
>                 <!--
>                         access manager:
>                         class: FQN of class implementing the AccessManager
> interface
>                 -->
>                 <AccessManager
>
> class="org.apache.jackrabbit.core.security.SimpleAccessManager">
>                         <!-- <param name="config"
> value="${rep.home}/access.xml"/> -->
>                 </AccessManager>
>
>                 <LoginModule
>
> class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>                         <!-- anonymous user name ('anonymous' is the
> default value) -->
>                         <param name="anonymousId" value="anonymous" />
>                         <!--
>                                 default user name to be used instead of the
> anonymous user
>                                 when no login credentials are provided (unset by
> default)
>                         -->
>                         <!-- <param name="defaultUserId"
> value="superuser"/> -->
>                 </LoginModule>
>         </Security>
>
>         <!--
>                 location of workspaces root directory and name of
> default workspace
>         -->
>         <Workspaces rootPath="${rep.home}/workspaces"
>                 defaultWorkspace="default" />
>         <!--
>                 workspace configuration template:
>                 used to create the initial workspace if there's no
> workspace yet
>         -->
>         <Workspace name="${wsp.name}">
>                 <!--
>                         virtual file system of the workspace:
>                         class: FQN of class implementing the FileSystem
> interface
>                 -->
>                 <FileSystem
>
> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>                         <param name="path" value="${wsp.home}" />
>                 </FileSystem>
>                 <!--
>                         persistence manager of the workspace:
>                         class: FQN of class implementing the
> PersistenceManager interface
>                 -->
>                 <PersistenceManager
>
> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>                         <param name="driver"
>                                 value="net.sourceforge.jtds.jdbc.Driver" />
>                         <param name="url"
>                                 value="jdbc:jtds:sqlserver://127.0.0.1:1433/jcr"
> />
>                         <param name="user" value="sa" />
>                         <param name="password" value="dragon" />
>                         <param name="externalBLOBs" value="true" />
>                 </PersistenceManager>
>                 <!--
>                         Search index and the file system it uses.
>                         class: FQN of class implementing the QueryHandler
> interface
>                 -->
>                 <SearchIndex
>
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>                         <param name="path" value="${wsp.home}/index" />
>                 </SearchIndex>
>         </Workspace>
>
>         <!--
>                 Configures the versioning
>         -->
>         <Versioning rootPath="${rep.home}/version">
>                 <!--
>                         Configures the filesystem to use for versioning for
> the respective
>                         persistence manager
>                 -->
>                 <FileSystem
>
> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>                         <param name="path" value="${rep.home}/version" />
>                 </FileSystem>
>
>                 <!--
>                         Configures the persistence manager to be used for
> persisting version state.
>                         Please note that the current versioning
> implementation is based on
>                         a 'normal' persistence manager, but this could
> change in future
>                         implementations.
>                 -->
>                 <PersistenceManager
>
> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>                         <param name="driver"
>                                 value="net.sourceforge.jtds.jdbc.Driver" />
>                         <param name="url"
>                                 value="jdbc:jtds:sqlserver://127.0.0.1:1433/jcr"
> />
>                         <param name="externalBLOBs" value="true" />
>                 </PersistenceManager>
>
>         </Versioning>
>
>         <!--
>                 Search index for content that is shared repository
> wide
>                 (/jcr:system tree, contains mainly versions)
>         -->
>         <SearchIndex
>
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>                 <param name="path"
> value="${rep.home}/repository/index" />
>         </SearchIndex>
> </Repository>
>
>
>
>
> ***************************************************
>
> Here is my code
>
>
> RepositoryConfig conf = RepositoryConfig
>                                 .create(
>                                                 "C:\\repository.xml",
>                                                 "c:\\temp\\myrepo");
>
>                 Repository repository = new
> TransientRepository(conf);
>
>                 Session session = repository.login(new
> SimpleCredentials("username",
>                                 "password".toCharArray()));
>
>                 try {
>                         Node root = session.getRootNode();
>
>                         // Store content
> /*                      Node hello = root.addNode("hello");
>                         Node world = hello.addNode("world");
>                         world.setProperty("message", "Hello, World!");
>                         session.save();
>
>                         // Retrieve content
>                         Node node = root.getNode("hello/world");
>                         System.out.println(node.getPath());
>
> System.out.println(node.getProperty("message").getString());*/
>
>                         // Remove content
>                         root.getNode("hello").remove();
>                         //root.getNode("1002-1151597096759").remove();
>                         session.save();
>                 } finally {
>                         session.logout();
>                 }
>
> Please help me!
>
> Thank you,
>
>
>
> Senthilkumar Sivanandam,
> 2540, Rosehall lane,
> Aurora, IL-60504
> Res  No : 630 851 8693
> Cell No : 847 722 4843
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Mime
View raw message