Manifest.MF issue with MSSQLSERVER 2008 and Groovy

拥有回忆 提交于 2020-01-22 02:11:14

问题


I have created a simple Groovy project in GGTS IDE that connects to Oracle and SQLServer. The Program runs fine within the IDE but when I run the program through the command line I seem to get some sort of enconding error in MANIFEST.MF?. See the stacktrace below:

Command Line

groovy -cp lib\ojdbc14_g.jar lib\sqljdbc4.jar src\Starter.groovy

Result

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\workspace-ggts-3.1.0.RELEASE\Test\lib\sqljdbc4.jar: 1: unexpected char: 0x3 @ line 1, column 3.
   PK♥ h?I@            ¶   META-INF/MANIFEST.MF¡|GôΓ┌▓εⁿD∞ ░=x/êsä      8◄o ï∟B▲
ë╔
     ^

1 error

In the past to connect to MSSQLServer I have used the following jars:

  • msbase.jar
  • msutil.jar
  • mssqlserver.jar

This time though, when I looked for jdbc jars for 2008 I got the sqljdbc4.jar. Again it works from within the IDE but not from command line. I have singled out the problem to be in the sqljdbc4.jar because I commented all the code related to that and the program ran fine with just the oracle jar references.

  1. Anybody know why this is happening?
  2. What jars are you using to connect to sqlserver 2008 from the command line with groovy?

Thanks.


回答1:


You need semi-colons between classpath entries (assuming you are on Windows)

groovy -cp lib\ojdbc14_g.jar;lib\sqljdbc4.jar src\Starter.groovy

Or colons if you're on Linux/Mac

groovy -cp lib/ojdbc14_g.jar:lib/sqljdbc4.jar src/Starter.groovy


来源:https://stackoverflow.com/questions/13311992/manifest-mf-issue-with-mssqlserver-2008-and-groovy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!