我有一个使用两个jars axis.jar和axisCognosClient.jar连接到cognos环境的应用程序

Cognos将其版本从cognos 10.1.1升级到了cognos 10.2,我从Cognos 10.2 SDK中提取了一个新的jar文件,并将其包含在我的项目中,一切都成功完成,但是在运行时出现了以下异常。

[6/10/13 13:47:14:609 CDT] 00000028 RequestProces Worg.apache.struts.action.RequestProcessor processException Unhandled Exception thrown: class sf.jra.util.reflect.MethodInvocationException
[6/10/13 13:47:14:609 CDT] 00000028 ServletWrappe E   SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: action. Exception thrown : javax.servlet.ServletException: public org.apache.struts.action.ActionForward sf.gds.web.iflex.cognos.actions.CreateReportAction.runReport(org.apache.struts.action.ActionMapping,org.apache.struts.action.ActionForm,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) threw a RuntimeException during a reflection invocation.
at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:516)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:423)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Caused by: com.ibm.ws.exception.WsEJBException: nested exception is: java.lang.UnsupportedClassVersionError: (com/cognos/developer/schemas/bibus/_3/AgentService_ServiceLocator) bad major version at offset=6
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:229)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.setUncheckedException(LocalExceptionMappingStrategy.java:394)
at com.ibm.ejs.container.EJSDeployedSupport.setUncheckedLocalException(EJSDeployedSupport.java:473)
at sf.gds.service.iflex.ejbs.EJSLocalStatelessCreateReport_dad64636.createReport(EJSLocalStatelessCreateReport_dad64636.java:35)
... 50 more
Caused by: java.lang.UnsupportedClassVersionError
(com/cognos/developer/schemas/bibus/_3/AgentService_ServiceLocator) bad major version    at offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:266)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:577)
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:529)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:412)
at java.lang.ClassLoader.loadClass(ClassLoader.java:605)
at sf.gds.service.iflex.cognos.api.provided.CRNConnect.connectToCognosServer(CRNConnect.java:263)


知道为什么我们会得到这种例外。

最佳答案

检查您的Java版本以了解Cognos安装和您的应用程序使用的Java版本。

对于Cognos 10.1:IBM Cognos BI随附的当前版本是JRE 1.5.0。

对于Cognos 10.2:IBM Cognos BI随附的当前版本是JRE 6.0。

08-27 15:49