I know the answer to this, but I\'m posting this here because as an app developer, I was burned by this problem several times and it took a very long time to find the answer
There are a couple strategies that you can apply to resolve this issue.
The quick and dirty 'solution' is to
Make sure the server is stopped.
Delete the content of the osgi-cache, by removing the osgi-cache/felix directory in your domain. This is usually found in glassfishv3/glassfish/domains/domain1 (GlassFish Server 3.0.1) OR glassfish3/glassfish/domains/domain1 (GlassFish Server 3.1).
There are situations where this will damage your domain, since you can install OSGi modules into your server that do not come from the glassfish/modules directory. To avoid this kind of problem, you may want to
Verify that the server is stopped
Apply this work-around.