#1 2015-05-18 14:01:50

remijouannet
Member
Registered: 2015-05-18

Centos 6 java.lang.IllegalAccessError: tried to access field org.slf4j

Hello everyone,

I've tried reportserver on windows 8 without any problem,

after that, I tried to install reportserver on Centos 6/tomcat 8/Java 7 but the application can't start completely.

I can access the main page but the login never comin', it makes POST request to homepage indefinitely

in the tomcat logs, It seems that is blocking on that error (I don't have this error on windows) :

Exception in thread "Thread-7" java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
        at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:65)
        at org.apache.sshd.common.AbstractFactoryManager.<init>(AbstractFactoryManager.java:40)
        at org.apache.sshd.SshServer.<init>(SshServer.java:144)
        at org.apache.sshd.SshServer.setUpDefaultServer(SshServer.java:446)
        at net.datenwerke.rs.remoteaccess.service.sftp.SftpServiceImpl.start(SftpServiceImpl.java:54)
        at net.datenwerke.rs.remoteaccess.service.RemoteAccessStartup$1.initialize(RemoteAccessStartup.java:33)
        at net.datenwerke.gf.service.lateinit.LateInitStartup$1.run(LateInitStartup.java:42)
        at java.lang.Thread.run(Thread.java:745)

Offline

#2 2015-05-18 16:03:00

Thorsten J. Krause
Guest

Re: Centos 6 java.lang.IllegalAccessError: tried to access field org.slf4j

Hi,

there is a problem with the way we bundled the slf4j library with reportserver that only shows in some environments. Please try this:

- From the WEB-INF/lib subdirectory of the reportserver install dir remove all the slf4j-*.jar files
- Download the latest slf4j version here http://www.slf4j.org/download.html
- From the download extract the files
      slf4j-api-1.7.12.jar
      slf4j-log4j12-1.7.12.jar
and place them into the WEB-INF/lib directory.

If it still does not work check the tomcat/lib directory and all other java library folders on your computer for slf4j files and remove them.
That should do the trick.

Cheers,
Thorsten

#3 2015-05-18 16:03:17

remijouannet
Member
Registered: 2015-05-18

Re: Centos 6 java.lang.IllegalAccessError: tried to access field org.slf4j

nevermind I found the reason, an old version of slf4j in the lib folder, here is what i've done to fix it :

[user@host lib]# ll | grep slf
533059 -rw-r--r-- 1 root root  672K Mar  8 22:25 jaxb-xslfo-1.0.1.jar
533344 -rw-r--r-- 1 root root   26K Mar  8 22:26 slf4j-api-1.7.5.jar
533251 -rw-r--r-- 1 root root  8.7K Mar  8 22:26 slf4j-jdk14-1.6.6.jar
533327 -rw-r--r-- 1 root root   14K Mar  8 22:26 slf4j-log4j12-1.0.1.jar
533157 -rw-r--r-- 1 root root  8.7K Mar  8 22:26 slf4j-log4j12-1.7.5.jar
[user@host lib]# mv slf4j-log4j12-1.0.1.jar slf4j-log4j12-1.0.1.jar.old
[user@host lib]# ll | grep slf
533059 -rw-r--r-- 1 root root  672K Mar  8 22:25 jaxb-xslfo-1.0.1.jar
533344 -rw-r--r-- 1 root root   26K Mar  8 22:26 slf4j-api-1.7.5.jar
533251 -rw-r--r-- 1 root root  8.7K Mar  8 22:26 slf4j-jdk14-1.6.6.jar
533327 -rw-r--r-- 1 root root   14K Mar  8 22:26 slf4j-log4j12-1.0.1.jar.old
533157 -rw-r--r-- 1 root root  8.7K Mar  8 22:26 slf4j-log4j12-1.7.5.jar
[user@host lib]#


EDIT: I didn't see your response before posting this, thanks smile
EDIT2: You should clean the lib folder a little bit for the next package

Last edited by remijouannet (2015-05-18 16:06:21)

Offline

Board footer

Powered by FluxBB