使用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)
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)
相关文章推荐
- 【软件系肖潇】解决使用DButils进行jdbc多表联合操作时抛出sql异常的问题
- 使用sql 2005 jar 包替换 2000 jar包异常:com.microsoft.sqlserver.jdbc.SQLServerException: 不支持此游标类型/并发组合。
- 使用sql 2005 jar 包替换 2000 jar包异常:com.microsoft.sqlserver.jdbc.SQLServerException: 不支持此游标类型/并发组合。
- com.microsoft.sqlserver.jdbc.SQLServerException: 使用 DBComms.receive 方法期间发生异常。
- 解决使用SQL关键字作为列名引起的sql异常场景
- 1 开发一个注重性能的JDBC应用程序不是一件容易的事. 当你的代码运行很慢的时候JDBC驱动程序并不会抛出异常告诉你。 本系列的性能提示将为改善JDBC应用程序的性能介绍一些基本的指导原则,这其中的原则已经被许多现有的JDBC应用程序编译运行并验证过。 这些指导原则包括: 正确的使用数据库MetaData方法 只获取需要的数据 选用最佳性能的功能 管理连
- jdbc 捕捉sql server raiseerror 方法抛出的异常
- HiveServer2 的jdbc方式创建udf的修改(add jar 最好不要使用),否则会造成异常: java.sql.SQLException: Error while processing statement: null
- SQL 抛出异常的例子 RAISERROR 的使用
- 关于使用Java Mail进行邮件发送,抛出Could not connect to SMTP host: xx@xxx.com, port: 25的异常可能
- 解决使用数据库时代理类强转出现异常$Proxy0 cannot be cast to java.sql.Connection
- 使用java以及jdbc不使用第三方库执行sql文件脚本
- Android多渠道打包汇总(二)—— 使用AS进行签名打包
- sql server jdbc driver 使用服务器端游标
- Android 使用Android Studio + Gradle 或 命令行 进行apk签名打包
- 使用powerdesigner连接数据库时出现Non SQL Error : Could not load class com.mysql.jdbc.Drive
- 使用正式签名打包APK,打开debug模式报错的问题解决方法
- 使用JDBC拼接SQL更新语句——Insert语句的代码思路
- 在使用Linq to SQL并序列化一个数据对象的时候报System.InvalidOperationException异常,序列化类型XXX的对象时检测到循环引用。
- TCP中使用ObjectOutputStream传输数据对象抛出**Connection reset**的异常。