Re: [JBoss-user] NoInitialContext
Hi, Actually, I don't put the message in an attachment... It's just that some mail clients don't process the signature right, and think the whole mail is in an attachment... IIRC this problem arises mostly with windows mail clients... it's a MIME problem I believe... Regards, Hans On Mon, 2002-11-18 at 03:14, Guy Rouillier wrote: > Due to the large number of viruses distributed by email attachment, many > people will not open email attachments from people they don't know. Your > messages will get widest exposure on the JBoss mailing list if you include > the text in the body of the message, rather than as an attachment to it. > > - Original Message - > From: "SainTiss" <[EMAIL PROTECTED]> > To: "JBoss Mailing" <[EMAIL PROTECTED]> > Sent: Sunday, November 17, 2002 11:30 AM > Subject: [JBoss-user] NoInitialContext > > > > signature.asc Description: This is a digitally signed message part
Re: [JBoss-user] NoInitialContext
Right... That explains it... Thanks to all who responded... I can see that it's explained at http://www.jboss.org/online-manual/HTML/ch01s15.html indeed, but it's a bit tricky, since on the jboss site, it is referred to as deprecated docs, so you don't really know which parts are relevant for jboss3 and which aren't... Hans On Mon, 2002-11-18 at 14:47, Stefan Arentz wrote: > > On Monday, Nov 18, 2002, at 14:12 Europe/Amsterdam, Brian Johnson wrote: > > > A "client" would be in the same VM if it was a servlet or something > > similar running within the app server. > > Back to the original question, if you need to talk to JBoss from a > different *process* or even a different *machine* then you will need to > specify the location of the initial context. > > The easiest way to do that is to include a jndi.properties file in your > client's classpath. Mine looks like this: > > java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory > java.naming.provider.url=jnp://localhost:1099 > java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces > > If you need to talk to a remote instance of JBoss then change the > provider.url accordingly. You can also programatically create the > properties and pass them to the constructor of the InitialContext(). > > S. > > > > --- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > signature.asc Description: This is a digitally signed message part
Re: [JBoss-user] NoInitialContext
El Domingo 17 de Noviembre del 2002 02:50 PM, SainTiss escribió: > On Sun, 2002-11-17 at 19:33, G.L. Grobe wrote: > Well yes, but now I can't see how it would be possible to run them in > the same VM... See below... > I mean, you always have to issue the java command twice, no? If you are using a '"remote client" you have to specify the jndi.properties to use by including the directory where that file is in within the client's classpath. You can also create the required properties within your code and use them for the initial context creation: InitialContext ctx = new InitialContext(yourCustomProps); > How can a client ever be in the same VM as the jboss server? That is the case when you use an EJB Bean whithin another. In this case the client and the server are within the same VM (the same app server). No need to run the command twice, see? Rodrigo Chandía --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] NoInitialContext
On Monday, Nov 18, 2002, at 14:12 Europe/Amsterdam, Brian Johnson wrote: A "client" would be in the same VM if it was a servlet or something similar running within the app server. Back to the original question, if you need to talk to JBoss from a different *process* or even a different *machine* then you will need to specify the location of the initial context. The easiest way to do that is to include a jndi.properties file in your client's classpath. Mine looks like this: java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=jnp://localhost:1099 java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces If you need to talk to a remote instance of JBoss then change the provider.url accordingly. You can also programatically create the properties and pass them to the constructor of the InitialContext(). S. --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] NoInitialContext / Classpath
http://www.jboss.org/online-manual/HTML/ch01s15.html On Sun, 2002-11-17 at 14:10, SainTiss wrote: > So this means you do need a jndi.properties file in the classpath when > running the client? > > After even more research, I found out that the jndi.properties file in > the server/default/conf directory isn't right... It seems you need a > line like this as well: > > java.naming.provider.url=localhost > > As for the classpath, it seems you need the client/jbossall-client.jar > to be included as well, and then the client will run... > > Is there a place where this is explained? I mean, I found out about all > this just browsing the web, but isn't there some simple document about > "running my first ejb client" or something? > > Thanks, > > Hans > > > > On Sun, 2002-11-17 at 19:33, G.L. Grobe wrote: > > >I'm using the same "java" command to launch jboss as I use to launch the > > >client, so I'm pretty sure this is the case... So why am I still getting > > >this exception? > > > > So in other words ... it sounds like you're launching two instances of the > > JVM and of course that would be done using the same command, but ... > > > > >"When you use the JNDI API within the same VM that the JBoss server is > > >running do not have to perform any special configuration to create a > > >JNDI InitialContext. You simply create an InitialContext without any > > >arguments." > > > > You have one for the JBoss server, and one for the client. Can you see how > > you're not using the same VM? > > > > > > > > > > --- > > This sf.net email is sponsored by: To learn the basics of securing > > your web site with SSL, click here to get a FREE TRIAL of a Thawte > > Server Certificate: http://www.gothawte.com/rd524.html > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] NoInitialContext
A "client" would be in the same VM if it was a servlet or something similar running within the app server. On Sun, 2002-11-17 at 13:50, SainTiss wrote: > On Sun, 2002-11-17 at 19:33, G.L. Grobe wrote: > > >I'm using the same "java" command to launch jboss as I use to launch the > > >client, so I'm pretty sure this is the case... So why am I still getting > > >this exception? > > > > So in other words ... it sounds like you're launching two instances of the > > JVM and of course that would be done using the same command, but ... > > > > >"When you use the JNDI API within the same VM that the JBoss server is > > >running do not have to perform any special configuration to create a > > >JNDI InitialContext. You simply create an InitialContext without any > > >arguments." > > > > You have one for the JBoss server, and one for the client. Can you see how > > you're not using the same VM? > > > > > > Well yes, but now I can't see how it would be possible to run them in > the same VM... > I mean, you always have to issue the java command twice, no? > How can a client ever be in the same VM as the jboss server? > > Hans --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] NoInitialContext
Due to the large number of viruses distributed by email attachment, many people will not open email attachments from people they don't know. Your messages will get widest exposure on the JBoss mailing list if you include the text in the body of the message, rather than as an attachment to it. - Original Message - From: "SainTiss" <[EMAIL PROTECTED]> To: "JBoss Mailing" <[EMAIL PROTECTED]> Sent: Sunday, November 17, 2002 11:30 AM Subject: [JBoss-user] NoInitialContext --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] NoInitialContext / Classpath
So this means you do need a jndi.properties file in the classpath when running the client? After even more research, I found out that the jndi.properties file in the server/default/conf directory isn't right... It seems you need a line like this as well: java.naming.provider.url=localhost As for the classpath, it seems you need the client/jbossall-client.jar to be included as well, and then the client will run... Is there a place where this is explained? I mean, I found out about all this just browsing the web, but isn't there some simple document about "running my first ejb client" or something? Thanks, Hans On Sun, 2002-11-17 at 19:33, G.L. Grobe wrote: > >I'm using the same "java" command to launch jboss as I use to launch the > >client, so I'm pretty sure this is the case... So why am I still getting > >this exception? > > So in other words ... it sounds like you're launching two instances of the > JVM and of course that would be done using the same command, but ... > > >"When you use the JNDI API within the same VM that the JBoss server is > >running do not have to perform any special configuration to create a > >JNDI InitialContext. You simply create an InitialContext without any > >arguments." > > You have one for the JBoss server, and one for the client. Can you see how > you're not using the same VM? > > > > > --- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > signature.asc Description: This is a digitally signed message part
Re: [JBoss-user] NoInitialContext
On Sun, 2002-11-17 at 19:33, G.L. Grobe wrote: > >I'm using the same "java" command to launch jboss as I use to launch the > >client, so I'm pretty sure this is the case... So why am I still getting > >this exception? > > So in other words ... it sounds like you're launching two instances of the > JVM and of course that would be done using the same command, but ... > > >"When you use the JNDI API within the same VM that the JBoss server is > >running do not have to perform any special configuration to create a > >JNDI InitialContext. You simply create an InitialContext without any > >arguments." > > You have one for the JBoss server, and one for the client. Can you see how > you're not using the same VM? > > Well yes, but now I can't see how it would be possible to run them in the same VM... I mean, you always have to issue the java command twice, no? How can a client ever be in the same VM as the jboss server? Hans signature.asc Description: This is a digitally signed message part
Re: [JBoss-user] NoInitialContext
>I'm using the same "java" command to launch jboss as I use to launch the >client, so I'm pretty sure this is the case... So why am I still getting >this exception? So in other words ... it sounds like you're launching two instances of the JVM and of course that would be done using the same command, but ... >"When you use the JNDI API within the same VM that the JBoss server is >running do not have to perform any special configuration to create a >JNDI InitialContext. You simply create an InitialContext without any >arguments." You have one for the JBoss server, and one for the client. Can you see how you're not using the same VM? --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] NoInitialContext
Hi, I'm writing a very simple client atm, but something's wrong... I get this exception: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280) at javax.naming.InitialContext.lookup(InitialContext.java:347) at eenloketsysteem.TestClient.main(TestClient.java:16) I've done a bit of research, and it seems that a jndi.properties file needs to be on the classpath... However, in the jboss docs I find: "When you use the JNDI API within the same VM that the JBoss server is running do not have to perform any special configuration to create a JNDI InitialContext. You simply create an InitialContext without any arguments." I'm using the same "java" command to launch jboss as I use to launch the client, so I'm pretty sure this is the case... So why am I still getting this exception? Thanks, Hans signature.asc Description: This is a digitally signed message part