stale deployment in WAS - eclipse

I'm learning to use IBM WebSphere v8.8.5 for JavaEE development. I'm using MyEclipse as the development environment.
Sometimes when I debug my project from inside MyEclipse, I could see errors like this
00000091 ComponentMeta E WSVR0603E: ComponentMetaDataAccessor beginContext method received a NULL ComponentMetaData.
00000091 AlarmListener E SCHD0063E: A task with ID 953 (mi-online-app-1.0.0-SNAPSHOT#my-online-services-1.0.0-SNAPSHOT.jar#PaymentResultCheckServiceBean) failed to run on Scheduler WebSphere_EJB_Timer_Service (WebSphere_EJB_Timer_Service) because of an exception: java.lang.NullPointerException.
But actually, there's no PaymentResultCheckServiceBean in my project. It used to be in the project but I have renamed it.
When I develop in MyEclipse, I add a WAS server. Sometimes if anything wrong, I'll directly delete the whole workspace from disk and create a new one. So I'm wondering if these ways leave some stale data in WAS folder so that when WAS starts, old deployment got to run. But I've checked C:\IBM\WebSphere85\AppServer\profiles\AppSrv01\installedApps\myserver, there's nothing here.

Related

Eclipse Team Foundation Server plugin (Team Explorer Everywhere) giving null errors

I have been using the TFS plugin for eclipse with my companies TFS server for several months. Last week, my laptop crashed while eclipse was open and a connection to the TFS was present. Now, every time I launch eclipse, I get an error stating a connection could not be made to the server, throwing a NullPointerException.
To try to fix this, I cleaned eclipse from my system and removed the installed plugin and then reinstalled eclipse and the TFS plugin. Now, I am no longer getting this connection error on launch. I added the original TFS to the list of servers in eclipse and it can see all of the projects (see http://i.imgur.com/SbgyuRx.png).
However, trying to use any of the projects leads to a screen with an error message saying Error querying workspaces: null. The error log shows the plugin in question as com.microsot.tfs.client.common, with the stack trace saying An exception stack trace is not available.
I am using the same exact plugin installation that I originally used. I have no idea why I'm getting these errors.
The error logs may be helpful. You can view them by going to Help > Team Explorer Everywhere Support, then clicking on the Logs tab.
Ultimately, though, this is probably some corrupt configuration files. TEE performs some various background tasks and I suspect one of those was interrupted in the middle of some file I/O when your computer crashed. Deleting the cache directory may be helpful:
~/.microsoft/Team Foundation
When you restart Eclipse, you should get a dialog box that indicates that your TFS server information cannot be located, but when you reconnect to that TFS server, your projects should return to being TFS managed.

Glassfish taking 20s to do hot deployment, is that right?

I'm working in a JSF project with Eclipse and Glassfish 3.1.2.
Every time I did a minor change and save it, Glassfish do the hot deployment, but is taking too much time to do that, about 20s, at least.
Can I do something do deacrease this time ? Is horrible develop something where you have to wait all time time everytime I change something.
UPDATE
This is how my project settings.
Just open the folder below, this surprise me, is this so many .jar files, is this correct ?
And this one:
My Glassfish configuration :
Any idea ?
There are several ways to deploy a GlassFish application. To speed up development/debuging we need a way to instantly deploy web applications. One of the ways is to use hot deployment feature, another lesser known feature is ‘directory deployment’. You simply point GlassFish to your development directory and let it pick up and deploy application from there. No packaging and re-deoploying hassles. The catch is whenever you want to re-deploy your application you just need to touch a file called .reload which should be present in your web folder.
Following is the command and directory structure you can use.
–|myproj
–|–|src
–|–|web
–|–|–|WEB-INF
–|–|–|–lib
–|–|–|–classes
–|–|–|–web.xml
–|–|.reload
GLASS_FISH_HOME/bin/asadmin deploydir full_path_to_you_web_folder

Unable to run project with anything but local codebase in Netbeans

I'm trying to build my Java Web Start application using Netbeans.
I realized that if I change the codebase option in the properties options to anything but local I get an error saying
Project cannot be run with non-local codebase. Open project properties dialog and set Web Start Codebase to Local Execution.
A week or two ago I was able to run it with a "User Defined" codebase. I'm not aware of a change I've made that could have resulted in this. I can build the project, just not run it, is this to be expected?
Any idea whats causing this and how/if I can run this with a non-local codebase?
After figuring out why this was happening, it turns out that this is intentional. As when you run a project in NetBeans you are running it locally, it would be incorrect to try and serve it from a non-local codebase. Hence the ant script in the project ensures that you're running it with a local codebase.
However, you can always build it with a non-local codebase, deploy the jar file, and then test it out.
Sadly there is no way to create a different build profile to build it with a non-local codebase, when you want it, and built it with a local codebase at other times.

Eclipse 3.5 Cache Problem

I am using eclipse 3.5 with google app engine + spring framework to develop application. My problem is when I change the code and build the project, the new code doesn't come in to effect. I even deleted the old file but at runtime, the old version gets display in the browser. Why?
Your description is not explicit, so following are my assumptions:
You are changing jsp/js or view related files
You have Google app engine plugin for eclipse to deploy the code
Following might be one of the reasons:
Your view files are cached in the browser, so try deleting the browser cache
Google app engine might have cached your files, so try deleting the temp folder
Eclipse IDE wouldn't have deployed your changed code, so check the timestamp, if it still shows the old timestamp, then find out how to configure eclipse to detect your changes.
I found 3 workarounds for similar issue (changes to a servlet (.java file) were not taking effect).
Before editing the .java file, stop the application. It seems that if you edit it while running, the issue occurs, even if you edit it, stop then re-start.
Delete items in Temp folder e.g, (C:\Users\username\AppData\Local\Temp), then stop and re-start the app.
I think the culprit folder in the Temp folder is this:Jetty_127_0_0_1_8888_war__.g0qk00
Right click in in the console area and select 'Remove All Terminated'. Sometimes that reveals there are other instances running, which need to be stopped by clicking the terminate button.
I got the similar issue and the problem was due to not stopping the running server.
What i was doing was running the server, editing the java file, saving and again running the server. This created two instances of the server running and when checking into the browsers the old code was executed from the first instances.
So, the solution is terminate and relaunch the server, and your new changes will be in effect.

SpringSource dm Server occastionally fails to unpack valid ZIP file

When deploying my project to SpringSource dm Server, every once in a while a JAR fails to deploy with the following message:
/mnt/myproject/springsource/work/com.springsource.server.deployer/packed/my.project.0.1.10.M.jar' cannot be unpacked.
java.util.zip.ZipException: error in opening zip file
There are 5 .war files in the project. If one of them fails, it's always the same one (which is also the last one to be copied into the pickup directory). However, usually all 5 will deploy without issues. It is the exact same set of files in all instances, taken from a maven repository, just deployed to new server instances.
The file that fails can be opened just fine by 7-Zip. If I stop Spring, clear the pickup directory, start Spring and copy the .war files to pickup again, it will usually work.
The usual deployment process is:
Start Spring
Wait until it reports Open for business with profile 'web'
Copy all 5 projects with a 2 second delay between each copy (scripted).
Similar issues java-util-zip-zipexception-error-in-opening-zip-file and jboss5-cannot-deploy-due-to-java-util-zip-zipexception-error-in-opening-zip-fil do not seem to apply.
You don't say which version of dm Server you are running, so I would recommend upgrading to 2.0.x to pick up fixes if you haven't already. You may also like to upgrade to Eclipse Virgo which is the continuation of the dm Server project.
My guess is that the heuristic in dm Server for determining when a file copy into pickup has terminated is playing up, possibly due to a slow or irratic copy operation. Is there anything unusual about your disk, such as encryption or remote mount, which may interfere with the copy operation?
One way to rule out the heuristic would be to place the files in the pickup directory when dm Server is not running and then start dm Server when the copy operation has definitely completed. If the problem reproduces, then there may be a problem in the JRE you are using.