[forge-dev] Hibernate Tools Plugin: Multiple Freemarker Impls?
brian
brianx at vt.edu
Tue Apr 26 09:56:51 EDT 2011
removed the freemarker dependency from hibernate tools:
[INFO] [dependency:tree {execution: default-cli}]
[INFO]
org.jboss.hibernate.forge:hibernate-tools-plugin:jar:1.0.0-SNAPSHOT
[INFO] +- org.jboss.seam.forge:forge-shell-api:jar:1.0.0.Alpha3:compile
[INFO] | +-
org.jboss.seam.forge:forge-parser-java-api:jar:1.0.0.Alpha3:compile
[INFO] | +-
org.jboss.seam.forge:forge-parser-xml:jar:1.0.0.Alpha3:compile
[INFO] | \- javax.enterprise:cdi-api:jar:1.0-SP4:compile
[INFO] | +-
org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.1_spec:jar:1.0.0.Beta1:compile
[INFO] | +- javax.annotation:jsr250-api:jar:1.0:compile
[INFO] | \- javax.inject:javax.inject:jar:1:compile
[INFO] +- org.hibernate:hibernate-tools:jar:3.4.0.CR2-SNAPSHOT:compile
[INFO] | +- org.hibernate:hibernate-core:jar:3.5.6-Final:compile
[INFO] | | +- antlr:antlr:jar:2.7.6:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.1:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] | | \- org.slf4j:slf4j-api:jar:1.5.8:compile
[INFO] | +- org.hibernate:hibernate-annotations:jar:3.5.6-Final:compile
[INFO] | | \-
org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO] | +-
org.hibernate:hibernate-entitymanager:jar:3.5.6-Final:compile
[INFO] | | \- javassist:javassist:jar:3.9.0.GA:compile
[INFO] | +-
org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO] | +- javax.transaction:jta:jar:1.1:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1:compile
[INFO] | | +- log4j:log4j:jar:1.2.12:compile
[INFO] | | +- logkit:logkit:jar:1.0.1:compile
[INFO] | | +- avalon-framework:avalon-framework:jar:4.1.3:compile
[INFO] | | \- javax.servlet:servlet-api:jar:2.3:compile
[INFO] | +- cglib:cglib:jar:2.2:compile
[INFO] | | \- asm:asm:jar:3.1:compile
[INFO] | +- ant:ant:jar:1.6.5:compile
[INFO] | +- freemarker:freemarker:jar:2.3.8:compile
[INFO] | +- org.hibernate:jtidy:jar:r8-20060801:compile
[INFO] | +-
org.eclipse.jdt:org.eclipse.jdt.core:jar:3.2.0-v_671:compile
[INFO] | +- org.eclipse:text:jar:3.2.0-v20060605-1400:compile
[INFO] | | +-
org.eclipse.core:commands:jar:3.3.0-I20070605-0010:compile
[INFO] | | \- org.eclipse.equinox:common:jar:3.3.0-v20070426:compile
[INFO] | \- org.eclipse.core:runtime:jar:3.2.0-v20060603:runtime
[INFO] | +- org.eclipse:osgi:jar:3.3.0-v20070530:runtime
[INFO] | +- org.eclipse.core:jobs:jar:3.3.0-v20070423:runtime
[INFO] | +- org.eclipse.equinox:registry:jar:3.3.0-v20070522:runtime
[INFO] | +-
org.eclipse.equinox:preferences:jar:3.2.100-v20070522:runtime
[INFO] | \-
org.eclipse.core:contenttype:jar:3.2.100-v20070319:runtime
[INFO] +-
org.jboss.seam.forge:forge-j2ee-plugins:jar:1.0.0.Alpha3:compile
[INFO] | +-
org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api:jar:0.1.6:compile
[INFO] | \- org.jboss.spec:jboss-javaee-6.0:pom:1.0.0.CR1:compile
[INFO] | +-
org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.resource:jboss-connector-api_1.5_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar:1.0.0.CR2:compile
[INFO] | | \- javax.xml:jaxrpc-api:jar:1.1:compile
[INFO] | | \- javax.xml.soap:saaj-api:jar:1.3:compile
[INFO] | +-
org.jboss.spec.javax.el:jboss-el-api_2.2_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.security.jacc:jboss-jacc-api_1.4_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.enterprise.deploy:jboss-jad-api_1.2_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.security.auth.message:jboss-jaspi-api_1.0_spec:jar:1.0.0.CR1:compile
[INFO] | +-
org.jboss.spec.javax.xml.registry:jboss-jaxr-api_1.0_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.jms:jboss-jms-api_1.1_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.servlet.jsp:jboss-jsp-api_2.2_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.xml.rpc:jboss-jaxrpc-api_1.1_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.xml.soap:jboss-saaj-api_1.3_spec:jar:1.0.0.Final:compile
[INFO] | +-
org.jboss.spec.javax.xml.ws:jboss-jaxws-api_2.2_spec:jar:1.0.0.Final:compile
[INFO] | +- javax.activation:activation:jar:1.1:compile
[INFO] | +- javax.faces:jsf-api:jar:2.0.2-FCS:compile
[INFO] | +- javax.jws:jsr181-api:jar:1.0-MR1:compile
[INFO] | +- javax.mail:mail:jar:1.4.2:compile
[INFO] | +- javax.servlet:jstl:jar:1.2:compile
[INFO] | +- org.jboss.resteasy:jaxrs-api:jar:2.0.0.GA:compile
[INFO] | +- stax:stax-api:jar:1.0.1:compile
[INFO] | \- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] +- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.0.0-alpha-12:compile
[INFO] \-
org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.0.0-alpha-12:test
[INFO] \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.0.0-alpha-12:test
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 minute 10 seconds
[INFO] Finished at: Mon Apr 25 12:59:43 EDT 2011
[INFO] Final Memory: 19M/158M
if i'm reading this right, freemarker 2.3.8 is included in the [INFO] +-
org.hibernate:hibernate-tools:jar:3.4.0.CR2-SNAPSHOT:compile
but then:
[ForgeJpaProject] ForgeJpaProject $ forge
source-plugin /apps/src/brianxlong-plugin-hibernate-tools-2f38225/
***INFO*** Invoking build with underlying build system.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for
org.jboss.hibernate.forge:hibernate-tools-plugin:jar:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 60,
column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.
[WARNING]
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building hibernate-tools-plugin 1.0.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @
hibernate-tools-plugin ---
[INFO]
Deleting /apps/src/brianxlong-plugin-hibernate-tools-2f38225/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
hibernate-tools-plugin ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
hibernate-tools-plugin ---
[WARNING] File encoding has not been set, using platform encoding UTF-8,
i.e. build is platform dependent!
[INFO] Compiling 1 source file
to /apps/src/brianxlong-plugin-hibernate-tools-2f38225/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources
(default-testResources) @ hibernate-tools-plugin ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing
resourceDirectory /apps/src/brianxlong-plugin-hibernate-tools-2f38225/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile)
@ hibernate-tools-plugin ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @
hibernate-tools-plugin ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @
hibernate-tools-plugin ---
[INFO] Building
jar: /apps/src/brianxlong-plugin-hibernate-tools-2f38225/target/hibernate-tools-plugin-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-shade-plugin:1.4:shade (default) @
hibernate-tools-plugin ---
[INFO] Excluding org.jboss.seam.forge:forge-shell-api:jar:1.0.0.Alpha3
from the shaded jar.
[INFO] Excluding
org.jboss.seam.forge:forge-parser-java-api:jar:1.0.0.Alpha3 from the
shaded jar.
[INFO] Excluding org.jboss.seam.forge:forge-parser-xml:jar:1.0.0.Alpha3
from the shaded jar.
[INFO] Excluding javax.enterprise:cdi-api:jar:1.0-SP4 from the shaded
jar.
[INFO] Excluding
org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.1_spec:jar:1.0.0.Beta1 from the shaded jar.
[INFO] Excluding javax.annotation:jsr250-api:jar:1.0 from the shaded
jar.
[INFO] Excluding javax.inject:javax.inject:jar:1 from the shaded jar.
[INFO] Including org.hibernate:hibernate-tools:jar:3.4.0.CR2-SNAPSHOT in
the shaded jar.
[INFO] Including org.hibernate:hibernate-core:jar:3.5.6-Final in the
shaded jar.
[INFO] Including antlr:antlr:jar:2.7.6 in the shaded jar.
[INFO] Excluding commons-collections:commons-collections:jar:3.1 from
the shaded jar.
[INFO] Including dom4j:dom4j:jar:1.6.1 in the shaded jar.
[INFO] Excluding xml-apis:xml-apis:jar:1.0.b2 from the shaded jar.
[INFO] Excluding org.slf4j:slf4j-api:jar:1.5.8 from the shaded jar.
[INFO] Including org.hibernate:hibernate-annotations:jar:3.5.6-Final in
the shaded jar.
[INFO] Including
org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final in the
shaded jar.
[INFO] Including org.hibernate:hibernate-entitymanager:jar:3.5.6-Final
in the shaded jar.
[INFO] Excluding javassist:javassist:jar:3.9.0.GA from the shaded jar.
[INFO] Excluding
org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final
from the shaded jar.
[INFO] Excluding javax.transaction:jta:jar:1.1 from the shaded jar.
[INFO] Excluding commons-logging:commons-logging:jar:1.1 from the shaded
jar.
[INFO] Excluding log4j:log4j:jar:1.2.12 from the shaded jar.
[INFO] Excluding logkit:logkit:jar:1.0.1 from the shaded jar.
[INFO] Excluding avalon-framework:avalon-framework:jar:4.1.3 from the
shaded jar.
[INFO] Excluding javax.servlet:servlet-api:jar:2.3 from the shaded jar.
[INFO] Excluding cglib:cglib:jar:2.2 from the shaded jar.
[INFO] Excluding asm:asm:jar:3.1 from the shaded jar.
[INFO] Excluding ant:ant:jar:1.6.5 from the shaded jar.
[INFO] Including freemarker:freemarker:jar:2.3.8 in the shaded jar.
[INFO] Including org.hibernate:jtidy:jar:r8-20060801 in the shaded jar.
[INFO] Excluding org.eclipse.jdt:org.eclipse.jdt.core:jar:3.2.0-v_671
from the shaded jar.
[INFO] Excluding org.eclipse:text:jar:3.2.0-v20060605-1400 from the
shaded jar.
[INFO] Excluding org.eclipse.core:commands:jar:3.3.0-I20070605-0010 from
the shaded jar.
[INFO] Excluding org.eclipse.core:runtime:jar:3.2.0-v20060603 from the
shaded jar.
[INFO] Excluding org.eclipse:osgi:jar:3.4.3.R34x_v20081215-1030 from the
shaded jar.
[INFO] Excluding org.eclipse.core:jobs:jar:3.3.0-v20070423 from the
shaded jar.
[INFO] Excluding org.eclipse.equinox:registry:jar:3.3.0-v20070522 from
the shaded jar.
[INFO] Excluding org.eclipse.equinox:preferences:jar:3.2.100-v20070522
from the shaded jar.
[INFO] Excluding org.eclipse.core:contenttype:jar:3.2.100-v20070319 from
the shaded jar.
[INFO] Excluding org.eclipse.equinox:common:jar:3.2.0-v20060603 from the
shaded jar.
[INFO] Excluding
org.jboss.seam.forge:forge-j2ee-plugins:jar:1.0.0.Alpha3 from the shaded
jar.
[INFO] Excluding
org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api:jar:0.1.6
from the shaded jar.
[INFO] Excluding org.jboss.spec:jboss-javaee-6.0:pom:1.0.0.CR1 from the
shaded jar.
[INFO] Excluding
org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar:1.0.0.Final from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.resource:jboss-connector-api_1.5_spec:jar:1.0.0.Final from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar:1.0.0.CR2 from the
shaded jar.
[INFO] Excluding javax.xml:jaxrpc-api:jar:1.1 from the shaded jar.
[INFO] Excluding javax.xml.soap:saaj-api:jar:1.3 from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.el:jboss-el-api_2.2_spec:jar:1.0.0.Final from the
shaded jar.
[INFO] Excluding
org.jboss.spec.javax.security.jacc:jboss-jacc-api_1.4_spec:jar:1.0.0.Final from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.enterprise.deploy:jboss-jad-api_1.2_spec:jar:1.0.0.Final from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.security.auth.message:jboss-jaspi-api_1.0_spec:jar:1.0.0.CR1 from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.xml.registry:jboss-jaxr-api_1.0_spec:jar:1.0.0.Final from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.jms:jboss-jms-api_1.1_spec:jar:1.0.0.Final from the
shaded jar.
[INFO] Excluding
org.jboss.spec.javax.servlet.jsp:jboss-jsp-api_2.2_spec:jar:1.0.0.Final
from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar:1.0.0.Final
from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec:jar:1.0.0.Final
from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.xml.rpc:jboss-jaxrpc-api_1.1_spec:jar:1.0.0.Final
from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.xml.soap:jboss-saaj-api_1.3_spec:jar:1.0.0.Final
from the shaded jar.
[INFO] Excluding
org.jboss.spec.javax.xml.ws:jboss-jaxws-api_2.2_spec:jar:1.0.0.Final
from the shaded jar.
[INFO] Excluding javax.activation:activation:jar:1.1 from the shaded
jar.
[INFO] Excluding javax.faces:jsf-api:jar:2.0.2-FCS from the shaded jar.
[INFO] Excluding javax.jws:jsr181-api:jar:1.0-MR1 from the shaded jar.
[INFO] Excluding javax.mail:mail:jar:1.4.2 from the shaded jar.
[INFO] Excluding javax.servlet:jstl:jar:1.2 from the shaded jar.
[INFO] Excluding org.jboss.resteasy:jaxrs-api:jar:2.0.0.GA from the
shaded jar.
[INFO] Excluding stax:stax-api:jar:1.0.1 from the shaded jar.
[INFO] Excluding javax.validation:validation-api:jar:1.0.0.GA from the
shaded jar.
[INFO] Excluding org.jboss.shrinkwrap:shrinkwrap-api:jar:1.0.0-alpha-12
from the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO]
Replacing /apps/src/brianxlong-plugin-hibernate-tools-2f38225/target/hibernate-tools-plugin-1.0.0-SNAPSHOT.jar with /apps/src/brianxlong-plugin-hibernate-tools-2f38225/target/hibernate-tools-plugin-1.0.0-SNAPSHOT-shaded.jar
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 6.622s
[INFO] Finished at: Mon Apr 25 16:38:40 EDT 2011
[INFO] Final Memory: 23M/188M
[INFO]
------------------------------------------------------------------------
***SUCCESS*** Build successful.
***INFO*** Installing plugin artifact.
Wrote /home/brianx/.forge/plugins/org.jboss.hibernate.forge
$hibernate-tools-plugin$1$1.0.0-SNAPSHOT.jar
***SUCCESS*** Installed from [brianxlong-plugin-hibernate-tools-2f38225]
successfully.
Exception in thread "Thread-16" java.lang.NoClassDefFoundError:
freemarker/ext/jdom/NodeListModel$JDOMXPathEx
at java.lang.Class.getDeclaringClass(Native Method)
at java.lang.Class.getEnclosingClass(Class.java:1085)
at java.lang.Class.getSimpleBinaryName(Class.java:1220)
at java.lang.Class.getSimpleName(Class.java:1112)
at java.lang.Class.isAnonymousClass(Class.java:1188)
at
org.jboss.weld.introspector.jlr.WeldClassImpl.isAnonymousClass(WeldClassImpl.java:445)
at
org.jboss.weld.bootstrap.AbstractBeanDeployer.isTypeManagedBeanOrDecoratorOrInterceptor(AbstractBeanDeployer.java:295)
at
org.jboss.weld.bootstrap.BeanDeployer.createBeans(BeanDeployer.java:143)
at
org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:216)
at
org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:364)
at org.jboss.weld.environment.se.Weld.initialize(Weld.java:87)
at org.jboss.seam.forge.shell.Bootstrap$2.run(Bootstrap.java:89)
at java.lang.Thread.run(Thread.java:619)
note "[INFO] Including freemarker:freemarker:jar:2.3.8 in the shaded
jar."
i need to get that 2.3.8 updated to 2.3.16, i think.
On Mon, 2011-04-25 at 12:00 -0400, Lincoln Baxter, III wrote:
> It's possible that the shade include is too liberal, and things are
> getting overlapped just from that, but...
>
> The first thing I would try is this:
>
> cd plugin-hibernate-tools/
> mvn dependency:tree
>
> That will tell maven to dump out a list of all dependencies and what
> included them. If you see multiple freemarker impls, then we can go
> from there. If not, it's possible the shade config is messing things
> up, in which case we will need to work on an alternative bundling
> strategy. Forge does not bundle Freemarker, so that shouldn't be the
> issue.
>
> ~Lincoln
>
>
>
> On Mon, Apr 25, 2011 at 11:45 AM, brian <brianx at vt.edu> wrote:
>
> dude i'm stuck. i don't know shade, and i'm getting what
> looks like
> classloader issues with freemarker... looks like my plugin is
> getting
> freemarker 2.3.8 included from somewhere... and i've added
> (per
> freemarker specs) 2.3.16 to the hibernate-tools plugin pom.
> both build
> clean when built separately but sourcing the hib-tools plugin
> gives what
> looks like a classloader problem:
>
> ***SUCCESS*** Build successful.
> ***INFO*** Installing plugin artifact.
> Wrote /home/brianx/.forge/plugins/
> org.jboss.hibernate.forge
> $hibernate-tools-plugin$1$1.0.0-SNAPSHOT.jar
> ***SUCCESS*** Installed from
> [brianxlong-plugin-hibernate-tools-2f38225]
> successfully.
> Exception in thread "Thread-32"
> com.google.common.collect.ComputationException:
> java.lang.IllegalAccessError: tried to access class
> freemarker.ext.beans.MethodMap from class
> freemarker.ext.beans.MethodMap
> $ClassString
>
> ...the build from my new plugin says that it is excluding
> freemarker
> 2.3.8 (means included somewhere else - i think in the base
> forge
> build)?
>
> so i need to rebuild forge?
>
>
> --
> Lincoln Baxter, III
> http://ocpsoft.com
> http://scrumshark.com
> "Keep it Simple"
More information about the forge-dev
mailing list