2012-04-10 7 views
-2
#!/bin/bash 
#echo off 
echo -n Enter acl File Location 
read acl 
echo -n Enter target sql File Location 
read sql 
cd bin 
pwd 
java -cp .:../lib/dom4j-1.6.1.jar:../lib/poi-3.8-20120326.jar:../lib/poi-ooxml-3.8-20120326.jar:../lib/poi-ooxml-schemas-3.8-20120326.jar:../lib/stax-api-1.0.1.jar: 
.:../lib/xmlbeans-2.3.0.jar com/paywithisis/gateway/utility/XLSXToSQLConverter $acl $sql 
cd .. 
echo $acl 
echo $sql 

ERREUR MSG:incapable d'exécuter le script shell

../lib/xmlbeans-2.3.0.jar: line 1: PK: command not found 
../lib/xmlbeans-2.3.0.jar: line 2: Lk¶6: command not found 
../lib/xmlbeans-2.3.0.jar: line 3:Kk¶6KAKÛnMETA-INF/MANIFEST.MF}AkÂ@…ï 
                      ûæØv“h!7-„Úƒ¶â­¬ÉXÙÙ°: No such file or directory 
../lib/xmlbeans-2.3.0.jar: line 3: ¶úï›5: command not found 
../lib/xmlbeans-2.3.0.jar: line 4: B¯óÞ: command not found 
../lib/xmlbeans-2.3.0.jar: line 4: óÞ¬ 
             5 
             ¬¶èC㨄‰N¥˜ÓŸÉ¼3Õ¡ŸõâLO¥xöhkµ¸¡³ÏI¦öi›Áª©¼ 
                        —Àh,©ÒRHñf,–àüWb®¼älÛ=: command not found 
../lib/xmlbeans-2.3.0.jar: line 5: IÏsÖñxjgÛE”à{È™Îuªü´HŸòBŠ¥íZŒU½7Ül=°õ}gKýOÜÕÎy6îÀ?Æ#¼¸ÕWËÝÊÇúµ„#sW: command not found 
../lib/xmlbeans-2.3.0.jar: line 5: cµ[œØ:þàPK: command not found 
../lib/xmlbeans-2.3.0.jar: line 6: 9k¶6org/PK: No such file or directory 
../lib/xmlbeans-2.3.0.jar: line 7: 9k¶6 
             org/apache/PK: No such file or directory 
../lib/xmlbeans-2.3.0.jar: line 8: :k¶6org/apache/xmlbeans/PK: No such file or directory 
../lib/xmlbeans-2.3.0.jar: line 9: syntax error near unexpected token `)' 
../lib/xmlbeans-2.3.0.jar: line 9: 9k¶6«f)¸}¿'org/apache/xmlbeans/BindingConfig.class•T]OA=Ó.jµˆÈ7*‚вúBŒ I%Å`j©mC$>é2- 
                                   Ë,n·¦?KäÁÄ€?ÊxgwÅÒ.´¼ÌݽwϹ瞹íï??~x=ŽRƒèGZK1,Ç°ÃÓV&²ï 
     å½ýí|9[ÜÊlf÷³Ëû™b1³Çþ”³šÎO¹q(ôæ‰U\Öõmé 
+2

s'il vous plaît modifier votre poste au format lisible par l'homme –

+0

Donc, votre question est ...? – shift66

+1

Un peu plus d'efforts dans la question et vous inciteriez probablement certaines personnes à essayer d'y répondre. Sinon, la question pourrait se fermer rapidement. – Thomas

Répondre

2

Il ressemble qu'il essaie de un terme fichier JAR en tant que script. Les chaînes PK et MANIFEST sont celles trouvées dans les fichiers JAR compressés.

Vous pouvez vérifier que vous n'avez pas d'espace errant (ou autre caractère drôle) dans votre chemin de classe.

3

Le problème semble être avec la commande suivante qui se est divisé en deux:

java -cp .:../lib/dom4j-1.6.1.jar:../lib/poi-3.8-20120326.jar:../lib/poi-ooxml-3.8-20120326.jar:../lib/poi-ooxml-schemas-3.8-20120326.jar:../lib/stax-api-1.0.1.jar: 
.:../lib/xmlbeans-2.3.0.jar com/paywithisis/gateway/utility/XLSXToSQLConverter $acl $sql 

Vous devez supprimer le saut de ligne avant la .:../lib/xmlbeans-2.3.0.jar

Sinon, le shell tente d'exécuter directement ../lib/xmlbeans-2.3.0.jar, ce qui l'erreur que vous voyez.

+0

Je l'ai essayé aussi.removed.: .. et mais pourquoi il essaye d'exécuter le fichier pourquoi pas d'autres.le code fonctionne bien avec .bat dans Windows .. – milind