Skip to content
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

Generator: "Sculptor code generator failed" without details #138

Closed
rcodesmith opened this issue Jul 9, 2014 · 4 comments
Closed

Generator: "Sculptor code generator failed" without details #138

rcodesmith opened this issue Jul 9, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@rcodesmith
Copy link
Member

Running off the latest code, I'm getting the following failure in a Maven build:

[ERROR] Executing generator workflow failed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.636s
[INFO] Finished at: Wed Jul 09 10:10:47 CDT 2014
[INFO] Final Memory: 18M/350M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sculptorgenerator:sculptor-maven-plugin:3.0.5-SNAPSHOT:generate (code-generation) on project xyz-domain: Sculptor code generator failed -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sculptorgenerator:sculptor-maven-plugin:3.0.5-SNAPSHOT:generate (code-generation) on project xyz-domain: Sculptor code generator failed
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        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:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        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:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Sculptor code generator failed
        at org.sculptor.maven.plugin.GeneratorMojo.execute(GeneratorMojo.java:221)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more

Generated from this line:

            // Execute Sculptor code generator
            if (!executeGenerator()) {
                throw new MojoExecutionException("Sculptor code generator failed");
            }

I don't see any error messages indicating the reason for the failure.

@rcodesmith rcodesmith added the bug label Jul 9, 2014
@tjuerge tjuerge self-assigned this Jul 9, 2014
@tjuerge tjuerge added this to the 3.0.5 milestone Jul 9, 2014
@tjuerge
Copy link
Member

tjuerge commented Jul 9, 2014

Ok, the first line "[ERROR] Executing generator workflow failed" is logged if SculptorGeneratorRunner.run() returns null. This is the case if the new Xtend-based Sculptor workflow in SculptorGeneratorWorkflow.run() "falls through" and returns false:

    def final boolean run(String modelURI, Properties properties) {
        updateConfiguration(properties)
        if (readModel(modelURI)) {
            if (validateResources()) {
                val dslApp = getApplication()
                if (validateApplication(dslApp)) {
                    val app = transformAndModifyApplication(dslApp)
                    if (app != null) {
                        if (generateCode(app) != null) {
                            return true
                        }
                    }
                }
            }
        }
        false
    }

It seems that these workflow steps aren't logging enough to get an idea on what's going wrong.

Please run mvn clean generate-resourceson this project with the verbose attribute set in the configuration of Sculptors Maven plugin (or use the Maven option -X) and attach the debug output of the plugin.

tjuerge added a commit that referenced this issue Jul 9, 2014
@tjuerge
Copy link
Member

tjuerge commented Jul 9, 2014

Please re-run your build using the Sculptor plugin with the improved logging in the workflow introduced in 6df8d09.

@tjuerge tjuerge changed the title "Sculptor code generator failed" without details Generator: "Sculptor code generator failed" without details Jul 9, 2014
@tjuerge
Copy link
Member

tjuerge commented Aug 1, 2014

The documentation of Sculptors Maven plugin provides now a chapter on activating debug logging of Sculptors generator library. Please check if this information is helpful here.

@tjuerge
Copy link
Member

tjuerge commented Aug 3, 2014

Please check if #145 solves this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants