This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Websphere and the fly likes Error While trying to update Jndi name of resource of deployed application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Error While trying to update Jndi name of resource of deployed application" Watch "Error While trying to update Jndi name of resource of deployed application" New topic
Author

Error While trying to update Jndi name of resource of deployed application

Anish mathew
Greenhorn

Joined: Oct 31, 2008
Posts: 9
I Issued the Following command to update the jndi name of data resource of deployed application

wsadmin>$AdminApp update BPCECollector_widNode_server1 modulefile {-operation addupdate -contents Z:\IBM\WID61\pf\wps\config\cells\widCell\applications\BPCEColl
ector_widNode_server1.ear\deployments\BPCECollector_widNode_server1\collector.jar -contenturi collector.jar -nodeployejb -MapResRefToEJB {{"EventTransformer" co
llector collector.jar,META-INF/ejb-jar.xml "jdbc/OBSERVERDB"}}}

But i am getting the following error

java.lang.IndexOutOfBoundsException: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4

Please provide some inputs to this....


Anish Mathew

SCJP 1.4, SCWCD 5.0
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 247

Use


May be this will work..!!
By the way what is the version of WAS you are using??

-Ricky.


Regards, Ricky
Oracle Weblogic 10g Certified Expert
TechPaste.Com
Anish mathew
Greenhorn

Joined: Oct 31, 2008
Posts: 9
Hi Ricky,
I am testing it in WPS Version 6.1.
[ November 04, 2008: Message edited by: ANISH mathew ]
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 247

I am testing it in WPS Version 6.1.

Ok I need to dig out your answer as I had a Jacl project long time ago.
If I get anything I ll get back to you.
Mean while you can try out by your own. If you get any answers then post it here for further viewers reference.

Thanks,
-Ricky
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 247

Hi,

Intro about MapResRefToEJB:
Maps resource references to resources. You must map each resource reference that is defined in your application to a resource. Use this option to provide missing data or to update a task.

Each element of the MapResRefToEJB option consists of the following fields: module, EJB, uri, referenceBinding, resRef.type, JNDI, login.config.name, and auth.props. Of these fields, the following can be assigned values: JNDI, login.config.name, auth.props. The JNDI field is required.

The current contents of the option after running default bindings include:

* Module: deplmtest.jar
* EJB: MailEJBObject
* URI: deplmtest.jar,META-INF/ejb-jar.xml
* Reference binding: jms/MyConnectionFactory
* Resource type: javax.jms.ConnectionFactory
* JNDI name: [jms/MyConnectionFactory]:
* Login Configuration Name: [null]:
* Properties: []:

If the login.config.name is set to DefaultPrincipalMapping, a property is created with the name com.ibm.mapping.authDataAlias . The value of the property is set by the auth.props. If the login.config name is not set to DefaultPrincipalMapping, the auth.props can specify multiple properties. The string format is websphere:name= <name1>,value=<value1>,description=<desc1>. Specify multiple properties using the plus sign (+) .

Use the taskInfo command of the AdminApp object to obtain information about the data that is needed for your application. You need to provide data for rows or entries that are either missing information, or require an update.

Though Its not same but Its ok for your reference.
JACL


JYTHON



Note: All paths are using forward slash instead of backword.

Check the details of your jndi by following command.

Above will give you details about below things:
Check out you have given the details correctly in your query or not.



$AdminApp update BPCECollector_widNode_server1 modulefile {-operation addupdate -contents Z:\IBM\WID61\pf\wps\...

instead use like this:


Hope this will help you.

Thanks,
-Ricky
[ November 05, 2008: Message edited by: Ricky Boxon ]
Anish mathew
Greenhorn

Joined: Oct 31, 2008
Posts: 9
Hi Ricky,
Its working fine.....Thanks a lot.......Below is the code for any who is facing the same problem...


$AdminApp update BPCECollector_widNode_server1 modulefile {-operation addupdate -contents Z:\IBM\WID61\pf\wps\config\cells\widCell\applications\BPCECollector_widNode_server1.ear\deployments\BPCECollector_widNode_server1\collector.jar -contenturi collector.jar -nodeployejb -MapResRefToEJB {{"BPCEventCollector" "EventTransformer" "collector.jar,META-INF/ejb-jar.xml" "jdbc/OBSERVERDB" "javax.sql.DataSource" "jdbc/BPEDB" "" ""}}}

[ November 06, 2008: Message edited by: ANISH mathew ]
[ November 06, 2008: Message edited by: ANISH mathew ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error While trying to update Jndi name of resource of deployed application
 
Similar Threads
Spring Context Error
pyhon/jacl scripts to change the jndi name of datasource of a deployed application
Deploying EAR file in weblogic8.1
WebSphere 6.0.2.9 Delployment Problem
JBoss 4.2.0 and Oracle 10g Configuration Issue with new DataSource