Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Trajan Walker

Greenhorn
+ Follow
since Sep 06, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Trajan Walker

That's exactly what the problem was.

The class loader wants the class file to have the same directory structure as the package name for the class. You can't just have it in the local directory. The Jar file or a -classpath statement with that directory structure solves the problem.

It would be nice if that were spelled out in the texts.

Also, JBoss appends "Home" at the end of the JNDI name, even if you already have "Home" at the end. Hence, you may receive a <class>HomeHome file in response.
I also figured out the other problems I was having.

1.) The JNDI name had to be specified in JBOSS.xml and the lookup has to be exactly what you specify in the deployment descriptors.

2.) The class path in the client has to point to the jar file or a directory structure consistent with your package name. The class loader doesn't like to find the class file in a local directory that doesn't have the same directory structure as the classpath.
Ravi:

I'm having exactly the same problem. I got passed your step with the following.

1. Add a client.policy file with the following contents:

grant {
// Allow everything for now
permission java.security.AllPermission;
};

2. Use java -Djava.security.policy=client.policy -classpath ... <classname>

That got me passed this error. I still haven't got it to work, but I did get passed the access denied error.
I'm figuring that this has been my problem for the past few days. I've been trying to do the lookup, and I can't seem to get it to connect. The only persistent exception at this point is the classNotFound exception. I have to assume I don't have the stubs.

I'm using JBOSS 3.2.3, and I haven't seen any container generated .jar file with stubs. A quick search of my file system doesn't show anything approximating my Demo.jar file either.

How do I get the stub classes? How do I get JBOSS to generate them, or does it do so already?