RE: [jBoss-User] This one has to be simple...

2000-05-31 Thread marc fleury

The 5 files thing is going to cause unecessary head scratching.

marc


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jim Archer
> Sent: Tuesday, May 30, 2000 11:31 PM
> To: jBoss
> Subject: Re: [jBoss-User] This one has to be simple...
>
>
> Rickard, at this point, I'm wondering what jar files should be on
> a client
> programs classpath. Is it correct to assume that all of the 5 jar
> files in
> the dist\client directory should be there? Any others?
>
> Thanks!
>
> Jim
>
> --On Wednesday, May 31, 2000 8:16 AM +0200 Rickard Öberg
> <[EMAIL PROTECTED]> wrote:
>
> > Hey
> >
> > [EMAIL PROTECTED] wrote:
> >> Just Loaded Jboss...Very Impressive. I do not know of any
> product that I
> >> have downloaded and just run. Bravo!
> >
> > Thanks :-) Yeah, the "download and run" thing is nice. I hope we can
> > stay that way for some time :-)
> >
> >> I know that I am missing something very simple in a test
> client I wrote.
> >> I deployed a HelloWorld Bean and for some reason cannot connect to it.
> >> Here is my client:
> > 
> >
> > Well, the error definitely shows that ejb.jar is missing from classpath.
> > Try again :-)
> >
> > BTW you can use jnp-client.jar instead of jnpserver.jar.
> >
> > regards,
> >   Rickard
> >
> > --
> > Rickard Öberg
> >
> > @home: +46 13 177937
> > Email: [EMAIL PROTECTED]
> > http://www.telkel.com
> > http://www.jboss.org
> > http://www.dreambean.com
> >
> >
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > Problems?:   [EMAIL PROTECTED]
>
>
>
>
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]
>
>



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] This one has to be simple...

2000-05-31 Thread Rickard Öberg

Hi!

[EMAIL PROTECTED] wrote:
> 
> I looked for this post but could not find it...can you provide?

Here's a copy/paste:

Well, the only thing you need to include in classpath, really, is
jboss-client.jar. HOWEVER, you need to *place* jnp-client.jar next to it
(i.e. in same directory), because it points to it through the Class-Path
manifest. 

Again:
* Put jboss-client.jar and jnp-client.jar in same dir
* Add jboss-client.jar to classpath
* Run :-)

> 2- please send me a page with the "power user" dynamic loading feature
> setting explained (3 lines is good!!! simple is good) I think this is a
> great feature and we need to advertise it.. what? no classes needed at ALL?
> I'll put on website

Well, here ya go:
Reference ref = new Reference("mybean.MyHome", new
StringRefAddr("URL","jnp://somehost/myapp/MyHome"),
"org.jnp.interfaces.jnp.jnpURLContextFactory","http://somehost:8081/");
MyHome home = (MyHome)NamingManager.getObjectInstance(ref, null, null,
null);

Something like that. This should make JNDI get the JNDI-implementation
from the jBoss server at somehost, and the rest should follow from that.
--

That's all. If you use the Reference trick then all of classes will be
loaded through RMI's dynamic classloading (if you have installed a
security manager).

/Rickard

-- 
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] This one has to be simple...

2000-05-31 Thread john_kidd



I looked for this post but could not find it...can you provide?






Rickard Öberg <[EMAIL PROTECTED]>
Sent by: <[EMAIL PROTECTED]>
05/31/00 01:34 AM
Please respond to "jBoss"

        
        To:        jBoss <[EMAIL PROTECTED]>
        cc:        
        Subject:        Re: [jBoss-User] This one has to be simple...


Hi!

Jim Archer wrote:
> Rickard, at this point, I'm wondering what jar files should be on a client
> programs classpath. Is it correct to assume that all of the 5 jar files in
> the dist\client directory should be there? Any others?

Extreme answer: no classes *have* to be on client classpath. (security
manager installed, JNDI Reference trick used)
Extreme answer: yes, all jar's have to be on client classpath (no
security manager isntalled, plain JNDI lookup used)

Both are possible.

I explained this some time ago on this list (sent on 23rd of May). See
that posting for details.

/Rickard

--
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]




Re: [jBoss-User] This one has to be simple...

2000-05-30 Thread Rickard Öberg

Hi!

Jim Archer wrote:
> Rickard, at this point, I'm wondering what jar files should be on a client
> programs classpath. Is it correct to assume that all of the 5 jar files in
> the dist\client directory should be there? Any others?

Extreme answer: no classes *have* to be on client classpath. (security
manager installed, JNDI Reference trick used)
Extreme answer: yes, all jar's have to be on client classpath (no
security manager isntalled, plain JNDI lookup used)

Both are possible.

I explained this some time ago on this list (sent on 23rd of May). See
that posting for details.

/Rickard

-- 
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] This one has to be simple...

2000-05-30 Thread John_Kidd


Thanks and will do.


   
   
Rickard Öberg  
   
<[EMAIL PROTECTED]>To: jBoss 
<[EMAIL PROTECTED]>  
Sent by:cc:
   
<[EMAIL PROTECTED]Subject: Re: [jBoss-User] This 
one has to be simple...
-dogs.com> 
   
   
   
   
   
05/31/00 01:31 AM  
   
Please respond to  
   
"jBoss"
   
   
   
   
   




Hi!

[EMAIL PROTECTED] wrote:
> OK.I assume then that my code looks OK (As basic as it is) I mean
JNDI
> stuff is not that difficult. Thanks to the sanity check.
>
> Is jnp-client.jar in CVS? It is not in the bin distribution

The binary distribution is terribly outdated. It will be updated soon.
If you check it out from CVS you will get a much much much (etc.) better
jBoss server :-)

/Rickard

--
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]






--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] This one has to be simple...

2000-05-30 Thread Rickard Öberg

Hi!

[EMAIL PROTECTED] wrote:
> OK.I assume then that my code looks OK (As basic as it is) I mean JNDI
> stuff is not that difficult. Thanks to the sanity check.
> 
> Is jnp-client.jar in CVS? It is not in the bin distribution

The binary distribution is terribly outdated. It will be updated soon.
If you check it out from CVS you will get a much much much (etc.) better
jBoss server :-)

/Rickard

-- 
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] This one has to be simple...

2000-05-30 Thread Jim Archer

Rickard, at this point, I'm wondering what jar files should be on a client
programs classpath. Is it correct to assume that all of the 5 jar files in
the dist\client directory should be there? Any others?

Thanks!

Jim

--On Wednesday, May 31, 2000 8:16 AM +0200 Rickard Öberg
<[EMAIL PROTECTED]> wrote:

> Hey
>
> [EMAIL PROTECTED] wrote:
>> Just Loaded Jboss...Very Impressive. I do not know of any product that I
>> have downloaded and just run. Bravo!
>
> Thanks :-) Yeah, the "download and run" thing is nice. I hope we can
> stay that way for some time :-)
>
>> I know that I am missing something very simple in a test client I wrote.
>> I deployed a HelloWorld Bean and for some reason cannot connect to it.
>> Here is my client:
> 
>
> Well, the error definitely shows that ejb.jar is missing from classpath.
> Try again :-)
>
> BTW you can use jnp-client.jar instead of jnpserver.jar.
>
> regards,
>   Rickard
>
> --
> Rickard Öberg
>
> @home: +46 13 177937
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]






--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] This one has to be simple...

2000-05-30 Thread John_Kidd


OK.I assume then that my code looks OK (As basic as it is) I mean JNDI
stuff is not that difficult. Thanks to the sanity check.

Is jnp-client.jar in CVS? It is not in the bin distribution

John


   
   
Rickard Öberg  
   
<[EMAIL PROTECTED]>To: jBoss 
<[EMAIL PROTECTED]>  
Sent by:cc:
   
<[EMAIL PROTECTED]Subject: Re: [jBoss-User] This 
one has to be simple...
-dogs.com> 
   
   
   
   
   
05/31/00 01:16 AM  
   
Please respond to  
   
"jBoss"
   
   
   
   
   




Hey

[EMAIL PROTECTED] wrote:
> Just Loaded Jboss...Very Impressive. I do not know of any product that I
> have downloaded and just run. Bravo!

Thanks :-) Yeah, the "download and run" thing is nice. I hope we can
stay that way for some time :-)

> I know that I am missing something very simple in a test client I wrote.
I
> deployed a HelloWorld Bean and for some reason cannot connect to it. Here
> is my client:


Well, the error definitely shows that ejb.jar is missing from classpath.
Try again :-)

BTW you can use jnp-client.jar instead of jnpserver.jar.

regards,
  Rickard

--
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]






--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] This one has to be simple...

2000-05-30 Thread Rickard Öberg

Hey

[EMAIL PROTECTED] wrote:
> Just Loaded Jboss...Very Impressive. I do not know of any product that I
> have downloaded and just run. Bravo!

Thanks :-) Yeah, the "download and run" thing is nice. I hope we can
stay that way for some time :-)

> I know that I am missing something very simple in a test client I wrote. I
> deployed a HelloWorld Bean and for some reason cannot connect to it. Here
> is my client:


Well, the error definitely shows that ejb.jar is missing from classpath.
Try again :-)

BTW you can use jnp-client.jar instead of jnpserver.jar. 

regards,
  Rickard

-- 
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] This one has to be simple...

2000-05-30 Thread John_Kidd

Just Loaded Jboss...Very Impressive. I do not know of any product that I
have downloaded and just run. Bravo!

I know that I am missing something very simple in a test client I wrote. I
deployed a HelloWorld Bean and for some reason cannot connect to it. Here
is my client:

public class MAIN
{
 public static void main(String[] args)
 {

  System.out.println("Starting Client...");
  System.setSecurityManager(new RMISecurityManager());
System.out.println("Security Manager Setup...");

final Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
properties.setProperty(Context.PROVIDER_URL, "127.0.0.1");

   try
{
  System.out.println("Getting Initial Context.");
final Context _context = new InitialContext(properties);
System.out.println("Initial Context: " + _context.toString());
System.out.println("");
System.out.println("Initial Context Retrieved.");
HelloWorldHome hwh = (HelloWorldHome)_context.lookup
("HelloWorldBean");
  }

 catch(Exception e)
 {
  e.printStackTrace();
 }
 }

}

And here is the Exception being thrown. I am using jdk1.3 have ejb.jar,
jnpserver.jar and jboss-client.jar in my classpath. I also, use a security
manager poicy file on staartup to grant all. (Sorry for wasting the space
on this!)

java.lang.NoClassDefFoundError: javax/ejb/EJBObject
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
 at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
 at java.net.URLClassLoader.access$100(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:297)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:195)
 at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654)
 at
sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:121)
 at
java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
 at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
 at java.rmi.MarshalledObject.get(MarshalledObject.java:138)
 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:171)
 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:152)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 at com.vse.client.MAIN.main(MAIN.java:30)
Exception in thread "main" Process Exit...




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]