cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: how to resolve Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/velocity/context/Context
Date Tue, 23 Aug 2011 18:25:38 GMT

To use the code generation stuff, you would need to have Velocity on the 
classpath.   Just add:
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity</artifactId>
                <version>1.7</version>
            </dependency>

and that should do it.

Dan


On Saturday, August 20, 2011 6:32:04 PM Amine El idrissi wrote:
> I'm a newby in using apache cxf.
> so i tried to run the program CodeGenerator.java( look attached file) as
> java application, but i get the following exception:
> 20 août 2011 18:18:17 org.apache.cxf.tools.wsdlto.core.PluginLoader
> loadPlugin
> INFO: Replaced default databinding jaxb
> 20 août 2011 18:18:17 org.apache.cxf.tools.wsdlto.core.PluginLoader
> loadPlugin
> INFO: Replaced default frontend jaxws
> 20 août 2011 18:18:17 org.apache.cxf.tools.wsdlto.core.PluginLoader
> loadPlugin
> INFO: Replaced default frontend jaxws21
> 20 août 2011 18:18:17 org.apache.cxf.tools.wsdlto.core.PluginLoader
> loadPlugin
> INFO: Replaced default databinding xmlbeans
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/velocity/context/Context
> at
> org.apache.cxf.tools.wsdlto.core.AbstractGenerator.<init>(AbstractGenerator.
> java:46) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.AbstractJAXWSGenerator
> .<init>(AbstractJAXWSGenerator.java:30) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.AntGenerator.<init>(An
> tGenerator.java:45) at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
> sorImpl.java:39) at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
> torAccessorImpl.java:27) at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513) at
> java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at
> org.apache.cxf.tools.wsdlto.core.PluginLoader.getFrontEndGenerators(PluginLo
> ader.java:265) at
> org.apache.cxf.tools.wsdlto.core.PluginLoader.getFrontEndProfile(PluginLoade
> r.java:381) at
> org.apache.cxf.tools.wsdlto.WSDLToJava.loadFrontEnd(WSDLToJava.java:64) at
> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:96)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
> at main.java.com.ttdev.CodeGenerator.main(CodeGenerator.java:11)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.velocity.context.Context
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> ... 16 more
> so Could you please help me to resolve it.
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Mime
View raw message