You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by L'eau <li...@yahoo.com> on 2002/05/01 16:43:18 UTC

I get a mysterious NoClassDefFoundError

Hi, I'm new to the list. 

I don't have any clue why this is happening to me. I've spent
the past 4 hours trying to figure this out. I stumbled onto a
similar error message in the archives here, and it helped me
realize I needed to add the classpaths, but I'm still having the
error. I'm using the latest version of FOP, with J2SDK 1.4.

C:\xsl\build>java -cp
c:\xsl\libs\ant.jar;c:\xsl\libs\avalon-framework-4.0.jar;c:\xsl\lib\batik.jar;c:\xsl\lib\logkit-1.0.jar;c:\xsl\lib\xalan-2.0.0.jar;c:\xsl\lib\xerces-1.2.3.jar;c:\xsl\build\fop.jar
-jar fop.jar -xml xmlfoRef.xml -xsl xml2pdf.xsl -pdf output.pdf
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/log/format/Formatter
        at org.apache.fop.apps.Fop.main(Fop.java:16)


  I just don't get it, and I'm on the verge of going postal.
Thanx in advance for all help, guidance, or suggestions. BTW,
who do I send a message to about the FOP website and
documentation seriously needing to give workable examples of how
to run the program? It quite misled me and I nearly gave up on
it (but couldn't find another free XSL-FO renderer as an
alternative so I had to return to this stressful thing). 

Devon

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

Re: I get a mysterious NoClassDefFoundError

Posted by "J.Pietschmann" <j3...@yahoo.de>.
L'eau wrote:
> -jar fop.jar -xml xmlfoRef.xml -xsl xml2pdf.xsl -pdf output.pdf
   ^^^^^
Using the -jar option forces the classpath defined in the
manifest in the jar, which contains relative path entries.
I belive the -cp setting is completely irrelevant in this
scenario.

Replace "-jar fop.jar" by org.apache.fop.apps.Fop
or use
  java -jar fop.jar -xml...
in the directory where you installed FOP (the lib directory
with the jars should be a subdirectory).

A much better and easier way is to use the fop.bat or
fop.sh files from the distribution. Make sure the directory
where the files are stored is the current directory while
executing them.

J.Pietschmann


Re: I get a mysterious NoClassDefFoundError

Posted by Carlos <ca...@cvc.edu>.
Look at the fop.sh script and see what is it that you're missing. I normally
run fop like this:

/usr/local/java/fop/fop.sh -xml why-naginata.xml -xsl xsl/fo/cal.xsl -pdf
naginata.pdf


Note that you can specify additional classpath on the fop.sh script. See if
the fop.sh script works and let us know. It may also have to do with the
fact that J2SDK1.4 comes with older versions of Xerces and Xalan bundled by
default and it will use the ones bundled over those on your classpath.

See if fop.sh works and if it doesn't consider downgrading to 1.3

Carlos


On 05/01/02 7:43, "L'eau" <li...@yahoo.com> wrote:

> Hi, I'm new to the list.
> 
> I don't have any clue why this is happening to me. I've spent
> the past 4 hours trying to figure this out. I stumbled onto a
> similar error message in the archives here, and it helped me
> realize I needed to add the classpaths, but I'm still having the
> error. I'm using the latest version of FOP, with J2SDK 1.4.
> 
> C:\xsl\build>java -cp
> c:\xsl\libs\ant.jar;c:\xsl\libs\avalon-framework-4.0.jar;c:\xsl\lib\batik.jar;
> c:\xsl\lib\logkit-1.0.jar;c:\xsl\lib\xalan-2.0.0.jar;c:\xsl\lib\xerces-1.2.3.j
> ar;c:\xsl\build\fop.jar
> -jar fop.jar -xml xmlfoRef.xml -xsl xml2pdf.xsl -pdf output.pdf
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/log/format/Formatter
>       at org.apache.fop.apps.Fop.main(Fop.java:16)
> 
> 
> I just don't get it, and I'm on the verge of going postal.
> Thanx in advance for all help, guidance, or suggestions. BTW,
> who do I send a message to about the FOP website and
> documentation seriously needing to give workable examples of how
> to run the program? It quite misled me and I nearly gave up on
> it (but couldn't find another free XSL-FO renderer as an
> alternative so I had to return to this stressful thing).
> 
> Devon
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com

-- 
Carlos E. Araya
---+ WebCT Administrator/Trainer
 P | California Virtual Campus
 - | C/O De Anza College
 G | 21250 Stevens Creek Blvd
---+ Cupertino, CA 95014

email               carlos@cvc.edu
web                 http://www.cvc1.org/ (work)
                    http://www.silverwolf-net.net (personal)
phone               408 257 0420 (work)
PGP Fingerprint:    E629 5DFD 7EAE 4995 E9D7  3D2F 5A9F 0CE7 DFE7 1756

"If there is artificial intelligence, doesn't that imply there is also
artificial stupidity!"


Re: "[ERROR]: Don't know what to do with"

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Christian Geisert wrote:
> You could try "fop list.fo list.pdf" (with quotes)

Not a very good idea on Win95/98/ME (or any other system), it
searches for a command file
  fop list.fo list.pdf.exe
(with spaces)


On Win95/98/ME, the command processor feeds the whole command
line in one piece to the applications, therefore the JRE parses
the command line. Either there is a bug in the parser, or the
command processor appends some ugly invisible character. It's
been years since i last delat with DOS based systems, but I
believe the command line gets a \r\n ant the end, perhaps
the JRE doesn't count the \r as white space and passes it as
parameter.

It would help to run a test program to see what happens:

public class TestC {
   static final char[] hex={'0','1','2','3','4','5','6','7',
                          '8','9','A','B','C','D','E','F'};
   static public void main(String[] arg) {
     for( int i=0;i<arg.length;i++ ) {
       byte[] b=arg[i].getBytes();
       for( int j=0;j<b.length;j++ ) {
         System.out.print(""+hex[b[j]/16]+hex[b[j]%16]+' ');
       }
       System.out.println();
     }
   }
}

J.Pietschmann


Re: "[ERROR]: Don't know what to do with"

Posted by Jens Kühnberger <Ku...@web.de>.
did you try C:\xsl\build>Fop -fo list.fo -pdf list.pdf ?

Christian Geisert wrote:
> L'eau wrote:
> 
>> Ok, so I had the time to download an old FOP version, and was
>> glad to see it had a jimi-1.0.jar in it! It works to a degree. I
>> did this:
>>
>> C:\xsl\build>Fop list.fo list.pdf
>>
>> Now I get the following error message now:
>>
>> [ERROR]: Don't know what to do with
>>
>> .....and that's it. It doesn't even tell me what it doesn't know
>> what to do with. I'm stumped and baffled.
> 
> 
> Strange, this error happens if you give three commandline arguments
> and in your case this seems to be blank (really strange .. which
> OS are you using?)
> 
> You could try "fop list.fo list.pdf" (with quotes)
> 
>> Devon
>>
>> PS. who would I write to, to let Apache know that their latest 
> 
> 
> This is the appropriate place but we had to remove jimi because we
> are not allowed to distribute it (it is mentioned in the release notes!)
> 
>>     FOP package is missing a jimi-1.0.jar? I can only imagine
>>     how many other people are having a problem and giving up.
> 
> 
> Christian
> 
> 




Re: "[ERROR]: Don't know what to do with"

Posted by Christian Geisert <ch...@isu-gmbh.de>.
L'eau wrote:
> Ok, so I had the time to download an old FOP version, and was
> glad to see it had a jimi-1.0.jar in it! It works to a degree. I
> did this:
> 
> C:\xsl\build>Fop list.fo list.pdf
> 
> Now I get the following error message now:
> 
> [ERROR]: Don't know what to do with
> 
> .....and that's it. It doesn't even tell me what it doesn't know
> what to do with. I'm stumped and baffled.

Strange, this error happens if you give three commandline arguments
and in your case this seems to be blank (really strange .. which
OS are you using?)

You could try "fop list.fo list.pdf" (with quotes)

> Devon
> 
> PS. who would I write to, to let Apache know that their latest 

This is the appropriate place but we had to remove jimi because we
are not allowed to distribute it (it is mentioned in the release notes!)

>     FOP package is missing a jimi-1.0.jar? I can only imagine
>     how many other people are having a problem and giving up.

Christian


Re: "[ERROR]: Don't know what to do with"

Posted by Carlos Araya <we...@earthlink.net>.
Because of a licensing issue, you now need to download jimi-1.0.jar from the
sun website. Check the fop website for more information

Carlos
On 05/02/02 1:55, "L'eau" <li...@yahoo.com> wrote:

> Ok, so I had the time to download an old FOP version, and was
> glad to see it had a jimi-1.0.jar in it! It works to a degree. I
> did this:
> 
> C:\xsl\build>Fop list.fo list.pdf
> 
> Now I get the following error message now:
> 
> [ERROR]: Don't know what to do with
> 
> .....and that's it. It doesn't even tell me what it doesn't know
> what to do with. I'm stumped and baffled.
> 
> Devon
> 
> PS. who would I write to, to let Apache know that their latest
>   FOP package is missing a jimi-1.0.jar? I can only imagine
>   how many other people are having a problem and giving up.
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com



Re: AW: "[ERROR]: Don't know what to do with"

Posted by L'eau <li...@yahoo.com>.
Hi,

Both, are giving me the same error message I got before.

Devon

--- Sascha Schmidt <co...@dig-dreams.de> wrote:
> Hi,
> 
> try this:
> 
> FOP list.fo -pdf list.pdf
> 
> Or for AWT output
> 
> FOP list.fo -awt
> 
> Sascha.


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

AW: "[ERROR]: Don't know what to do with"

Posted by Sascha Schmidt <co...@dig-dreams.de>.
Hi,

try this:

FOP list.fo -pdf list.pdf

Or for AWT output

FOP list.fo -awt

Sascha.


-----Ursprüngliche Nachricht-----
Von: L'eau [mailto:li_leau@yahoo.com] 
Gesendet: Donnerstag, 2. Mai 2002 10:56
An: fop-user@xml.apache.org
Betreff: "[ERROR]: Don't know what to do with"

Ok, so I had the time to download an old FOP version, and was
glad to see it had a jimi-1.0.jar in it! It works to a degree. I
did this:

C:\xsl\build>Fop list.fo list.pdf

Now I get the following error message now:

[ERROR]: Don't know what to do with

.....and that's it. It doesn't even tell me what it doesn't know
what to do with. I'm stumped and baffled.

Devon

PS. who would I write to, to let Apache know that their latest 
    FOP package is missing a jimi-1.0.jar? I can only imagine
    how many other people are having a problem and giving up.

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com


Re: "[ERROR]: Don't know what to do with"

Posted by L'eau <li...@yahoo.com>.
I'm glad I'm not the only one with this problem. Interesting you
noticed a problem when using it on Windows ME (i'm using that OS
myself). I just found Fop 0.20.1 works exactly as expected, but
Fop 0.20.3 still gives me that strange error. I'm not sure how
the OS could possibly affect a java program's ability to run
though. Anyway, I'd much prefer to use 0.20.3, but I'll have to
use the older version too until an update is made or something
is figured out.

Thank you all. I'm going to poke around the Apache site now and
figure out who to e-mail about the missing jimi-1.0.jar & the
way Windows ME affects 0.20.3.

Devon

--- jens@posingies.com wrote:
> I had the same error message since I use fop 0.20.2 and later
> fop
> 0.20.3, but I had no problems with fop 0.20.1 and earlier
> versions. I
> don't know what EXACTLY is the problem but the problem solved
> itself
> after I changed my OS from Windows ME to Windows 2000 (using
> the SAME
> UNMODIFIED fop installation!!!). Now it works fine.

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

Re: "[ERROR]: Don't know what to do with"

Posted by je...@posingies.com.
I had the same error message since I use fop 0.20.2 and later fop
0.20.3, but I had no problems with fop 0.20.1 and earlier versions. I
don't know what EXACTLY is the problem but the problem solved itself
after I changed my OS from Windows ME to Windows 2000 (using the SAME
UNMODIFIED fop installation!!!). Now it works fine.

L'eau <li...@yahoo.com> schrieb am 02.05.2002, 10:55:54:
> Ok, so I had the time to download an old FOP version, and was
> glad to see it had a jimi-1.0.jar in it! It works to a degree. I
> did this:
> 
> C:\xsl\build>Fop list.fo list.pdf
> 
> Now I get the following error message now:
> 
> [ERROR]: Don't know what to do with
> 
> .....and that's it. It doesn't even tell me what it doesn't know
> what to do with. I'm stumped and baffled.
> 
> Devon
> 
> PS. who would I write to, to let Apache know that their latest 
>     FOP package is missing a jimi-1.0.jar? I can only imagine
>     how many other people are having a problem and giving up.
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com

"[ERROR]: Don't know what to do with"

Posted by L'eau <li...@yahoo.com>.
Ok, so I had the time to download an old FOP version, and was
glad to see it had a jimi-1.0.jar in it! It works to a degree. I
did this:

C:\xsl\build>Fop list.fo list.pdf

Now I get the following error message now:

[ERROR]: Don't know what to do with

.....and that's it. It doesn't even tell me what it doesn't know
what to do with. I'm stumped and baffled.

Devon

PS. who would I write to, to let Apache know that their latest 
    FOP package is missing a jimi-1.0.jar? I can only imagine
    how many other people are having a problem and giving up.

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com