users@glassfish.java.net

url custom jndi ref

From: <glassfish_at_javadesktop.org>
Date: Mon, 21 Jun 2010 19:49:48 PDT

Hi,

I've been working on this problem for quite some time now, so any help would be appreciated.

I'm using glassfish 2.1 (jdk 1.5). I've defined a custom jndi resource of type java.net.URL with a factory class of org.glassfish.resources.custom.factory.URLFactory.

I've verified that the lookup is happening successfully (no lookup exception). Instead I get a class cast exception. The object that results from the lookup is a javax.naming.Reference rather than a java.net.URL.

I'm guessing that this may be a result of the fact that the glassfish server doesn't find the java.net.URL class. It only exists inside of rt.jar which exists inside the JDK directories. I've tried moving that jar into the domain/lib folder with no luck.

I've been googling around and finding people with similar issues but no concrete answers. Should I be using a different class for the URL resource type? As you can probably tell I'm new to all this. The books/resources I have don't really do a good job of the URL resource type -- the examples they have don't work.

Thanks,

Brian
[Message sent by forum member 'lostforwords88']

http://forums.java.net/jive/thread.jspa?messageID=475299