[
https://issues.apache.org/jira/browse/BROOKLYN-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aled Sage resolved BROOKLYN-240.
--------------------------------
Resolution: Fixed
Fix Version/s: 0.9.1
0.10.0
> NPE starting Brooklyn when could not create persistence directory
> -----------------------------------------------------------------
>
> Key: BROOKLYN-240
> URL: https://issues.apache.org/jira/browse/BROOKLYN-240
> Project: Brooklyn
> Issue Type: Bug
> Reporter: Aled Sage
> Priority: Minor
> Fix For: 0.10.0, 0.9.1
>
>
> I launched Brooklyn, but it failed to create the persistence directory (as
> seen with the error below).
> {noformat}
> 2016-03-16 12:00:46,564 ERROR Subsystem for persistence had startup error
> (continuing with startup):
> org.apache.brooklyn.util.exceptions.FatalConfigurationRuntimeException:
> Failed to create persistence directory /data/persisted-state
> org.apache.brooklyn.util.exceptions.FatalConfigurationRuntimeException:
> Failed to create persistence directory /data/persisted-state
> at
> org.apache.brooklyn.core.mgmt.persist.FileBasedObjectStore.prepareForSharedUse(FileBasedObjectStore.java:281)
> ~[brooklyn-core-0.9.0-20160125.1743-p1.jar:0.9.0-20160125.1743-p1]
> {noformat}
> The default is for it to continue with the startup. It then failed with the
> exception shown below:
> {noformat}
> 2016-03-16 12:00:48,152 ERROR Execution error: null
> java.lang.NullPointerException: null
> at
> org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl.forcePersistNow(RebindManagerImpl.java:453)
> ~[brooklyn-core-0.9.0-20160125.1743-p1.jar:0.9.0-20160125.1743-p1]
> Execution error: null
> java.lang.NullPointerException
> at
> org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl.forcePersistNow(RebindManagerImpl.java:453)
> at
> org.apache.brooklyn.launcher.BrooklynLauncher.start(BrooklynLauncher.java:656)
> at org.apache.brooklyn.cli.Main$LaunchCommand.call(Main.java:457)
> at org.apache.brooklyn.cli.Main$LaunchCommand.call(Main.java:194)
> at org.apache.brooklyn.cli.AbstractMain.execCli(AbstractMain.java:252)
> at org.apache.brooklyn.cli.AbstractMain.execCli(AbstractMain.java:244)
> {noformat}
> This was with Brooklyn a version of Brooklyn from incubator-brooklyn, and a
> startup command like:
> {noformat}
> nohup bin/brooklyn launch --localBrooklynProperties
> /home/users/myname/brooklyn-managed-processes/apps/xDuDKT2a/entities/BrooklynNode_zXt7gzFt/brooklyn-local.properties
> --port 8443 --bindAddress 0.0.0.0 --persist auto >>
> /home/users/myname/brooklyn-managed-processes/apps/xDuDKT2a/entities/BrooklynNode_zXt7gzFt/console
> 2>&1 </dev/null &
> {noformat}
> ---
> If the CLI {{startupFailOnPersistenceErrors}} is false (which is the default)
> then I'd expect Brooklyn to startup without throwing an NPE.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)