我有一个程序应该将文件发送到Web服务,这需要SSL连接.我按如下方式运行程序:
SET JAVA_HOME=C:\Program Files\Java\jre1.6.0_07
SET com.ibm.SSL.ConfigURL=ssl.client.props
"%JAVA_HOME%\bin\java" -cp ".;Test.jar" ca.mypackage.Main
Run Code Online (Sandbox Code Playgroud)
这工作正常,但当我改变第一行
SET JAVA_HOME=C:\Program Files\IBM\SDP\runtimes\base_v7\java\jre
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:119)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:140)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:593)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:552)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:537)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:434)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:247)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:132)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:242)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:222)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:115)
at $Proxy26.fileSubmit(Unknown Source)
at com.testing.TestingSoapProxy.fileSubmit(TestingSoapProxy.java:81)
at ca.mypackage.Main.main(Main.java:63)
Caused by: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:7)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:1)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:110)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:14)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:902)
at com.ibm.net.ssl.www2.protocol.https.b.getOutputStream(b.java:86) …
Run Code Online (Sandbox Code Playgroud) 我在IBM J9 JDK/JRE上有以下问题.
谢谢.
我正在编写将在AIX服务器上运行的Java代码.我想知道IBM的JDK和Oracle的JDK之间的区别,以及JDK是否具有相同的类.IBM JDK是否具有Oracle JDK中的所有类?
是否有任何IBM文档描述了两个JDK之间的差异?
我们刚刚将服务器升级RHEL v7.3
为v7.4
.
这个简单的程序适用于RHEL v7.3,在v7.4中失败
public class TestJava {
public static void main(String[] args) {
Font font = new Font("SansSerif", Font.PLAIN, 12);
FontRenderContext frc = new FontRenderContext(null, false, false);
TextLayout layout = new TextLayout("\ude00", font, frc);
layout.getCaretShapes(0);
System.out.println(layout);
}
}
Run Code Online (Sandbox Code Playgroud)
RHEL 7.4中的例外情况是:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:75)
at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
at sun.font.Font2D.getFontMetrics(Font2D.java:415)
at java.awt.Font.defaultLineMetrics(Font.java:2176)
at java.awt.Font.getLineMetrics(Font.java:2283)
at java.awt.font.TextLayout.fastInit(TextLayout.java:598)
at java.awt.font.TextLayout.<init>(TextLayout.java:393)
Run Code Online (Sandbox Code Playgroud)
RHEL v7.3的结果是:
sun.font.StandardTextSource@7ba4f24f[start:0, len:1, cstart:0, clen:1, chars:"de00", level:0, flags:0, font:java.awt.Font[family=SansSerif,name=SansSerif,style=plain,size=12], frc:java.awt.font.FontRenderContext@c14b833b, cm:sun.font.CoreMetrics@412ae196]
Run Code Online (Sandbox Code Playgroud)
的更新RHEL v7.4 …
其他一些团队正在调用我们的FileNet自定义应用程序来搜索文档.我相信有些用户正面临间歇性故障,因为我们正在获取门票(虽然没有用户报告此问题)以下错误,我尝试用不同的方案验证我们的服务,但他们都工作但我不知道是什么导致此错误.任何建议/帮助将不胜感激.
<stackTrace>
at com.filenet.apiimpl.transport.ejb.EJBSession.throwException(EJBSession.java:1122)
at com.filenet.apiimpl.transport.ejb.EJBSession.throwException(EJBSession.java:1045)
at com.filenet.apiimpl.transport.ejb.EJBSession$EJBImpl._getObjects(EJBSession.java:650)
at com.filenet.apiimpl.transport.ejb.EJBSession$EJBImpl.getObjects(EJBSession.java:575)
at com.filenet.apiimpl.transport.ejb.EJBSession.getObjects(EJBSession.java:471)
at com.filenet.apiimpl.util.SessionHandle.getObjects(SessionHandle.java:346)
at com.filenet.apiimpl.core.Session.callGetObjects(Session.java:132)
at com.filenet.apiimpl.core.Session.executeGetObject(Session.java:340)
at com.filenet.apiimpl.core.Session.getObject(Session.java:354)
at com.filenet.apiimpl.core.DispatchEntries.FetchObject_28(DispatchEntries.java:907)
at com.filenet.apiimpl.core.ObjectStoreImpl.fetchObject(ObjectStoreImpl.java:1643)
at com.filenet.api.core.Factory$ClassDescription.fetchInstance(Factory.java:21761)
at ecm.service.p8ceservices.implementation.integration.SearchP8ObjectAdapter.retrievePropertyDefinitions(SearchP8ObjectAdapter.java:352)
at ecm.service.p8ceservices.implementation.integration.SearchP8ObjectAdapter.integrate(SearchP8ObjectAdapter.java:158)
at ecm.service.p8ceservices.implementation.integration.ContentEngineAdapter.execute(ContentEngineAdapter.java:37)
</stackTrace>
</exception><exception name="java.lang.IndexOutOfBoundsException" message="Data to be copied (length 2124) exceeds space available (480)" sequence="0" guid="sfr2mx3l:jewe2wkf:00000000:00000121"><source class="com.ibm.rmi.util.buffer.SimpleByteBuffer" archive="" vendor="" version="" /><stackTrace>
at com.ibm.rmi.util.buffer.SimpleByteBuffer.write(SimpleByteBuffer.java:166) at com.ibm.rmi.iiop.ClientRequestImpl.reInvoke(ClientRequestImpl.java:489)
at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDelegate.java:637) at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1377)
at com.ibm.rmi.corba.ClientDelegate.invoke(ClientDelegate.java:695) at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1407)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:484) at com.filenet.apiimpl.transport.ejbstubs._Engine_Stub.getObjects(Unknown Source)
at com.filenet.apiimpl.transport.ejb.EJBSession$EJBImpl._getObjects(EJBSession.java:638)</stackTrace>
Run Code Online (Sandbox Code Playgroud) 1.13.1
我正在使用Java 8构建可执行jar。以下是Java版本:
$ /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-2~14.04-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
Run Code Online (Sandbox Code Playgroud)
我正在使用gradle 3.4.1生成jar,如下所示:
/opt/gradle-3.4.1/bin/gradle jar -Dorg.gradle.java.home=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
下面是模块级build.gradle文件中定义的依赖项:
dependencies {
compile files("$TOOLCHAIN_VERSION_DIR/lib/commons-io-2.6.jar")
compile files("$TOOLCHAIN_VERSION_DIR/lib/grpc-all.jar")
compile files("$TOOLCHAIN_VERSION_DIR/lib/java-protobuf.jar")
compile files("$TOOLCHAIN_VERSION_DIR/lib/jetty.jar")
compile files("$TOOLCHAIN_VERSION_DIR/lib/log4j-core-2.8.jar")
compile files("$TOOLCHAIN_VERSION_DIR/lib/log4j-slf4j-impl-2.8.jar")
compile files("$TOOLCHAIN_VERSION_DIR/lib/netty-tcnative-boringssl-static-2.0.20.Final.jar")
compile files("$TOOLCHAIN_VERSION_DIR/lib/netty-tcnative-2.0.20.Final.jar")
compile files("$TOOLCHAIN_VERSION_DIR/lib/picocli-3.8.2.jar")
compile group: 'com.google.guava', name: 'guava', version: '20.0'
compile files("$TOOLCHAIN_VERSION_DIR/lib/javassist-3.19.0-GA.jar")
compile project(':annotation')
}
Run Code Online (Sandbox Code Playgroud)
构建后,我在AIX7.2机器上运行jar,如下所示:
/usr/java8_64/jre/bin/java -jar agent-1.0.jar
AIX机器上的Java版本如下:
$ /usr/java8_64/jre/bin/java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 8.0.5.26 - pap6480sr5fp26-20181115_03(SR5 …
Run Code Online (Sandbox Code Playgroud) 我正在查看最新的websphere自由8.5.5.7完整平台(https://developer.ibm.com/wasdev/downloads/liberty-profile-using-non-eclipse-environments/),我想知道它是否可以运行oracle java 8?我在下载页面上看到,ibms java 8仅支持web配置文件,但我不在乎我是否从oracle或ibm运行jdk,只要它是版本8.
从历史上看,websphere要求在linux和solaris上使用ibms jdk.
我搜索了ibms网站但没有找到任何答案.