3

14:02:45,997 INFO ModeShape version 3.1.1.Final

javax.jcr.RepositoryException: Error while starting 'Persisted-Repository' repository: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[6,43]

Message: Unexpected element '{urn:infinispan:config:6.0}infinispan' encountered

at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:613)

at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:580)

at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:149)

at org.modeshape.example.sequencing.ModeShapeExample.main(ModeShapeExample.java:76)

Caused by: org.infinispan.config.ConfigurationException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[6,43]

Message: Unexpected element '{urn:infinispan:config:6.0}infinispan' encountered

at org.infinispan.configuration.parsing.Parser.parse(Parser.java:116)

at org.infinispan.configuration.parsing.Parser.parse(Parser.java:94)

at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:369)

at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:341)

at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:328)

at org.modeshape.jcr.LocalEnvironment.createContainer(LocalEnvironment.java:201)

at org.modeshape.jcr.LocalEnvironment.getCacheContainer(LocalEnvironment.java:113)

at org.modeshape.jcr.RepositoryConfiguration.getCacheContainer(RepositoryConfiguration.java:959)

at org.modeshape.jcr.RepositoryConfiguration.getContentCacheContainer(RepositoryConfiguration.java:949)

at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1050)

at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:966)

at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:354)

at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:611)

... 3 more

Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[6,43]

Message: Unexpected element '{urn:infinispan:config:6.0}infinispan' encountered

at org.infinispan.configuration.parsing.ParseUtils.unexpectedElement(ParseUtils.java:60)

at org.infinispan.configuration.parsing.ParseUtils.nextElement(ParseUtils.java:49)

at org.infinispan.configuration.parsing.Parser.doParse(Parser.java:122)

at org.infinispan.configuration.parsing.Parser.parse(Parser.java:105)

... 15 more

Shutting down engine ...

Success!

  • It is very unlikely that I will be able to help you unless you share the configuration. All I can tell you is *where* the problem is: "ParseError at [row,col]:[6,43]" – jgitter Apr 23 '14 at 12:30
  • Please share the config file. – Braj Apr 23 '14 at 12:34

3 Answers3

1

Looking at the ModeShape 3.1.1.Final bom, it uses Infinispan 5.1.2, and the error that you see there is most likely because you are giving it a newer configuration (version 6.x), which it does not know how to handle.

Galder Zamarreño
  • 5,027
  • 2
  • 26
  • 34
0

This is the config file:

{
    "name" : "persisted_repository",
    "workspaces" : {
        "predefined" : ["otherWorkspace"],
        "default" : "defaultws",
        "allowCreation" : true
    },
    "security" : {
        "anonymous" : {
            "roles" : ["readonly","readwrite","admin"],
            "useOnFailedLogin" : false
        }
    },
    "storage" : {
        "cacheConfiguration" : "infinispan_config.xml",
        "cacheName" : "persisted_repository",
        "binaryStorage" : {
            "type" : "file",
            "directory": "target/content/binaries",
            "minimumBinarySizeInBytes" : 4096 
        }
    },

    }
}

------------- My infinispan --------------

<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
    xmlns="urn:infinispan:config:5.1">
    <global>
    </global>
    <default>
    </default>
    <namedCache name="persisted_Repository">
        <loaders passivation="false" shared="false" preload="false">
            <loader
                class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"
                fetchPersistentState="false" ignoreModifications="false"
                purgeOnStartup="false">
                <properties>
                    <property name="stringsTableNamePrefix" value="ISPN_STRING_TABLE" />
                    <property name="idColumnName" value="ID_COLUMN" />
                    <property name="dataColumnName" value="DATA_COLUMN" />
                    <property name="timestampColumnName" value="TIMESTAMP_COLUMN" />
                    <property name="timestampColumnType" value="BIGINT" />
                    <property name="connectionFactoryClass"
                        value="org.infinispan.loaders.jdbc.connectionfactory.PooledConnectionFactory" />
                    <property name="connectionUrl"
                        value="jdbc:sqlserver://localhost:1433;DatabaseName=modeshape" />
                    <property name="userName" value="sa1" />
                    <property name="password" value="sa" />
                    <property name="driverClass"
                        value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
                    <property name="idColumnType" value="VARCHAR(255)" />
                    <property name="dataColumnType" value="BINARY" />
                    <property name="dropTableOnExit" value="false" />
                    <property name="createTableOnStart" value="true" />
                </properties>
            </loader>
        </loaders>
        <transaction
            transactionManagerLookupClass="org.infinispan.transaction.lookup.DummyTransactionManagerLookup"
            transactionMode="TRANSACTIONAL" lockingMode="OPTIMISTIC" />

    </namedCache>
</infinispan>
Nadjib Mami
  • 5,736
  • 9
  • 37
  • 49
0

Seems like you are missing a dependency Add "org.infinispan services" in your MANIFEST.MF file

Muthee
  • 118
  • 10