3 Replies Latest reply: Sep 26, 2008 11:24 AM by 594115 RSS

    Error while running a trusted application in OC4J

    568002
      I have created a trusted application to access the CDB and I can directly run this application in the Embedded OC4J and get the right result. The login code is :
      public ManagersFactory loginCDB(){
      FdkCredential credential = new S2SFdkCredential(
      "orcladmin" , "orclapplicationcommonname=s2stestapplication,cn=ifs,cn=products,cn=oraclecontext",
      "welcome1", null);
      try {
      session = ManagersFactory.login(credential, CDBURL);
      Item user = session.getUser(null);
      s_Logger.log("Connected user: "+LoggingUtils.log(user));
      s_Logger.log(session.getUserManager().toString());
      }
      catch (FdkException e) {
      s_Logger.log(e);

      }
      return session;
      }

      But when I deploy this application to the Local/Remote OC4J and access this application by web, the error is shown as below:
      java.lang.RuntimeException:java.lang.RuntimeException: Unknown exception. See cause.
      java.lang.RuntimeException: Unknown exception. See cause.
           at oracle.ifs.fdk.client.impl.AxisRemoteManagersFactory.handleException(AxisRemoteManagersFactory.java:1271)
           at oracle.ifs.fdk.client.impl.AxisRemoteManagersFactory.<init>(AxisRemoteManagersFactory.java:326)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
           at oracle.ifs.fdk.ManagersFactory.login(ManagersFactory.java:214)
           at oracle.ifs.fdk.ManagersFactory.login(ManagersFactory.java:121)
           at oracle.ifs.fdk.ManagersFactory.login(ManagersFactory.java:84)
           at oracle.l360.cdb.S2SLoginUtil.loginCDB(S2SLoginUtil.java:43)
           at view.backing.LearningActivity.getCdbFileList(LearningActivity.java:152)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99)
           at oracle.adfinternal.view.faces.model.FacesPropertyResolver.getValue(FacesPropertyResolver.java:92)
           at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)
           at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)
           at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
           at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
           at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)
           at javax.faces.component.UIData.getValue(UIData.java:547)
           at org.apache.myfaces.component.html.ext.HtmlDataTableHack.createDataModel(HtmlDataTableHack.java:437)
           at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getDataModel(HtmlDataTableHack.java:414)
           at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getRowCount(HtmlDataTableHack.java:87)
           at org.apache.myfaces.custom.datalist.HtmlListRenderer.encodeChildren(HtmlListRenderer.java:120)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
           at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:465)
           at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:253)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
           at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:629)
           at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:566)
           at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
           at mdssys.viewcontroller._public__html._LearningActivity_jspx._jspService(_LearningActivity_jspx.java:317)
           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
           at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:598)
           at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:522)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
           at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
           at oracle.mds.jsp.MDSJSPFilter.doFilter(Unknown Source)
           at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
           at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
           at java.security.AccessController.doPrivileged(Native Method)
           at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
           at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
           at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
           at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:286)
           at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:50)
           at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:192)
           at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
           at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:197)
           at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
           at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
           at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
           at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
           at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100)
           at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
           at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
           at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
           at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
           at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
           at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
           at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
           at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
           at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
           at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
           at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
           at java.security.AccessController.doPrivileged(Native Method)
           at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
           at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
           at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
           at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
           at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
           at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
           at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
           at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
           at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
           at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
           at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
           at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl
           at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
           at org.apache.axis.client.Call.invoke(Call.java:1820)
           at oracle.ifs.fdk.SessionManagerSoapBindingStub.getCurrentUser(SessionManagerSoapBindingStub.java:365)
           at oracle.ifs.fdk.client.impl.AxisRemoteManagersFactory.<init>(AxisRemoteManagersFactory.java:319)
           ... 88 more
      Caused by: java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl
           at org.apache.axis.Message.setup(Message.java:341)
           at org.apache.axis.Message.<init>(Message.java:243)
           at org.apache.axis.client.Call.invoke(Call.java:2406)
           at org.apache.axis.client.Call.invoke(Call.java:2347)
           at org.apache.axis.client.Call.invoke(Call.java:1804)
           ... 90 more


      How can I resolve this problem? Do I need to config the OC4J server?
      Thanks.

      Message was edited by:
      user564999