|
||||||
| Java Help Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hi,
I have an client-server application developed in Ecplise. The server is working on Apache Tomcat5.5 and the client is a java application... Heres my problem, the client makes a request on a webservice and the server receives it and begins to process its request, at some point when executing the following class: public class URIClassLoader extends ClassLoader { public Object loadClassByURL(String location, String className, boolean jar) { try { if (jar) location = "jar:" + location + "!/" + className + ".class"; URL url = new URL(location); InputStream is = url.openStream(); byte[] classData = new byte[is.available()]; is.read(classData); Class dynamicClass = defineClass(null, classData, 0, classData.length, null); this.resolveClass(dynamicClass); return dynamicClass.newInstance(); } catch (Exception e) { System.out.println(e); } return null; } } it simply stops at the line marked in red. the local version of my application works just fine, but "remotely" it simply gives me this exception in the client: java.lang.reflect.InvocationTargetException but no exception is shown in the tomcats log. my guess is that something is (obviously) going wrong when executing Class dynamicClass = defineClass(null, classData, 0, classData.length, null); but I cant understand what it is... can anyone help me? Regards Rui Rocha |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Peculiar UI Problem Needs Tackling | adriyel | C# Programming | 2 | 04-06-2008 07:46 AM |
| Problem read pwd protected Access2K dbase - CR9 & VB6 | mrbar | Visual Basic Programming | 2 | 03-10-2008 04:50 AM |
| How to tackle a programming problem? | TcM | General Programming | 10 | 01-07-2008 11:29 AM |
| i have a problem please help me!!!???? | stack | Java Help | 8 | 09-22-2007 03:17 PM |
| [C] Comparison problem | Alhazred | C and C++ | 1 | 08-29-2007 04:58 AM |