0

I'm trying to install ear file on local Websphere, by Ant Script, but i'm getting this annoying error and the instalation fails.

This is my script.

<taskdef name="wsInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication" />
<target name="installApplication">
        <wsInstallApp ear="${ear.dir}" options="-appname ${name} -CtxRootForWebMod ${install.contextRootName} -BindJndiForEJBNonMessageBinding ${install.resourceJNDI}" failonerror="true" />
</target>

I send the 3 parameters when I call the target from another ant script file and with other tasks like update application or uninstallApplication it works. I need the 3 parameters to set the 3 properties of the installed application, so that seems to be the problem.

This is the error reported.

Buildfile: WasDeployApp.xml

installApplication:

callTask:

installApplication:
[wsInstallApp] Installing Application [C:\Workspace\Deploy\..\Resources\Publish\Application.ear]...
  [wsadmin] WASX7209I: Connected to process "server1" on node CDELO020-2Node01 using SOAP connector;  The type of process is: UnManagedProcess
  [wsadmin] WASX7017E: Exception received while running file "C:\Users\delo020\AppData\Local\Temp\wsant711553899414193403jacl"; exception information: java.lang.ClassCastException: java.lang.ClassCastException: java.lang.String incompatible with java.util.List


BUILD FAILED
C:\Workspace\Deploy\WasDeployApp.xml:22: The following error occurred while executing this line:
C:\Workspace\Deploy\WasDeployApp.xml:12: The following error occurred while executing this line:
C:\Workspace\Deploy\WasDeploy.xml:48: Java returned: 105

Total time: 9 seconds

This is the content of the TEMP ffile refered in the error log.

$AdminApp install C:\Workspace\Deploy\..\Resources\Publish\Application.ear { -appname ApplicationExample -CtxRootForWebMod CtxRootExample -BindJndiForEJBNonMessageBinding facade_App }
$AdminConfig save

I've been strugling with this for some time, but as you can se the log is not very much explicit.

Can someone help me?

Thanks in Advance.

1 Answers1

0

Cause

The cause of this problem is an option in the split properties file that should have been specified using the "options.multi." format but used the singular "options." format. The result is the option should have been passed to wsadmin as a single element list, but it is passed as a string.

You can look into this and this post and follow the instructions to correct the errors which you are getting. Further more you can look into this post which contains the deployment script for WebSphere Application Server.

Community
  • 1
  • 1
Prerak Tiwari
  • 3,436
  • 4
  • 34
  • 64
  • I've come accross those articles but I really did not undestand what I had to do. I undestand I have to change the way It reads the options from single String to List, but I don't know how to do it. Can you be more specific, please? – Sérgio Andaluz Ramos Dec 01 '15 at 14:55
  • @SérgioAndaluzRamos did you try the deployment script which is referenced in my post? – Prerak Tiwari Dec 01 '15 at 16:23