Topic
10 replies Latest Post - ‏2013-05-17T03:22:00Z by MikeC711
SystemAdmin
SystemAdmin
37422 Posts
ACCEPTED ANSWER

Pinned topic WSAdmin Ant Task Problem

‏2007-11-02T15:42:17Z |
Hi Guys!

I am trying to get an automated deployment script to run in Websphere 6.1 and failing miserably. I get the following output:

wsadmin WASX7209I: Connected to process "server1" on node RDGD5223Node01 using SOAP connector; The type of process is: UnManagedProcess
wsadmin WASX7015E: Exception running command: "$AdminApp install C:/AutoDeploy/tmp2/xxx.ear {-appname xxx-deployejb -usedefaultbindings}"; exception information:
wsadmin com.ibm.websphere.management.application.client.AppDeploymentException: AppDeploymentException: null
wsadmin java.lang.ClassCastException: org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl incompatible with org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile
wsadmin java.lang.ClassCastException: java.lang.ClassCastException: org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl incompatible with org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile
wsadmin

BUILD FAILED

The error seems to be

java.lang.ClassCastException: org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl incompatible with org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile

But I have no idea what this means!! Am tearing my hair out trying to figure out what I need to do to make this work. My ant code looks like this:

<wsadmin washome="${was.home}" properties="${wasProfile}/properties/wsadmin.properties"
command="$AdminApp install ${project.working.dir}/${module.name}.ear {-appname ${module.name} -deployejb -usedefaultbindings}" failonerror="true">
</wsadmin>

Any support would be greatly appreciated!

Thanks

djhope
Updated on 2009-02-05T06:05:03Z at 2009-02-05T06:05:03Z by SystemAdmin
  • Wes_Clark
    Wes_Clark
    6 Posts
    ACCEPTED ANSWER

    Re: WSAdmin Ant Task Problem

    ‏2008-01-07T21:44:11Z  in response to SystemAdmin
    I just ran into the same problem. Did you find the cause and the fix?
    • SystemAdmin
      SystemAdmin
      37422 Posts
      ACCEPTED ANSWER

      Re: WSAdmin Ant Task Problem

      ‏2008-02-07T21:08:57Z  in response to Wes_Clark
      Hi,

      I was wondering if you found a solution to this?

      Thanks so much!

      Bob
  • DDeFer
    DDeFer
    1 Post
    ACCEPTED ANSWER

    Re: WSAdmin Ant Task Problem

    ‏2008-02-08T16:01:15Z  in response to SystemAdmin
    Same problem here when attemtping to use an ear file exported from RAD7.0 sandbox to a lab server. Any info?
  • SystemAdmin
    SystemAdmin
    37422 Posts
    ACCEPTED ANSWER

    Re: WSAdmin Ant Task Problem

    ‏2008-02-20T19:24:27Z  in response to SystemAdmin
    I'm not sure how helpful this will be since you are working with a deployment script, but I was getting the same ClassCastException when trying to publish an EAR to my server (WAS6.1) from within Rational Application Developer and I was able to correct it by cleaning my server. I did this by right-clicking on my server (in RAD) and selecting the "Clean" command, which discards all published projects and republishes them from scratch. I'm not sure what the script equivalent of this would be, but hopefully this is somewhat helpful to you.
    • SystemAdmin
      SystemAdmin
      37422 Posts
      ACCEPTED ANSWER

      Re: WSAdmin Ant Task Problem

      ‏2009-02-05T06:05:03Z  in response to SystemAdmin
      Hi Sean,

      Te solution which you posted I tried doing that but still I am stuck up with the same problem :( Can you help me out further.
  • SystemAdmin
    SystemAdmin
    37422 Posts
    ACCEPTED ANSWER

    Re: WSAdmin Ant Task Problem

    ‏2008-04-17T11:56:39Z  in response to SystemAdmin
    Hello

    Currently I work on EJB 3.0 with RAD 7.5 beta.

    I had the same problem and I solved it by generating the deployment descriptor.
    Indeed, when I created my EJB project, I hadn't selected the property "Generate the deployment descriptor".
    So I generated the deployment descriptor (right click on the project -> Java EE -> Generate deployment descriptor)
    and the ClassCastException disappeared.

    Perhaps this will help you, if somebody know more about this thanks to post.
    • SystemAdmin
      SystemAdmin
      37422 Posts
      ACCEPTED ANSWER

      Re: WSAdmin Ant Task Problem

      ‏2008-04-22T16:25:29Z  in response to SystemAdmin
      The name of the meta-inf directory is case-sensitive and must be META-INF. That's what caused the problem in my case. Changing it to upper-case letters solved the problem for me.

      Cheers,
      Sven
      • SystemAdmin
        SystemAdmin
        37422 Posts
        ACCEPTED ANSWER

        Re: WSAdmin Ant Task Problem

        ‏2008-09-08T17:21:53Z  in response to SystemAdmin
        I have the following automatic deployment Ant script for websphere application server v6.1. All the wsadmin commands used in the below target are exectuted correctly when ran from command control on windows platform.
        When I run this ant target I dont get any error but either any of the wsadmin tasks are not executed. It doen't throw any error, the console says BUILD SUCCESSFUL.
        Any idea what wrong I have dont below. I would be really grateful.

        <target name="install">
        <echo message="Beginning installation" />
        <!-- wasStartServer server="server1"/ -->
        <echo message="was.home =C:/RAD7/runtimes/base_v61"/>

        <property name="was.home" value="C:/RAD7/runtimes/base_v61"/>
        <property name="user.install.root" value="C:/RAD7/runtimes/base_v61"/>

        <taskdef name="wsadmin" classname="com.ibm.websphere.ant.tasks.WsAdmin"/>

        <taskdef name="wsStartApp" classname="com.ibm.websphere.ant.tasks.StartApplication" />

        <taskdef name="wasStartServer" classname="com.ibm.websphere.ant.tasks.StartServer" />

        <!-- wsadmin script="C:/RAD7/runtimes/base_v61/bin/uninstall.jacl -lang jacl" washome="${was.home}"/ -->
        <wsadmin command="$AdminApp install C:/workspace/HMS_RAD7.0/HMS3Web/HMS.ear -lang jacl" washome="${was.home}"/>
        <wsadmin command="$AdminApp save -lang jacl" washome="${was.home}" />
        <wsadmin command="$AdminControl invoke $AdminControl queryNames type=ApplicationManager,* startApplication MyAppName -lang jacl" washome="${was.home}"/>
        </target>
        • SystemAdmin
          SystemAdmin
          37422 Posts
          ACCEPTED ANSWER

          Re: WSAdmin Ant Task Problem

          ‏2008-09-08T17:23:18Z  in response to SystemAdmin
          <target name="install">
          <echo message="Beginning installation" />
          <!-- wasStartServer server="server1"/ -->
          <echo message="was.home =C:/RAD7/runtimes/base_v61"/>

          <property name="was.home" value="C:/RAD7/runtimes/base_v61"/>
          <property name="user.install.root" value="C:/RAD7/runtimes/base_v61"/>

          <taskdef name="wsadmin" classname="com.ibm.websphere.ant.tasks.WsAdmin"/>

          <taskdef name="wsStartApp" classname="com.ibm.websphere.ant.tasks.StartApplication" />

          <taskdef name="wasStartServer" classname="com.ibm.websphere.ant.tasks.StartServer" />

          <!-- wsadmin script="C:/RAD7/runtimes/base_v61/bin/uninstall.jacl -lang jacl" washome="${was.home}"/ -->
          <wsadmin command="$AdminApp install C:/workspace/HMS_RAD7.0/HMS3Web/HMS.ear -lang jacl" washome="${was.home}"/>
          <wsadmin command="$AdminApp save -lang jacl" washome="${was.home}" />
          <wsadmin command="$AdminControl invoke $AdminControl queryNames type=ApplicationManager,* startApplication MyAppName -lang jacl" washome="${was.home}"/>
          </target>
    • MikeC711
      MikeC711
      4 Posts
      ACCEPTED ANSWER

      Re: WSAdmin Ant Task Problem

      ‏2013-05-17T03:22:00Z  in response to SystemAdmin

      FYI: I've been having a similar situation with a deploy to 6.1 for some time (low prio so I kept coming back to it and banging my head against the wall.  Your post fixed my problem.  THANKS.  Of course, you also took away a good excuse ... but that's a different story.