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 13:51:19 GMT
senthilkumar,

thomas is right, you forgot to specify the correct schema type in
your configuration. here's a sample configuration for mssql
(see http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/state/db/SimpleDbPersistenceManager.html):

  <PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
       <param name="driver"
value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
       <param name="url"
value="jdbc:microsoft:sqlserver://localhost:1433;;DatabaseName=test;SelectMethod=Cursor;"/>
       <param name="schema" value="mssql"/>
       <param name="user" value="sa"/>
       <param name="password" value=""/>
       <param name="schemaObjectPrefix" value="${wsp.name}_"/>
       <param name="externalBLOBs" value="false"/>
   </PersistenceManager>

cheers
stefan

On 9/19/06, Thomas Mueller <thomas.tom.mueller@gmail.com> wrote:
> Hi,
>
> I had a similar problem with MS SQL Server a few weeks ago, the
> problem was that the tables where created with VARCHAR / VARBINARY
> length 1 (instead of 255 or whatever the correct length is). Could you
> check in the schema if the tables are created in this way. I think
> what happened in my case was that the schema for HSQLDB was used,
> where it says CREATE TABLE ... ( ... VARCHAR, ...). Just VARCHAR means
> VARCHAR(unlimited) for HSQLDB, but it means VARCHAR(1) for MS SQL
> Server. Anyway, what I did was, I created the tables manually. At that
> time I thought it was a configuration mistake on my side, and didn't
> really investigate any further... I used the 'official' MS SQL JDBC
> Driver by the way.
>
> Thomas
>
>
> > > I am using Microsoft SQL Server  2000 - 8.00.194
> > > ERROR - failed to write node state:
> > > deadbeef-face-babe-cafe-babecafebabe
> > > java.sql.DataTruncation: Data truncation
> > > net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:379)
>

Mime
View raw message