Question

Environment: WinXP. RAD: Version: 7.5.3 (Eclipse 3.4.2) Websphere 6.1

I have two web projects on my local RAD environment and 4 or 5 sub jar projects. When I change classes in debug and regular start mode, the files don't get copied to the server for runtime.

So, normally I have to restart the server completely or add/remove the project all together.

I may make a change to Servlet.java

When I do "publish", the ear/application seems to restart, but my changes are not there. So I normally restart the server. This is a productivity killer.

Additional settings:

* Publish automatically turned off.
* Minimize resources. Use workspace.

What can I do to make sure that the classes get copied over.

My theories:

I have parent_first/application for the class loader/war settings. Is that an issue? Maybe I should remove the ear and add it back to websphere I did a clean on the server?

Was it helpful?

Solution

  1. Delete your application from the server.
  2. Restart the server
  3. Go to the admin console and ensure the application is not listed in the list of applications, if it is then delete it.
  4. Restart the server
  5. Deploy/publish again.

OTHER TIPS

Unfortunatelly, RAD with WebSphere are very unstable environment.

From my experience, debug mode is causing a lot of problems. It's mainly what you describe, changes not being seen after republish, additionally very quick memory depletion. I'm using debug mode as last report.

In normal mode everything should (read: in most cases) work correctly. You add/change some classes and make 'republish'. Sometimes it's necessary to do clean on project before republishing it.

But when the Websphere is running longer together with RAD, I observe that often something get stuck. You have there clean option on the server, with is expected to clean the cache (which included also compiled classes). You should also observe memory usage. If it's nearing the limits of JVM (memory leaks are heavy) Websphere stops to function correctly, and you must restart it.

However, I sometimes get serious issues where the clean isn't helping, and then it's necessary to remove all applications, stop the websphere (close all projects and open then again) and then start Websphere and add all applications, restarting RAD in the meanwhile. But it's not everyday, maybe every month or so...

If you are really unlucky, RAD can break your workspace, which will force you to delete all project, delete project files (or do a fresh checkout) and import everything once again, or even start a new workspace (happens also with 'normal' Eclipse, ~1-2 years).

You are using the latest RAD so do I... here is my guide for solving this issue:

  • Enable the error log to see if you get intuitive info on internal RAD errors, in 7.5 it is available on "Show views"
  • If your changes are not deployed Clean project
  • If your changes are not deployed yet Rebuild project
  • If your changes are not deployed yet Redeploy project
  • If your changes are not deployed yet Clean server
  • If your changes are not deployed yet Restart server

Or: - Use ant or maven to make deployments straighforward and ignore the pain due to websphere and eclipse having internal bugs (which you may see in the error log if it is fully enabled).

Regards.

Are your JSPs copied correctly? That is, when you make a change in one JSP, can you see change immediately upon browser refresh? If this works, then I see no reason why classes aren't also published. JSP auto refresh should work in normal and debug modes.

Now, is "build automatically" enabled? If no, your classes won't get compiled and transferred. Parent_first/application for class loading shouldn't be an issue.

Is the local app. server running in development mode? If not, it should be.

While developing, use debug mode. Hot deploy will assure changes to your methods are seen immediately. Changes in classes won't be seen (i.e. adding a method will require application restart).

Is your app. server using global security? I have it turned off and auto redeploy works without problems.

Class reloading has always been a problem while developing Java EE applications. Try do erase that ear file from your WAS and redeploy it again.

If all else fails, try JRebel.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top