Hello,
I continue to track my problem... When the exception is raised, the
MashallInputStream.ResolveProxyClass is called. Here it is...:
/**
* resolveProxyClass is extended to acquire (if present) the location
* to determine the class loader to define the proxy class in.
*/
protected Class resolveProxyClass(String[] interfaces)
throws IOException, ClassNotFoundException
{
/*
* Always read annotation written by MarshalOutputStream.
*/
Object annotation = readLocation();
/*
* Choose the class loader to define the proxy class in.
*/
ClassLoader loader;
if (!useCodebaseOnly &&
annotation != null && (annotation instanceof String))
{
String location = (String) annotation;
**********loader = LoaderHandler.getClassLoader(location);
} else {
loader = LoaderHandler.getClassLoader(null);
}
/*
* First resolve the interface names to Class objects, and then
* get the proxy class defined in the chosen class loader.
*/
Class[] classObjs = new Class[interfaces.length];
for (int i = 0; i < interfaces.length; i++) {
classObjs[i] = Class.forName(interfaces[i], false, loader);
}
return java.lang.reflect.Proxy.getProxyClass(loader, classObjs);
}
And the call goes through where you can read the stars (**********). Consequently, it
seems that the rmi stuff tries to find a decent classloader for the proxy being
unmarshalled and first tries, if existant, with the string codebase serialized with
the proxy. In this case, it indicates a JBoss file!
Issues:
- How is this solved with standard application (not running on the local host)?
- If this is really the case, is this a bug? in this case, the codebase should
be empty or indicate the URL of the JBoss webserver
- Shouldn't the rmi stuff first try to load the class from the local
classloader? It does not seem to in what I see.. but...
ANY help would be really appreciated.
It seems that numerous people on this ML had this problem in February of this year.
Thank you. Cheers,
Sacha
> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Sacha
> Labourey
> Envoy� : mardi, 8 mai 2001 16:17
> � : jBoss-User Mailing List
> Objet : [JBoss-user] EJB and applets : problem with RMI classloading
>
>
> Hello,
>
> I am trying to make a JBoss SLSB accessible from an Applet.
>
> After having solved some JNDI issues, I have a problem in the
> lookup code. It seems that the codebase given by JBoss indicates
> a local file. Here is the stack trace from the Applet (browser
> not running on the same host as JBoss i.e. the file path cannot
> have a coherent meaning in this case):
>
> java.security.AccessControlException: access denied
> (java.io.FilePermission
> \C:\Internet\AS\JBoss-2.2.1\tmp\deploy\Default\monitron_applet_bea
> n.jar\- read)
> at
> java.security.AccessControlContext.checkPermission(AccessControlCo
> ntext.java:272)
> at
> java.security.AccessController.checkPermission(AccessController.java:399)
> at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
> at
> sun.rmi.server.LoaderHandler$Loader.checkPermissions(LoaderHandler
> .java:759)
> at
> sun.rmi.server.LoaderHandler$Loader.access$000(LoaderHandler.java:713)
> at
> sun.rmi.server.LoaderHandler.getClassLoader(LoaderHandler.java:265)
> at
> sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputSt
> ream.java:172)
> at
> java.io.ObjectInputStream.inputProxyClassDescriptor(ObjectInputStr
> eam.java:982)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> 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:299)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
> at javax.naming.InitialContext.lookup(InitialContext.java:350)
> at mycode.EjbResolver.refreshProxy(EjbResolver.java:46)
> at mycode.AppletDelegate.<init>(AppletDelegate.java:24)
> at mycode.myApplet.<init>(MonitronApplet.java:41)
> at java.lang.Class.newInstance0(Native Method)
> at java.lang.Class.newInstance(Class.java:237)
> at sun.applet.AppletPanel.createApplet(AppletPanel.java:579)
> at sun.plugin.AppletViewer.createApplet(Unknown Source)
> at sun.applet.AppletPanel.runLoader(AppletPanel.java:515)
> at sun.applet.AppletPanel.run(AppletPanel.java:293)
> at java.lang.Thread.run(Thread.java:484)
>
>
>
> Any idea? The problem does not lie in the security error but more
> on why does my applet tries to read something not even locally
> accessible but local to the JBoss server only.
>
> Cheers,
>
>
>
> Sacha
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user