New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac installation fails to start with incorrect cast of Log4jLoggerAdapter #400

Open
mdance opened this Issue Feb 7, 2015 · 13 comments

Comments

Projects
None yet
2 participants
@mdance

mdance commented Feb 7, 2015

I am trying to run Multibit HD.app and get the following error:

java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to ch.qos.logback.classic.Logger
at org.multibit.hd.core.logging.LoggingFactory.getCleanRoot(LoggingFactory.java:106)
at org.multibit.hd.core.logging.LoggingFactory.bootstrap(LoggingFactory.java:32)
at org.multibit.hd.core.services.CoreServices.main(CoreServices.java:144)
at org.multibit.hd.ui.MultiBitHD.initialiseCore(MultiBitHD.java:291)
at org.multibit.hd.ui.MultiBitHD.start(MultiBitHD.java:122)
at org.multibit.hd.ui.MultiBitHD.main(MultiBitHD.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.install4j.runtime.launcher.MacLauncher.main(Unknown Source)

@gary-rowe gary-rowe added this to the Beta 6 milestone Feb 8, 2015

@gary-rowe

This comment has been minimized.

Show comment
Hide comment
@gary-rowe

gary-rowe Feb 8, 2015

Contributor

Thanks for the feedback. Are you using the 0.0.5beta installer? Have you made any custom changes to the mbhd.yaml file?

There shouldn't be any reference to Log4j within MultiBit HD - it uses Logback.

Contributor

gary-rowe commented Feb 8, 2015

Thanks for the feedback. Are you using the 0.0.5beta installer? Have you made any custom changes to the mbhd.yaml file?

There shouldn't be any reference to Log4j within MultiBit HD - it uses Logback.

@mdance

This comment has been minimized.

Show comment
Hide comment
@mdance

mdance Feb 8, 2015

I used whatever was on the website from the day when I emailed, I have
deleted the installer afterwards so I am unable to check the version

On Sun, Feb 8, 2015 at 8:59 PM, Gary Rowe notifications@github.com wrote:

Thanks for the feedback. Are you using the 0.0.5beta installer?


Reply to this email directly or view it on GitHub
#400 (comment)
.

mdance commented Feb 8, 2015

I used whatever was on the website from the day when I emailed, I have
deleted the installer afterwards so I am unable to check the version

On Sun, Feb 8, 2015 at 8:59 PM, Gary Rowe notifications@github.com wrote:

Thanks for the feedback. Are you using the 0.0.5beta installer?


Reply to this email directly or view it on GitHub
#400 (comment)
.

@gary-rowe

This comment has been minimized.

Show comment
Hide comment
@gary-rowe

gary-rowe Feb 8, 2015

Contributor

OK, if you only downloaded the installer off the beta site recently then it will be 0.0.5beta. However, just to be absolutely sure would you mind downloading the 0.0.0 release which represents the latest build (currently pre-Beta 6)?

Could you describe how you start the app and how the symptoms manifest because just clicking MultiBit HD.app is unable to replicate the problem here.

Contributor

gary-rowe commented Feb 8, 2015

OK, if you only downloaded the installer off the beta site recently then it will be 0.0.5beta. However, just to be absolutely sure would you mind downloading the 0.0.0 release which represents the latest build (currently pre-Beta 6)?

Could you describe how you start the app and how the symptoms manifest because just clicking MultiBit HD.app is unable to replicate the problem here.

@gary-rowe gary-rowe changed the title from Mac installation crashes on startup with Log4jLoggerAdapter cannot be cast to ch.qos.logback.classic.Logger to Mac installation fails to start with incorrect cast of Log4jLoggerAdapter Feb 8, 2015

@gary-rowe gary-rowe modified the milestones: Beta 6, Release 0.1 Payment Protocol Feb 8, 2015

@mdance

This comment has been minimized.

Show comment
Hide comment
@mdance

mdance Feb 8, 2015

I'm receiving the same error

On Mon, Feb 9, 2015 at 1:59 AM, Gary Rowe notifications@github.com wrote:

OK, if you only downloaded the installer off the beta site recently then
it will be 0.0.5beta. However, just to be absolutely sure would you mind
downloading the 0.0.0 release
https://multibit.org/releases/multibit-hd/multibit-hd-0.0.0/ which
represents the latest build (currently pre-Beta 6)?

Could you describe how you start the app and how the symptoms manifest
because just clicking MultiBit HD.app is unable to replicate the problem
here.


Reply to this email directly or view it on GitHub
#400 (comment)
.

mdance commented Feb 8, 2015

I'm receiving the same error

On Mon, Feb 9, 2015 at 1:59 AM, Gary Rowe notifications@github.com wrote:

OK, if you only downloaded the installer off the beta site recently then
it will be 0.0.5beta. However, just to be absolutely sure would you mind
downloading the 0.0.0 release
https://multibit.org/releases/multibit-hd/multibit-hd-0.0.0/ which
represents the latest build (currently pre-Beta 6)?

Could you describe how you start the app and how the symptoms manifest
because just clicking MultiBit HD.app is unable to replicate the problem
here.


Reply to this email directly or view it on GitHub
#400 (comment)
.

@gary-rowe

This comment has been minimized.

Show comment
Hide comment
@gary-rowe

gary-rowe Feb 8, 2015

Contributor

Thanks for the update. Could you upload some logs/console output/screenshots so I can see the start up sequence?

Assuming there is anything, you'll find logs in:

  • ~/Library/Application Support/MultiBitHD/logs/multibit-hd.log (MultiBit HD)
  • /Applications/MultiBit HD/Contents/java/app/.install4j/installation.log (Installation log)

In addition, could you try the following:

  1. Ensure you have Java 7+ installed on your Mac (Terminal java -version should show 1.7.0_12 or higher)
  2. Navigate in Finder to Applications/MultiBit HD
  3. Right click Show Package Contents
  4. Navigate to Contents/java/app
  5. Copy multibit-hd.jar to ~/Desktop
  6. Open Terminal and cd ~/Desktop
  7. Launch with java -jar multibit-hd.jar

This last sequence should absolutely rule out any Log4j dependencies that could be creeping in although I've checked the Install4j supporting JARs and no sign of Log4j is present.

Let me know how you get on, and thanks for taking the time to help out with this - much appreciated.

Contributor

gary-rowe commented Feb 8, 2015

Thanks for the update. Could you upload some logs/console output/screenshots so I can see the start up sequence?

Assuming there is anything, you'll find logs in:

  • ~/Library/Application Support/MultiBitHD/logs/multibit-hd.log (MultiBit HD)
  • /Applications/MultiBit HD/Contents/java/app/.install4j/installation.log (Installation log)

In addition, could you try the following:

  1. Ensure you have Java 7+ installed on your Mac (Terminal java -version should show 1.7.0_12 or higher)
  2. Navigate in Finder to Applications/MultiBit HD
  3. Right click Show Package Contents
  4. Navigate to Contents/java/app
  5. Copy multibit-hd.jar to ~/Desktop
  6. Open Terminal and cd ~/Desktop
  7. Launch with java -jar multibit-hd.jar

This last sequence should absolutely rule out any Log4j dependencies that could be creeping in although I've checked the Install4j supporting JARs and no sign of Log4j is present.

Let me know how you get on, and thanks for taking the time to help out with this - much appreciated.

@gary-rowe

This comment has been minimized.

Show comment
Hide comment
@gary-rowe

gary-rowe Feb 8, 2015

Contributor

I've updated my earlier comment to provide additional locations for logs that will shed some light on what's going on here.

Contributor

gary-rowe commented Feb 8, 2015

I've updated my earlier comment to provide additional locations for logs that will shed some light on what's going on here.

@mdance

This comment has been minimized.

Show comment
Hide comment
@mdance

mdance Feb 8, 2015

The initial log directory did not exist.

cat error.log
Mon  9 Feb 2015 08:42:35 AEDT
log4j:WARN No appenders could be found for logger (org.multibit.hd.core.concurrent.SafeExecutors).
log4j:WARN Please initialize the log4j system properly.
java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to ch.qos.logback.classic.Logger
at org.multibit.hd.core.logging.LoggingFactory.getCleanRoot(LoggingFactory.java:106)
at org.multibit.hd.core.logging.LoggingFactory.bootstrap(LoggingFactory.java:32)
at org.multibit.hd.core.services.CoreServices.main(CoreServices.java:144)
at org.multibit.hd.ui.MultiBitHD.initialiseCore(MultiBitHD.java:291)
at org.multibit.hd.ui.MultiBitHD.start(MultiBitHD.java:122)
at org.multibit.hd.ui.MultiBitHD.main(MultiBitHD.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.install4j.runtime.launcher.MacLauncher.main(Unknown Source)

Then

md at mactop in /A/M/C/j/app 22.370 Mb
java -jar multibit-hd.jar
Mon  9 Feb 2015 08:42:38 AEDT

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/multibit/hd/ui/MultiBitHD : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Then

md at mactop in /A/M/C/j/app 22.370 Mb
pwd
Mon  9 Feb 2015 08:42:58 AEDT

/Applications/MultiBit HD.app/Contents/java/app

mdance commented Feb 8, 2015

The initial log directory did not exist.

cat error.log
Mon  9 Feb 2015 08:42:35 AEDT
log4j:WARN No appenders could be found for logger (org.multibit.hd.core.concurrent.SafeExecutors).
log4j:WARN Please initialize the log4j system properly.
java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to ch.qos.logback.classic.Logger
at org.multibit.hd.core.logging.LoggingFactory.getCleanRoot(LoggingFactory.java:106)
at org.multibit.hd.core.logging.LoggingFactory.bootstrap(LoggingFactory.java:32)
at org.multibit.hd.core.services.CoreServices.main(CoreServices.java:144)
at org.multibit.hd.ui.MultiBitHD.initialiseCore(MultiBitHD.java:291)
at org.multibit.hd.ui.MultiBitHD.start(MultiBitHD.java:122)
at org.multibit.hd.ui.MultiBitHD.main(MultiBitHD.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.install4j.runtime.launcher.MacLauncher.main(Unknown Source)

Then

md at mactop in /A/M/C/j/app 22.370 Mb
java -jar multibit-hd.jar
Mon  9 Feb 2015 08:42:38 AEDT

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/multibit/hd/ui/MultiBitHD : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Then

md at mactop in /A/M/C/j/app 22.370 Mb
pwd
Mon  9 Feb 2015 08:42:58 AEDT

/Applications/MultiBit HD.app/Contents/java/app
@gary-rowe

This comment has been minimized.

Show comment
Hide comment
@gary-rowe

gary-rowe Feb 8, 2015

Contributor

Hmm no installer.log? OK that class 51 error means you're running Java6 which is Mac default. Can you install Java 7 and try that last command again?

Contributor

gary-rowe commented Feb 8, 2015

Hmm no installer.log? OK that class 51 error means you're running Java6 which is Mac default. Can you install Java 7 and try that last command again?

@gary-rowe gary-rowe self-assigned this Feb 13, 2015

@gary-rowe

This comment has been minimized.

Show comment
Hide comment
@gary-rowe

gary-rowe Feb 25, 2015

Contributor

@mdance Have you seen this error again?

Perhaps try the Beta 6 installer: https://beta.multibit.org/releases/multibit-hd/multibit-hd-0.0.6beta/

Contributor

gary-rowe commented Feb 25, 2015

@mdance Have you seen this error again?

Perhaps try the Beta 6 installer: https://beta.multibit.org/releases/multibit-hd/multibit-hd-0.0.6beta/

@gary-rowe gary-rowe modified the milestone: Release 0.1 Payment Protocol Feb 25, 2015

@mdance

This comment has been minimized.

Show comment
Hide comment
@mdance

mdance Feb 26, 2015

I am still experiencing the same issue with the latest installer

On Thu, Feb 26, 2015 at 12:42 AM, Gary Rowe notifications@github.com
wrote:

@mdance https://github.com/mdance Have you seen this error again?

Perhaps try the Beta 6 installer:
https://beta.multibit.org/releases/multibit-hd/multibit-hd-0.0.6beta/


Reply to this email directly or view it on GitHub
#400 (comment)
.

mdance commented Feb 26, 2015

I am still experiencing the same issue with the latest installer

On Thu, Feb 26, 2015 at 12:42 AM, Gary Rowe notifications@github.com
wrote:

@mdance https://github.com/mdance Have you seen this error again?

Perhaps try the Beta 6 installer:
https://beta.multibit.org/releases/multibit-hd/multibit-hd-0.0.6beta/


Reply to this email directly or view it on GitHub
#400 (comment)
.

@gary-rowe

This comment has been minimized.

Show comment
Hide comment
@gary-rowe

gary-rowe Feb 26, 2015

Contributor

Thanks for coming back on this. I'm really struggling to work out how a dependency on Log4j is getting in since neither Install4j nor MultiBitHD includes that framework. Consequently I'm suspecting an unusual configuration at your end. Getting to the bottom of this will certainly help with installation instructions.

Were you able to upgrade to Java 7 and try the earlier manual instructions?

Contributor

gary-rowe commented Feb 26, 2015

Thanks for coming back on this. I'm really struggling to work out how a dependency on Log4j is getting in since neither Install4j nor MultiBitHD includes that framework. Consequently I'm suspecting an unusual configuration at your end. Getting to the bottom of this will certainly help with installation instructions.

Were you able to upgrade to Java 7 and try the earlier manual instructions?

@gary-rowe gary-rowe modified the milestone: Support issues Feb 27, 2015

@gary-rowe

This comment has been minimized.

Show comment
Hide comment
@gary-rowe

gary-rowe Jun 17, 2015

Contributor

I've not heard anyone else reporting this error since we began bundling JRE 7 so I'm going to close this as resolved.

Contributor

gary-rowe commented Jun 17, 2015

I've not heard anyone else reporting this error since we began bundling JRE 7 so I'm going to close this as resolved.

@gary-rowe

This comment has been minimized.

Show comment
Hide comment
@gary-rowe

gary-rowe Oct 18, 2015

Contributor

There has been a repeat of this so re-opening to prompt further investigation.

java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to ch.qos.logback.classic.Logger
    at org.multibit.hd.core.logging.LoggingFactory.getCleanRoot(LoggingFactory.java:119)
    at org.multibit.hd.core.logging.LoggingFactory.bootstrap(LoggingFactory.java:34)
    at org.multibit.hd.ui.MultiBitHD.start(MultiBitHD.java:119)
    at org.multibit.hd.ui.MultiBitHD.main(MultiBitHD.java:72)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    at com.install4j.runtime.launcher.MacLauncher.main(Unknown Source)
Contributor

gary-rowe commented Oct 18, 2015

There has been a repeat of this so re-opening to prompt further investigation.

java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to ch.qos.logback.classic.Logger
    at org.multibit.hd.core.logging.LoggingFactory.getCleanRoot(LoggingFactory.java:119)
    at org.multibit.hd.core.logging.LoggingFactory.bootstrap(LoggingFactory.java:34)
    at org.multibit.hd.ui.MultiBitHD.start(MultiBitHD.java:119)
    at org.multibit.hd.ui.MultiBitHD.main(MultiBitHD.java:72)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    at com.install4j.runtime.launcher.MacLauncher.main(Unknown Source)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment