Eclipse的ADT朱诺.JTDS是不成立的,是它让返回"字符集0x0904000128 / CP850未由JVM支持&QUOT。 JTDS 1.3.0 [英] Eclipse ADT Juno .JTDS is not established and it keeps returning " Charset 0x0904000128/Cp850 is not supported by the JVM." Jtds 1.3.0

查看:259
本文介绍了Eclipse的ADT朱诺.JTDS是不成立的,是它让返回"字符集0x0904000128 / CP850未由JVM支持&QUOT。 JTDS 1.3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过了codeS的下方,它一直在catch异常返回null。能告诉我为什么,我如何解决这个问题?

I had tried the codes below and it keeps returning null in the catch exception. May I know why and how do I fix this?

Connection conn = null;
try
{
    //String driver = "";
    Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance();
    String connString ="jdbc:jtds:sqlserver://hostNameA/databaseNameAAA;integratedSecurity=true";
    conn = DriverManager.getConnection(connString, username, password);
    Log.e(TAG,"DB Connection Established");
    conn.close();

}
catch(Exception e)
{
    Log.e(TAG,"ERROR: Exception Caught! - " + e.getMessage());
    e.printStackTrace();
}

感谢您。

编辑:
我使用JTDS-1.3.1.jar
每次说到线
康恩=的DriverManager.getConnection(CONNSTRING,用户名,密码);

I am using jtds-1.3.1.jar Everytime it comes to the line conn = DriverManager.getConnection(connString, username, password);

错误将在catch捕获,它会显示为

an error will be caught in the catch and it will display as

错误:异常捕获! - 空

ERROR: Exception Caught! - null

,现在我已经取代JTDS-1.3.1.jar与JTDS-1.3.0.jar文件,现在我收到此错误

and now I had replaced the jtds-1.3.1.jar with jtds-1.3.0.jar file and now I am getting this error

错误:!捕获到异常 - 字符集0x0904000128 / CP850不是由JVM支持

"ERROR: Exception Caught! - Charset 0x0904000128/Cp850 is not supported by the JVM."

EDIT2:

我已经测试了这些codeS在JAVA(桌面),它工作正常使用它,它是能够连接到数据库和检索服务器的所有数据,但是当我在android系统我用它在异步任务获得字符集不被JVM支持。

I had tested these codes in JAVA (desktop) and it works fine with it, it is able to connect into the database and retrieve all the data from the server but when I use it in async task in android I get the "Charset is not supported by the JVM".

我该如何解决这个问题?
我曾试图重新安装JDK和它不工作。它仍然是相同的。

How do I fix this? I had tried re-installing the JDK and it does not work. It is still the same.

推荐答案

字符集0x0904000128 / CP850不被JVM的支持。

我发现一个论​​坛主题同样的错误信息这里。回答是

I found the same error message in a forum thread here. The response was

此问题是由于安装在服务器上的JVM。
  这是一个只有有限的语言包(如美国/英国只包)。

This problem is due to the JVM installed on your server. It's a limited language-only package (like US/English-only package).

您必须改变JVM来解决这个问题。

You have to change the JVM to resolve this problem.

其次

问题是由reinstallaing用完整的语言包JVM解决

issue is solved by reinstallaing JVM with complete language package

由于code页850是Latin1的(参考较旧的DOS版本:这里),您也可以尝试改变你的项目的源编码到Windows 1252或ISO-8859-1,看看你目前的JVM可以下载和安装其他JVM之前处理它。

Since code page 850 is an older DOS version of Latin1 (ref: here) you might also try changing the source encoding of your project to Windows-1252 or ISO-8859-1 and see if your current JVM can handle it before downloading and installing another JVM.

这篇关于Eclipse的ADT朱诺.JTDS是不成立的,是它让返回"字符集0x0904000128 / CP850未由JVM支持&QUOT。 JTDS 1.3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆