我需要有关如何迁移与连接业务对象有关的Java代码的帮助。它最近从版本3迁移到4.2。我们正在使用在WAS 9上运行的Java8。我尝试从已读过的论坛中更新jar,但是遇到此错误。
org.apache.axis2.AxisFault:登录异常的来源已知。 (错误:FWB 00008) com.businessobjects.dsws.Consumer.dswsExceptionDocToAxisFault处(未知源) com.businessobjects.dsws.session.Session.login处(未知来源) 在com.bms.reacts.bobj.BOWSClient.getInstance(BOWSClient.java:138) 在com.bms.reacts.ui.reports.action.GetDynaReportPromptsAction.getBoWsClient(GetDynaReportPromptsAction.java:674) 在com.bms.reacts.ui.reports.action.GetDynaReportPromptsAction.execute(GetDynaReportPromptsAction.java:153) 在org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 在org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 在org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 在org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:707) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 在com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1234) 在com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:778) 在com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:477) 在com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 在com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:143) 在com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:96) 在com.bms.sidetrack.DebugFilter.doFilter(DebugFilter.java:103) 在com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197) 在com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90) 在com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:969) 在com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1109) 在com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82) 在com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:961) 在com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817) 在com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:294) 在com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) 在com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532) 在com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318) 在com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88) 在com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) 在com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 在com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 在com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 在com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 在com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 在com.ibm.io.async.ResultHandler $ 2.run(ResultHandler.java:905) 在com.ibm.ws.util.ThreadPool $ Worker.run(ThreadPool.java:1892)
请参见以下代码:
公共静态同步的BOWSClient getInstance() 引发AxisFault,NamingException,MalformedURLException {
BOWSClient bowsclient = null;
if (bowsclient == null) {
bowsclient = new BOWSClient();
}
try {
// create connection
Connection boConnection;
boConnection = new Connection(getBoConURL());
int bobjServerTimout = Integer.parseInt(System.getProperty("BOBJ_SRVR_TOUT")) *60*1000;
boConnection.setTimeOut(bobjServerTimout);
// provide authentication credentials
EnterpriseCredential boCredential = EnterpriseCredential.Factory.newInstance();
//username, pwd and urls are loaded from database table appl_parm during login
boCredential.setLogin(System.getProperty("BOBJ_UNAME"));
boCredential.setPassword(ReactsUtil.doROT13Convert(System.getProperty("BOBJ_PWD")));
boCredential.setAuthType("secEnterprise");
if (bowsclient.bowsSession == null) {
// create session
bowsclient.bowsSession = new Session(boConnection);
SessionInfo boSI = bowsclient.bowsSession.login(boCredential);
bowsclient.bowsSession.resetSessionTimeOut();
if (log.isDebugEnabled())
log.debug("BOWS Conn established successfully.");
}
} catch (AxisFault e) {
log.error("Exception message is " + e.getMessage(), e);
throw e;
} catch (NamingException e) {
log.error("Exception message is " + e.getMessage(), e);
throw e;
} catch (MalformedURLException e) {
log.error("Exception message is " + e.getMessage(), e);
throw e;
}
return bowsclient;
}
我不确定这是Java还是BO上的错误。请让我知道有关如何正确整合它的步骤。