You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Clay Leeds <cl...@medata.com> on 2002/12/09 23:03:53 UTC

Getting FOP running on Mac OS X

Howdy,

FYI, I had a problem running FOP on my Mac OS X system. Here's the error I got:

>[webmaestro-mac:Users/Shared/fop-0.20.4] clay% ./fop.sh -d -xml
>"/Users/clay/Desktop/HuiBro/test_MIWC.xml" -xsl
>"/Users/clay/Desktop/HuiBro/xml_med7_MIWC.fo" -awt
>Exception in thread "main" java.lang.NoClassDefFoundError:
>org/apache/avalon/framework/logger/Logger
>         at org.apache.fop.apps.Fop.main(Unknown Source)
>[webmaestro-mac:Users/Shared/fop-0.20.4] clay%

The information on the FOP FAQ was helpful in finding the problem, but was 
by no means enough. It ended up being a simple problem, but nonetheless was 
difficult for me to resolve.

The files were ZIP'd, and when they were unZIP'd using Stuffit Expander, 
the avalon JAR file's long filename was changed from:

   avalon-framework-cvs-20020315.jar

to:

   avalon-framework-cvs-20020315.j

Adding "ar" at the end of that filename, resolved the problem, and I am 
able to run FOP on my Mac. Unfortunately, it took a few days to figure out 
this problem.

JAVA_HOME UNDER MAC OS X
Also, according to Apple's Developer Connection:
http://developer.apple.com/qa/qa2001/qa1170.html

Java Home. Many Java applications require the identification of a "Java 
Home" directory during installation. The equivalent on Mac OS X should 
always be /Library/Java/Home. This is actually a symbolic link to the 
current installed J2SE version, and allows access to the bin subdirectory 
where command line tools such as java, javac, etc. exist as expected. The 
advantage of using this link, as opposed to its target, is that it will be 
maintained and updated when a new version of Java is downloaded via 
Software Update or installed with a newer version of Mac OS X. For this 
reason, it is important that developers do not install files below the Java 
Home, as the actual directory referenced by the link will be lost with 
subsequent updates when the link is updated.

I didn't see this in the FAQ, but I think it might be a good addition.

Respectfully,

- Clay Leeds
- Web Developer
- cleeds@medata.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: Getting FOP running on Mac OS X

Posted by Victor Mote <vi...@outfitr.com>.
Clay Leeds wrote:

> Above it indicates /Library/Java/Home is a symbolic link to the installed
> version. If Java is updated, this is changed to point the new version. I
> don't know how it's maintained, but I assume that the scripts for
> installing help with the "maintenance". Personally, I'd rather
> have be able
> to download from java.sun.com like everyone else, instead of from Apple,
> but they've got their reasons...
>
> In addition, I found these links helpful:
>
> Apple's Technical Java Q/As:
> http://developer.apple.com/qa/indexes/java-a.html
>
> Apple's Java FAQ:
> http://developer.apple.com/java/faq/

What I am trying to say is that I am in a worse position if I tell the user
to do something that doesn't work than I am if I tell them nothing at all
(the status quo). I don't doubt that OSX knows how to keep the links
straight, but it can't possibly know exactly what version of Java FOP needs.

I went ahead & updated the "running.xml" document to include information on
these two issues (filename truncation and JAVA_HOME). I added a "caveat" and
the java faq link you provided above to try to mitigate the upgrade issue. I
am not sure when the web site will next be updated, but in the meantime, if
you want to look at the content, go to:
http://cvs.apache.org/viewcvs.cgi/xml-fop/src/documentation/content/xdocs/ru
nning.xml?rev=HEAD&content-type=text/vnd.viewcvs-markup

Victor Mote


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: Getting FOP running on Mac OS X

Posted by Clay Leeds <cl...@medata.com>.
Victor et al,

At 09:03 PM 12/9/2002, you wrote:
>Sebastien Aperghis-Tramoni wrote:
> > Java under Mac OS X started with JDK 1.3. JDK 1.4 is in beta test.
> > The JAVA_HOME issue should already be known by most Java
> > programmers that work under Mac OS X, but it may be useful to
> > recall the trick.
>
>Again, barring objections from the other developers, I'll add a comment to
>the installation doc. However, the upgrade issue still remains. I really
>don't want to document for users how to point to an obsolete version of Java
>(I see that it is not obsolete now -- I am thinking of future FOP releases
>that may require higher versions of Java). What is Apple's plan for
>upgrading Java when that is needed? Is there a web site URL that I could add
>that would help the user 1) figure out what version they have, and 2) get it
>upgraded if necessary?
>
>Victor Mote

Sorry, Victor, I thought it was clear. The doc "Important Java Directories 
on Mac OS X" includes the relevant info for JAVA HOME, as well as 
Extensions Libraries, User Preferences, etc.:
http://developer.apple.com/qa/qa2001/qa1170.html

         "Java Home. Many Java applications require the identification
         of a "Java Home" directory during installation. The equivalent
         on Mac OS X should always be /Library/Java/Home. This is
         actually a symbolic link to the current installed J2SE
         version, and allows access to the bin subdirectory where
         command line tools such as java, javac, etc. exist as
         expected. The advantage of using this link, as opposed to its
         target, is that it will be maintained and updated when a new
         version of Java is downloaded via Software Update or installed
         with a newer version of Mac OS X. For this reason, it is
         important that developers do not install files below the Java
         Home, as the actual directory referenced by the link will be
         lost with subsequent updates when the link is updated."

Above it indicates /Library/Java/Home is a symbolic link to the installed 
version. If Java is updated, this is changed to point the new version. I 
don't know how it's maintained, but I assume that the scripts for 
installing help with the "maintenance". Personally, I'd rather have be able 
to download from java.sun.com like everyone else, instead of from Apple, 
but they've got their reasons...

In addition, I found these links helpful:

Apple's Technical Java Q/As:
http://developer.apple.com/qa/indexes/java-a.html

Apple's Java FAQ:
http://developer.apple.com/java/faq/

The latter includes info on the version of Java included with Mac OS X 
(1.3.1_03), as well as how to get Java 1.4.1 (which requires free Apple 
Developer Connection registration for download).

If anyone has any questions I can answer (I'll try not to respond with "42" 
:-), please don't hesitate.

Respectfully,

- Clay Leeds
- Web Developer
- cleeds@medata.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: Getting FOP running on Mac OS X

Posted by Victor Mote <vi...@outfitr.com>.
Clay Leeds wrote:

> This is fine, but I think it would be better to state something like:
>
> MacOSX Note: Use the following shell command to extract FOP under
> Mac OS X:
>
>    tar -xzf <source>.tar.gz
>
> If you use Stuffit to expand the archive, the following filename:
>
>    fop-0.20.4\lib\avalon-framework-cvs-20020315.jar
>
> may be truncated to 31 characters
>
>    fop-0.20.4\lib\avalon-framework-cvs-20020315.j

...

Thanks to Clay, Stephen, and Sebastien for enlightening me on the
31-character truncation issue. Unless any other developers object, I will
find a place in the documentation (probably in the installation) to deal
with this. It will be much more general than the one proposed (I don't want
to maintain anything that has specific filenames in it, nor do I want to
turn this into a Mac support site), but should be sufficient for someone to
get started on finding a solution.

Sebastien Aperghis-Tramoni wrote:

> Java under Mac OS X started with JDK 1.3. JDK 1.4 is in beta test.
> The JAVA_HOME issue should already be known by most Java
> programmers that work under Mac OS X, but it may be useful to
> recall the trick.

Again, barring objections from the other developers, I'll add a comment to
the installation doc. However, the upgrade issue still remains. I really
don't want to document for users how to point to an obsolete version of Java
(I see that it is not obsolete now -- I am thinking of future FOP releases
that may require higher versions of Java). What is Apple's plan for
upgrading Java when that is needed? Is there a web site URL that I could add
that would help the user 1) figure out what version they have, and 2) get it
upgraded if necessary?

Victor Mote


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: Getting FOP running on Mac OS X

Posted by Clay Leeds <cl...@medata.com>.
Stephen & Victor,

At 02:54 PM 12/9/2002, you wrote:
>Clay Leeds wrote:
>
> > The files were ZIP'd, and when they were unZIP'd using Stuffit Expander,
> > the avalon JAR file's long filename was changed from:
> >
> >    avalon-framework-cvs-20020315.jar
> >
> > to:
> >
> >    avalon-framework-cvs-20020315.j
> >
> > Adding "ar" at the end of that filename, resolved the problem, and I am
> > able to run FOP on my Mac. Unfortunately, it took a few days to
> > figure out
> > this problem.
>
>First, thanks for the input. I'll be glad to update the FAQ, but I am a
>little confused about what to put into it. The file name was truncated after
>31 characters, which is too odd of a number to seem to have been done on
>purpose by StuffIt. What caused the filename truncation? Without
>understanding that, I am not sure how to help.

Traditionally, Mac OS (up until Mac OS X) has been able to handle 31 
characters. I believe this began in 1984 with the original Macintosh. This 
is why it truncates to 31 characters. I don't recall why it's 31, but I'm 
guessing that it has more to do with "32" than 31 (perhaps it has something 
to do with the ":" which was used as the "folder" delimiter much like "\" 
on Windows & "/" under Unix--e.g., "Macintosh 
HD:java:fop-0.20.4:lib:avalon-framework-cvs-20020315.jar").

Stephen Bannasch wrote:
>MacOSX Note: Don't use Stuffit to expand the archive. Use the following 
>shell command instead:
>
>   tar -xzf <source>.tar.gz
>
>gunzip should work for a zip file also (I think).

This is fine, but I think it would be better to state something like:

MacOSX Note: Use the following shell command to extract FOP under Mac OS X:

   tar -xzf <source>.tar.gz

If you use Stuffit to expand the archive, the following filename:

   fop-0.20.4\lib\avalon-framework-cvs-20020315.jar

may be truncated to 31 characters

   fop-0.20.4\lib\avalon-framework-cvs-20020315.j

causing an exception:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/avalon/framework/logger/Logger
         at org.apache.fop.apps.Fop.main(Unknown Source)

Simply rename the file as follows and all should be fine:

   fop-0.20.4\lib\avalon-framework-cvs-20020315.jar

> > Java Home. Many Java applications require the identification of a "Java
> > Home" directory during installation. The equivalent on Mac OS X should
> > always be /Library/Java/Home. This is actually a symbolic link to the
> > current installed J2SE version, and allows access to the bin subdirectory
> > where command line tools such as java, javac, etc. exist as expected. The
>
>I am not a Mac guy, so please excuse my ignorance. Is this something that
>Mac people should already know? In other words, I wonder whether it is even
>appropriate to address this in FOP doc as it is primarily a sysadmin issue,
>or at least a Mac or Java issue. Also, what if /Library/Java/Home points to
>a 1.1 or 1.2 java runtime? If we tell the user to use that, then FOP doesn't
>work. Again, I am not sure what to recommend here.

As for adding this info to the FAQ, I thought it might be useful to include 
some information about this since it's not easy to find. It would've saved 
me some time if it were in the FOP FAQ. Believe it or not, it wasn't easy 
to find on Apple's site. I found it in an obscure link (I don't recall the 
page with the link):

http://developer.apple.com/qa/qa2001/qa1170.html

BTW, although I haven't really done much with the Java end of things on my 
Mac, I considered myself something of an advanced Mac user. To be more 
clear, I never really ran JAVA applets outside of web pages. Now I'm 
developing with XSL-FO, and since I can FOP it on my Mac, I thought it'd be 
nice to start playing with it. Unfortunately, I had problems, and when I 
searched far and wide for help, and did not find "the answer" anywhere.

Clear as mud!? :-)

- Clay Leeds
- Web Developer
- cleeds@medata.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: Getting FOP running on Mac OS X

Posted by Stephen Bannasch <st...@concord.org>.
It is possible the latest StuffIt Expanders work properly for filenames longer than 31 chars but it is a known problem.  OS X can use much longer filenames.  I include the following when I put up archives:

MacOSX Note: Don't use Stuffit to expand the archive. Use the following shell command instead:

  tar -xzf <source>.tar.gz

gunzip should work for a zip file also (I think).


>Clay Leeds wrote:
>
>> The files were ZIP'd, and when they were unZIP'd using Stuffit Expander,
>> the avalon JAR file's long filename was changed from:
>>
>>    avalon-framework-cvs-20020315.jar
>>
>> to:
>>
>>    avalon-framework-cvs-20020315.j
>>
>> Adding "ar" at the end of that filename, resolved the problem, and I am
>> able to run FOP on my Mac. Unfortunately, it took a few days to
>> figure out
>> this problem.
>
>First, thanks for the input. I'll be glad to update the FAQ, but I am a
>little confused about what to put into it. The file name was truncated after
>31 characters, which is too odd of a number to seem to have been done on
>purpose by StuffIt. What caused the filename truncation? Without
>understanding that, I am not sure how to help.
>
>> Java Home. Many Java applications require the identification of a "Java
>> Home" directory during installation. The equivalent on Mac OS X should
>> always be /Library/Java/Home. This is actually a symbolic link to the
>> current installed J2SE version, and allows access to the bin subdirectory
>> where command line tools such as java, javac, etc. exist as expected. The
>
>I am not a Mac guy, so please excuse my ignorance. Is this something that
>Mac people should already know? In other words, I wonder whether it is even
>appropriate to address this in FOP doc as it is primarily a sysadmin issue,
>or at least a Mac or Java issue. Also, what if /Library/Java/Home points to
>a 1.1 or 1.2 java runtime? If we tell the user to use that, then FOP doesn't
>work. Again, I am not sure what to recommend here.
>
>Victor Mote
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
>For additional commands, email: fop-dev-help@xml.apache.org


-- 

-s

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Getting FOP running on Mac OS X

Posted by Sébastien Aperghis-Tramoni <ma...@free.fr>.
On Monday, December 9, 2002, at 11:54 PM, Victor Mote wrote:

> Clay Leeds wrote:
>
>> The files were ZIP'd, and when they were unZIP'd using Stuffit 
>> Expander,
>> the avalon JAR file's long filename was changed from:
>>
>>    avalon-framework-cvs-20020315.jar
>>
>> to:
>>
>>    avalon-framework-cvs-20020315.j
>>
>> Adding "ar" at the end of that filename, resolved the problem, and I am
>> able to run FOP on my Mac. Unfortunately, it took a few days to
>> figure out this problem.
>
> First, thanks for the input. I'll be glad to update the FAQ, but I am a
> little confused about what to put into it. The file name was truncated 
> after
> 31 characters, which is too odd of a number to seem to have been done on
> purpose by StuffIt. What caused the filename truncation? Without
> understanding that, I am not sure how to help.

This is because 31 characters was the file name limit under Mac OS 
Classic.
StuffIt Expander being a "carbonized" application, it may still contains 
code
that make sure filenames are truncated to 31 characters.

The Good Way to extract Unix archives under Mac OS X is to open the
Terminal and use gzip, gnutar and zip/unzip.

>> Java Home. Many Java applications require the identification of a "Java
>> Home" directory during installation. The equivalent on Mac OS X should
>> always be /Library/Java/Home. This is actually a symbolic link to the
>> current installed J2SE version, and allows access to the bin 
>> subdirectory
>> where command line tools such as java, javac, etc. exist as expected. 
>> The
>
> I am not a Mac guy, so please excuse my ignorance. Is this something 
> that
> Mac people should already know? In other words, I wonder whether it is 
> even
> appropriate to address this in FOP doc as it is primarily a sysadmin 
> issue,
> or at least a Mac or Java issue. Also, what if /Library/Java/Home 
> points to
> a 1.1 or 1.2 java runtime? If we tell the user to use that, then FOP 
> doesn't
> work. Again, I am not sure what to recommend here.

Java under Mac OS X started with JDK 1.3. JDK 1.4 is in beta test.
The JAVA_HOME issue should already be known by most Java
programmers that work under Mac OS X, but it may be useful to
recall the trick.


Sébastien Aperghis-Tramoni
  -- - --- -- - -- - --- -- - --- -- - --[ http://maddingue.org ]


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: Getting FOP running on Mac OS X

Posted by Victor Mote <vi...@outfitr.com>.
Clay Leeds wrote:

> The files were ZIP'd, and when they were unZIP'd using Stuffit Expander,
> the avalon JAR file's long filename was changed from:
>
>    avalon-framework-cvs-20020315.jar
>
> to:
>
>    avalon-framework-cvs-20020315.j
>
> Adding "ar" at the end of that filename, resolved the problem, and I am
> able to run FOP on my Mac. Unfortunately, it took a few days to
> figure out
> this problem.

First, thanks for the input. I'll be glad to update the FAQ, but I am a
little confused about what to put into it. The file name was truncated after
31 characters, which is too odd of a number to seem to have been done on
purpose by StuffIt. What caused the filename truncation? Without
understanding that, I am not sure how to help.

> Java Home. Many Java applications require the identification of a "Java
> Home" directory during installation. The equivalent on Mac OS X should
> always be /Library/Java/Home. This is actually a symbolic link to the
> current installed J2SE version, and allows access to the bin subdirectory
> where command line tools such as java, javac, etc. exist as expected. The

I am not a Mac guy, so please excuse my ignorance. Is this something that
Mac people should already know? In other words, I wonder whether it is even
appropriate to address this in FOP doc as it is primarily a sysadmin issue,
or at least a Mac or Java issue. Also, what if /Library/Java/Home points to
a 1.1 or 1.2 java runtime? If we tell the user to use that, then FOP doesn't
work. Again, I am not sure what to recommend here.

Victor Mote


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org