oracle.iam.platform.utils.NoSuchServiceException:java.lang.reflect.InvocationTargetException

时间:2014-09-02 18:47:00

标签: jsf jsf-2 weblogic oracle-adf

我正在尝试连接oim服务器并从jsf按钮调用以下函数。 这是我的功能:

public static IdentityManagerAPI connect_ICE_TEST(IdentityManagerAPI api) {
        try {
            System.setProperty("java.security.auth.login.config",
                               "C:\\JDeveloper\\mywork\\AddRemoveAPP\\AddRemove\\src\\config\\authwl.conf");
            System.setProperty("OIM.AppServerType", "weblogic");
            java.util.Hashtable<String, String> env = new java.util.Hashtable<String, String>();
            env.put("java.naming.provider.url", "t3://<ip address>:<port>");
            env.put("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory");
            tcUtilityFactory tcUtilityFactory = new tcUtilityFactory(env, "<username>", "<password>");
            api = IdentityManagerAPI.getAPI(tcUtilityFactory);
        } catch (Exception e) {
            logMap.put("Server connection error", 2);
            e.printStackTrace();
        }

        return api;
    }

从main函数调用此函数时,一切正常。但是当我尝试从jsf按钮调用该函数时,它返回以下异常。 我有调试项目。我看到它从第267行的tcUtilityFactory抛出异常获取实例

发展环境:Jdev 12 c和weblogic 12 c

  

oracle.iam.platform.utils.NoSuchServiceException:   java.lang.reflect.InvocationTargetException at   oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:197)
  在oracle.iam.platform.OIMClient.getService(OIMClient.java:174)at   oracle.iam.platform.OIMClient.loginSessionCreated(OIMClient.java:209)   在oracle.iam.platform.OIMClient.login(OIMClient.java:136)at   oracle.iam.platform.OIMClient.login(OIMClient.java:114)at   Thor.API.tcUtilityFactory。(tcUtilityFactory.java:154)at   javaClasses.AddRemovePriv.connect_ICE_TEST(AddRemovePriv.java:267)
  在javaClasses.AddRemovePriv.execute(AddRemovePriv.java:124)at   beans.bean.btnSubmitAction(bean.java:130)at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   在java.lang.reflect.Method.invoke(Method.java:606)at   com.sun.el.parser.AstValue.invoke(AstValue.java:254)at at   com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)   在   org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)   在   com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)   在   org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)   在   javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)   在   javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)   在   oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:1074)   在   oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:402)   在   oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)   在javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)at   weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:280)   在   weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:254)   在   weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)   在   weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)   在weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
  在   weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)   在   oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)   在   org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl $ FilterListChain.doFilter(TrinidadFilterImpl.java:502)   在   oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)   在   org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl $ FilterListChain.doFilter(TrinidadFilterImpl.java:502)   在   org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)   在   org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)   在   org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)   在   weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)   在   oracle.security.jps.ee.http.JpsAbsFilter $ 1.run(JpsAbsFilter.java:137)   在java.security.AccessController.doPrivileged(Native Method)at   oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)   在   oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)   在   oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)   在   oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)   在oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
  在   weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)   在   oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)   在   weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)   在   weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)   在   weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)   在   weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)   在   weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.run(WebAppServletContext.java:3402)   在   weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)   在   weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)   在   weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)   在   weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)   在   weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)   在   weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)   在   weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)   在   weblogic.servlet.provider.ContainerSupportProviderImpl $ WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)   在weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)at   weblogic.work.ExecuteThread.run(ExecuteThread.java:263)引起:   java.lang.reflect.InvocationTargetException at   sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)   在   sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)   在   sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)   在java.lang.reflect.Constructor.newInstance(Constructor.java:526)
  在   oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:193)
  ... 61更多引起:java.lang.AssertionError:无法生成   weblogic.jndi.internal.ServerNamingNode_1030_WLStub的类   weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:851)   在   weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:842)   在weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:73)
  在weblogic.rmi.internal.StubInfo.resolveObject(StubInfo.java:327)
  在weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:268)at at   sun.reflect.GeneratedMethodAccessor95.invoke(未知来源)at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   在java.lang.reflect.Method.invoke(Method.java:606)at   java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1104)   在   java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1807)   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)   在java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
  在   weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:208)   在   weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:602)   在   weblogic.rjvm.MsgAbbrevInputStream.readObjectWL(MsgAbbrevInputStream.java:591)   在   weblogic.rjvm.MsgAbbrevInputStream $ NestedObjectInputStream.readObjectWL(MsgAbbrevInputStream.java:730)   在   weblogic.jndi.internal.WLContextImpl.readExternal(WLContextImpl.java:590)   在   java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1837)   在   java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)   在   java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)   在   java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)   在   java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)   在java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
  在   weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:208)   在   weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:602)   在weblogic.rjvm.ResponseImpl.getThrowable(ResponseImpl.java:204)at at   weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:252)at at   weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:477)   在   weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:285)   在weblogic.jndi.internal.ServerNamingNode_12130_WLStub.lookup(未知   来源)at   weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:440)
  在weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)   在javax.naming.InitialContext.lookup(InitialContext.java:411)at   org.springframework.jndi.JndiTemplate $ 1.doInContext(JndiTemplate.java:155)   在org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)   在org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153)   在org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)   在   oracle.iam.platformservice.api.ClientLoginSessionServiceDelegate。(未知   来源)... 66更多引起:   java.lang.reflect.InvocationTargetException at   sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)   在   sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)   在   sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)   在java.lang.reflect.Constructor.newInstance(Constructor.java:526)
  在   weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:849)   ... 105更多引起:java.lang.NoSuchMethodError:   。weblogic.rmi.internal.MethodDescriptor(Ljava /郎/反映/方法; Ljava /郎/类; ZZZZII)V   在   weblogic.jndi.internal.ServerNamingNode_1030_WLStub.ensureInitialized(未知   来源)at   weblogic.jndi.internal.ServerNamingNode_1030_WLStub。(未知   来源)... 110更多

我该如何解决?

1 个答案:

答案 0 :(得分:0)