ClassNotFoundException using the oxf:java processor

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ClassNotFoundException using the oxf:java processor

f.blanc
Hi!

I needed to change a bit the code of a working class called with the java processor but I'm always getting the following classNotFoundException :

Error compiling '[-g, -classpath, C:\Tomcat 5.5\webapps\ops\WEB-INF\classes;/C:/Program Files/Java/jdk1.5.0_09/jre/lib/ext/dnsns.jar;
[... a long list of jar file ...],
-sourcepath, C:\Tomcat 5.5\webapps\ops\WEB-INF\resources\myApp\java,
-d, C:\Tomcat 5.5\temp, C:\Tomcat 5.5\webapps\ops\WEB-INF\resources\myApp\java/org/cgcis/XLSInsertion.java]'

error: cannot read: C:\Tomcat 5.5\webapps\ops\WEB-INF\resources\myApp\java/org/cgcis/XLSInsertion.java
1 error

My java processor looks like this (same as the example in userguide...)

<p:processor name="oxf:java" xmlns:p="http://www.orbeon.com/oxf/pipeline">
    <p:input name="config">
        <config sourcepath="./java" class="org.cgcis.XLSInsertion"/>
    </p:input>
    <p:input name="data" href="..."/>
    <p:output name="data" id="..."/>
</p:processor>

The class XLSInsertion.java is located in
c:\tomcat 5.5\webapps\WEB-INF\ops\ressources\myApp\org\cgcis\XLSInsertion.java with all classes it needs but... I'm unable to find what is the problem. Do you see why it doen't work?

Thank you for your attention!

with regards,

Frédéric

ps. Here is some line of the stack trace if it can help...

org.orbeon.oxf.processor.JavaProcessor [getProcessor] JavaProcessor.java (294)
org.orbeon.oxf.processor.JavaProcessor [start] JavaProcessor.java (96)
org.orbeon.oxf.processor.JavaProcessor$1 [getInput] JavaProcessor.java (83)
org.orbeon.oxf.processor.JavaProcessor$1 [readImpl] JavaProcessor.java (69)
org.orbeon.oxf.processor.ProcessorImpl$6 [read] ProcessorImpl.java (1012)
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl [read] ProcessorImpl.java (1195)
org.orbeon.oxf.processor.ProcessorImpl [readInputAsSAX] ProcessorImpl.java (348)
org.orbeon.oxf.processor.serializer.HttpSerializer [readInput] HttpSerializer.java (42)
org.orbeon.oxf.processor.serializer.HttpSerializerBase [start] HttpSerializerBase.java (178)
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: ClassNotFoundException using the oxf:java processor

f.blanc
I finally make the oxf:java processor work putting all ressources at the same place than que xpl file (so shooting away all package structure and sourcepath).

Does the error come from line 228 and 229 of JavaProcessor.java

228 | final String fnam = config.sourcepath + "/"
229 |                        + config.clazz.replace('.', '/') + ".java";

Because I have the impression that the error would desapear replacing "/" by "\"... My be ;o)

228 | final String fnam = config.sourcepath + "\"
229 |                        + config.clazz.replace('.', '\') + ".java";



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: ClassNotFoundException using the oxf:java processor

Alessandro Vernet
Administrator
Frédéric,

I think it is fine to use "/" in Java for paths. On Windows, the Java
library will automatically translate that for you in a "\". So I
wouldn't this is the source of the problem here.

Alex

On 1/16/07, [hidden email] <[hidden email]> wrote:

> I finally make the oxf:java processor work putting all ressources at the same place than que xpl file (so shooting away all package structure and sourcepath).
>
> Does the error come from line 228 and 229 of JavaProcessor.java
>
> 228 | final String fnam = config.sourcepath + "/"
> 229 |                        + config.clazz.replace('.', '/') + ".java";
>
> Because I have the impression that the error would desapear replacing "/" by "\"... My be ;o)
>
> 228 | final String fnam = config.sourcepath + "\"
> 229 |                        + config.clazz.replace('.', '\') + ".java";
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws