4 Replies Latest reply: Mar 21, 2012 1:54 PM by Franck Mangin RSS

Can't run the 2.8.0 repository examples

Franck Mangin Newbie

Hi,

 

I am ne wto JBoss & Modeshape and I am running into an SLF4J issue trying to run the modeshape 2.8.0 example. I haven't been using Maven, I simply added the needed jars from the JBoss-6.0.0.Final distribution and compiled the examples, and at runtime I am getting this error:

 

Starting repositories ... SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.

SLF4J: Your binding is version 1.5.5 or earlier.

SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x

 

I have installed maven to run "mvn dependency:tree" as suggested in another post, I was able to run it on the modeshape example project but not in the JBoss distribution (Cannot execute mojo: tree. It requires a project with an existing pom.xml, but the build is not using one.).

 

I am not too sure how to troubleshoot this further, any pointers would be greatly appreciated!

 

Thanks

  • 1. Re: Can't run the 2.8.0 repository examples
    Brian Wallis Master

    JBoss 6.x is built against slf4j 1.5.6 and modeshape since about 2.6 has been using slf4j 1.6.1. The slf4j API checks the version when it binds with the logging backend (in slf4j-jboss-logmanager.jar for jboss 6) and complains if it finds a major version number difference (such as 1.6 to 1.5). Major version changes can include API differences hence the warning.

     

    It should still work OK as it is just a warning, I have systems in production that print this warning at startup (caused by a difficult version mismatch between slf4j, log4j and logback).

  • 2. Re: Can't run the 2.8.0 repository examples
    Franck Mangin Newbie

    Unfortunately there seems to be an API difference that is causing the runtime to fail. I have looked around and this seems a common issue with no straightforward solution (e.g. https://community.jboss.org/message/567177).

    I have also tried to run modeshape in JBoss 7 but I ran into some other issue that I can't remember.

     

    Starting repositories ...

    done.

    Shutting down repositories ... SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.

    SLF4J: Your binding is version 1.5.5 or earlier.

    SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x

    Exception in thread "Thread-1" java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;

        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)

        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)

        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268)

        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)

        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254)

        at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:196)

        at org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:129)

        at org.modeshape.connector.store.jpa.HibernateAdapter.getEntityManagerFactory(HibernateAdapter.java:170)

        at org.modeshape.connector.store.jpa.JpaSource.getConnection(JpaSource.java:1326)

        at org.modeshape.graph.connector.RepositoryConnectionPool.newWrappedConnection(RepositoryConnectionPool.java:975)

        at org.modeshape.graph.connector.RepositoryConnectionPool.getConnection(RepositoryConnectionPool.java:831)

        at org.modeshape.repository.RepositoryLibrary.createConnection(RepositoryLibrary.java:566)

        at org.modeshape.graph.Graph.execute(Graph.java:283)

        at org.modeshape.graph.Graph$5.process(Graph.java:231)

        at org.modeshape.graph.request.RequestBuilder.verifyWorkspace(RequestBuilder.java:75)

        at org.modeshape.graph.Graph.useWorkspace(Graph.java:382)

        at org.modeshape.graph.Graph.getCurrentWorkspace(Graph.java:357)

        at org.modeshape.graph.Graph.getCurrentWorkspaceName(Graph.java:342)

        at org.modeshape.graph.Graph$Batch.<init>(Graph.java:3134)

        at org.modeshape.graph.Graph.batch(Graph.java:3100)

        at org.modeshape.graph.io.GraphImporter.importXml(GraphImporter.java:167)

        at org.modeshape.graph.Graph$30.into(Graph.java:2865)

        at org.modeshape.graph.Graph$30.into(Graph.java:2826)

        at org.modeshape.graph.Graph$30.into(Graph.java:2795)

        at org.modeshape.example.repository.RepositoryClient.startRepositories(RepositoryClient.java:164)

        at org.modeshape.example.repository.ConsoleInput$1.run(ConsoleInput.java:90)

        at java.lang.Thread.run(Thread.java:722)

    done.

  • 3. Re: Can't run the 2.8.0 repository examples
    Franck Mangin Newbie

    BTW, my only dependency on JBoss to run that example comes from the Jaas config that uses the org.jboss.security.auth.spi.UsersRolesLoginModule login module.

     

    I have searched around trying to disable that, I am just trying to explore modeshape features at this point, but I couldn't find an easy way to do so... I would be happy with just anonymous, unauthenticated access at this point...

     

    Franck

  • 4. Re: Can't run the 2.8.0 repository examples
    Franck Mangin Newbie

    Update: using maven to build the example (rather than trying to compile & run against a JBoss7 distrib) solved the problem for me.