Re: applet, module, Class.forName() - ClassNotFoundException

2002-09-18 Thread Vadim Gritsenko

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:



Try then:

 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

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.


I don't know what **class has to do with the jar, may be you have a 
problem somewhere else (i.e., in your APPLET tag).

Vadim



 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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: applet, module, Class.forName() - ClassNotFoundException

2002-09-18 Thread Ilya A. Kriveshko

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: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]





-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: applet, module, Class.forName() - ClassNotFoundException

2002-09-18 Thread Gabor Bartha

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: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]





 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]







-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: applet, module, Class.forName() - ClassNotFoundException

2002-09-17 Thread Vadim Gritsenko

Gabor Bartha wrote:

 Hi All,

 I have a java applet in a jar file and there are several class files 
 beside the jar, which files (modules) can be loaded by the applet with 
 the Class.forName() and newInstance() methods. My applet works well as 
 far as it has to load a module, at that time ClassNotFoundException 
 occures.

 I put the following pipeline into my sitemap.xmap, but it is not working.
map:match pattern=*.class


If your classes are within some package (not in default package), you 
will have to match on **.class:

map:match pattern=**.class


Vadim



  map:read src={1}.class mime-type=application/java-class/
/map:match

 Can anybody help me?

 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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: applet, module, Class.forName() - ClassNotFoundException

2002-09-17 Thread Gabor Bartha

It doesn't work.
A few classes are in the jar, the others are beside the jar in the 
proper directories (as they are in the packages).
During the running of the applet every class is loaded by the 
Class.forName(), ... method.
- If I use map:match pattern=**.class the classes which are in the 
jar cannot be loaded.
- If I use map:match pattern=*.class the classes which are beside 
the jar cannot be loaded.

Gabor

Vadim Gritsenko wrote:

 Gabor Bartha wrote:

 Hi All,

 I have a java applet in a jar file and there are several class files
 beside the jar, which files (modules) can be loaded by the applet with
 the Class.forName() and newInstance() methods. My applet works well as
 far as it has to load a module, at that time ClassNotFoundException
 occures.

 I put the following pipeline into my sitemap.xmap, but it is not 
 working.
map:match pattern=*.class



 If your classes are within some package (not in default package), you
 will have to match on **.class:

 map:match pattern=**.class


 Vadim



  map:read src={1}.class mime-type=application/java-class/
/map:match

 Can anybody help me?

 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: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]


 .





-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: applet, module, Class.forName() - ClassNotFoundException

2002-09-17 Thread Ilya A. Kriveshko

Do you have the pipeline for the jar?
--
Ilya

Gabor Bartha wrote:

 It doesn't work.
 A few classes are in the jar, the others are beside the jar in the 
 proper directories (as they are in the packages).
 During the running of the applet every class is loaded by the 
 Class.forName(), ... method.
 - If I use map:match pattern=**.class the classes which are in the 
 jar cannot be loaded.
 - If I use map:match pattern=*.class the classes which are beside 
 the jar cannot be loaded.

 Gabor

 Vadim Gritsenko wrote:

 Gabor Bartha wrote:

 Hi All,

 I have a java applet in a jar file and there are several class files
 beside the jar, which files (modules) can be loaded by the applet with
 the Class.forName() and newInstance() methods. My applet works well as
 far as it has to load a module, at that time ClassNotFoundException
 occures.

 I put the following pipeline into my sitemap.xmap, but it is not 
 working.
map:match pattern=*.class




 If your classes are within some package (not in default package), you
 will have to match on **.class:

 map:match pattern=**.class


 Vadim



  map:read src={1}.class mime-type=application/java-class/
/map:match

 Can anybody help me?

 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: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]


 .





 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]





-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]