1

I am deploying EAR file through jython script on IBM WAS but at the time of deploying I am getting error and application not coming up.

ERROR CODE:

     J2CA0052E: The lookup of the Activation Specification with JNDI Name jms/SampleQueueListener failed due to the following exception: javax.naming.NameNotFoundException: Context: cell01/nodes/dmgr11/servers/dmgr, name: jms/SampleQueueListener: First component in name jms/SampleQueueListener not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]

The jms/SampleQueueListener is already there. I am using WAS 8.5.5.8 and deploying application through Jython script on Linux OS and I am also using node agent and dmgr.

python Script to deploy app:

def installapps():
try:
    print "********************************************************"
    print "Installing  Application in IBM WAS"
    print "********************************************************"
    print "\n Installing ear file -- %s " % eFile 
    AdminApp.install(eFile,["-usedefaultbindings", "-BindJndiForEJBMessageBinding",[["samplesystemservice.jar", "ServiceActivator", "sampleservices.jar,META-INF/ejb-jar.xml", "SampleQueueListener", "jms/SampleQueueListener", "jms/SampleJMSQueue"], ["sampleystemservices.jar", "BootstrapMessageBean", "samplesystemservices.jar,META-INF/ejb-jar.xml", "SampleTopicListener", "jms/SampleTopicListener", "jms/SampleJMSTopic"]]])
AdminConfig.save()
print "***************hello22***********"
AdminApp.install(wFile, ["-appname", wName, "-contextroot", ctxroot])
print "***************hello33**********"
    AdminConfig.save()
    print "Completed installing applications.\n"
    print "Saving configuration. This may take time, please wait...."
    print "********************************************************\n"
    print "********************************************************"
    print "Completed the installation of  Application in IBM WAS"
    print "********************************************************"
except:
    AdminControl.stopServer("server1", node)
print "Unable to install  Application"
print "********************************************************"
sys.exit(0)
try:
    print "********************************************************"
    print "Stop the WAS for post configuration of  Application"
    AdminControl.stopServer("server1", node)    
except:
prank
  • 43
  • 11

1 Answers1

2

You have to fix your script. Currently you are deploying your app to dmgr server, see the context:

Context: cell01/nodes/dmgr11/servers/dmgr, name: jms/SampleQueueListener

The dmgr server is only for management, not for deploying your own apps and resources. You need to provide nodeName and serverName or clusterName, if you are deploying to the ND environment. Usually the server for apps is called server1. If you dont have any server you may need to create it.

I'd suggest using web admin console first, until you have better knowledge about your topology and management.

UPDATE

You need to map modules to the correct servers, see MapModulesToServers option, like this:

AdminApp.install('DefaultApplication.ear', ['-appname', 'TEST', '-MapModulesToServers', [['.*', 
 '.*', 'WebSphere:cell=myCell,node=myNode,server=myServer']]])

Or you can use provided scripts from library, which may be easier and more convenient:

AdminApplication.installAppWithNodeAndServerOptions(appName, earFile,
 nodeName, serverName)

See also:

Gas
  • 17,601
  • 4
  • 46
  • 93
  • Hi gas, I am using scope node name Do i need to provide server name as well. – prank Apr 12 '16 at 16:04
  • Resources can be installed on node, but apps only on servers/clusters. Your app somehow got installed on `dmgr`, which is incorrect. You have to install it on other server. You can define resources on Node that this server belongs to. – Gas Apr 13 '16 at 12:28
  • Hi Gas, I have added jython script which in am using to deploy app on server. Could you please let me know where i am doing wrong. – prank Apr 14 '16 at 07:20