1 |
He tenido un problema al instalar tomcat, en realidad con sus |
2 |
dependencias, que hacen uso de ant y éste me suelta algún error. |
3 |
|
4 |
Es la segunda vez que me pasa, así que lo reporto aquí por si a alguien |
5 |
le sirve de ayuda. |
6 |
|
7 |
El error en el emerge es parecido al siguiente: |
8 |
--------------------------------------------------------------- |
9 |
>>> Compiling source in |
10 |
/var/tmp/portage/caucho-services-3.0.8-r1/work/caucho-services-3.0.8 ... |
11 |
/usr/bin/ant: eval: line 171: unexpected EOF while looking for matching `"' |
12 |
/usr/bin/ant: eval: line 172: syntax error: unexpected end of file |
13 |
|
14 |
!!! ERROR: dev-java/caucho-services-3.0.8-r1 failed. |
15 |
Call stack: |
16 |
ebuild.sh, line 1539: Called dyn_compile |
17 |
ebuild.sh, line 939: Called src_compile |
18 |
caucho-services-3.0.8-r1.ebuild, line 28: Called eant 'jar' |
19 |
'-Dservletapi=/usr/share/servletapi-2.3/lib/servlet.jar' |
20 |
java-utils-2.eclass, line 1314: Called die |
21 |
|
22 |
!!! eant failed |
23 |
!!! If you need support, post the topmost build error, and the call |
24 |
stack if relevant. |
25 |
|
26 |
!!! When you file a bug report, please include the following information: |
27 |
GENTOO_VM=sun-jdk-1.5 CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.5.0.08" |
28 |
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac" |
29 |
and of course, the output of emerge --info |
30 |
--------------------------------------------------------------- |
31 |
|
32 |
No es un problema del script /usr/bin/ant sino del comando java-config |
33 |
invocado por él. |
34 |
|
35 |
Esto ya me pasó cuando hice un upgrade de java en mi máquina, veamos |
36 |
como se arregla: |
37 |
|
38 |
En una de las líneas del /usr/bin/ant se hace esta petición: |
39 |
java-config |
40 |
--classpath=log4j,xerces-2,xalan,junit,antlr,bcel,bsh,commons-beanutils-1.6,commons-collections,commons-logging,commons-net,jakarta-oro-2.0,jdepend,jsch,jakarta-regexp-1.3,rhino-1.5,jython,jta,sun-jaf-bin,sun-javamail-bin |
41 |
|
42 |
Que dá por respuesta esto: |
43 |
/usr/share/commons-logging/lib/commons-logging.jar:/usr/share/xerces-2/lib/xercesImpl.jar:/usr/share/jdepend/lib/jdepend.jar:"/usr/share/sun-jaf-bin/lib/activation.jar:/usr/share/sun-jaf-bin/lib/activation.jar:/usr/share/xalan/lib/xalan.jar:/usr/share/sun-javamail-bin/lib/smtp.jar:/usr/share/jython/lib/jython.jar:/usr/share/antlr/lib/antlr.jar:/usr/share/xerces-2/lib/xercesSamples.jar:/usr/share/junit/lib/junit.jar:/usr/share/rhino-1.5/lib/js.jar:/usr/share/xalan/lib/serializer.jar:/usr/share/commons-collections/lib/commons-collections.jar:/usr/share/jakarta-regexp-1.3/lib/jakarta-regexp.jar:/usr/share/bcel/lib/bcel.jar:/usr/share/sun-javamail-bin/lib/mail.jar:/usr/share/bsh/lib/bsh.jar:/usr/share/jakarta-oro-2.0/lib/jakarta-oro.jar:/usr/share/commons-logging/lib/commons-logging-api.jar:/usr/share/xerces-2/lib/xml-apis.jar:/usr/share/log4j/lib/log4j.jar:/usr/share/commons-net/lib/commons-net.jar:/usr/share/sun-javamail-bin/lib/pop3.jar:/usr/share/sun-javamail-bin/lib/imap.jar |
44 |
:/usr/share/sun-javamail-bin/lib/mailapi.jar:/usr/share/commons-beanutils-1.6/lib/commons-beanutils.jar:/usr/share/jsch/lib/jsch.jar |
45 |
|
46 |
Si nos fijamos hay unas '"' intercaladas en el chorizo. Esto, por |
47 |
supuesto causa un error al intentar usar esta salida como una cadena de |
48 |
texto. |
49 |
|
50 |
El parche consiste en editar el /usr/bin/ant y poner justo debajo de |
51 |
esta línea: |
52 |
LOCALCLASSPATH="${LOCALCLASSPATH}:`java-config |
53 |
--classpath=log4j,xerces-2,xalan,junit,antlr,bcel,bsh,commons-beanutils-1.6,commons-collections,commons-logging,commons-net,jakarta-oro-2.0,jdepend,jsch,jakarta-regexp-1.3,rhino-1.5,jython,jta,sun-jaf-bin,sun-javamail-bin |
54 |
2> /dev/null`" |
55 |
|
56 |
Esta otra: |
57 |
LOCALCLASSPATH=`echo ${LOCALCLASSPATH} | sed 's/\"//g'` |
58 |
|
59 |
|
60 |
Suerte |
61 |
d2clon. |
62 |
-- |
63 |
http://www.flickr.com/photos/d2clon/ |
64 |
http://enamsterdam.blogspot.com/ |
65 |
|
66 |
-- |
67 |
gentoo-user-es@g.o mailing list |