axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject Re: ClassNotFoundException at java2wsdl
Date Fri, 03 Aug 2007 12:36:07 GMT
Christian,

Can you please zip up the whole project and create a JIRA bug report?

thanks,
dims

On 8/3/07, Christian Oloff <christiano@in-forms.co.za> wrote:
> Hi,
>
> while trying to get java2wsdl as part of a small maven2 project up and
> running, I got stuck with the following issues. (Please note that I am
> quite new to axis.)
>
> 1) The links to download axis2-java2wsdl-maven-plugin-1.2.jar on
> http://ws.apache.org/axis2/tools/index.html point to nothing right now,
> even the backup mirror answers '404'. Can someone take care of this (or
> am I doing something wrong here)?
>
> 2) When not trying to download but let maven sort out how to get the
> plugin, I get a ClassNotFoundException about the class implementing the
> service.
>
> See below for my configuration details.
>
> Any help appreciated!
>
> Best regards,
> Chris
>
> ====
>
> My pom.xml contains the following:
>         <plugin>
>             <groupId>org.apache.axis2.maven2</groupId>
>             <artifactId>axis2-java2wsdl-maven-plugin</artifactId>
>             <configuration>
>               <className>pojoservice.MyService</className>
>             </configuration>
>             <executions>
>               <execution>
>                 <goals>
>                   <goal>java2wsdl</goal>
>                 </goals>
>               </execution>
>             </executions>
>         </plugin>
>
> The full mvn output when getting the ClassNotFoundException looks as
> follows:
> user@host:~/myservice$ mvn -o package
> [INFO]
> NOTE: Maven is executing in offline mode. Any artifacts not already in
> your local
> repository will be inaccessible.
>
> [INFO] Scanning for projects...
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Building Unnamed - chris-test:wesemo-pojoservice:jar:0.0.1-SNAPSHOT
> [INFO]    task-segment: [package]
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] [axis2-java2wsdl:java2wsdl {execution: default}]
> java.lang.Exception: java.lang.ClassNotFoundException: pojoservice.MyService
>         at
> org.apache.ws.java2wsdl.Java2WSDLCodegenEngine.generate(Java2WSDLCodegenEngine.java:58)
>         at
> org.apache.axis2.maven2.java2wsdl.Java2WSDLMojo.execute(Java2WSDLMojo.java:146)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.ClassNotFoundException: pojoservice.MyService
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at
> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
>         at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
>         at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
>         at
> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at
> org.apache.ws.java2wsdl.Java2WSDLUtils.namespaceFromClassName(Java2WSDLUtils.java:63)
>         at
> org.apache.ws.java2wsdl.Java2WSDLUtils.schemaNamespaceFromClassName(Java2WSDLUtils.java:82)
>         at
> org.apache.ws.java2wsdl.Java2WSDLBuilder.getSchemaTargetNamespace(Java2WSDLBuilder.java:56)
>         at
> org.apache.ws.java2wsdl.Java2WSDLBuilder.generateWSDL(Java2WSDLBuilder.java:152)
>         at
> org.apache.ws.java2wsdl.Java2WSDLCodegenEngine.generate(Java2WSDLCodegenEngine.java:56)
>         ... 19 more
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] java.lang.ClassNotFoundException: pojoservice.MyService
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Aug 03 13:53:46 CEST 2007
> [INFO] Final Memory: 4M/9M
> [INFO]
> ------------------------------------------------------------------------
>
> uname -a
> Linux gw4 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686
> GNU/Linux
>
> user@host:~/myservice$ less src/main/java/pojoservice/MyService.java
> package pojoservice;
>
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.kwantu.wesemo.Model;
> import org.kwantu.wesemo.WesemoException;
>
> public class MyService {
>
>         private static final Log log = LogFactory.getLog(MyService.class);
>
>         private Model model = new Model();
>
>         public void createTable(String name) /* throws WesemoException */ {
>                 try {
>                         model.createTable(name);
>                         log.info("table " + name + " created.");
>                 } catch (WesemoException e) {
>                         // TODO Auto-generated catch block
>                         e.printStackTrace();
>                         log.error(e.getMessage());
>                 }
>         }
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message