-
1. Re: Weld-SE maven generated jar problem
gvagenas Jan 4, 2012 3:35 PM (in response to gvagenas)Turns out that the problem was the classpath in the MANIFEST.MF, after fixing it everything is fine.
Thanks.
-
2. Re: Weld-SE maven generated jar problem
as6o Aug 20, 2012 2:57 PM (in response to gvagenas)How exactly did you fix this? When I run the packaged jar I'm seeing a bunch of errors that look like the following:
295 [main] INFO org.jboss.weld.Bootstrap - WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
663 [main] INFO org.jboss.weld.ClassLoading - WELD-000119 Not generating any bean definitions from org.jboss.weld.injection.spi.helpers.ForwardingJpaInjectionServices because of underlying class loading error
666 [main] INFO org.jboss.weld.ClassLoading - WELD-000119 Not generating any bean definitions from org.jboss.weld.injection.spi.JpaInjectionServices because of underlying class loading error
...
and at the end of it all I see:
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/Scope
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.getEnclosingMethod0(Native Method)
at java.lang.Class.getEnclosingMethodInfo(Unknown Source)
at java.lang.Class.getEnclosingClass(Unknown Source)
at java.lang.Class.getSimpleBinaryName(Unknown Source)
at java.lang.Class.isMemberClass(Unknown Source)
at org.jboss.weld.util.reflection.Reflections.isNonStaticInnerClass(Reflections.java:139)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:78)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:123)
at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:184)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:350)
at org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.deployBeans(ForwardingBootstrap.java:70)
at org.jboss.weld.environment.se.Weld.initialize(Weld.java:133)
at archiver.main(Archiver.java:62)
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.config.Scope
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 25 more
But I'm not using Spring and it isn't in my project at all (neither via the pom or run configurations). This app runs fine in Eclipse. I'm using maven-shade-plugin to build an executable jar with dependencies.
-Aaron
-
3. Re: Weld-SE maven generated jar problem
usul_ Aug 29, 2012 4:03 AM (in response to as6o)Hi I'm interested too !!
I have quite the same problem, my project launch via eclipse is good but when I package my jar with maven, I have several NoClassDefFoundError.
I have tried even with assembly plugin and jar with dependencies or with the shade plugin.
usul
-
4. Re: Weld-SE maven generated jar problem
gvagenas Sep 4, 2012 4:48 AM (in response to usul_)You should check classpath entries in the MANIFEST.MF