简体   繁体   中英

How do I debug server-side errors?

Our Java application is going through migration from a WAS 7 server to a WAS 8.5 server - and for some reason, even though our application shows as Deployed in our Admin Console, the application itself isn't coming up on our assigned URL.

I've ruled out the possibility of a code-related problem by testing the application in my local server, so I know the problem is with some server settings - but, almost all of my experience in CS is in coding, and I don't know how to figure out where those settings have gone awry.

What options do I have to debug my application's server-side issues?

You don't specify what you mean by "coming up," so I'll start with the broad suggestions.

A couple things to sanity check:

  • Ensure the application has been deployed on the specific server you are trying to access it on. It's common to have multiple servers all in one cell controlled by one deployment manager, and applications can be deployed to only some of those servers. In the admin console, under Servers -> WebSphere application servers you can find the server you expect it to be on and check Installed applications .
  • Check to see if the application itself has started. It's possible the server has been started, but not the application. In Applications -> WebSphere enterprise applications , look for the green arrow next to your application.
  • If you're trying to access a servlet, make sure the context-root of your web module is set to what you expect. In the application's configuration page, it's in Context Root for Web Modules under Web Module Properties .
  • If all of those seem correct, or if the application is stopped and won't start, check the server logs in your profile's logs directory, especially the SystemOut.log and the ffdc folder. It may be that an error is occuring when you go to access it, or when it is starting up. Those should appear there.
  • If your application uses EJBs at a version less than 3.1, the EJBDeploy tool must have been run against your application either before deployment, or as part of the deployment process. If you are expecting the latter to occur, ensure the EJBDeploy tool was installed alongside WebSphere on the target system.

If all of that fails, you may way to break out the debugger (if that's allowed in your environment) and see if your code is even being reached.

  1. Check Server Logs: in WAS Console you can find the logs of your server.

  2. Debug in local server. By deploying an ear in your local server, you can then start the server in loggin mode. Then you shuld stop and restart your websphere aplication and it will be stoped in selected breakpoints.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM