您的位置:首页 > 数据库

使用fat jar打包后抛出异常(sqljdbc签名引起)

2013-05-03 10:56 441 查看
问题:

Exception in thread "main" java.lang.SecurityException: invalid SHA1 signature file digest for com/microsoft/sqlserver/jdbc/SQLServerException.class

解决方法:

Mircosoft had signed the jar file thru their own tools. So when you try to use the jar file directly or signing by your own tool and using on your JNLP will give this problem.

To solve this problem steps to be followed.

1. Extract the sqljdbc.jar or sqljdbc4.jar file

(解压缩sqljdbc4.jar)

2. Goto META-INF Folder

(进入META-INF文件夹)

3. Open MANIFEST.MF and delete all the lines other than first line and save it

(打开MANIFEST.MF文件,删除第一行之外的所有内容并保存)

4. Delete other files which exist in the same folder

(删除该目录内其他所有文件及文件夹)

5. Finally once again make a new jar file including *com* and *META-INF* folder as sqljdbc.jar or sqljdbc4.jar

(重新将com目录和META-INF目录打包为 sqljdbc.jar或sqljdbc4.jar)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐