UnsupportedCharsetException:在Solaris 5.10上带有JDK 1.8u51的IS646-US

时间:2015-08-17 09:19:31

标签: java jdbc solaris

我尝试使用JDK 1.8u51在Solaris 5.10上启动java企业应用程序(在JBoss 4.3上运行)。不幸的是,我从jdbc驱动程序中得到以下异常:

java.nio.charset.UnsupportedCharsetException: IS646-US

有谁知道这是怎么回事?这一切在JDK 1.7u65上都没有问题

这是堆栈跟踪:

java.nio.charset.UnsupportedCharsetException: IS646-US
    at java.nio.charset.Charset.forName(Charset.java:531)
    at sun.nio.fs.Util.<clinit>(Util.java:41)
    at sun.nio.fs.UnixFileSystem.<init>(UnixFileSystem.java:52)
    at sun.nio.fs.SolarisFileSystem.<init>(SolarisFileSystem.java:43)
    at sun.nio.fs.SolarisFileSystemProvider.newFileSystem(SolarisFileSystemProvider.java:46)
    at sun.nio.fs.SolarisFileSystemProvider.newFileSystem(SolarisFileSystemProvider.java:39)
    at sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.java:56)
    at sun.nio.fs.SolarisFileSystemProvider.<init>(SolarisFileSystemProvider.java:41)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at java.lang.Class.newInstance(Class.java:442)
    at sun.nio.fs.DefaultFileSystemProvider.createProvider(DefaultFileSystemProvider.java:48)
    at sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.java:61)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:108)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.access$000(FileSystems.java:89)
    at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:98)
    at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:96)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:96)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.<clinit>(FileSystems.java:90)
    at java.nio.file.FileSystems.getDefault(FileSystems.java:176)
    at java.io.File.toPath(File.java:2234)
    at sun.security.provider.SeedGenerator$1.run(SeedGenerator.java:190)
    at sun.security.provider.SeedGenerator$1.run(SeedGenerator.java:168)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.security.provider.SeedGenerator.getSystemEntropy(SeedGenerator.java:168)
    at sun.security.provider.SecureRandom$SeederHolder.<clinit>(SecureRandom.java:201)
    at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:221)
    at java.security.SecureRandom.nextBytes(SecureRandom.java:468)
    at oracle.security.o5logon.O5Logon.a(Unknown Source)
    at oracle.security.o5logon.O5Logon.<clinit>(Unknown Source)
    at oracle.jdbc.driver.T4CTTIoauthenticate.<init>(T4CTTIoauthenticate.java:566)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:370)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
    at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:207)
    at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:139)
    at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:88)
    at oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1598)
    at oracle.jdbc.pool.OracleImplicitConnectionCache.makeOneConnection(OracleImplicitConnectionCache.java:515)
    at oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:475)
    at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:357)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:395)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179)
...

1 个答案:

答案 0 :(得分:2)

它看起来像一个错字,它应该是ISO646-US(更好地称为ASCII或US-ASCII)。

可能的原因是您使用-Dfile.encoding=IS646-US(或类似)运行,例如在应用程序服务器的启动配置中明确地运行。