1

I have a jython script to create a server, deploy and application and then start the server.

But I am geeting the following exception while running it.

WASX7017E: Exception received while running file "myfile.py"; exception information: javax.management.MBeanException[[ com.ibm.websphere.management.exception.AdminException: Server, SERVERNAME, not found.

Here is the entire code... http://snipt.org/BMaf4

Update: He is the entire log http://snipt.org/BNZ1

Can't figure out where I am going wrong.

But When I am issuing a start all servers in wsadminlib.. the server gets started

Debajyoti Das
  • 2,038
  • 4
  • 34
  • 66
  • 1
    Is this the entire output? Otherwise it would probably help if you could add that as well as it would be easier to see where in your script you get the exception. – DanielBarbarian Jan 13 '14 at 12:59
  • @DanielBarbarian I have added the entire shell output. – Debajyoti Das Jan 13 '14 at 13:04
  • Can't see anything obvious other than it seems like the log output you provided does not seem to match the script entirely. I assume this is because you have made many attempts. It just makes it a bit harder to follow. – DanielBarbarian Jan 13 '14 at 13:24
  • What WAS version are you running, also have you tried to use the startServer command using only the server name as a parameter? – DanielBarbarian Jan 13 '14 at 13:41
  • Don't care about the names in the script I modified it to hide the product name (company policy). The thing is the same script runs fine for other wars. @DanielBarbarian – Debajyoti Das Jan 13 '14 at 17:32
  • @DanielBarbarian Do you have a similar script that does the same so that I can reference for the same. I m using WS 8.5x – Debajyoti Das Jan 13 '14 at 17:39
  • Not one that creates servers, but unless you already have done so you should really have a look at wsadminlib, that should also help in the future. https://github.com/wsadminlib/wsadminlib – DanielBarbarian Jan 14 '14 at 07:10
  • @DanielBarbarian Using wsadminlib also I m getting the same error. – Debajyoti Das Jan 24 '14 at 13:21

2 Answers2

1

The problem might be in the way how you deploying and/or configuring your application.

# Your script sample
# Deploy the WAR
APP_PATH= APP_HOME + '/MYAPP/CycleWAR/war/MYAPPCycle.war'
ARGS_LIST='.....'

AdminApp.install(APP_PATH, ARGS_LIST)

You need to add another parameter into your arguments list ARGS_LIST : args = "[-server " + SERVER_NAME + "]"

# Since 6.0.X version
# Server Deployment
args = "[-server " + serverName + "]"

# Cluster Deployment
# args = "[-cluster " + clusterName + "]"
AdminApp.install(applicationFilePath, args)
Anton N
  • 2,317
  • 24
  • 28
0

After the server configurations...

#Sync the Nodes
Sync1 = AdminControl.completeObjectName( "type=NodeSync,node="+ NODE_NAME +",*")
print "Getting Sync Info.. " + "\n" + Sync1
AdminControl.invoke(Sync1, 'sync')
print NODE_NAME + " Sync Completed.. "

We have to sync the nodes first before trying to start the server.

Debajyoti Das
  • 2,038
  • 4
  • 34
  • 66