You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Zoltan Altfatter (JIRA)" <ji...@apache.org> on 2014/11/04 12:24:35 UTC

[jira] [Created] (OAK-2251) RDBDocumentStore with MySQL

Zoltan Altfatter created OAK-2251:
-------------------------------------

             Summary: RDBDocumentStore with MySQL
                 Key: OAK-2251
                 URL: https://issues.apache.org/jira/browse/OAK-2251
             Project: Jackrabbit Oak
          Issue Type: Bug
    Affects Versions: 1.0.8
            Reporter: Zoltan Altfatter


The following gives me the error

{code}
 ApplicationContext ctx = new ClassPathXmlApplicationContext("application-context.xml");
        DataSource ds = (javax.sql.DataSource) ctx.getBean("dataSource");

        DocumentNodeStore ns = new DocumentMK.Builder().setRDBConnection(ds).getNodeStore();
        Repository repo = new Jcr(new Oak(ns)).createRepository();
{code}

{code}
Exception in thread "main" org.apache.jackrabbit.mk.api.MicroKernelException: initializing RDB document store
12:20:27.789 [main] INFO  o.a.j.o.p.d.rdb.RDBDocumentStore - Attempting to create table CLUSTERNODES in MySQL
	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.<init>(RDBDocumentStore.java:76)
	at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.setRDBConnection(DocumentMK.java:539)
	at com.backbase.progfun.Fun.main(Fun.java:25)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
	at com.mysql.jdbc.Util.getInstance(Util.java:383)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1062)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4208)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4140)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2597)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2758)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2820)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2769)
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:907)
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:791)
	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.initialize(RDBDocumentStore.java:278)
	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.<init>(RDBDocumentStore.java:74)
	... 2 more
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)