[GLASSFISH-19075] starting hybrid osgi app with jpa failed on a cluster and causing undeploy-related problems Created: 14/Sep/12 Updated: 19/Sep/12
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
1 Windows XP
|Attachments:||sample.uas.api.jar sample.uas.entities.jar server.log|
1 After setting the "org.glassfish.osgjpa.extension.useHybridPersistenceProviderResolver=true" and executing the following commands, a hybrid osgi app with jpa started failed from server.log,
1) >asadmin start-domain
2) >asadmin start-database
3) >asadmin create-cluster cluster1
4) >asadmin create-local-instance --cluster cluster1 --systemproperties HTTP_LISTENER_PORT=18080:HTTP_SSL_LISTENER_PORT=18181:IIOP_SSL_LISTENER_PORT=13800:IIOP_LISTENER_PORT=13700:JMX_SYSTEM_CONNECTOR_PORT=17676:IIOP_SSL_MUTUALAUTH_PORT=13801:JMS_PROVIDER_PO
5) >asadmin create-local-instance --cluster cluster1 --systemproperties HTTP_LISTENER_PORT=28080:HTTP_SSL_LISTENER_PORT=28181:IIOP_SSL_LISTENER_PORT=23800:IIOP_LISTENER_PORT=23700:JMX_SYSTEM_CONNECTOR_PORT=27676:IIOP_SSL_MUTUALAUTH_PORT=23801:JMS_PROVIDER_PO
6) >asadmin deploy --type=osgi --target cluster1 E:\gfv4\gftrunk\fighterfish\sample\uas\entities\target\sample.uas.entities.jar
7) >asadmin start-local-instance in1
Although the above commands can be executed successfully, if opening glassfish3\glassfish\nodes\localhost-domain1\in1\logs\server.log, you will find that sample.uas.entities.jar has started failed because of "No Persistence provider for EntityManager named sample.uas.entities".
 pl.see the attachment(server.log)
2 Based 1, while you undeployed the sample.uas.entities.jar using the following command, undeploying will also failed although displaying "Command undeploy executed successfully".
>asadmin undeploy --target cluster1 sample.uas.entities
 The mean of what I said "failed" is that,
2) on the das server's felix-cache(glassfish\domains\domain1\osgi-cache\felix), sample.uas.entities bundle has been deleted. so inconsist with 1)
3) on the das server's "domains\domain1\applications", sample.uas.entities directory and resouces still existed and has been not deleted. On the other hand, on the instance's "nodes\localhost-domain1\in1\applications", sample.uas.entities directory and resouces been deleted. So inconsistance also happened.
4) on the das server's "glassfish\domains\domain1\config\domain.xml", sample.uas.entities application-ref and application definition still existed, however on the instance's "nodes\localhost-domain1\in1\config\domain.xml", sample.uas.entities application-ref and application definition have been deleted. So, inconsistance happened again.
|Comment by TangYong [ 14/Sep/12 ]|
On cluster mode, right undeploying results are as following:
Taking the sample.uas.api.jar as an example, after undeploying the bundle,
1) on the instance's felix-cache(glassfish\nodes\localhost-domain1\in1\osgi-cache\felix), sample.uas.api bundle will be deleted.
2) on the das server's felix-cache(glassfish\domains\domain1\osgi-cache\felix), sample.uas.api bundle will be deleted.
3) on the das server's "domains\domain1\applications", sample.uas.api directory and resouces will be deleted. And on the instance's "nodes\localhost-domain\in1\applications", sample.uas.api directory and resouces will be deleted too.
4) on the das server's "glassfish\domains\domain1\config\domain.xml", sample.uas.api application-ref and application definition will be deleted,and on the instance's "nodes\localhost-domain1\in1\config\domain.xml", sample.uas.api application-ref and application definition have been deleted too.
 pl. see the attachment(sample.uas.api.jar)
|Comment by TangYong [ 19/Sep/12 ]|
I need to say that on problem description, it needs not to create two instances on cluster and creating only one instance will trigger the problem. And I also confirmed the problem can be reproduced based on the newest gf trunk and confirmed that my env has no problem.
|Comment by TangYong [ 19/Sep/12 ]|
If first starting cluster instance, then deploying the jpa bundle, the jpa bundle can be deployed successfully and the exception of "No Persistence provider for EntityManager named sample.uas.entities" will disappear.
However, after undeploying the jpa bundle, under nodes\localhost-domain1\in1\applications, sample.uas.entities directory still exists.