Hi, I try to encapsulate my JNI calls in a GBean.
I read a lot of docs and articles, wrote my GBean along the sample in this posting http://www.nabble.com/POJO-caching-in-geronimo-td16986524s134.html read this Wiki entry: http://cwiki.apache.org/GMOxDEV/gbeansarticle1.html Unfortunately the entry does not tell how to install a GBean into the server. I guess, you use the deployer or console and deploy a jar together with a plan, isn't it? The Wiki entry links this sample from http://apache.org/~hemapani/docs/gbeans-sample.zip but it does not work with 2.1.3, console says: java.lang.ClassNotFoundException: org.apache.geronimo.upgrade.Upgrade1_0To1_1 in classloader org.apache.geronimo.plugins/plugin-console-tomcat/2.1.3/car org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:437) org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:279) java.lang.ClassLoader.loadClass(ClassLoader.java:597) org.apache.geronimo.console.configmanager.DeploymentPortlet.processAction(DeploymentPortlet.java:189) org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218) org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java:145) Probably it does not like sample's plan's <configuration xmlns="http://geronimo.apache.org/xml/ns/deployment" configId="test/plan2"> Then I tried <?xml version="1.0" encoding="UTF-8"?> <configuration xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"> configId="test/plan2"> <gbean name="test:axis=gb1" class="my.JNIGBean"> </gbean> </configuration> Now I get Deployment failed: Cannot deploy the requested application module because no deployer is able to handle it. This can happen if you have omitted the J2EE deployment descriptor, disabled a deployer module, or if, for example, you are trying to deploy an EJB module on a minimal Geronimo server that does not have EJB support installed. Then, how do I call a GBean method from a web app, is it still like cited in the posting http://www.nabble.com/POJO-caching-in-geronimo-td16986524s134.html ? quoting: <dependencies> <dependency> <groupId>com.w.core.geronimo.services</groupId> <artifactId>pojo-cache</artifactId> <version>1.0</version> <type>car</type> </dependency> </dependencies> ... </environment> <gbean-ref xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"> <ref-name>cache</ref-name> <ref-type>java.util.Map</ref-type> <pattern> <name>POJOCache</name> </pattern> </gbean-ref> And get the cache in the following manner cache = (Map<String, Template>) new InitialContext() .lookup("java:comp/env/cache"); end quote Thanks, Juergen -- View this message in context: http://www.nabble.com/deploy-a-GBean---how---tp21542349s134p21542349.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.