[
https://issues.apache.org/jira/browse/TORQUE-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17695698#comment-17695698
]
Max Philipp Wriedt commented on TORQUE-361:
-------------------------------------------
My fix was to change GroovyScriptOutlet:42 from
{code:java}
private static GroovyShell groovyShell = new GroovyShell(); {code}
to
{code:java}
private static GroovyShell groovyShell = new
GroovyShell(Thread.currentThread().getContextClassLoader()); {code}
as this invokes the GroovyShell including the ClassLoader given by the
Kotlin.class which is started by gradle
> Groovy can't resolve import from ddl scripts
> --------------------------------------------
>
> Key: TORQUE-361
> URL: https://issues.apache.org/jira/browse/TORQUE-361
> Project: Torque
> Issue Type: Bug
> Reporter: Max Philipp Wriedt
> Priority: Major
>
> The GroovyShell invoked at GroovyScriptOutlet.java:42 doesn't get a
> classpath, if i try to start it from a gradle instance. (the generator is
> invoked inside a kotlin.class)
> {code:java}
> Error executing template torque.sql.ddl.database
> org.apache.torque.generator.GeneratorException: Error executing template
> torque.sql.ddl.database
> Caused by: org.apache.torque.generator.GeneratorException: Error executing
> groovy script torque.sql.ddl.database
> Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException:
> startup failed:
> Script1.groovy: 17: unable to resolve cl ass
> org.apache.torque.generator.template.groovy.TorqueGenGroovy
> @ line 17, column 1.
> import org.apache.torque.generator.template.groovy.TorqueGenGroovy
> ^{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]