A question about jndi
Hi, I have a remote interface *my.test.Echo* and a ejb *my.test.EchoBean*. I don't do any configuration for the jndi in deployment descriptor and deployment plan. Then using *...@ejb(name=my/test/Echo) private Echo echo; *can find the ejb and run successfully.* * But why using *Context ctx = new InitialContext(); Echo echo = (Echo)ctx.lookup(java:comp/env/my/test/Echo); * there is: *javax.naming.NotContextException: my/test/Echo *Who can help me?* * Geronimo version 2.2 -- Best Regards, Rodger.
Re: war framework / external jar setup
For easy, try the second linked doc using the admin console. Or If the command has any problem(in fact,it works smoothly), you can manually create a repository directory in geronimo-home/repository.suppose the jar is impl.jar, put it into a directory,like geronimo-home/repository/com/group/impl/impl.jar And then add a dependency in you deployment plan,like dependencies dependency groupIdcom.group/groupId artifactIdimpl/artifactId typejar/type /dependency /dependencies -- Best Regards, Rodger.
Re: How to reuse the jars in geronimo repository?
The specified dependency is used for classloading when the war is deployed on geronimo. I think red circle X is because the compiler can't find the right classes. Add the very jar to the build path. -- Best Regards, Rodger.
Re: Binaries not getting deleted while un-deploying axis2-1.4.1 war from Geronimo 2.1.4
That problem exists not only when deploying axis2 webapp. It seems any packages containing third party jars in WEB-INF/lib can not be removed because of jars in use.
Re: Eclipse connect to Geronimo on other host
Is there a firewall on server host? Maybe port is not permitted. Why not try netstat -a on server host? -- Best Regards, Rodger.
Re: Dynamically load jars in running state
A module's gbeans are managed in a Configuration. One Configuration corresponds to one MultiParentClassLoader instance.All dependencies in deployment plan are added to the classloader as search-paths. If the dependency is a .car , then the .car's corresponding Configuration's classloader will become a parent classloader of the current classloader. If the dependency is a jar, then the jar's path will become one URL added to the current classloader. I'm still learning Geronimo. If I make a mistake, pls don't mind. -- Best Regards, Rodger.
Re: JNDI Name for EJB3
And geronimo_home/repository/org/apache/openejb/openejb-client/3.0.1/openejb-client-3.0.1.jar is necessary. 2009/6/18 Rodger eternalj...@gmail.com http://cwiki.apache.org/GMOxDEV/client-jndi-names.html will use a RemoteInitialContextFactory. Like: Properties p = new Properties(); p.setProperty(Context.INITIAL_CONTEXT_FACTORY, org.apache.openejb.client.RemoteInitialContextFactory); p.setProperty(Context.PROVIDER_URL, ejbd://localhost:4201); Context initialContext=null; try { initialContext=new InitialContext(p); Object object1 = initialContext.lookup(Secure3Remote); Secure3Remote s3r=(Secure3Remote)object1; } catch (NamingException e) { e.printStackTrace(); } -- Best Regards, Rodger. -- Best Regards, Rodger.
Error when deploying a realm with a login module:org.apache.geronimo.openejb.OpenejbRemoteLoginModule
My realm deploy plan named security_realm.xml is as follow: = module xmlns=http://geronimo.apache.org/xml/ns/deployment-1.2; environment moduleId groupIdconsole.realm/groupId artifactIdremote-openejb-realm/artifactId version1.0/version typecar/type /moduleId dependencies dependency groupIdorg.apache.geronimo.framework/groupId artifactIdj2ee-security/artifactId typecar/type /dependency /dependencies /environment gbean name=remote-openejb-realm class=org.apache.geronimo.security.realm.GenericSecurityRealm xsi:type=dep:gbeanType xmlns:dep= http://geronimo.apache.org/xml/ns/deployment-1.2; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; attribute name=realmNameremote-openejb-realm/attribute reference name=ServerInfo nameServerInfo/name /reference xml-reference name=LoginModuleConfiguration log:login-config xmlns:log= http://geronimo.apache.org/xml/ns/loginconfig-2.0; log:login-module control-flag=REQUIRED wrap-principals=false log:login-domain-nameremote-openejb-realm/log:login-domain-name log:login-module-classorg.apache.geronimo.openejb.OpenejbRemoteLoginModule/log:login-module-class log:option name=RemoteSecurityRealmtest-realm/log:option log:option name=ServerURIejbd://localhost:4201/log:option /log:login-module /log:login-config /xml-reference /gbean /module = When binjava -jar deployer.jar deploy d:\security_realm.xml The error is as follows: Error: Operation failed: start of console.realm/remote-openejb-realm/1.0/car failed Unknown start exception Configuration console.realm/remote-openejb-realm/1.0/car failed to start due to the following reasons: The service ServiceModule=console.realm/remote-openejb-realm/1.0/car,j2eeType=SecurityRe alm,name=remote-openejb-realm did not start because org.apache.geronimo.openejb.OpenejbRemoteLoginModule in classloader console.realm/remote-openejb-realm/1.0/car It seems that the system can not find the class org.apache.geronimo.openejb.OpenejbRemoteLoginModule. I get the reference from http://cwiki.apache.org/GMOxDOC22/configuring-javaee-app-client-security.html -- Best Regards, Rodger.
Re: Error when deploying a realm with a login module:org.apache.geronimo.openejb.OpenejbRemoteLoginModule
My geronimo version is 2.1.4 And in repository,there is no client-security. Thanks. 2009/6/9, David Jencks david_jen...@yahoo.com: I don't see anything obviously wrong. It _really_ shouldn't make a difference but could you try using client- security instead of j2ee-security in your plan and also include the geronimo version in the dependency? Also, what is the geronimo version? thanks david jencks On Jun 9, 2009, at 6:16 AM, Rodger wrote: My realm deploy plan named security_realm.xml is as follow: = module xmlns=http://geronimo.apache.org/xml/ns/deployment-1.2; environment moduleId groupIdconsole.realm/groupId artifactIdremote-openejb-realm/artifactId version1.0/version typecar/type /moduleId dependencies dependency groupIdorg.apache.geronimo.framework/groupId artifactIdj2ee-security/artifactId typecar/type /dependency /dependencies /environment gbean name=remote-openejb-realm class=org.apache.geronimo.security.realm.GenericSecurityRealm xsi:type=dep:gbeanType xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; attribute name=realmNameremote-openejb-realm/attribute reference name=ServerInfo nameServerInfo/name /reference xml-reference name=LoginModuleConfiguration log:login-config xmlns:log=http://geronimo.apache.org/xml/ns/loginconfig-2.0 log:login-module control-flag=REQUIRED wrap- principals=false log:login-domain-nameremote-openejb-realm/ log:login-domain-name log:login-module- classorg.apache.geronimo.openejb.OpenejbRemoteLoginModule/ log:login-module-class log:option name=RemoteSecurityRealmtest- realm/log:option log:option name=ServerURIejbd://localhost: 4201/log:option /log:login-module /log:login-config /xml-reference /gbean /module = = = == When binjava -jar deployer.jar deploy d:\security_realm.xml The error is as follows: Error: Operation failed: start of console.realm/remote-openejb-realm/1.0/car failed Unknown start exception Configuration console.realm/remote-openejb-realm/1.0/car failed to start due to the following reasons: The service ServiceModule=console.realm/remote-openejb-realm/1.0/ car,j2eeType=SecurityRe alm,name=remote-openejb-realm did not start because org.apache.geronimo.openejb.OpenejbRemoteLoginModule in classloader console.realm/remote-openejb-realm/1.0/car It seems that the system can not find the class org.apache.geronimo.openejb.OpenejbRemoteLoginModule. I get the reference from http://cwiki.apache.org/GMOxDOC22/configuring-javaee-app-client-security.html -- Best Regards, Rodger. -- Best Regards, Rodger.
Re: Error when deploying a realm with a login module:org.apache.geronimo.openejb.OpenejbRemoteLoginModule
Yes,that's the trick.Thanks. 2009/6/10, viola.lu viola...@gmail.com: pls add openejb dependency as below: dependency groupId org.apache.geronimo.configs/groupId artifactIdopenejb/artifactId typecar/type /dependency Then it will find OpenEjbremoteloginmodule class. Rodger-10 wrote: My geronimo version is 2.1.4 And in repository,there is no client-security. Thanks. 2009/6/9, David Jencks david_jen...@yahoo.com: I don't see anything obviously wrong. It _really_ shouldn't make a difference but could you try using client- security instead of j2ee-security in your plan and also include the geronimo version in the dependency? Also, what is the geronimo version? thanks david jencks On Jun 9, 2009, at 6:16 AM, Rodger wrote: My realm deploy plan named security_realm.xml is as follow: = module xmlns=http://geronimo.apache.org/xml/ns/deployment-1.2; environment moduleId groupIdconsole.realm/groupId artifactIdremote-openejb-realm/artifactId version1.0/version typecar/type /moduleId dependencies dependency groupIdorg.apache.geronimo.framework/groupId artifactIdj2ee-security/artifactId typecar/type /dependency /dependencies /environment gbean name=remote-openejb-realm class=org.apache.geronimo.security.realm.GenericSecurityRealm xsi:type=dep:gbeanType xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; attribute name=realmNameremote-openejb-realm/attribute reference name=ServerInfo nameServerInfo/name /reference xml-reference name=LoginModuleConfiguration log:login-config xmlns:log=http://geronimo.apache.org/xml/ns/loginconfig-2.0 log:login-module control-flag=REQUIRED wrap- principals=false log:login-domain-nameremote-openejb-realm/ log:login-domain-name log:login-module- classorg.apache.geronimo.openejb.OpenejbRemoteLoginModule/ log:login-module-class log:option name=RemoteSecurityRealmtest- realm/log:option log:option name=ServerURIejbd://localhost: 4201/log:option /log:login-module /log:login-config /xml-reference /gbean /module = = = == When binjava -jar deployer.jar deploy d:\security_realm.xml The error is as follows: Error: Operation failed: start of console.realm/remote-openejb-realm/1.0/car failed Unknown start exception Configuration console.realm/remote-openejb-realm/1.0/car failed to start due to the following reasons: The service ServiceModule=console.realm/remote-openejb-realm/1.0/ car,j2eeType=SecurityRe alm,name=remote-openejb-realm did not start because org.apache.geronimo.openejb.OpenejbRemoteLoginModule in classloader console.realm/remote-openejb-realm/1.0/car It seems that the system can not find the class org.apache.geronimo.openejb.OpenejbRemoteLoginModule. I get the reference from http://cwiki.apache.org/GMOxDOC22/configuring-javaee-app-client-security.html -- Best Regards, Rodger. -- Best Regards, Rodger. -- View this message in context: http://www.nabble.com/Error-when-deploying-a-realm-with-a-login-module%3Aorg.apache.geronimo.openejb.OpenejbRemoteLoginModule-tp23942630s134p23955030.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. -- Best Regards, Rodger.
Re: Exception when run Bank sample client in a command line window
Yes,that's the exception's reason. -- Best Regards, Rodger.
Re: set openejb jndi format in geronimo
Do you mean bin/geronimo.bat run -Dopenejb.jndiname.format={ejbName}/{interfaceClass} ?
Re: set openejb jndi format in geronimo
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*
Re: set openejb jndi format in geronimo
Yes.Great.It's ok. Thank you very much for your patient help! Rodger.
Exception when run Bank sample client in a command line window
When the sample project is in Eclipse, I run the BankClient.class smoothly.But in a command line window , by using the command: java -classpath %classpath%;%SAMPLE_HOME%/applications/bank/bank-client/target/bank-client-2.1.1.2.jar;%SAMPLE_HOME%/applications/bank/bank-ejb/target/bank-ejb-2.1.1.2.jar;%GERONIMO_HOME%/repository/org/apache/openejb/openejb-client/3.0/openejb-client-3.0.jar;%GERONIMO_HOME%/repository/org/apache/geronimo/specs/geronimo-ejb_3.0_spec/1.0.1/geronimo-ejb_3.0_spec-1.0.1.jar org.apache.geronimo.samples.bank.client.BankClient There are Exceptions: == javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hashtable {java.naming.provider.url=ejbd://localhost:4201, java.naming.factory.initial=org.apache.openejb.client.RemoteInitialContextFactory} [Root exception is java.lang.NullPointerException] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:2 46) at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.j ava:327) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:357 ) at javax.naming.InitialContext.internalInit(InitialContext.java:295) at javax.naming.InitialContext.init(InitialContext.java:212) at org.apache.geronimo.samples.bank.client.BankClient.main(BankClient.ja va:37) Caused by: java.lang.NullPointerException at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:2 38) ... 5 more == Who can give me some suggestions? Thanks a lot. Rodger
set openejb jndi format in geronimo
In openejb standalone version, we can set the jndi name format by two ways: 1. $ ./bin/openejb start -Dopenejb.jndiname.format={ejbName}/{interfaceClass} 2.set in the META-INFO/openejb-jar.xml as follows: openejb-jar properties openejb.deploymentId.format = {ejbName} openejb.jndiname.format = {deploymentId}{interfaceClass} /properties /openejb-jar But how to set it in Geronimo? Rodger Thanks.