[
https://issues.jboss.org/browse/FORGE-1261?page=com.atlassian.jira.plugin...
]
Thomas Maslen commented on FORGE-1261:
--------------------------------------
Here is a pretty minimal repro that works (well, successfully fails) for me.
To get the cleanest environment I could, I ran Forge 1.4.1 standalone (not in Eclipse) and
started with a freshly created empty directory that hadn't been touched by Forge
before.
In that directory, starting from my shell (ye olde Windows cmd.exe) with FORGE_HOME,
JAVA_HOME and PATH configured (Forge 1.4.1, JDK 1.6.0_45), I executed "forge",
"new-project --named repro-1261", and "rest setup" (see below for a
cut-and-paste of the log). At that point "rest setup" failed with the same
exception I initially noted against "rest endpoint-from-entity".
Herewith a cheesy cut-and-paste of the terminal log:
C:\Users\Administrator>mkdir forge-repro-1261
C:\Users\Administrator>cd forge-repro-1261
C:\Users\Administrator\forge-repro-1261>forge
_____
| ___|__ _ __ __ _ ___
| |_ / _ \| `__/ _` |/ _ \ \\
| _| (_) | | | (_| | __/ //
|_| \___/|_| \__, |\___|
|___/
JBoss Forge, version [ 1.4.1.Final ] - JBoss, by Red Hat, Inc. [
http://forge.jboss.org ]
[no project] forge-repro-1261 $ new-project --named repro-1261
? Use [C:\Users\Administrator\forge-repro-1261\repro-1261] as project directory? [Y/n]
***SUCCESS*** Created project [repro-1261] in new working directory
[C:\Users\Administrator\forge-repro-1261\repro-1261]
Wrote C:\Users\Administrator\forge-repro-1261\repro-1261
Wrote C:\Users\Administrator\forge-repro-1261\repro-1261\pom.xml
Wrote C:\Users\Administrator\forge-repro-1261\repro-1261\src\main\java
Wrote C:\Users\Administrator\forge-repro-1261\repro-1261\src\test\java
Wrote C:\Users\Administrator\forge-repro-1261\repro-1261\src\main\resources
Wrote C:\Users\Administrator\forge-repro-1261\repro-1261\src\test\resources
Wrote
C:\Users\Administrator\forge-repro-1261\repro-1261\src\main\java\com\example\repro1261
[repro-1261] repro-1261 $ rest setup
***ERROR*** Exception encountered: org.apache.log4j.Priority from [Module
"org.freemarker:main" from local module loader @43462851 (roots:
C:\Users\Administrato
r\forge-distribution-1.4.1.Final\forge-distribution-1.4.1.Final\modules,C:\Users\Administrator\.forge\plugins,C:\Users\Administrator\forge-repro-1261)]
(type "set VERBOSE true" to enable stack traces)
[repro-1261] repro-1261 $
"rest endpoint-from-entity" fails, ClassNotFoundException:
org.apache.log4j.Priority
------------------------------------------------------------------------------------
Key: FORGE-1261
URL:
https://issues.jboss.org/browse/FORGE-1261
Project: Forge
Issue Type: Bug
Components: Plugin API
Affects Versions: 1.4.1.Final
Environment: (Environment-independent, but...) JDK 1.6.0_45, Windows Server 2008
R2
Reporter: Thomas Maslen
Priority: Minor
Summary: the org.freemarker module should express a dependency on org.apache.log4j but
doesn't
Workaround: edit modules/org/freemarker/main/module.xml and add the dependency
The long version:
"rest endpoint-from-entity" works fine in the version of Forge that is bundled
in JBoss Tools 4.1 (Forge 1.3.3).
However, the DTO-based functionality added in FORGE-1060 looked tasty, so I downloaded
Forge 1.4.1 and took it for a spin.
Regardless of whether I run 1.4.1 standalone or within JBoss Tools (Eclipse), "rest
endpoint-from-entity" fails with
java.lang.ClassNotFoundException: org.apache.log4j.Priority from [Module
"org.freemarker:main"
(I have a complete stack trace but it doesn't add anything profound).
Once I edited modules/org/freemarker/main/module.xml and added a dependency for the
"org.apache.log4j" class, "rest endpoint-from-entity" ran happily and
generated the expected classes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira