Thanks David,
                 I have used this form of the url as well but with the same
result.

Thanks any way,
Faisal

David Smith-2 wrote:
> 
> I mean the path to cib.expserver.plugin.basics.ExpressServer, which your 
> tomcat is complaining about not being able to find.
> 
> Anyway... taking a closer look at the code you posted, I think the URI 
> you are using won't work
> 
> file:/c:Tud/Server/program/bin should probably be more like 
> file:///c:/Tud/Server/program/bin.
> 
> --David
> 
> Faisal wrote:
> 
>>Thank you very much for replying. The tomcat version is 5.5 and Java
version
>>is 1.5.0_14 and platform is Windows XP.
>>
>>The class is located in  webapps/axis/WEB-INF/classes/WebService.class
>>
>>Thanking you,
>>Faisal
>>
>>David Smith-2 wrote:
>>  
>>
>>>Hi Faisal.
>>>
>>>Could you post a few very important additional details?
>>>
>>>Tomcat version
>>>Platform
>>>Tomcat relative path to the class/jar you're having trouble with.
>>>
>>>--David
>>>
>>>Faisal wrote:
>>>
>>>    
>>>
>>>>Hello,
>>>>I can execute the following java code in a standalone application very
>>>>      
>>>>
>>well
>>  
>>
>>>>but when i put the same code in a web service and deploy it on the
Tomcat
>>>>5.5 then it gives error:
>>>>
>>>>exception classNotFoundException: can not find the class
>>>>cib.expserver.plugin.basics.ExpressServer
>>>>
>>>>Some one please help me out in this regard.
>>>>
>>>>The code is following:
>>>>
>>>>mport java.io.*;
>>>>import java.net.*;
>>>>
>>>>public class WebService {
>>>>public byte[] run(byte[] inputFile) throws Exception
>>>>{
>>>>URL url = new URL("file:/c:Tud/Server/program/bin");
>>>>System.out.println("successfully created the url");
>>>>URL[] pluginURLs = new URL[1];
>>>>pluginURLs[0]=url;
>>>>URLClassLoader pluginClassLoader = new
>>>>URLClassLoader(pluginURLs);
>>>>System.out.println("The class loader has been created successfully ");
>>>>String pluginClassName =
>>>>"cib.expserver.plugin.basics.ExpressParser";
>>>>
>>>>// The following line of code gives the Exception when run
>>>>// under Tomcat but runs fine in a standalone application
>>>>Class pluginClass =
>>>>pluginClassLoader.loadClass(pluginClassName);
>>>>// The following line of code is not executed under Tomcat
>>>>System.out.println("successfully loaded the class");
>>>>
>>>>
>>>>return inputFile;
>>>>}
>>>> 
>>>>
>>>>      
>>>>
>>>---------------------------------------------------------------------
>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>    
>>>
>>
>>  
>>
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/problem-in-loading-class-file-tp14335434p14336136.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to