UnsupportedCharsetException: IS646-US with JDK 1.8u51 on Solaris 5.10
UnsupportedCharsetException: IS646-US with JDK 1.8u51 on Solaris 5.10
我尝试使用 JDK 1.8u51 在 Solaris 5.10 上启动 java 企业应用程序(运行 on 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[=12=]0(FileSystems.java:89)
at java.nio.file.FileSystems$DefaultFileSystemHolder.run(FileSystems.java:98)
at java.nio.file.FileSystems$DefaultFileSystemHolder.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.run(SeedGenerator.java:190)
at sun.security.provider.SeedGenerator.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)
...
看起来像是打字错误,应该是 ISO646-US(更广为人知的名称是 ASCII 或 US-ASCII)。
可能的原因是您 运行 是 -Dfile.encoding=IS646-US
(或类似的),例如在应用程序服务器的启动配置中明确。
我尝试使用 JDK 1.8u51 在 Solaris 5.10 上启动 java 企业应用程序(运行 on 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[=12=]0(FileSystems.java:89)
at java.nio.file.FileSystems$DefaultFileSystemHolder.run(FileSystems.java:98)
at java.nio.file.FileSystems$DefaultFileSystemHolder.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.run(SeedGenerator.java:190)
at sun.security.provider.SeedGenerator.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)
...
看起来像是打字错误,应该是 ISO646-US(更广为人知的名称是 ASCII 或 US-ASCII)。
可能的原因是您 运行 是 -Dfile.encoding=IS646-US
(或类似的),例如在应用程序服务器的启动配置中明确。