This content has been marked as final.
Show 6 replies
-
1. Re: Cannot compile ModeShape Examples Getting Started
ceefour Apr 14, 2011 3:28 PM (in response to ceefour)I added this to examples/pom.xml :
<repositories> <repository> <id>jboss</id> <url>http://repository.jboss.org/nexus/content/groups/public/</url> </repository> </repositories>
and now it's compiling.
-
2. Re: Cannot compile ModeShape Examples Getting Started
ceefour Apr 14, 2011 3:46 PM (in response to ceefour)The build is successful, but I cannot run it:
ceefour@annafi:~/code/modeshape-examples/sequencers/target/modeshape-example-sequencers-basic$ ./run.sh SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:230) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:112) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:275) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:261) at org.modeshape.common.util.Logger.getLogger(Logger.java:82) at org.modeshape.graph.ExecutionContext.getLogger(ExecutionContext.java:205) at org.modeshape.graph.connector.base.Connection.execute(Connection.java:101) at org.modeshape.graph.Graph.execute(Graph.java:286) at org.modeshape.graph.Graph$5.process(Graph.java:229) at org.modeshape.graph.request.RequestBuilder.verifyWorkspace(RequestBuilder.java:72) at org.modeshape.graph.Graph.useWorkspace(Graph.java:380) at org.modeshape.graph.Graph.getCurrentWorkspace(Graph.java:355) at org.modeshape.graph.Graph.getCurrentWorkspaceName(Graph.java:340) at org.modeshape.graph.Graph$Batch.<init>(Graph.java:3073) at org.modeshape.graph.Graph.batch(Graph.java:3039) at org.modeshape.repository.ModeShapeConfiguration.changes(ModeShapeConfiguration.java:537) at org.modeshape.repository.ModeShapeConfiguration.repositorySourceDefinition(ModeShapeConfiguration.java:1177) at org.modeshape.jcr.JcrConfiguration.repositorySource(JcrConfiguration.java:458) at org.modeshape.example.sequencer.SequencingClient.main(SequencingClient.java:74) Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 21 more
-
3. Re: Cannot compile ModeShape Examples Getting Started
rhauch Apr 14, 2011 3:58 PM (in response to ceefour)You have to add a dependency on the particular logging system and SLF4J binding JAR. See this page for details.
-
4. Re: Cannot compile ModeShape Examples Getting Started
ceefour Apr 14, 2011 4:06 PM (in response to rhauch)I think so.
However the Getting Started Guide doesn't mention that:
- I should add any repository
- I should add any dependencies
Since Getting Started seems to assume the reader can be unaware of Maven, it's unfair to expect them to do the above.
I'd like to modify the example and pull request, but it seems not in modeshape github ?
-
5. Re: Cannot compile ModeShape Examples Getting Started
ceefour Apr 14, 2011 4:26 PM (in response to rhauch)Actually the example already depended on slf4j-log4j12 and log4j, however they are scope=test and thus need to be changed to:
<!-- Logging (require SLF4J API for compiling, but use Log4J and its SLF4J binding for testing) --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <scope>runtime</scope> </dependency>
Where can I commit the fixes to the examples ?
-
6. Re: Cannot compile ModeShape Examples Getting Started
rhauch Apr 15, 2011 11:28 AM (in response to ceefour)