Skip to content
This repository has been archived by the owner on Oct 7, 2019. It is now read-only.

jbake:inline fails after one change #6

Closed
cbrun opened this issue Nov 27, 2014 · 3 comments
Closed

jbake:inline fails after one change #6

cbrun opened this issue Nov 27, 2014 · 3 comments

Comments

@cbrun
Copy link

cbrun commented Nov 27, 2014

Hi,
I'm using the jbake-maven-plugin 0.0.8, thanks for your work !

When launching the target jbake:inline everything gets generated correctly and the plugins wait for a change. Once a change is made the execution stops with the following error:

[INFO] Running. Enter a blank line to finish. Anything else forces re-rendering.
[INFO] Refreshing
[INFO] Oops
com.orientechnologies.orient.core.exception.OConfigurationException: Error on opening database: the engine 'memory' was not found. URL was: memory:cache. Registered engines are: []
at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:208)
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.exists(ODatabaseRaw.java:206)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.exists(ODatabaseWrapperAbstract.java:65)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.exists(ODatabaseWrapperAbstract.java:65)
at org.jbake.app.DBUtil.createDB(DBUtil.java:25)
at org.jbake.app.Oven.bake(Oven.java:121)
at br.com.ingenieux.mojo.jbake.GenerateMojo.reRender(GenerateMojo.java:83)
at br.com.ingenieux.mojo.jbake.WatchMojo.executeInternal(WatchMojo.java:88)
at br.com.ingenieux.mojo.jbake.GenerateMojo.execute(GenerateMojo.java:58)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] Oops
org.apache.maven.plugin.MojoExecutionException: Failure when running:
at br.com.ingenieux.mojo.jbake.GenerateMojo.reRender(GenerateMojo.java:87)
at br.com.ingenieux.mojo.jbake.WatchMojo.executeInternal(WatchMojo.java:88)
at br.com.ingenieux.mojo.jbake.GenerateMojo.execute(GenerateMojo.java:58)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: Error on opening database: the engine 'memory' was not found. URL was: memory:cache. Registered engines are: []
at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:208)
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.exists(ODatabaseRaw.java:206)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.exists(ODatabaseWrapperAbstract.java:65)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.exists(ODatabaseWrapperAbstract.java:65)
at org.jbake.app.DBUtil.createDB(DBUtil.java:25)
at org.jbake.app.Oven.bake(Oven.java:121)
at br.com.ingenieux.mojo.jbake.GenerateMojo.reRender(GenerateMojo.java:83)
... 23 more
[INFO] Finishing
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.333 s
[INFO] Finished at: 2014-11-27T10:36:23+01:00
[INFO] Final Memory: 15M/340M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal br.com.ingenieux:jbake-maven-plugin:0.0.8:inline (default-cli) on project site: Oops: Failure when running: Error on opening database: the engine 'memory' was not found. URL was: memory:cache. Registered engines are: [] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@aldrinleal
Copy link
Member

Hey @jonbullock any idea?

@atao60
Copy link

atao60 commented Dec 28, 2014

The issue is with jbake-maven-plugin's GenerateMojo.reRender(). An instance of com.orientechnologies.orient.core.Orient is used without being fully initialized, neither explicitely nor by Oven constructor.

As soon as Orient.instance().startup() is called before calling oven.bake(), e.g. before calling Oven constructor, everything runs fine.

@cbrun
Copy link
Author

cbrun commented Dec 29, 2014

Thanks a lot !

aldrinleal added a commit that referenced this issue Dec 29, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants