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 bu...@apache.org on 2006/09/22 18:16:53 UTC

DO NOT REPLY [Bug 40583] New: - Under Cygwin, fop bash script CLASSPATH problem

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583

           Summary: Under Cygwin, fop bash script CLASSPATH problem
           Product: Fop
           Version: 0.92
          Platform: PC
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P2
         Component: general
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: timo@dspsrv.com


The LOCALCLASSPATH variable in the script is set to longer than 256 characters,
making any reasonable cygwin basic install fail with:

cygpath: error converting
"/cygdrive/c/win2k/fop/lib/xmlgraphics-commons-1.0.jar:/cygdrive/c/win2k/fop/lib/xml-apis-1.3.02.jar:/cygdrive/c/win2k/fop/lib/xercesImpl-2.7.1.jar:/cygdrive/c/win2k/fop/lib/xalan-2.7.0.jar:/cygdrive/c/win2k/fop/lib/serializer-2.7.0.jar:/cygdrive/c/win2k/fop/lib/commons-logging-1.0.4.jar:/cygdrive/c/win2k/fop/lib/commons-io-1.1.jar:/cygdrive/c/win2k/fop/lib/batik-all-1.6.jar:/cygdrive/c/win2k/fop/lib/avalon-framework-4.2.0.jar:/cygdrive/c/win2k/fop/build/fop.jar:/cygdrive/c/win2k/fop/build/fop-sandbox.jar:/cygdrive/c/win2k/fop/build/fop-hyph.jar:"
- File name too long
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fop/cli/Main

I have ant installed in the same directory, and it does not fail like this. The
reason for this is that it has the ANT_LIB and ANT_HOME directories passed to it
as properties, and (i guess) deals with the classpath issues internally.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From spepping@apache.org  2006-10-05 06:05 -------
(In reply to comment #3)
> I can confirm the problem using cygpath on the long path value in the report
> above. However, I'm running fop.sh from a cygwin bash for years and didn't have
> a problem. I suspect it might be due to the /cygdrive/ prefix.

It will always hurt a person who installs fop under a long path name. Therefore
we better try to prevent it. Can you test that the modified script at least does
not make things worse, and hopefully resolves the problem?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From timo@dspsrv.com  2006-10-12 13:29 -------
FWIW it was the technique i attempted when i first tried to hack it.

both work fine.
Fop - last script:
local class path:
c:/win2k/fop/lib/xmlgraphics-commons-1.0.jar;c:/win2k/fop/lib/xml-apis-1.3.02.jar;c:/win2k/fop/lib/xercesImpl-2.7.1.jar;c:/win2k/fop/lib/xlan-2.7.0.jar;c:/win2k/fop/lib/serializer-2.7.0.jar;c:/win2k/fop/lib/commons-logging-1.0.4.jar;c:/win2k/fop/lib/commons-io-1.1.jar;c:/win2k/fop/lib/batik-all-1.6.jar;c:/win2k/fop/lib/avalon-framework-4.2.0.jar;c:/win2k/fop/build/fop.jar;c;C:/cygwin/win2k/fop/build/fop-sandbox.jar;c;C:/cygwin/win2k/fop/build/fop-hyph.jar;

Fopish - new script:
local class path:
c:/win2k/fop/lib/xmlgraphics-commons-1.0.jar;c:/win2k/fop/lib/xml-apis-1.3.02.jar;c:/win2k/fop/lib/xercesImpl-2.7.1.jar;c:/win2k/fop/lib/xalan-2.7.0.jar;c:/win2k/fop/lib/serializer-2.7.0.jar;c:/win2k/fop/lib/commons-logging-1.0.4.jar;c:/win2k/fop/lib/commons-io-1.1.jar;c:/win2k/fop/lib/batik-all-1.6.jar;c:/win2k/fop/lib/avalon-framework-4.2.0.jar;c:/win2k/fop/build/fop.jar;c:/win2k/fop/build/fop-sandbox.jar;c:/win2k/fop/build/fop-hyph.jar

as you can see, the new one adds the last two jars correctly.

Done IMHO, but will leave for someone else to close.
 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From spepping@apache.org  2006-10-04 13:18 -------
Created an attachment (id=18964)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18964&action=view)
alternative fop script

Does this script solve the problem?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From spepping@apache.org  2006-10-05 10:21 -------
(In reply to comment #5)
> It now reports:
> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fop/cli/Main
> 
> i guess the classpath is still a bit messed.

Can you let me know the resulting class path? Is FOP_HOME set? Does
$FOP_HOME/build/fop.jar exist?


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From timo@dspsrv.com  2006-10-06 04:40 -------
LocalClasspath =
c:/win2k/fop/lib/xmlgraphics-commons-1.0.jar:c:/win2k/fop/lib/xml-apis-1.3.02.jar:c:/win2k/fop/lib/xercesImpl-2.7.1.jar:c:/win2k/fop/lib/xalan-2.7.0.jar:c:/win2k/fop/lib/serializer-2.7.0.jar:c:/win2k/fop/lib/commons-logging-1.0.4.jar:c:/win2k/fop/lib/commons-io-1.1.jar:c:/win2k/fop/lib/batik-all-1.6.jar:c:/win2k/fop/lib/avalon-framework-4.2.0.jar:c:/win2k/fop/build/fop.jar;c;C:/cygwin/win2k/fop/build/fop-sandbox.jar;c;C:/cygwin/win2k/fop/build/fop-hyph.jar:

Classpath =

fop_home = c:/win2k/fop

fop_exec_command = exec "/cygdrive/c/win2k/Java/jdk1.5.0_04/bin/java" -classpath
"c:/win2k/fop/lib/xmlgraphics-commons-1.0.jar:c:/win2k/fop/lib/xml-apis-1.3.02.jar:c:/win2k/fop/lib/xercesImpl-2.7.1.jar:c:/win2k/fop/lib/xalan-2.7.0.jar:c:/win2k/fop/lib/serializer-2.7.0.jar:c:/win2k/fop/lib/commons-logging-1.0.4.jar:c:/win2k/fop/lib/commons-io-1.1.jar:c:/win2k/fop/lib/batik-all-1.6.jar:c:/win2k/fop/lib/avalon-framework-4.2.0.jar:c:/win2k/fop/build/fop.jar;c;C:/cygwin/win2k/fop/build/fop-sandbox.jar;c;C:/cygwin/win2k/fop/build/fop-hyph.jar:"
org.apache.fop.cli.Main

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fop/cli/Main


My guess is that it is not recognising the path separation as windoes, i.e. c:/
should be c:\

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From spepping@apache.org  2006-10-12 11:34 -------
Created an attachment (id=18995)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18995&action=view)
another alternative fop script

This script was provided by Mark C. Allman. I builds the Unix path, but with
semicolons instead of colons. Then it applies cygpath as before. This will
cause cygpath to convert the path in pieces, and avoid length problems. This is
a simpler solution than mine. Please, test.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From j_cumps@yahoo.com  2006-10-06 07:07 -------
I think your last trial failed because you used : as path separator.

Even though you are in cygwin, the java.exe is the windows version. It 
expects ; as path separator.

To make CLASSPATH work on my cygwin installation, I have to use this style:
$ export CLASSPATH="c:/library_home/bopiler.jar;c:/library_home/junit/junit4/ju
nit-4.1.jar"

Either with forward or backward slashes.

Using it without quotes fails;
using : in stead of ; fails
using /cygdrive/c/... fails.

But, 
Cygwin has a tool called cygpath, that translates your UNIX-style classpath to 
windows path. See link:
<http://www.ics.uci.edu/~ics185/projects/project0/faq1.html>

Regards, Jan

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From timo@dspsrv.com  2006-10-05 06:12 -------
Almost, but not quite ;)

It now reports:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fop/cli/Main

i guess the classpath is still a bit messed.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From j3322ptm@yahoo.de  2006-10-04 14:33 -------
I can confirm the problem using cygpath on the long path value in the report
above. However, I'm running fop.sh from a cygwin bash for years and didn't have
a problem. I suspect it might be due to the /cygdrive/ prefix.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From timo@dspsrv.com  2006-10-07 06:40 -------
Nope, not quite. Change 
PATH_SEPARATOR=;
to
PATH_SEPARATOR=";"

and it works.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583


spepping@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From spepping@apache.org  2006-10-13 00:07 -------
Patch by Mark C. Allman applied in revision 463578.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583


spepping@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18964|0                           |1
        is obsolete|                            |




------- Additional Comments From spepping@apache.org  2006-10-06 10:55 -------
Created an attachment (id=18974)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18974&action=view)
alternative fop script

One more try, with ';' as the path separator. If this does not work, I will
defer to a seasoned Cygwin user.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583





------- Additional Comments From spepping@apache.org  2006-10-04 13:20 -------
I do not run Cygwin here, so I cannot test this problem. Is it really true that
cygpath has such a small upper limit to the path length? If so, can you test
whether the attached script solves the problem?

Simon

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 40583] - Under Cygwin, fop bash script CLASSPATH problem

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40583


p.kullmann@arenae.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.kullmann@arenae.ch




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.