One thing i've experienced with eclipse is that it caches some of the classes, plugin configurations. So eventhough u update the plugin or overwrite the existing one it uses this cached information for some reason. I had alot of problems bcos of it. Try using a fresh eclipse installation to try the latest codegen plugin u downloaded (may b with a new workspace also). Hopefully u will get the java.lang.reflect.InvocationTargetException again ;) (which might mean some sort of improvement from yo current situation).

I was kinds busy yesterday so i couldn't look at a solution for the latest codegen plugin to solve the problem. I only had time to test the snapshot to see whether it works. Anyway i checked the existing plugin and to fix the problem u will have to do some work. (this is for "Axis2_Codegen_Wizard_1.3.0")

first copy following two jars to the lib folder of the codegen plugin
       geronimo-stax-api_1.0_spec-1.0.1.jar
       backport-util-concurrent-3.1.jar
(next obvious question... where to find these jars??? check yo maven repo or google for it)

Then you need to update the plugin.xml file to include the runtime classpath for these jars. I'm pasting the updated plugin.xml i used (which worked).

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>

<!--
 ~ Licensed to the Apache Software Foundation (ASF) under one
 ~ or more contributor license agreements. See the NOTICE file
 ~ distributed with this work for additional information
 ~ regarding copyright ownership. The ASF licenses this file
 ~ to you under the Apache License, Version 2.0 (the
 ~ "License"); you may not use this file except in compliance
 ~ with the License. You may obtain a copy of the License at
 ~
 ~ http://www.apache.org/licenses/LICENSE-2.0
 ~
 ~ Unless required by applicable law or agreed to in writing,
 ~ software distributed under the License is distributed on an
 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 ~ KIND, either express or implied. See the License for the
 ~ specific language governing permissions and limitations
 ~ under the License.
 -->

<plugin
  id="Axis2_Codegen_Wizard"
  name="Axis2 Codegen Wizard Plug-in"
  version="1.3.0"
  provider-name="Apache Software Foundation"
  class="org.apache.axis2.tool.codegen.eclipse.plugin.CodegenWizardPlugin">

  <runtime>
     <!--<library name="Axis2CodegenWizard.jar">
        <export name="*"/>
     </library>-->
     <library name=".">
        <export
              name="*">
        </export>
     </library>
     <library name="lib/geronimo-activation_1.1_spec-1.0.1.jar">
        <export name="*"/>
     </library>
     <library name="./lib/geronimo-stax-api_1.0_spec-1.0.1.jar">
        <export name="*"/>
     </library>
     <library name="./lib/backport-util-concurrent-3.1.jar">
        <export name="*"/>
     </library>
     <library name="lib/annogen-0.1.0.jar">
        <export name="*"/>
     </library>
     <library name="lib/ant-1.7.0.jar">
        <export name="*"/>
     </library>
     <library name="lib/axiom-api-1.2.7.jar">
        <export name="*"/>
     </library>
     <library name="lib/axiom-dom-1.2.7.jar">
        <export name="*"/>
     </library>
     <library name="lib/axiom-impl-1.2.7.jar">
        <export name="*"/>
     </library>
     <library name="lib/commons-logging-1.1.1.jar">
        <export name="*"/>
     </library>
      <library name="lib/axis2-1.4.1.jar">
      <export name="*"/>
      </library>
      <library name="lib/log4j-1.2.15.jar">
        <export name="*"/>
     </library>
     <library name="lib/neethi-2.0.4.jar">
        <export name="*"/>
     </library>
     <library name="lib/stax-api-1.0.1.jar">
        <export name="*"/>
     </library>
     <library name="lib/wsdl4j-1.6.2.jar">
        <export name="*"/>
     </library>
     <library name="lib/wstx-asl-3.2.4.jar">
        <export name="*"/>
     </library>
     <library name="lib/xmlbeans-2.3.0.jar">
        <export name="*"/>
     </library>
     <library name="lib/XmlSchema-1.4.2.jar">
        <export name="*"/>
     </library>
     <library name="lib/woden-1.0M8.jar">
        <export name="*"/>
     </library>
     <library name="lib/commons-httpclient-3.1.jar">
        <export name="*"/>
     </library>
     <library name="lib/commons-codec-1.3.jar">
        <export name="*"/>
     </library>
     <library name="lib/jibx-bind-1.1.5.jar">
        <export name="*"/>
     </library>
     <library name="lib/jibx-run-1.1.5.jar">
        <export name="*"/>
     </library>
  </runtime>

  <requires>
     <import plugin="org.eclipse.ui"/>
     <import plugin="org.eclipse.ui.ide"/>
     <import plugin="org.eclipse.core.runtime"/>
     <import plugin="org.eclipse.core.resources"/>
     <import plugin="org.apache.ant"/>
  </requires>

  <extension
        point="org.eclipse.ui.newWizards">
     <category
           name="Axis2 Wizards"
           id="Axis2_Wizards">
     </category>
     <wizard
           name="Axis2 Code Generator"
           icon="icons/icon.gif"
           category="Axis2_Wizards"
           class="org.apache.axis2.tool.codegen.eclipse.CodeGenWizard"
           id="org.apache.axis2.tool.codegen.eclipse.CodeGenWizard">
     </wizard>
  </extension>
   <extension point="org.eclipse.help.toc">
   <toc file="help_toc.xml" primary="true" />
</extension>

</plugin>


dats it.
If you still get the error, try a fresh eclipse as i've mentioned earlier.

good luck,
Saminda



Steve Cohen wrote:
Thanks, both of you, but your advice is, alas too late. If you read carefully what I originally wrote (I admit it's not as clear as it might have been), I no longer even get to the InvocationTargetException, because I can't even get into the Wizard.

I noticed that the plugin code I had was not the most recent, so I removed this plugin from my eclipse plugins directory and downloaded the latest from the site, and placed it back in the plugins directory.

Now the wizard fails immediately upon launch as follows:

The selected wizard could not be started.

Plug-in Axis2_Codegen_Wizard was unable to load class org.apache.axis2.tool.codegen.eclipse.CodeGenWizard



keith chapman wrote:
Saminda,

Is there a way that a user can get this missing jar and add it into the plugin manually instead of doing a maven build? I guess the former is easier for users. :)

Thanks,
Kieth.

On Wed, Oct 1, 2008 at 3:42 PM, Saminda Wijeratne <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi,
    Yes I also noticed the InvocationException on the last release of
    the plugin. This occured due to a missing jar file (missing class
    actually "javax.xml.stream.XMLStreamException"). However the
    snapshot of the plugin works fine.  What you can do is to checkout
    the source
(http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/tool/axis2-eclipse-codegen-plugin/)
    and do a maven build to create the snapshot version of the plugin.
    It works fine for me.

    regards
    saminda.


    Steve Cohen wrote:

        I ran the eclipse plugin wizard to generate Java from a WSDL
        and it failed with

        "An error occurred while completing process -
        java.lang.reflect.InvocationTargetException"

        upon pressing Finish.

        Platform is Ubuntu Linux 7.10
        Eclipse is version 3.3.2

        I noticed that the plugin code I had was not the most recent,
        so I removed this plugin from my eclipse plugins directory and
        downloaded the latest from the site, and placed it back in the
        plugins directory.

        Now the wizard fails immediately upon launch as follows:

        The selected wizard could not be started.

        Plug-in Axis2_Codegen_Wizard was unable to load class
        org.apache.axis2.tool.codegen.eclipse.CodeGenWizard

        Ironically, before I tried using this wizard I was making some
        progress with the command line tool.  I thought this would be
        easier.  Geez.

        Can someone explain what I need to make this plugin work?  Or
        would I be better off just using the command line tool.


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





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




--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


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




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

Reply via email to