java.io.FileNotFoundException: ../../../../sonatype-work/nexus/logs/nexus.log (No such file or directory)

Sonatype JIRA | Deleted User | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I am trying to upgrade to 1.0.1 from an 1.0.0 installation. My layout is /opt/nexus -> nexus-webapp-1.0.1 /var/nexus -> nexus work directory (/var/nexus/conf/nexus.xml is my configuration file) Originally I had to "trick" nexus into looking at /var/nexus by doing mkdir /opt/sonatype-work ln -s /var/nexus /opt/sonatype-work/nexus With 1.0.1 I decided to try PLEXUS_NEXUS_WORK to do away with the symlink. In my start up script wrapping I defined export PLEXUS_NEXUS_WORK=/var/nexus Unfortunately the app did not start and I got this in the /opt/nexus/logs/wrapper.log {code} STATUS | wrapper | 2008/09/28 23:44:24 | Launching a JVM... INFO | jvm 1 | 2008/09/28 23:44:24 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org INFO | jvm 1 | 2008/09/28 23:44:24 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. INFO | jvm 1 | 2008/09/28 23:44:24 | INFO | jvm 1 | 2008/09/28 23:44:24 | INFO | jvm 1 | 2008/09/28 23:44:24 | WARNING - Unable to load the Wrapper's native library 'libwrapper.so'. INFO | jvm 1 | 2008/09/28 23:44:24 | The file is located on the path at the following location but INFO | jvm 1 | 2008/09/28 23:44:24 | could not be loaded: INFO | jvm 1 | 2008/09/28 23:44:24 | /opt/nexus-webapp-1.0.1/bin/jsw/linux-x86-64/./lib/libwrapper.so INFO | jvm 1 | 2008/09/28 23:44:24 | Please verify that the file is readable by the current user INFO | jvm 1 | 2008/09/28 23:44:24 | and that the file has not been corrupted in any way. INFO | jvm 1 | 2008/09/28 23:44:24 | One common cause of this problem is running a 32-bit version INFO | jvm 1 | 2008/09/28 23:44:24 | of the Wrapper with a 64-bit version of Java, or vica versa. INFO | jvm 1 | 2008/09/28 23:44:24 | This is a 32-bit JVM. INFO | jvm 1 | 2008/09/28 23:44:24 | Reported cause: INFO | jvm 1 | 2008/09/28 23:44:24 | /opt/nexus-webapp-1.0.1/bin/jsw/linux-x86-64/lib/libwrapper.so: /opt/nexus-webapp-1.0.1/bin/jsw/linux-x86-64/lib/libwrapper.so: cannot open shared object file: No such file or directory (Possible cause: architecture word width mismatch) INFO | jvm 1 | 2008/09/28 23:44:24 | System signals will not be handled correctly. INFO | jvm 1 | 2008/09/28 23:44:24 | INFO | jvm 1 | 2008/09/28 23:44:24 | Replacing PLEXUS_APPLICATION_PORT with value in ENVIRONMENT + 8300 INFO | jvm 1 | 2008/09/28 23:44:24 | Replacing PLEXUS_NEXUS_WORK with value in ENVIRONMENT + /var/nexus INFO | jvm 1 | 2008/09/28 23:44:24 | Starting the Plexus Container. INFO | jvm 1 | 2008/09/28 23:44:25 | log4j:ERROR setFile(null,true) call failed. INFO | jvm 1 | 2008/09/28 23:44:25 | java.io.FileNotFoundException: ../../../../sonatype-work/nexus/logs/nexus.log (No such file or directory) INFO | jvm 1 | 2008/09/28 23:44:25 | at java.io.FileOutputStream.openAppend(Native Method) INFO | jvm 1 | 2008/09/28 23:44:25 | at java.io.FileOutputStream.<init>(FileOutputStream.java:177) INFO | jvm 1 | 2008/09/28 23:44:25 | at java.io.FileOutputStream.<init>(FileOutputStream.java:102) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.FileAppender.setFile(FileAppender.java:289) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:215) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.LogManager.<clinit>(LogManager.java:122) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:88) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager.createLogger(Slf4jLoggerManager.java:36) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.logging.BaseLoggerManager.getLoggerForComponent(BaseLoggerManager.java:164) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.logging.AbstractLoggerManager.getLoggerForComponent(AbstractLoggerManager.java:44) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.container.initialization.InitializeLoggerManagerPhase.initializeCoreComponent(InitializeLoggerManagerPhase.java:75) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.container.initialization.AbstractCoreComponentInitializationPhase.execute(AbstractCoreComponentInitializationPhase.java:26) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.DefaultPlexusContainer.initializePhases(DefaultPlexusContainer.java:851) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:815) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.DefaultPlexusContainer.construct(DefaultPlexusContainer.java:407) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:198) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.sonatype.appbooter.PlexusContainerHost.startContainer(PlexusContainerHost.java:221) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.sonatype.appbooter.jsw.PlexusJSWListener.start(PlexusJSWListener.java:101) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788) INFO | jvm 1 | 2008/09/28 23:44:25 | log4j:ERROR Either File or DatePattern options are not set for appender [logfile]. {code} It appears that it is due to a hardcoded path in runtime/apps/nexus/conf/log4j.properties: {code}log4j.appender.logfile.File=${basedir}/../sonatype-work/nexus/logs/nexus.log{code} It tried to set it to {code}log4j.appender.logfile.File=${nexus-work}/logs/nexus.log{code} The application started successfully but no log /var/nexus/logs/nexus.log was created and all logs went to the /opt/nexus/logs/wrapper.log instead. I finally hard coded the path {code}log4j.appender.logfile.File=/var/nexus/logs/nexus.log{code} and all worked as I expected: app started successfully and its logs appeared in /var/nexus/logs/nexus.log My suggestion would be to have the plexus.properties available in the log4j.properties and use ${nexus-work}/logs/nexus.log as the location of nexus log file

    Sonatype JIRA | 9 years ago | Deleted User
    java.io.FileNotFoundException: ../../../../sonatype-work/nexus/logs/nexus.log (No such file or directory)
  2. 0

    I am trying to upgrade to 1.0.1 from an 1.0.0 installation. My layout is /opt/nexus -> nexus-webapp-1.0.1 /var/nexus -> nexus work directory (/var/nexus/conf/nexus.xml is my configuration file) Originally I had to "trick" nexus into looking at /var/nexus by doing mkdir /opt/sonatype-work ln -s /var/nexus /opt/sonatype-work/nexus With 1.0.1 I decided to try PLEXUS_NEXUS_WORK to do away with the symlink. In my start up script wrapping I defined export PLEXUS_NEXUS_WORK=/var/nexus Unfortunately the app did not start and I got this in the /opt/nexus/logs/wrapper.log {code} STATUS | wrapper | 2008/09/28 23:44:24 | Launching a JVM... INFO | jvm 1 | 2008/09/28 23:44:24 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org INFO | jvm 1 | 2008/09/28 23:44:24 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. INFO | jvm 1 | 2008/09/28 23:44:24 | INFO | jvm 1 | 2008/09/28 23:44:24 | INFO | jvm 1 | 2008/09/28 23:44:24 | WARNING - Unable to load the Wrapper's native library 'libwrapper.so'. INFO | jvm 1 | 2008/09/28 23:44:24 | The file is located on the path at the following location but INFO | jvm 1 | 2008/09/28 23:44:24 | could not be loaded: INFO | jvm 1 | 2008/09/28 23:44:24 | /opt/nexus-webapp-1.0.1/bin/jsw/linux-x86-64/./lib/libwrapper.so INFO | jvm 1 | 2008/09/28 23:44:24 | Please verify that the file is readable by the current user INFO | jvm 1 | 2008/09/28 23:44:24 | and that the file has not been corrupted in any way. INFO | jvm 1 | 2008/09/28 23:44:24 | One common cause of this problem is running a 32-bit version INFO | jvm 1 | 2008/09/28 23:44:24 | of the Wrapper with a 64-bit version of Java, or vica versa. INFO | jvm 1 | 2008/09/28 23:44:24 | This is a 32-bit JVM. INFO | jvm 1 | 2008/09/28 23:44:24 | Reported cause: INFO | jvm 1 | 2008/09/28 23:44:24 | /opt/nexus-webapp-1.0.1/bin/jsw/linux-x86-64/lib/libwrapper.so: /opt/nexus-webapp-1.0.1/bin/jsw/linux-x86-64/lib/libwrapper.so: cannot open shared object file: No such file or directory (Possible cause: architecture word width mismatch) INFO | jvm 1 | 2008/09/28 23:44:24 | System signals will not be handled correctly. INFO | jvm 1 | 2008/09/28 23:44:24 | INFO | jvm 1 | 2008/09/28 23:44:24 | Replacing PLEXUS_APPLICATION_PORT with value in ENVIRONMENT + 8300 INFO | jvm 1 | 2008/09/28 23:44:24 | Replacing PLEXUS_NEXUS_WORK with value in ENVIRONMENT + /var/nexus INFO | jvm 1 | 2008/09/28 23:44:24 | Starting the Plexus Container. INFO | jvm 1 | 2008/09/28 23:44:25 | log4j:ERROR setFile(null,true) call failed. INFO | jvm 1 | 2008/09/28 23:44:25 | java.io.FileNotFoundException: ../../../../sonatype-work/nexus/logs/nexus.log (No such file or directory) INFO | jvm 1 | 2008/09/28 23:44:25 | at java.io.FileOutputStream.openAppend(Native Method) INFO | jvm 1 | 2008/09/28 23:44:25 | at java.io.FileOutputStream.<init>(FileOutputStream.java:177) INFO | jvm 1 | 2008/09/28 23:44:25 | at java.io.FileOutputStream.<init>(FileOutputStream.java:102) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.FileAppender.setFile(FileAppender.java:289) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:215) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.apache.log4j.LogManager.<clinit>(LogManager.java:122) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:88) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager.createLogger(Slf4jLoggerManager.java:36) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.logging.BaseLoggerManager.getLoggerForComponent(BaseLoggerManager.java:164) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.logging.AbstractLoggerManager.getLoggerForComponent(AbstractLoggerManager.java:44) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.container.initialization.InitializeLoggerManagerPhase.initializeCoreComponent(InitializeLoggerManagerPhase.java:75) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.container.initialization.AbstractCoreComponentInitializationPhase.execute(AbstractCoreComponentInitializationPhase.java:26) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.DefaultPlexusContainer.initializePhases(DefaultPlexusContainer.java:851) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:815) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.DefaultPlexusContainer.construct(DefaultPlexusContainer.java:407) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:198) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.sonatype.appbooter.PlexusContainerHost.startContainer(PlexusContainerHost.java:221) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.sonatype.appbooter.jsw.PlexusJSWListener.start(PlexusJSWListener.java:101) INFO | jvm 1 | 2008/09/28 23:44:25 | at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788) INFO | jvm 1 | 2008/09/28 23:44:25 | log4j:ERROR Either File or DatePattern options are not set for appender [logfile]. {code} It appears that it is due to a hardcoded path in runtime/apps/nexus/conf/log4j.properties: {code}log4j.appender.logfile.File=${basedir}/../sonatype-work/nexus/logs/nexus.log{code} It tried to set it to {code}log4j.appender.logfile.File=${nexus-work}/logs/nexus.log{code} The application started successfully but no log /var/nexus/logs/nexus.log was created and all logs went to the /opt/nexus/logs/wrapper.log instead. I finally hard coded the path {code}log4j.appender.logfile.File=/var/nexus/logs/nexus.log{code} and all worked as I expected: app started successfully and its logs appeared in /var/nexus/logs/nexus.log My suggestion would be to have the plexus.properties available in the log4j.properties and use ${nexus-work}/logs/nexus.log as the location of nexus log file

    Sonatype JIRA | 9 years ago | Deleted User
    java.io.FileNotFoundException: ../../../../sonatype-work/nexus/logs/nexus.log (No such file or directory)
  3. 0

    FileNotFoundException on startup

    GitHub | 5 years ago | skivvies
    java.io.FileNotFoundException: log.txt (Permission denied)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Ubuntu lantern from deb crashes on startup

    GitHub | 4 years ago | leahxschmidt
    java.io.FileNotFoundException: log.txt (Permission denied)
  6. 0

    some errors when starting up

    GitHub | 2 years ago | LeoK987
    java.io.FileNotFoundException: log.txt (Permission denied)
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.FileNotFoundException

    ../../../../sonatype-work/nexus/logs/nexus.log (No such file or directory)

    at java.io.FileOutputStream.openAppend()
  2. Java RT
    FileOutputStream.<init>
    1. java.io.FileOutputStream.openAppend(Native Method)
    2. java.io.FileOutputStream.<init>(FileOutputStream.java:177)
    3. java.io.FileOutputStream.<init>(FileOutputStream.java:102)
    3 frames
  3. Apache Log4j
    LogManager.<clinit>
    1. org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
    2. org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
    3. org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:215)
    4. org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
    5. org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
    6. org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
    7. org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
    8. org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
    9. org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
    10. org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
    11. org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
    12. org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
    13. org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
    13 frames
  4. SLF4J LOG4J-12 Binding
    Log4jLoggerFactory.getLogger
    1. org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
    1 frame
  5. SLF4J API Module
    LoggerFactory.getLogger
    1. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:88)
    1 frame
  6. org.codehaus.plexus
    Slf4jLoggerManager.createLogger
    1. org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager.createLogger(Slf4jLoggerManager.java:36)
    1 frame
  7. Plexus
    DefaultPlexusContainer.<init>
    1. org.codehaus.plexus.logging.BaseLoggerManager.getLoggerForComponent(BaseLoggerManager.java:164)
    2. org.codehaus.plexus.logging.AbstractLoggerManager.getLoggerForComponent(AbstractLoggerManager.java:44)
    3. org.codehaus.plexus.container.initialization.InitializeLoggerManagerPhase.initializeCoreComponent(InitializeLoggerManagerPhase.java:75)
    4. org.codehaus.plexus.container.initialization.AbstractCoreComponentInitializationPhase.execute(AbstractCoreComponentInitializationPhase.java:26)
    5. org.codehaus.plexus.DefaultPlexusContainer.initializePhases(DefaultPlexusContainer.java:851)
    6. org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:815)
    7. org.codehaus.plexus.DefaultPlexusContainer.construct(DefaultPlexusContainer.java:407)
    8. org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:198)
    8 frames
  8. org.sonatype.appbooter
    PlexusJSWListener.start
    1. org.sonatype.appbooter.PlexusContainerHost.startContainer(PlexusContainerHost.java:221)
    2. org.sonatype.appbooter.jsw.PlexusJSWListener.start(PlexusJSWListener.java:101)
    2 frames
  9. Java Service Wrapper
    WrapperManager$12.run
    1. org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
    1 frame