Re: Barcode inegration wih Apache FOP
Philip Shanks <[email protected]> Thu, 05 Feb 2004 23:58:41 -0800
| Newsgroups | gmane.comp.krysalis.user |
|---|---|
| Message-ID | <[email protected]> |
Thank you! I misunderstood how to add jar files to the FOP classpath. I have edited fop.bat, and barcode apears to be functioning. Now I will spend some time with your barcode XML format documentation to tweak the images into what I want. Then I will get back to you with my results. Thanks for the incredibly speedy and accurate response! Perhaps you could add a note to the FOP extension documentation to point users to fop.bat (or fop.sh) to set up the proper classpaths. For reference, below is my fop.bat: Phil Shanks ---------------------------8< snip --------------------------8< ------------------- @ECHO OFF rem %~dp0 is the expanded pathname of the current script under NT set LOCAL_FOP_HOME= if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME=%~dp0 set LIBDIR=%LOCAL_FOP_HOME%lib set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.1.4.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\krysalis-barcode.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\krysalis-barcode-fop-ext-0.20.5.jar java -cp "%LOCALCLASSPATH%" org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 ---------------------------8< snip --------------------------8< ------------------- Jeremias Maerki wrote: >Just a guess: You have replaced or added the necessary JARs to your FOP >installation and you are using the fop.bat that comes with FOP. If yes, >you need to make sure you edit fop.bat to reflect the correct filenames >so the JARs get really added to the classpath. If not, please tell me >how you actually invoke FOP. > >Your first error clearly shows that Avalon Framework is not available so >it's probably missing in the classpath. > >The second indicates that the barcode package is either not in the >classpath or somehow not available to FOP via its own class loader. > >I hope this helps. If not, get back here so we can have another look at >the problem. When you get it running, I'd be keen on getting more >feedback on your experiences. > >On 06.02.2004 07:00:27 Philip Shanks wrote: > > >>I've downloaded barcode-1.0beta, and I'm trying to use it with Apache >>FOP version 0.20.5. I'm following the instructions for the FOP exension >>from the krysalis.org website, and all is not going well for me. I'm >>hoping someone can provide a clue for me about the errors I'm seeing. >> >>Environment: Java 1.4.2_03 on Windows 2000 Pro. FOP is installed in >>"C:\fop-0.20.5", with no changes to the original FOP config file. >> >>I added krysalis-barcode.jar and krysalis-barcode-fop-ext-0.20.5.jar in >>"C:\fop-0.20.5\lib" and as per the insructions, I replaced the file >>"avalon-framework-cvs-20020806.jar" that ships with FOP with the >>"avalon-framework-4.1.4.jar" that was packaged with krysalis-barcode. >> >>Error #1: >> >>java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger >> at org.apache.fop.apps.Fop.main(Fop.java:59) >>Exception in thread "main" >> >>This error appears to be independant of the krysalis-barcode >>installation. If I restore the original avalon-framework jar file, this >>error does not occur. >> >>Error #2 (using "avalon-framework-cvs-20020806.jar"): >> >>[ERROR] Unsupported element encountered: barcode >>(Namespace:http://www.krysalis.org/barcode/ns). Source context: >>file:/c:/scratch/night.fo (line: 97, col: 115) >>[ERROR] no handler defined for >>http://www.krysalis.org/barcode/ns:barcode foreign xml >> >>Apparently I have missed something in configuring the integration of the >>two packages. can anyone fill me on what that might be? >> >> > > >Jeremias Maerki > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >krysalis-users mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/krysalis-users > > > ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn