Re: log4jResource setting in GBean: ApplicationLog4jConfigurationGBean

2009-07-13 Thread Ying Tang
Thanks David and Viola.

 The document
http://cwiki.apache.org/GMOxDOC22/configuring-application-specific-logging-with-log4j.htmlhas
been updated with this issue:


You can also use a log4j.properties file in your classpath, for example, in
WEB-INF/classes/META-INF. (If you prefer not to place this file under
WEB-INF/classes/, the path of this file must be added to your
classpath).But this will obstruct anyone trying to configure logging
as the file will
remain packed in your application somewhere hard to find.

gbean name=DirectoryLog4jConfiguration class=
org.apache.geronimo.system.logging.log4j.ApplicationLog4jConfigurationGBean

attribute name=log4jResourceMETA-INF/log4j.properties/attribute
 /gbean



Best Regards,

Ying Tang

2009/6/9 David Jencks david_jen...@yahoo.com


 On Jun 8, 2009, at 11:03 PM, viola.lu wrote:


 hi, i follow steps in

 http://cwiki.apache.org/GMOxDOC22/configuring-application-specific-logging-with-log4j.html
 ,
 and add gbean information in geronimo-web.xml using log4jResource.

 dep:gbean

 class=org.apache.geronimo.system.logging.log4j.ApplicationLog4jConfigurationGBean
 name=testlogLog4jConfiguration

   dep:attribute
 name=log4jResourceMETA-INF/log4j.properties/dep:attribute

   /dep:gbean

 But Can't find META-INF/log4j.properties  error always exists. if i use
 log4jFile setting like below:

 dep:gbean

 class=org.apache.geronimo.system.logging.log4j.ApplicationLog4jConfigurationGBean
 name=testlogLog4jConfiguration
 dep:attribute
 name=log4jFilevar/log/log4j.properties/dep:attribute
   dep:reference
 name=ServerInfodep:nameServerInfo/dep:name/dep:reference
   !--dep:attribute
 name=log4jResourceMETA-INF/log4j.properties/dep:attribute--
   /dep:gbean

 it works well.

 I looked into ApplicationLog4jConfigurationGBean code:
 ...
 InputStream in;
   if (log4jFile != null) {
   File file = serverInfo.resolveServer(log4jFile);
   in = new FileInputStream(file);
   } else if (log4jResource != null) {
   in = classloader.getResourceAsStream(log4jResource);
   if (in == null) {
   throw new NullPointerException(No log4j properties resource
 found at  + log4jResource);
   }
   } else {
   return;
   }

 ...

 in = classloader.getResourceAsStream(log4jResource);

 ClassLoader will search this file from classpath, and my project structure
 is:

 LogWeb
   ---src(testlog.java
   ---WebContent
 META-INF(log4j.properties)
 WEB-INF
 index.jsp
   

 Why it can't find out file META-INF/log4j.properties?


 Because that's not in your classpath.

 Try WEB-INF/classes/META-INF/log4j.properties.

 thanks
 david jencks




 Anyone can figure it out? Thanks.
 --
 View this message in context:
 http://www.nabble.com/log4jResource-setting-in-GBean%3A-ApplicationLog4jConfigurationGBean-tp23936783s134p23936783.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: Hello World Tutorial - Requested Resource not available

2009-06-15 Thread Ying Tang
Thanks, Viola and Carlos. This point is worth mentioning in the tutorial.

2009/6/13 caof2005 caof2...@gmail.com


 Thanks again


 viola.lu wrote:
 
  pls add  welcome-filehello.jsp/welcome-file entry in your web.xml
  under WEB-INF.
 
  caof2005 wrote:
 
  Thanks Viola.
  I was wrong when writing the error message that I got. The correct one
  is:
 
  HTTP status 404/HelloWorld/
  type status report
  mesage /HelloWorld/
  description The requested resource (/HelloWorld/) is not available.
 
  And http://localhost:8080/HelloWorld/ address automatically appeared in
  the url address bar of the embedded browser after I run/deploy.
 
  So as you see nothing changes but the name of the resource.
 
  However, while I was trying to inspect that address, I  appended  the
  hello.jsp part to the end of the address. And it worked perfectly!
  Thanks a lot!
 
  But I still have the question...:
  Is there a way to configure the embedded browser, so that it
  automatically detects the correct URL?
 
  I carefully followed each of the steps indicated in the tutorial, so I
  supposed that I will get no error message at all, or had to change
  anything in any view/browser.
 
  The parameters that I used while I was in the Dynamic Project Wizard
  were:
 
  Project Name: HelloWorld
  Directory: D:\SWExercises\eclipse\HelloWorld
  Target Runtime: Apache Geronimo v2.1
  Dynamic WebModule Version: 2.5
  Configuration: Default Configuration for Apache v2.1
  Context Root: HelloWorld
  Content Directory: WebContent
  Java Source Directory: src
  Generate Deployment Descriptor - yes
  Group Id: default
  Artifact Id:
  Version: 1.0
  Artifact Type: car
  Add runtime dependency to Geronimo shared library - no
 
  Parent Folder: HellWorld/WebContent
  Name of the JSP added to the project: hello.jsp
 
 
  Could you clarify what I did wrong?
 
  Thanks
  Carlos
 
 
  viola.lu wrote:
 
  For hello world sample, access link is
  http://localhost:8080/HelloWorld/hello.jsp, not
  http://localhost:8080/Hello/hello.jsp.
 
  caof2005 wrote:
 
  Hi, folks, I´m totally newbe to Geronimo so this question:
 
  I have tried to do the Hello World Web Application that is described
  in the Geronimo´s v2.1 Developers Guide Tutorial Section.
 
  I am using Eclipse Gamynedes 3.4.2 with the Geronimo Eclipse Plugin
  (GEP) 2.1.4.
 
  I followed each of the steps indicated in the tutorial, however at the
  end when trying to run and deploy a simple Hello.jsp page from within
  Eclipse GEP, what I got from the embedded browser is the following
  error:
 
  HTTP status 404/hello/
  type status report
  mesage /hello/
  description The requested resource (/hello/) is not available.
 
  Does anybody have an idea what can be happening?
 
  Regards.
  Carlos
 
 
 
 
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Hello-World-Tutorial---Requested-Resource-not-available-tp24000364s134p24013124.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: geronimo 2.1.4 failed to start from eclipse

2009-06-09 Thread Ying Tang
Hi,

Unfortunately the document was aimed at Geronimo 2.1   In our application,
we should update  version numbers in the deployment plan *geronimo-web.xml*:

Change sys:version2.1/sys:version into
sys:version2.1.4/sys:version

*  *You'd better provide the deployment plan when you Deploy New to
install new applications, although the document didn't ask you to.

I managed to deploy the application on Geronimo 2.1.4 with Eclipse 3.4.1,
after modifying  the plan.

Please let me know if there is still any problem. Thanks!

Best  Regards,

Ying Tang


2009/6/9 Boern cayso...@gmail.com

 Yes, my geronimo is started successfully  and my web app is the WebJMS
 that`s in geronimo wiki
 http://cwiki.apache.org/GMOxDOC21/web-application-for-jms-access.html
 http://cwiki.apache.org/GMOxDOC21/web-application-for-jms-access.htmlI
 just copy the code and deploy it,that` s all.


 On Tue, Jun 9, 2009 at 1:30 PM, Ying Tang yingtang1...@gmail.com wrote:

 Hi Boern,

   Did you successfully start the Geronimo server in Eclipse?

   Could you tell us what your Web application is like?  Let's find out
 what sets off the error.  Thanks.



 Best Regards,

 Ying Tang


 2009/6/9 Boern cayso...@gmail.com

 I replaced the environment use sun jdk1.5 , a clear eclipse and a clean
 gep,but  still cann`t deploy the WebJMS sample  in the geronimo doc

 The console output is :

 Distribution of module failed.  See log for details.
   Failed to load servlet class UserServlet
   org.apache.geronimo.common.DeploymentException: Failed to load servlet
 class UserServlet
at
 org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.getPortInfo(AdvancedWARWebServiceFinder.java:148)
at
 org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverPOJOWebServices(AdvancedWARWebServiceFinder.java:125)
at
 org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverWebServices(AdvancedWARWebServiceFinder.java:45)
at
 org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServices(WARWebServiceFinder.java:70)
at
 org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServices(JAXWSServiceBuilder.java:97)
at
 org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices(JAXWSServiceBuilder.java:80)
at
 org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:364)
at
 org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext(TomcatModuleBuilder.java:330)
at
 org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:159)
at
 org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:595)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
 org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
 org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at
 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
at
 org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at
 org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
 at
 org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
 org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at
 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
at
 org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at
 org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
at
 com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at
 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at
 com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at
 javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410)
at
 javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
at
 javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run

Re: geronimo 2.1.4 failed to start from eclipse

2009-06-09 Thread Ying Tang
Thanks, Boern.  We don't have to export the WAR now.

Best  Regards,
Ying Tang

2009/6/9 Boern cayso...@gmail.com

 thanks,Ying Tang. The problem is solved ,but I directly deployed the web
 app by GEP,and my deployment plan *geronimo-web.xml is :*
 *
 *
 *?xml version=1.0 encoding=UTF-8?
 web-app xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-1.2;
  xmlns:nam=http://geronimo.apache.org/xml/ns/naming-1.2;
  xmlns:sec=http://geronimo.apache.org/xml/ns/security-1.1;
  xmlns:sys=http://geronimo.apache.org/xml/ns/deployment-1.2;
   sys:environment
 sys:moduleId
   sys:groupIddefault/sys:groupId
   sys:artifactIdWebJMS/sys:artifactId
   sys:version1.0/sys:version
   sys:typecar/sys:type
 /sys:moduleId
 sys:dependencies
 sys:dependency
 sys:groupIdorg.apache.geronimo.configs/sys:groupId
 sys:artifactIdactivemq-ra/sys:artifactId
 sys:version2.1.4/sys:version
 sys:typecar/sys:type
 /sys:dependency
 /sys:dependencies
   /sys:environment
   context-root/WebJMS/context-root
   nam:resource-ref
 nam:ref-namejms/TestConnectionFactory/nam:ref-name
 nam:pattern
 nam:groupIdorg.apache.geronimo.configs/nam:groupId
 nam:artifactIdactivemq-ra/nam:artifactId
 nam:version2.1.4/nam:version
 nam:nameDefaultActiveMQConnectionFactory/nam:name
 /nam:pattern
 /nam:resource-ref
 nam:resource-env-ref
 nam:ref-namejms/TestQueue/nam:ref-name
 nam:pattern
 nam:groupIdorg.apache.geronimo.configs/nam:groupId
 nam:artifactIdactivemq-ra/nam:artifactId
 nam:version2.1.4/nam:version
 nam:nameSendReceiveQueue/nam:name
 /nam:pattern
 /nam:resource-env-ref
 /web-app
 *

 On Tue, Jun 9, 2009 at 2:52 PM, Ying Tang yingtang1...@gmail.com wrote:

 Hi,

 Unfortunately the document was aimed at Geronimo 2.1   In our
 application,  we should update  version numbers in the deployment plan *
 geronimo-web.xml*:

 Change sys:version2.1/sys:version into

 sys:version2.1.4/sys:version

 *  *You'd better provide the deployment plan when you Deploy New to
 install new applications, although the document didn't ask you to.

 I managed to deploy the application on Geronimo 2.1.4 with Eclipse 3.4.1,
 after modifying  the plan.

 Please let me know if there is still any problem. Thanks!


 Best  Regards,

 Ying Tang


 2009/6/9 Boern cayso...@gmail.com

 Yes, my geronimo is started successfully  and my web app is the WebJMS
 that`s in geronimo wiki
 http://cwiki.apache.org/GMOxDOC21/web-application-for-jms-access.html
 http://cwiki.apache.org/GMOxDOC21/web-application-for-jms-access.htmlI
 just copy the code and deploy it,that` s all.


 On Tue, Jun 9, 2009 at 1:30 PM, Ying Tang yingtang1...@gmail.comwrote:

 Hi Boern,

   Did you successfully start the Geronimo server in Eclipse?

   Could you tell us what your Web application is like?  Let's find out
 what sets off the error.  Thanks.



 Best Regards,

 Ying Tang


 2009/6/9 Boern cayso...@gmail.com

 I replaced the environment use sun jdk1.5 , a clear eclipse and a clean
 gep,but  still cann`t deploy the WebJMS sample  in the geronimo doc

 The console output is :

 Distribution of module failed.  See log for details.
   Failed to load servlet class UserServlet
   org.apache.geronimo.common.DeploymentException: Failed to load
 servlet class UserServlet
at
 org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.getPortInfo(AdvancedWARWebServiceFinder.java:148)
at
 org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverPOJOWebServices(AdvancedWARWebServiceFinder.java:125)
at
 org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverWebServices(AdvancedWARWebServiceFinder.java:45)
at
 org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServices(WARWebServiceFinder.java:70)
at
 org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServices(JAXWSServiceBuilder.java:97)
at
 org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices(JAXWSServiceBuilder.java:80)
at
 org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:364)
at
 org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext(TomcatModuleBuilder.java:330)
at
 org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:159)
at
 org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:595)
at
 org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
at
 org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39

Re: geronimo 2.1.4 failed to start from eclipse

2009-06-08 Thread Ying Tang
Hi Boern ,

May I ask which version of GEP are you using?

We recommend that you start from a clean Eclipse and a clean GEP.

Geronimo 2.1.4 bases its functionalities on Sun JDK 5.  Could you try to run
Geronimo 2.1.4 with JDK 5? Thanks.


Best  Regards,

Ying Tang



2009/6/9 Boern cayso...@gmail.com

 Hi,all:
 why my geronimo always starts error ? I feel the geronimo is not  too
 stable!
 My eclipse is 3.4.1 for javaee and geronimo is 2.1.4
 This time,the console output is :

 Booting Geronimo Kernel (in Java 1.6.0_12)...
 Module  1/71
 org.apache.geronimo.framework/gshell-framework/2.1.4/car
 started in   .000s
 Module  2/71
 org.apache.geronimo.framework/gshell-geronimo/2.1.4/car
 started in   .000s
 Module  3/71
 org.apache.geronimo.framework/j2ee-system/2.1.4/car
 started in   .000s
 Module  4/71
 org.apache.geronimo.framework/transformer-agent/2.1.4/car
 started in   .000s
 Module  5/71
 org.apache.geronimo.framework/jee-specs/2.1.4/car
 started in   .000s
 Module  6/71
 org.apache.geronimo.framework/rmi-naming/2.1.4/car
 started in  1.152s
 Module  7/71
 org.apache.geronimo.framework/xmlbeans/2.1.4/car
 started in   .000s
 Module  8/71
 org.apache.geronimo.framework/plugin/2.1.4/car
 2009-06-09 10:23:45,739 WARN  [ConfigurationUtil] Could not load gbean
 org.apache.geronimo.framework/plugin/2.1.4/car?ServiceModule=org.apache.geronimo.framework/plugin/2.1.4/car,j2eeType=GBean,name=Archiver
 java.lang.NoClassDefFoundError:
 org/codehaus/plexus/personality/plexus/lifecycle/phase/Contextualizable
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
 at
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
 at
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.checkParents(MultiParentClassLoader.java:508)
 at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClassInternal(MultiParentClassLoader.java:466)
 at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.checkParents(MultiParentClassLoader.java:505)
 at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClassInternal(MultiParentClassLoader.java:466)
 at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.checkParents(MultiParentClassLoader.java:505)
 at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:417)
 at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:280)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
 at java.lang.Class.getMethod0(Class.java:2670)
 at java.lang.Class.getMethod(Class.java:1603)
 at
 org.apache.geronimo.gbean.runtime.GBeanAttribute.init(GBeanAttribute.java:237)
 at
 org.apache.geronimo.gbean.runtime.GBeanInstance.init(GBeanInstance.java:245)
 at
 org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.java:354)
 at
 org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:441)
 at
 org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
 at
 org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39

Re: geronimo 2.1.4 failed to start from eclipse

2009-06-08 Thread Ying Tang
Hi Boern,

  Did you successfully start the Geronimo server in Eclipse?

  Could you tell us what your Web application is like?  Let's find out what
sets off the error.  Thanks.


Best Regards,

Ying Tang


2009/6/9 Boern cayso...@gmail.com

 I replaced the environment use sun jdk1.5 , a clear eclipse and a clean
 gep,but  still cann`t deploy the WebJMS sample  in the geronimo doc

 The console output is :

 Distribution of module failed.  See log for details.
   Failed to load servlet class UserServlet
   org.apache.geronimo.common.DeploymentException: Failed to load servlet
 class UserServlet
at
 org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.getPortInfo(AdvancedWARWebServiceFinder.java:148)
at
 org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverPOJOWebServices(AdvancedWARWebServiceFinder.java:125)
at
 org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverWebServices(AdvancedWARWebServiceFinder.java:45)
at
 org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServices(WARWebServiceFinder.java:70)
at
 org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServices(JAXWSServiceBuilder.java:97)
at
 org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices(JAXWSServiceBuilder.java:80)
at
 org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:364)
at
 org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext(TomcatModuleBuilder.java:330)
at
 org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:159)
at
 org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:595)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
 org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
 org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at
 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
at
 org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
 org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
 org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at
 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
at
 org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at
 org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
at
 com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at
 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at
 com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at
 javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410)
at
 javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
at
 javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247)
at java.security.AccessController.doPrivileged(Native Method)
at
 javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1350)
at
 javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:784)
at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at
 sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at
 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run

Re: set openejb jndi format in geronimo

2009-06-05 Thread Ying Tang
Hi all,

The page in Geronimo 2.1 (
http://cwiki.apache.org/confluence/display/GMOxDOC21/Client+JNDI+Names)  has
been updated, and the DEV page (
http://cwiki.apache.org/GMOxDEV/client-jndi-names.html) refers to that page.
Ditto for Geronimo 2.2.


Best Regards,

Ying Tang


2009/6/5 David Blevins david.blev...@visi.com

 Hey Ivan, if you had time to update this page with the working solution,
 that would be great:
 http://cwiki.apache.org/GMOxDEV/client-jndi-names.html



 On Jun 3, 2009, at 12:24 AM, Ivan wrote:

  OK, try this:
 set GERONIMO_OPTS=-Dopenejb.jndiname.format={ejbName}/{interfaceClass}
 geronimo.bat start

 2009/6/3 Rodger eternalj...@gmail.com
 I tried it.But the default format--{ejbName}{interfaceType.annotationName}
 still works,the format doesn't change to {ejbName}/{interfaceClass}.
 That is
 initialContext.lookup(CalculatorRemote); works
 but
 initialContext.lookup(Calculator/org.apache.geronimo.samples.slsb.calculator.CalculatorRemote);
  failed.

 There are my ejb part:
 @Remote
 interface CalculatorRemote

 @Stateless
 class Calculator implements CalculatorRemote



 --
 Ivan





Re: Some minute error in Geronimo Tutorials

2009-05-31 Thread Ying Tang
Thanks, Sheshank and Jeff.

The corresponding page in Geronimo
2.2http://cwiki.apache.org/confluence/display/GMOxDOC22/Accessing+JDBC+in+Web+applicationshas
also been updated with

sys:artifactIdjdbc_userds/sys:artifactId.


Best Regards,

Ying Tang




2009/5/31 chi runhua chirun...@gmail.com

 Hi,

 On Thu, May 28, 2009 at 8:16 PM, Sheshank Dudyala d.shesh...@gmail.comwrote:

 I have started using geronimo from last week and while following tutorials
 I found these minute errors

 in http://cwiki.apache.org/GMOxDOC21/web-applications.html web
 application

 my platform details: I am using geronimo 2.1.4 with eclipse ganymede


 In http://cwiki.apache.org/GMOxDOC21/web-application-for-jms-access.htmlat 
 11. Name the
 *Message Destination Name* as jms/TestQueue. Select Next.

 I could create a destination only after I give some physical name
 otherwise it was leading me to page not found in geronimo console.

 and in geronimo-web.xml. It is still using the older JMS Resource Groups,
 instead of the newly created resource groups.


  I tried the above tutorial as well and I can create a destination
 successfully without Physical name. And I was using Geronimo v2.1.4 and
 Firefox 3.0.10 on Ubuntu 8.0.4.  Not sure it might be the problem of
 explorer?


 And in
 http://cwiki.apache.org/GMOxDOC21/web-application-for-jdbc-access.html

 the downloaded images are not exactly similar to uploaded images(they are
 slightly distorted) can anyone tell me why is this happening and

 And in geronimo-web.xml, sys:artifactId*jdbc%2Fuserds*/sys:artifactId
 should be replaced with sys:artifactId*jdbc_userds*/sys:artifactId

 Thanks for bring this into our attention. The page is now updated with
 correct datasource pool name as sys:artifactId*jdbc_userds*
 /sys:artifactId.

 Jeff Chi



Re: Basic EJB app structure

2009-04-02 Thread Ying Tang
Hi Antonio,

  Maven is not necessary in this project.
  The deployment plan of the web project (geronimo-web.xml)  looks like
this. But I don't think there is anything special.
---
?xml version=1.0 encoding=UTF-8 standalone=no?
web:web-app xmlns:app=
http://geronimo.apache.org/xml/ns/j2ee/application-2.0; xmlns:client=
http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0; xmlns:conn=
http://geronimo.apache.org/xml/ns/j2ee/connector-1.2; xmlns:dep=
http://geronimo.apache.org/xml/ns/deployment-1.2; xmlns:ejb=
http://openejb.apache.org/xml/ns/openejb-jar-2.2; xmlns:name=
http://geronimo.apache.org/xml/ns/naming-1.2; xmlns:pers=
http://java.sun.com/xml/ns/persistence; xmlns:pkgen=
http://openejb.apache.org/xml/ns/pkgen-2.1; xmlns:sec=
http://geronimo.apache.org/xml/ns/security-2.0; xmlns:web=
http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1;
dep:environment
dep:moduleId
dep:groupIddefault/dep:groupId
dep:artifactIdCalculatorWeb/dep:artifactId
dep:version1.0/dep:version
dep:typecar/dep:type
/dep:moduleId
dep:dependencies
dep:dependency
dep:groupIddefault/dep:groupId
dep:artifactIdcalculator/dep:artifactId
dep:version1.0/dep:version
dep:typecar/dep:type
/dep:dependency
/dep:dependencies
/dep:environment
web:context-root/CalculatorWeb/web:context-root
/web:web-app
---

If there is still any problem, please let me know.  And please tell me about
the detials of the error. Thanks!

Best Regards,
Ying Tang

2009/4/2 Antonio Fornié sitaronoctur...@gmail.com


 Thank you all very much!!

 I've tried to do what you've told me, Ying Tang... but it doesn't work.
 Please, is there any xml configuration that I must change. I've done
 everything similar to the tutorial you told me, but it doesn't work anyway.

 One more thing, I'm not using Maven. Is it necessary?

 Thank you very much.

 Antonio
 --
 View this message in context:
 http://www.nabble.com/Basic-EJB-app-structure-tp22817752s134p22844060.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: Basic EJB app structure

2009-04-01 Thread Ying Tang
I have successfully run this example using Eclipse 3.4.1 and Geronimo 2.1.3,
and only the CalcServlet  code was a bit differnent:

--
@EJB(name = ejb/CalculatorRemote)
private CalculatorRemote  calculator;
---

And I didn't package EJB and Web as a EAR, but added the EJB project to the
build path of Web project, and use Add and Remove Projects in Eclipse
plugin.

Hope this page gives you some hint:
http://cwiki.apache.org/GMOxDOC21/web-application-for-ejb-access.html


Best  Regards,
Ying Tang

2009/4/1 David Jencks david_jen...@yahoo.com

 It looks like the critical bit of stack trace is this:

 Caused by: java.io.NotSerializableException:
 org.apache.openejb.assembler.classic.JndiEncBuilder$Ref
at java.io.ObjectOutputStream.writeObject0(Unknown Source)

 In Openejb trunk this is certainly serialzable and I don't think we could
 have released anything with this problem.  On the other hand I have a faint
 recollection of seeing a similar problem in the past.

 Which geronimo version are you using?  Can you deploy your ear from the
 command line, not using eclipse?

 thanks
 david jencks



 On Mar 31, 2009, at 5:46 PM, Antonio Fornié wrote:


 Hello!

 First of all, I've been looking for a similar post but surprisingly I
 didn't
 find anything, so I hope I'm not asking something that it's been answered
 before.

 I'm creating a basic JEE5 app with Eclipse plugin. It all works well until
 I
 try to use an EJB. I've created a Dynamic Web Project, then a EJB Project
 and finally an Enterprise Application Project in which I've included the
 other two. It compiles without problems.

 But when I start Geronimo, and it seems everything is gone ok and the
 server
 is running it says:

 Geronimo startup complete
 00:10:32,500 INFO  [config] Configuring Service(id=Default Stateless
 Container, type=Container, provider-id=Default Stateless Container)
 00:10:32,500 INFO  [config] Configuring Service(id=Default Stateful
 Container, type=Container, provider-id=Default Stateful Container)
 00:10:32,500 INFO  [config] Configuring Service(id=Default BMP Container,
 type=Container, provider-id=Default BMP Container)
 00:10:32,500 INFO  [config] Configuring Service(id=Default CMP Container,
 type=Container, provider-id=Default CMP Container)
 00:10:32,500 INFO  [config] Configuring app: default/GeronimoEA/1.0/car
 00:10:32,703 INFO  [OpenEJB] Auto-deploying ejb Calculator:
 EjbDeployment(deployment-id=GeronimoEJB.jar/Calculator)
 00:10:32,718 INFO  [config] Loaded Module: default/GeronimoEA/1.0/car
 00:10:33,609 WARN  [startup] Unresolved ejb reference
 com.redondel.servlet.CalcServlet/calculator in bean GeronimoEnc.  Will
 attempt resolution again at runtime.
 00:10:33,703 WARN  [startup] Unresolved ejb reference
 com.redondel.servlet.CalcServlet/calculator in bean GeronimoEnc.  Will
 attempt resolution again at runtime.
 00:10:33,921 ERROR [Deployer] Deployment failed due to
 java.io.IOException: Unable to serialize GBeanData for

 default/GeronimoEA/1.0/car?J2EEApplication=default/GeronimoEA/1.0/car,j2eeType=WebModule,name=GeronimoWEB.war
at

 org.apache.geronimo.kernel.config.SerializedGBeanState.storeGBeans(SerializedGBeanState.java:145)
at

 org.apache.geronimo.kernel.config.SerializedGBeanState.writeObject(SerializedGBeanState.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.HashMap.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source

Re: Geronom 2.1.4, Thread Pools are reporting zero usage

2009-03-30 Thread Ying Tang
Thanks for clarifying. This problem is now described in Monitoring
http://cwiki.apache.org/GMOxDOC22/monitoring-the-health-of-the-apache-geronimo-server.htmlsection
of the Geronimo 2.2 doc:

http://cwiki.apache.org/GMOxDOC22/monitoring-thread-pools.html

Any comments?

2009/3/25 Jack Cai greensi...@gmail.com

 Do you mean to monitor the total number of threads that Geronimo is using
 (the whole JVM)? There's no such function in the admin console today. But it
 can be easily implemented by retrieving thread stat from the standard
 ThreadMXBean and adding it to the JVM stat. You might want to open a JIRA if
 you really want this, and I might be able to help out.

 -Jack

 2009/3/24 jklcom99 jeff_k...@yahoo.com


 Thanks Jack,

 Is there a way that we can check for thread usage in the console?


 Jack Cai wrote:
 
  I looked through the code to see how ConnectorThreadPool and
  DefaultThreadPool are actually used. It seems that ConnectorThreadPool
 is
  used by org.apache.geronimo.connector.work.GeronimoWorkManagerGBean in
  JCA,
  and DefaultThreadPool is used by Jetty and System-database. So their
 names
  are misleading in some sense. You cannot expect that the
  ConnectorThreadPool
  has any link with Tomcat's web connector. Hope this helps.
 
  -Jack
 
  2009/3/12 jklcom99 jeff_k...@yahoo.com
 
 
  I'm running 3/2/09 2.1.4-SNAPSHOT.
 
  Geronimo console is reporting zero usages for both ConnectorThreadPool
  and
  DefaultThreadPool even with our application running.
 
  ConnectorThreadPool is set to 30 Max
  DefaultThreadPool is set to 200 min and 500 max
 
 
  Thank you
 
  --
  View this message in context:
 
 http://www.nabble.com/Geronom-2.1.4%2C-Thread-Pools-are-reporting-zero-usage-tp22461310s134p22461310.html
  Sent from the Apache Geronimo - Users mailing list archive at
 Nabble.com.
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Geronom-2.1.4%2C-Thread-Pools-are-reporting-zero-usage-tp22461310s134p22681515.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.





Re: GBean documentation improvement

2009-03-23 Thread Ying Tang
Hi all,

  Thanks for your comments. I've explained a little bit about doStart(),
doFail() and doStop() on this page (
http://cwiki.apache.org/GMOxDOC22/developing-and-deploying-a-geronimo-gbean.html),
but might not be sufficient.   Any ideas for improvement?

   And we have drafted a section named Referencing another
GBeanhttp://cwiki.apache.org/GMOxDOC22/developing-and-deploying-a-geronimo-gbean.html#DevelopingandDeployingaGeronimoGBean-ReferencinganotherGBean
on this page to describe how to use *Reference*,  and gives an example.


Best Regards,

Ying Tang


2009/3/20 David Jencks david_jen...@yahoo.com


 On Mar 20, 2009, at 2:07 AM, Radim Kolar wrote:


  1. GBean Lifecycle section
  what is doFail() method expected to do? Shutdown gbean and make it sure
 that calling doStart() will do nothing?


 Agreed to add description of doFail().   What do you mean calling
 doStart()
 will do nothing ? ?
 something like this:
 doStart() - running
 doFail() - stop and mark it as failed
 doStart() - dont start it because it is marked as failed


 I think you have to call stop after fail before you call start.

 Also note that after fail or stop the actual gbean object is discarded and
 if you call start again the framework will create a whole new object for
 you.

 In practice no one has ever implemented doFail.

 thanks
 david jencks



 --
 View this message in context:
 http://www.nabble.com/GBean-documentation-improvement-tp22607392s134p22616649.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.





Re: GBean documentation improvement

2009-03-19 Thread Ying Tang
Hi Radiim,

  Thanks a lot for your suggestion. We will get down to the improvement.


Best Regards,

Ying Tang (Sophia)


2009/3/20 Radim Kolar h...@sendmail.cz


 I have some suggestions about improving following document:

 http://cwiki.apache.org/GMOxDOC22/developing-and-deploying-a-geronimo-gbean.html

 1. GBean Lifecycle section
   what is doFail() method expected to do? Shutdown gbean and make it sure
 that calling doStart() will do nothing?

 2. GBean attributes
 SimpleServerGBean doesn't have get/set methods for its attributes `name`
 and
 `port`. I would like to see and example handling of invalid input. for
 example setPort(-1). Should gbean just ignore attribute change or throw
 IllegalArgument exception?

 3. Make some example Gbean using references

 4. Deploy
 What should i do if gbean itself needs another library to work? Deploy both
 .jars into jars repository and list both as dependencies when we are about
 to create gbean instance by deploying simpleServer_deployment_plan.xml ?
 --
 View this message in context:
 http://www.nabble.com/GBean-documentation-improvement-tp22607392s134p22607392.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: JNDI in Geronimo 2

2009-03-10 Thread Ying Tang
Yes,  should be ejbd://localhost:4201. The same as the example in the
dochttp://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients
.

2009/3/10 Rex Wang rwo...@gmail.com

 Tang, I believe Russell use a remote client, but not a application client.

 to Russell, try ejbd://localhost:4201


 Rex.

 2009/3/10 Ying Tang yingtang1...@gmail.com

 Hi Russell,

 I suggest you use JDK 1.5 instead of 1.6. It is also recommended that
 Eclipse and Geronimo use the same Java environment.

 Please let me know if there is still any problem.

 Best Regards,

 Ying Tang


 2009/3/10 Russell Collins russell.coll...@mclaneat.com

  Thank you Tang.  This should be real strait forward but there has got to
 be some reason why this is not working.  Here is the configuration that I
 have.  This may help in solving this issue.



 Eclipse Ganymede

 Java 1.6..0_11

 Geronimo 2.1.2

 Geronimo 2.1.3 (tried it on both)



 There are a couple of other things that I tried that gave me different
 results.

 1.Added a runtime dependency to the Geronimo Runtime.  This gave me
 a different error.  It was a java runtime error that said that the response
 from the server is: -1

 2.Created a client j2ee application to run my app.



 Basically, I am following everything in that link that you sent me.  I am
 just getting these errors when trying to look up the object.  Any more
 insight would be greatly appreciated.





 *From:* Ying Tang [mailto:yingtang1...@gmail.com]
 *Sent:* Monday, March 09, 2009 11:21 PM
 *To:* user@geronimo.apache.org
 *Subject:* Re: JNDI in Geronimo 2



 Hi Russell,

 I tried your example on Geronimo 2.1.4.

 1. I renamed the implementation class  as FirstObjectBean.  A bit
 different from your code:
 ---

 @Stateless

 *public* *class* *FirstObjectBean* *implements* *FirstObjectRemote* {
 import

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}

 }
 ---

 2.  In the application client that referece the EJB, I used
 ---
 *import ejb.FirstObjectRemote;*
 ...
 *FirstObjectRemote* firstObject = (*FirstObjectRemote*)context.*lookup*(
 FirstObjectBeanRemote);
 ---
 3. Add the EJB project to the build path of the application client
 project.
 4. Add the two projects to the Geronimo server, and run the application
 client.

 The application works well and the Hello Russel message shows up.

 For more detailed information, please refer to:

 http://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients

 Hope this helps.


 Best Regards,

 Ying Tang  (Sophia)

  2009/3/9 Russell Collins russell.coll...@mclaneat.com

 Hello.  I am new to the list, new to EJB 3.0 and new to Geronimo 2.  I am
 pretty sure I understand all of the concepts but I am having an issue with a
 JNDI lookup in Geronimo.  I have created a Bean and it looks as follows.



 Interface:



 @Remote

 *public* *interface* *FirstObjectRemote* {

   *public* *String* *hello*(*String* name);

 }



 Class:



 @Stateless

 *public* *class* *FirstObject* *implements* *FirstObjectRemote* {



*public* *FirstObject*() {

}



@Override

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}



 }



 Everything deploys just fine (at lease I think it does).  I created a
 test class:





 *public* *class* *TheClass*

 {

 *public* *static* *void* *main*(*String*[] args)

   {

 *Properties* prop=*new* *Properties*();

 prop.*put*(*Context*.*INITIAL_CONTEXT_FACTORY*,
 org.apache.openejb.client.RemoteInitialContextFactory);

 prop.*put*(*Context*.*PROVIDER_URL*, ejbd://localhost:1099
 );



 *try*{

   *Context* context = *new* *InitialContext*(prop);

   *FirstObjectRemote* firstObject = (*FirstObjectRemote*
 )context.*lookup*(FirstObjectRemote);

   *System*.*out*.*println*(firstObject.*hello*(Russell
 ));

 }

 *catch*(*Exception* ex){

   *System*.*out*.*println*(ex.*toString*());

 }



   }

 }





 I get an error I when trying to run this.  The error that comes back is:





 *javax.naming.NamingException*: Cannot lookup '/FirstObjectRemote'.
 [Root exception is *java.rmi.RemoteException*: Error while communicating
 with server: ; nested exception is:

   java.lang.NoClassDefFoundError:
 javax/transaction/RollbackException]







 What am I missing?








Re: JNDI in Geronimo 2

2009-03-09 Thread Ying Tang
Hi Russell,

I tried your example on Geronimo 2.1.4.

1. I renamed the implementation class  as FirstObjectBean.  A bit different
from your code:
---

@Stateless

*public* *class* *FirstObjectBean* *implements* *FirstObjectRemote* { import
**

*   public* *String* *hello*(*String* name){

  *return* Hello  + name;

   }
}
---

2.  In the application client that referece the EJB, I used
---
*import ejb.FirstObjectRemote;*
...
*FirstObjectRemote* firstObject = (*FirstObjectRemote*)context.*lookup*(
FirstObjectBeanRemote);
---
3. Add the EJB project to the build path of the application client project.
4. Add the two projects to the Geronimo server, and run the application
client.

The application works well and the Hello Russel message shows up.

For more detailed information, please refer to:
http://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients

Hope this helps.


Best Regards,

Ying Tang  (Sophia)


2009/3/9 Russell Collins russell.coll...@mclaneat.com

  Hello.  I am new to the list, new to EJB 3.0 and new to Geronimo 2.  I am
 pretty sure I understand all of the concepts but I am having an issue with a
 JNDI lookup in Geronimo.  I have created a Bean and it looks as follows.



 Interface:



 @Remote

 *public* *interface* *FirstObjectRemote* {

   *public* *String* *hello*(*String* name);

 }



 Class:



 @Stateless

 *public* *class* *FirstObject* *implements* *FirstObjectRemote* {



*public* *FirstObject*() {

}



@Override

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}



 }



 Everything deploys just fine (at lease I think it does).  I created a test
 class:





 *public* *class* *TheClass*

 {   **

 *public* *static* *void* *main*(*String*[] args)

   {

 *Properties* prop=*new* *Properties*();

 prop.*put*(*Context*.*INITIAL_CONTEXT_FACTORY*,
 org.apache.openejb.client.RemoteInitialContextFactory);

 prop.*put*(*Context*.*PROVIDER_URL*, ejbd://localhost:1099);



 *try*{

   *Context* context = *new* *InitialContext*(prop);

   *FirstObjectRemote* firstObject = (*FirstObjectRemote*
 )context.*lookup*(FirstObjectRemote);

   *System*.*out*.*println*(firstObject.*hello*(Russell
 ));

 }

 *catch*(*Exception* ex){

   *System*.*out*.*println*(ex.*toString*());

 }



   }

 }





 I get an error I when trying to run this.  The error that comes back is:





 *javax.naming.NamingException*: Cannot lookup '/FirstObjectRemote'. [Root
 exception is *java.rmi.RemoteException*: Error while communicating with
 server: ; nested exception is:

   java.lang.NoClassDefFoundError: javax/transaction/RollbackException]







 What am I missing?



Re: JNDI in Geronimo 2

2009-03-09 Thread Ying Tang
Hi Russell,

I suggest you use JDK 1.5 instead of 1.6. It is also recommended that
Eclipse and Geronimo use the same Java environment.

Please let me know if there is still any problem.

Best Regards,

Ying Tang


2009/3/10 Russell Collins russell.coll...@mclaneat.com

  Thank you Tang.  This should be real strait forward but there has got to
 be some reason why this is not working.  Here is the configuration that I
 have.  This may help in solving this issue.



 Eclipse Ganymede

 Java 1.6..0_11

 Geronimo 2.1.2

 Geronimo 2.1.3 (tried it on both)



 There are a couple of other things that I tried that gave me different
 results.

 1.Added a runtime dependency to the Geronimo Runtime.  This gave me a
 different error.  It was a java runtime error that said that the response
 from the server is: -1

 2.Created a client j2ee application to run my app.



 Basically, I am following everything in that link that you sent me.  I am
 just getting these errors when trying to look up the object.  Any more
 insight would be greatly appreciated.





 *From:* Ying Tang [mailto:yingtang1...@gmail.com]
 *Sent:* Monday, March 09, 2009 11:21 PM
 *To:* user@geronimo.apache.org
 *Subject:* Re: JNDI in Geronimo 2



 Hi Russell,

 I tried your example on Geronimo 2.1.4.

 1. I renamed the implementation class  as FirstObjectBean.  A bit different
 from your code:
 ---

 @Stateless

 *public* *class* *FirstObjectBean* *implements* *FirstObjectRemote* {
 import

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}

 }
 ---

 2.  In the application client that referece the EJB, I used
 ---
 *import ejb.FirstObjectRemote;*
 ...
 *FirstObjectRemote* firstObject = (*FirstObjectRemote*)context.*lookup*(
 FirstObjectBeanRemote);
 ---
 3. Add the EJB project to the build path of the application client project.

 4. Add the two projects to the Geronimo server, and run the application
 client.

 The application works well and the Hello Russel message shows up.

 For more detailed information, please refer to:

 http://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients

 Hope this helps.


 Best Regards,

 Ying Tang  (Sophia)

  2009/3/9 Russell Collins russell.coll...@mclaneat.com

 Hello.  I am new to the list, new to EJB 3.0 and new to Geronimo 2.  I am
 pretty sure I understand all of the concepts but I am having an issue with a
 JNDI lookup in Geronimo.  I have created a Bean and it looks as follows.



 Interface:



 @Remote

 *public* *interface* *FirstObjectRemote* {

   *public* *String* *hello*(*String* name);

 }



 Class:



 @Stateless

 *public* *class* *FirstObject* *implements* *FirstObjectRemote* {



*public* *FirstObject*() {

}



@Override

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}



 }



 Everything deploys just fine (at lease I think it does).  I created a test
 class:





 *public* *class* *TheClass*

 {

 *public* *static* *void* *main*(*String*[] args)

   {

 *Properties* prop=*new* *Properties*();

 prop.*put*(*Context*.*INITIAL_CONTEXT_FACTORY*,
 org.apache.openejb.client.RemoteInitialContextFactory);

 prop.*put*(*Context*.*PROVIDER_URL*, ejbd://localhost:1099);



 *try*{

   *Context* context = *new* *InitialContext*(prop);

   *FirstObjectRemote* firstObject = (*FirstObjectRemote*
 )context.*lookup*(FirstObjectRemote);

   *System*.*out*.*println*(firstObject.*hello*(Russell
 ));

 }

 *catch*(*Exception* ex){

   *System*.*out*.*println*(ex.*toString*());

 }



   }

 }





 I get an error I when trying to run this.  The error that comes back is:





 *javax.naming.NamingException*: Cannot lookup '/FirstObjectRemote'. [Root
 exception is *java.rmi.RemoteException*: Error while communicating with
 server: ; nested exception is:

   java.lang.NoClassDefFoundError: javax/transaction/RollbackException]







 What am I missing?





Re: new IBM book: Using WASCE 2.1

2009-03-05 Thread Ying Tang
Hi Juergen,

Thanks for your suggestion.  I made some changes  and added a GBean
methods section:

http://cwiki.apache.org/GMOxDOC22/developing-and-deploying-a-geronimo-gbean.html

Any comment  is appreciated.


Best  Wishes,

Sophia


2009/3/5 Juergen Weber webe...@gmail.com


 Hi Sophia,

 I'd suggest you also write (the for me formerly non-obvious points ;-):

 - a gbean consists of classes in a jar + plan
 - you deploy both
 - infoFactory.addAttribute(port  relates to attribute name=port
 - infoFactory.addOperation names the user methods you can call
 - how do you call an operation?
  -

 http://www.nabble.com/How-do-you-access-a-GBean-via-JNDI--td21621410s134.html#a21621410
 - how do you put a GBean into JNDI
  -

 http://www.nabble.com/How-do-you-access-a-GBean-via-JNDI--td21621410s134.html#a21621410

 Thanks,
 Juergen



 Sophia Tang wrote:
 
  Thanks Radim for your suggestion.
 
  A  topic named Developing and Deploying a Geronimo
  GBea
 http://cwiki.apache.org/confluence/display/GMOxDOC22/Developing+and+Deploying+a+Geronimo+GBean
 n
   has been added to the
  referencehttp://cwiki.apache.org/confluence/display/GMOxDOC22/Reference
 section
  in Geronimo 2.2 documentation wiki:
 
 
 http://cwiki.apache.org/confluence/display/GMOxDOC22/Developing+and+Deploying+a+Geronimo+GBean
 
 
 
  Any of your comments is welcome.
 
 
  Best Regards,
 
 
  Ying Tang


 --
 View this message in context:
 http://www.nabble.com/new-IBM-book%3A-Using-WASCE-2.1-tp22117057s134p22334640.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: new IBM book: Using WASCE 2.1

2009-03-03 Thread Ying Tang
Thanks Radim for your suggestion.

A  topic named Developing and Deploying a Geronimo
GBeahttp://cwiki.apache.org/confluence/display/GMOxDOC22/Developing+and+Deploying+a+Geronimo+GBeann
 has been added to the
referencehttp://cwiki.apache.org/confluence/display/GMOxDOC22/Referencesection
in Geronimo 2.2 documentation wiki:

http://cwiki.apache.org/confluence/display/GMOxDOC22/Developing+and+Deploying+a+Geronimo+GBean



Any of your comments is welcome.


Best Regards,


Ying Tang

2009/2/22 Radim Kolar h...@sendmail.cz


 Yes, its pretty good to have good cookbook for Geronimo. I think biggest
 problem with Geronimo is lack of documentation for programmers. For example
 some deeper article about GBeans (making GBean based app and deploying it)
 would be very usefull for us.


 Juergen Weber wrote:
 
  There is a hot new (18 Februar 2009) book at IBM redbooks:
 
  Using WebSphere Application Server Community Edition 2.1
 
  http://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/sg247639.html
 
  Thanks to the redbook team for great Geronimo documentation.
 
  Juergen
 

 --
 View this message in context:
 http://www.nabble.com/new-IBM-book%3A-Using-WASCE-2.1-tp22117057s134p22146192.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: Admin Console Access and Security Realm

2009-02-19 Thread Ying Tang
Hi Michael,

As far as I can tell, the SQL database security realm is used to
authenticate username and password from the built-in Derby database, not for
Geronimo admin console.

For changing the username and password for the Administration Console,  you
can use the *Users and Groups* portlet  in the console.

Please see this page for more details:
http://cwiki.apache.org/GMOxDOC22/changing-the-username-and-password.html

Hope this helps.


Best Regards,

Ying Tang

2009/2/19 Michael2 wtist...@yahoo.com


 I created a new SQL Security Realm, tested and deployed to Geronimo 2.1.3
 server, but when I reboot the server and try to use the new user name and
 password defined in the new SQL Security Realm to log into the admin
 console, it does not work. I have to use the default user name and password
 to get in.

 My question is: can I use the SQL Security Realm for the Admin Console user
 authentication?

 Thanks for your help.

 Michael.
 --
 View this message in context:
 http://www.nabble.com/Admin-Console-Access-and-Security-Realm-tp22093927s134p22093927.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: Get The page cannot be displayed Error when try to access database pool edit page

2009-02-15 Thread Ying Tang
 Hi,

 This is perhaps caused by a maximum URL length limitation (2,083
characters) of IE.



2009/2/13 Michael2 wtist...@yahoo.com


 I created an Informix database pool in Geronimo 2.1.3 using the database
 pool
 wizard, I was able to successfully test the database connection before
 deploying it. I can see the database pool I just created is listed in the
 Available database pool list with a running status. When I click the
 Usage
 link, I see the instructions about how to use this database pool. However,
 when I click the Edit link, I get a The page cannot be displayed error.
 When I check the log file there is no error message there. I also check
 other default database pool's Edit links and I do not have any problem to
 open these database pool Edit pages.

 Can someone help me find where my problem is?

 In a case like this, although I cannot edit the pool anymore, is it running
 properly and can I still use it?

 Thanks in advance.

 Michael
 --
 View this message in context:
 http://www.nabble.com/Get-%22The-page-cannot-be-displayed%22-Error-when-try-to-access-database-pool-edit-page-tp21893706s134p21893706.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: Use a keystore in java application

2009-02-06 Thread Ying Tang
As far I know,  for 1-way authentication, you only have to import the
keystore and certificate from the Web service,  and set up the environment
in the Web Service Client ( via System.setProperty).

You need to provide your own certificate in a keystore for mutual
authentications, that is, when you also want the remote Web service to trust
you.



Best Regards,

Ying Tang



2009/1/28 cesarAugusto ccesar.guz...@gmail.com


 I'm also a little confused with this subject, but my intention is connect
 to
 an existing websebservice, I have a certificate from the owner of the
 webservices, and I have my java application deployed in a web sphere
 community edition, my concrete question is if I need to configure a
 keystore
 in the application server (Web Sphere C.E) to establish communication with
 that existing webservice?.
 or
 I have a keystore with the certificate of my werservice provider, Can I use
 this keystore to establish this communication?

 thanks in advance.



 djencks wrote:
 
  Sorry, I'm confused.  Are you trying to expose a web service and need
  to set up a https connector using this certificate or are you trying
  to connect to an existing webservice that requires client certificate
  authentication?
 
  I assume since you mention wasce that you are using geronimo-
  tomcat which was ce version are you using?
 
  thanks
  david jencks
 
  On Jan 27, 2009, at 1:27 PM, cesarAugusto wrote:
 
 
  Hi, everybody,
 
  I formed a keystore from keystore configuration of was ce.
  I log me in for administrative console, in
  console navigation
  -Security
  --keystores.
 
  I created a keystore named testKS in this I import a certificate and
  create
  a private key.
 
  I need to establish a communication with a WebService published over
  https,
  normally I use instruction like
  // path to the JKS which contains the public cert of the server
 
  System.setProperty(javax.net.ssl.trustStore,path);
 
  // store password of the above JKS
  System.setProperty(javax.net.ssl.trustStorePassword,password);
 
  However, how can I access the keystore from my WASCE distribution.
 
  I need to establish a HTTPS Connector?
  or
  I need to access directly to WASCE_HOME\var\security\keystores
  \testKS?
 
  thanks in advance.
 
 
 
  --
  View this message in context:
 
 http://www.nabble.com/Use-a-keystore-in-java-application-tp21694808s134p21694808.html
  Sent from the Apache Geronimo - Users mailing list archive at
  Nabble.com.
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Use-a-keystore-in-java-application-tp21694808s134p21706084.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: deployment for MySQL XA.

2009-01-20 Thread Ying Tang
Thanks for the detailed instruction.  It has been documented here:
http://cwiki.apache.org/confluence/display/GMOxDOC22/Configuring+a+MySQL+datasource

Any comments?

2009/1/20 Forrest Xia forres...@gmail.com

 Ok, give you a full instruction about how to setup datasource in geronimo.

 There are two ways:
 1. Create a datasource and deploy it as a standalone JEE connector module
 2. Embed a datasource definition in an application deployment plan.

 Method 1:
 1. Refer to the attachment sample-mysql-xa-ds-plan-standalone.xml to
 create a standalone JEE connector deployment plan
 2. Install the mysql jdbc driver to geronimo repository via admin console,
 and ensure its repository id is same as the defined one in the sample plan.
 3. Use command line to deploy it, sample command for mysql xa datasource:
 $GERONIMO_HOME/bin/deploy.sh -u system -p manager deploy
 $GERONIMO_HOME/repository/org/tranql/tranql-connector-mysql-xa/1.2/tranql-connector-mysql-xa-1.2.rar
 sample-mysql-xa-ds-plan-standalone.xml
 4. Then you will able to use the datasource via its jndi name
 java:comp/env/jdbc/mysqlxads

 Method 2:
 1. Refer to the attachment sample-mysql-xa-ds-plan-embeded.xml to create
 an application deployment plan, replace web module and ejb module according
 to your application
 2. Install the mysql jdbc driver to geronimo repository via admin console,
 and ensure its repository id is same as the defined one in the sample plan.
 3. Use command line or admin console to deploy your application with the
 plan. For example, the command line as follows:
 $GERONIMO_HOME/bin/deploy.sh -u system -p manager deploy yourapp.ear
 sample-mysql-xa-ds-plan-embeded.xml
 4. Then you will able to use the datasource via its jndi name
 java:comp/env/jdbc/mysqlxads


 The transaction config element is something like:
 For XA:
 connectionmanager
   xa-transaction
  transaction-caching/
   /xa-transaction
   ...
 /connectionmanager

 For local transaction:
 connectionmanager
local-transaction/
...
 /connectionmanager

 As to how to configure MS SQL datasource, it's similar.

 Good luck!

 Forrest



Re: car-maven-plugin and GEP

2009-01-03 Thread Ying Tang
   Tim, thanks for your explanation. We have created a page for this topic
based on your reply in the  document wiki :   Importing applications built
with car-maven-plugin into GEP  (
http://cwiki.apache.org/confluence/display/GMOxDOC22/Importing+applications+built+with+car-maven-plugin+into+GEP
)http://cwiki.apache.org/confluence/display/GMOxDOC22/Importing+applications+built+with+car-maven-plugin+into+GEP

   Bongosdude, thanks for your question.

   Any comments on the content,  title, or whatever?  And let me know  if I
missed anything.

http://cwiki.apache.org/confluence/display/GMOxDOC22/Importing+applications+built+with+car-maven-plugin+into+GEP