This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes wsadmin Install problems with MapResRefToEJB - jython Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "wsadmin Install problems with MapResRefToEJB - jython" Watch "wsadmin Install problems with MapResRefToEJB - jython" New topic
Author

wsadmin Install problems with MapResRefToEJB - jython

J Lyons
Greenhorn

Joined: Jan 12, 2012
Posts: 1
Hi,

I'm running Websphere 6.1.0.27 on Redhat Linux 5.1. The example below is from a standalone version not ND.
I'm trying to get an automated installed working for our ear file deployment using jython but I cannot get past the MapResRefToEJB option.

Here is the taskinfo information for the ear with MapResRefToEJB
The current contents of the task after running default bindings are:
Module: COMP Application
EJB:
URI: comp.war,WEB-INF/web.xml
Resource Reference: jdbc/secref
Resource type: javax.sql.DataSource
Target Resource JNDI Name: jdbc/secref
Login configuration name: null
Properties:

Module: COMP Application
EJB:
URI: comp.war,WEB-INF/web.xml
Resource Reference: jdbc/appref
Resource type: javax.sql.DataSource
Target Resource JNDI Name: jdbc/appref
Login configuration name: null
Properties:

I've tried various combos to get AdminApp.install to work but I always get an error:
It's been weeks now and I'm no further along.

example:

AdminApp.install('/home/user/app_6.4.17-C2-27.0.13.ear', ['-MapResRefToEJB',["COMP Application","COMP.war,WEB-INF/web.xml","jdbc/appref", "javax.sql.DataSource","jdbc/db2foapp"]])

Results in :
WASX7015E: Exception running command: "AdminApp.install('/home/user/app_6.4.17-C2-27.0.13.ear', ['-MapResRefToEJB',["COMP Application","comp.war,WEB-INF/web.xml","jdbc/appref", "javax.sql.DataSource","jdbc/db2foapp"]])"; exception information:
java.lang.ClassCastException: java.lang.ClassCastException: java.lang.String incompatible with java.util.List

Does anyone know the correct syntax for this, the example on the IBM website was not much use and it doesnt use javax.sql.datasource.
I only found a couple of examples via google using sql.datasource but ended up more confused.
I also get the cast exception if I only include a single option for -MapResRefToEJB.
I'm a complete begineer with jython and only have a little java (it's not my app, I'm just a linux admin) so any pointers will be appreciated.
I didnt include the secref section in this one because I was trying to simplify it as much as possible but I have tried it and got the same error.

Thanks in advance.

Jlyons
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: wsadmin Install problems with MapResRefToEJB - jython
 
Similar Threads
Can't get connection from DataSource object
Websphere 7.0 in Myeclipse Blue
Error While trying to update Jndi name of resource of deployed application
JBoss Datsource Issue
Problem with connection pooling