[ 
https://issues.apache.org/jira/browse/AXIS2-3351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pat Bateman updated AXIS2-3351:
-------------------------------


Just to check this MOJO was functioning as expected, I ran the JUnit tests for 
the Code2WSDL plug-in, and first got success, but then realised the SureFire 
plug-in hade been configured to skip the tests. This was the 1.3 tagged code 
base.

Once I enabled the tests to run, I got a class a ClassCastException when it was 
trying to convert an Artifact from a String.

If I used a later version of the Maven Test Harness (1.1) I get the same issue 
documented in the bug:-

 <testcase time="0.359" name="testJava">
    <error type="java.lang.NullPointerException">java.lang.NullPointerException
        at 
org.apache.axis2.maven2.java2wsdl.Java2WSDLMojo.fillOptionMap(Java2WSDLMojo.java:304)
        at 
org.apache.axis2.maven2.java2wsdl.Java2WSDLMojo.execute(Java2WSDLMojo.java:324)
        at 
org.apache.axis2.maven2.java2wsdl.Java2WSDLMojoTest.runTest(Java2WSDLMojoTest.java:58)
        at 
org.apache.axis2.maven2.java2wsdl.Java2WSDLMojoTest.testJava(Java2WSDLMojoTest.java:38)
        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:585)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at 
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
        at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        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:585)
        at 
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
        at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
</error>
  </testcase>

Have I got the correct codebase for 1.3?

https://svn.apache.org/repos/asf/webservices/axis2/tags/java/v1.3/modules/tool/axis2-java2wsdl-maven-plugin

> axis2-java2wsdl-maven-plugin axis2-java2wsdl-maven-plugin
> ---------------------------------------------------------
>
>                 Key: AXIS2-3351
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3351
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.3, 1.2
>         Environment: Microsoft XP P2, Java 1.5, Maven 2.07, Axis 1.3
>            Reporter: Pat Bateman
>
> The following POM is producting a NullPointerException when it attempts to 
> resolved the artifacts absolute file. I've gone back to 1.2 to check if it 
> behaves in the same way, and I get the same exception on a different line 
> number. Its the same line if I look at that version.
> My POM is as follows:-
> <plugin>
>                               <groupId>org.apache.axis2</groupId>
>                               
> <artifactId>axis2-java2wsdl-maven-plugin</artifactId>
>                               <version>1.3</version>
>                               <configuration>
>                                       <className>
>                                               
> com.qualcomm.qis.mcs.ws.MCSMgmtWS
>                                       </className>
>                                       <outputFileName>
>                                               
> target/generated-sources/axis2/code2wsdl/MCSMgmtWS.wsdl
>                                       </outputFileName>
>                                       <serviceName>MCSMgmtWS</serviceName>
>                               </configuration>
>                               <executions>
>                                       <execution>
>                                               <!-- Ensure this happens before 
> the wsdl2code -->
>                                               <phase>generate-sources</phase>
>                                               <goals>
>                                                       <goal>java2wsdl</goal>
>                                               </goals>
>                                       </execution>
>                               </executions>
>                               <dependencies>
>                                       <!-- We're dependent on the common 
> project simply to generate the WSDL -->
>                                       <dependency>
>                                               
> <groupId>com.qualcomm.qis.mcs.mcs-ws</groupId>
>                                               
> <artifactId>mcs-ws-common</artifactId>
>                                               <version>0.0.1</version>
>                                       </dependency>
>                               </dependencies>
>                       </plugin>
> The Exception is as follows:-
> [DEBUG] Configuring mojo 
> 'org.apache.axis2:axis2-java2wsdl-maven-plugin:1.3:java2wsdl' -->
> [DEBUG]   (f) className = com.qualcomm.qis.mcs.ws.MCSMgmtWS
> [DEBUG]   (f) extraClasses = [Ljava.lang.String;@45c97b
> [DEBUG]   (f) outputFileName = 
> target/generated-sources/axis2/code2wsdl/MCSMgmtWS.wsdl
> [DEBUG]   (f) package2Namespace = {}
> [DEBUG]   (f) project = [EMAIL PROTECTED]
> [DEBUG]   (f) serviceName = MCSMgmtWS
> [DEBUG] -- end configuration --
> [INFO] [axis2-java2wsdl:java2wsdl {execution: default}]
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] null
> [INFO] 
> ------------------------------------------------------------------------
> [DEBUG] Trace
> java.lang.NullPointerException
>         at 
> org.apache.axis2.maven2.java2wsdl.Java2WSDLMojo.fillOptionMap(Java2WSDLMojo.java:237)
>         at 
> org.apache.axis2.maven2.java2wsdl.Java2WSDLMojo.execute(Java2WSDLMojo.java:324)
>         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:585)
>         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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to