cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabor Bartha <gabor.bar...@mailbox.hu>
Subject Re: applet, module, Class.forName() - ClassNotFoundException
Date Wed, 18 Sep 2002 13:36:39 GMT
Hi Ilya

the **.class is working fine. The trouble was with my jar file, it was 
obfuscated in a wrong way.

Thanks again,
Gabor

Ilya A. Kriveshko wrote:

> You should match "**.class". Not using ** definitely will not let you
> access .class files in sub-directories, and may simply  be covering
> another problem with accessing the jar.
>
> After you re-enable "**.class" matching, attempt to access your jar by
> typing in its URL in the browser. Then, try to access the problematic
> .class by tying in the URL in the browser. Then, inspect the log files
> (WEB-INF/logs/access.log for which files are accessed,
> WEB-INF/logs/sitemap.log for how the file is served and for errors, and
> WEB-INF/logs/error.log just in case).
>
> If your browser can access the files individually, then Cocoon is doing
> its job, and the JVM should be able to access all the files as well.
> Look for the problem elsewhere.
>
> Can you also post the HTML code that is used to establish  the applet? I
> wonder if there are issues with CODEBASE or ARCHIVE parameters?
>
> A couple of more hints:
>
> I assume that you had compiled your req class with "package
> outclasses.needed;" in the beginnning of the source file, and aren't
> simply placing the class file in the outclasses directory. Is that 
> correct?
>
> Are you running your servlet container behind a web-server, like Apache?
> Or are you running, say, Tomcat directly on port 80? If it's the former,
> look at the web server's access log to determine which files are
> requested by the browser. Maybe some of them are not reaching the
> servlet container? A problem with JkMount, in case of Tomcat could be
> the issue.
>
> Try unpacking your jar into /myApp directory. Does that work?
>
> Alternatively, try putting your outer class files inside the jar. Does
> that work?
>
> I'm running out of suggestions. Need more info.
> --
> Ilya
>
> Gabor Bartha wrote:
>
>> Hi,
>> summarized:
>>
>> I have an applet in a jar with outer classes (java modules). There are
>> several classes in the jar and beside the jar.
>>
>> When the applet is running (from the jar) it finds the classes inside
>> the jar, but is unable to find the classes beside the jar.
>>
>> I have the jar file: /myApp/main.jar
>> I have the classes: /myApp/outclasses/needed/req.class
>>                             /myApp/outclasses/eq.class
>>               When Class.forName(outclasses/needed/req) is called,
>> ClassNotFoundExecption occures. I have pipeline for the jar, and for
>> class:
>>
>> <map:match pattern="*.jar">
>>  <map:read src="{1}.jar" mime-type="application/java-archive"/>
>> </map:match>
>> <map:match pattern="*.class">
>>  <map:read src="{1}.class" mime-type="application/java-class"/>
>> </map:match>
>>
>> If I use the <map:match pattern="**.class"> pipeline, the classes
>> inside the jar cannot be loaded, and ClassNotFoundException occures.
>>
>> Gabor
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> Please check that your question  has not already been answered in the
>> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>>
>> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
>> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>
>
>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message