dev@glassfish.java.net

Re: [Problem]GlassFish OSGi Administration Console

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Thu, 19 Jul 2012 16:46:37 +0530

Tang,

Both the problems can be attributed to misuse of features. Fileinstall
(the technique behind autodeploy/bundles/), OSGi shell and OSGi admin
console are all management agents that can be used to control a bundle's
life cycle. When you manage one entity using multiple agents, problems
will occur. e.g., if you use fileinstall to manage bundles, then don't
stop/start/update those bundles via admin console.

Thanks,
Sahoo

nb: I have not got time to look into your other contribution; pl. give
me more time to do that.

On Thursday 19 July 2012 03:23 PM, Tang Yong wrote:
> Dear Sahoo,
>
> While I run stockquote-cdi-osgi-sample,
> (https://blogs.oracle.com/sivakumart/entry/typesafe_injection_of_dynamic_osgi)
>
> I found that some problems about GlassFish OSGi Administration Console.
>
> 1) After putting stockquote_service.jar on
> domains\domain1\autodeploy\bundles or installing stockquote_service.jar
> by means of GlassFish OSGi Administration Console, I can not uninstall
> stockquote_service bundle by means of GlassFish OSGi Administration
> Console. Once doing it, java.lang.NullPointerException happened.
>
> on server.log, there are the following stacktrace:
>
> java.lang.NullPointerException at
> org.apache.felix.framework.PackageAdminImpl.getBundleType(PackageAdminImpl.java:112)
> at
> org.apache.felix.webconsole.internal.core.BundlesServlet.isFragmentBundle(BundlesServlet.java:742)
> at
> org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:385)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
> at
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:428)
> at
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:375)
>
> This can be a big problem.
>
> 2) about wait timeout of @OSGiService
> After I put stockquote_service.jar on domains\domain1\autodeploy\bundles
> , I can run the stockquote wab. However, After I stop the
> stockquote_service bundle, the status of stockquote_service bundle has
> entered into Resolved, at the time, if I hit
> http://localhost:8080/stockquote/list again, the stockquote wab can
> still run successfully . However, I think the stockquote wab should not
> run successfully.
>
> --Best Regard!
> --Tang
>