| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/29/2009 16:50:51
|
ddaniels
master
Joined: 11/13/2008 14:08:44
Messages: 52
Location: Austin, TX
Offline
|
I’m upgrading our initial 2.7.3 Terracotta implementation to Terracotta 3.0 and I tried starting our custom java server which uses Hibernate as a Terracotta DSO node in Eclipse using the latest Terracotta Eclipse plugin, but I receive an error in the SLF4J library when Hibernate libraries try to call a non-existent SLF4J trace() method. If I run our server as a normal Java Application I don’t receive this error.
I’ve received errors like this before and is usually caused by a maven dependency including an older version of SLF4J (see this issue org.slf4j.impl.Log4jLoggerAdapter - AbstractMethodError).
I’m not sure what the Terracotta Eclipse plugin is doing or how I can override the SLF4J version it seems to be using.
Here’s the error:
Code:
2009-06-29 18:09:03,927 INFO - Terracotta 3.0.0-stable1, as of 20090318-110351 (Revision 12200 by cruise@su10mo5 from 3.0)
2009-06-29 18:09:04,298 INFO - Configuration loaded from the file at 'C:\dev\trunk\webwars-trunk2\littlethings\tc-config.xml'.
2009-06-29 18:09:04,504 INFO - Log file: 'C:\Users\ddaniels\terracotta\clients\logs\terracotta-client.log'.
2009-06-29 18:09:06,770 INFO - Connection successfully established to server at xxxxxxxx
Jun 29, 2009 6:09:07 PM com.webwars.gameplatform.util.XmlConfigurationUtil configure
INFO: PERSISTENCE SYSTEM: /hibernate.properties
Jun 29, 2009 6:09:11 PM com.webwars.gameplatform.database.PersistenceSystem init
SEVERE: PERSISTENCE SYSTEM: hibernatePropertiesPath: /hibernate.properties
Jun 29, 2009 6:09:11 PM org.hibernate.cfg.annotations.Version <clinit>
INFO: Hibernate Annotations 3.4.0.GA
Jun 29, 2009 6:09:11 PM org.hibernate.annotations.common.Version <clinit>
INFO: Hibernate Commons Annotations 3.1.0.GA
Jun 29, 2009 6:09:11 PM com.webwars.gameplatform.database.DBUtil getSessionFactory
SEVERE: HibernateConfigPath: /hibernate.cfg.xml HibernateConfigURL: URI:file:/C:/dev/trunk/webwars-trunk2/littlethings/target/classes/hibernate.cfg.xml
Jun 29, 2009 6:09:11 PM org.hibernate.cfg.search.HibernateSearchEventListenerRegister enableHibernateSearch
INFO: Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
Jun 29, 2009 6:09:12 PM org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: com.webwars.gameplatform.agent.AgentDecorator
Jun 29, 2009 6:09:12 PM org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity com.webwars.gameplatform.agent.AgentDecorator on table AgentDecorator
Exception in thread "main" java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.trace(Ljava/lang/String;)V
at org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
...
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/29/2009 18:46:17
|
gkeim
ophanim
Joined: 12/05/2006 10:22:37
Messages: 520
Location: Terracotta, Inc.
Offline
|
slf4j-nop is included in $TC_HOME/lib purely as a way to silence Jetty when embedded in the Terracotta server. We clearly need to a better way to accomplish that goal. For now you could try removing slf4j-nop.
|
Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/30/2009 09:02:46
|
ddaniels
master
Joined: 11/13/2008 14:08:44
Messages: 52
Location: Austin, TX
Offline
|
I tried removing the SL4J nop jar from the plugins folder in eclipse:
C:\eclipse\plugins\org.terracotta.dso_3.0.0.stable1_r12200_v20090318\lib
But I still get the same error, I then tried moving in the SL4J that I use in the normal java application: slf4j-jdk14-1.5.6.jar
Still same error, I'm not sure where it's picking up the incorrect SLF4J implementation.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/30/2009 16:23:40
|
ddaniels
master
Joined: 11/13/2008 14:08:44
Messages: 52
Location: Austin, TX
Offline
|
I was able to kind of work around the problem by including the following 2 jars on my Eclipse bootclasspath in the DSO Application launch configuration.
C:\Users\ddaniels\.m2\repository\org\slf4j\slf4j-jdk14\1.5.6\slf4j-jdk14-1.5.6.jar
C:\Users\ddaniels\.m2\repository\org\slf4j\slf4j-api\1.5.6\slf4j-api-1.5.6.jar
Trouble is that's not very portable as it references my home directory, is there a better solution?
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/30/2009 18:01:28
|
gkeim
ophanim
Joined: 12/05/2006 10:22:37
Messages: 520
Location: Terracotta, Inc.
Offline
|
Good. I couldn't see how the slf4j-nop we include in the kit could possibly affect your client, since in the client Terracotta code is loaded in an isolated classloader.
Are you using Maven+Eclipse? If so:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-754
If this is your case, then you can simply add the proper dependencies to your pom.
|
Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community |
|
|
 |
|
|