3

I have developed an java ear that i deploy from my local eclipse to my local websphere 8.5 by using the publish button in eclipse. When I try to deploy my ear from command line I get an error after I try to access the webpage.

I update my ear from common line like this: ${was.dir}/profiles/${was.profile}/bin/wsadmin.sh -lang jython -username ${was.username} -password ${was.password} -c AdminApplication.updateApplicationUsingDefaultMerge('${was.app.name}', '${build.dir}/${ear.name}')

The deployment is successful but when I access my application thru my web browser I get the following message instead of seeing my application:

Error 404: com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException: No target servlet configured for uri: /wwww/index.html

I have verified that the ear is ok by updating it thru the web admin interface of websphere without any configuration.

What am I doing wrong or what additional steps do I need to do to successfully update my ear?

user1329339
  • 1,295
  • 1
  • 11
  • 26
  • Is there supposed to be four w's in that path? Either way, it is hard to tell based on the description. It looks like it doesn't find the url you are trying to access. What url are you using and what is the configured context root for that web application in the ear that you are trying to access? – DanielBarbarian May 27 '14 at 11:22
  • I understand that its not finding the application. What I am looking for is the right way to update an existing ear and it looks like the command AdminApplication.updateApplicationUsingDefaultMerge is not enough. Thanks for taking the time to answer. – user1329339 May 27 '14 at 14:55

2 Answers2

4

You are using wrong command. You should use something like this:

AdminApp.update('MyAppEAR', 'app', '[ -operation update -contents MyApp.ear -nopreCompileJSPs -installed.ear.destination C:\WAS\MyAppEAR -nodistributeApp -useMetaDataFromBinary -nodeployejb -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall warn -noprocessEmbeddedConfig -filepermission ..dll=755#..so=755#..a=755#..sl=755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -noenableClientModule -clientMode isolated -novalidateSchema -MapModulesToServers [[ MyApp MyApp.war,WEB-INF/web.xml WebSphere:cell=Node02Cell,node=Node02,server=server1 ]]]' )

Also, in WebSphere Application Server you can log every command you issue through Administrative Console.

Steps

  1. login to admin console with administrative user (e.g. wasadmin)
  2. click "System Administration" -> "Console Preferences"
  3. check "Enable command assistance notifications" and "Log command assistance commands"
  4. click Apply button to save changes

enter image description here

You can see commands in help portlet on the upper-right side of admin console: help portlet

If you checked "Log command assistance commands", you can also see jython commands in a log file "<WAS_HOME>\profiles\<PROFILE_NAME>\logs\server1\commandAssistanceJythonCommands.log"

grajsek
  • 856
  • 2
  • 11
  • 24
2

I'm not sure about updateApplicationUsingDefaultMerge vs update (the latter is what I use), but don't forget you also have to AdminConfig.save() after you're finished.

dbreaux
  • 4,982
  • 1
  • 25
  • 64