5 Replies Latest reply: Nov 18, 2012 1:58 AM by Dhananjay Neeraj2 RSS

    OIM 11g R2 -Client code -JRF is unable to determine the current application

    user608228
      Hi,

      I am trying to request a resource via an API using the client program, I am facing below issue when I execute the client program:
      Nov 17, 2012 8:56:35 PM oracle.iam.platform.context.ContextManager <clinit>
      SEVERE: IAM-0030002
      oracle.jrf.UnknownPlatformException: JRF is unable to determine the current application server platform.
           at oracle.jrf.ServerPlatformSupportFactory.getInstance(ServerPlatformSupportFactory.java:79)
           at oracle.iam.platform.context.ContextManager.<clinit>(ContextManager.java:77)
           at oracle.iam.platformservice.api.ClientLoginSessionServiceDelegate.loginSessionCreated(Unknown Source)
           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:597)
           at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
           at weblogic.security.Security.runAs(Security.java:41)
           at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
           at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)
           at $Proxy1.loginSessionCreated(Unknown Source)
           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:597)
           at oracle.iam.platform.OIMClient.loginSessionCreated(OIMClient.java:291)
           at oracle.iam.platform.OIMClient.login(OIMClient.java:215)
           at oracle.iam.platform.OIMClient.login(OIMClient.java:197)
           at comp.iam.oim.client.Client.<init>(Client.java:37)
           at comp.iam.oim.client.ClientRequest.<init>(ClientRequest.java:24)
           at comp.iam.oim.client.RequestResourceCreate.<init>(RequestResourceCreate.java:44)
           at comp.iam.oim.client.RequestResourceCreate.main(RequestResourceCreate.java:57)
      Exception in thread "main" oracle.iam.platform.utils.NoSuchServiceException: java.lang.reflect.InvocationTargetException
           at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:279)
           at oracle.iam.platform.OIMClient.getService(OIMClient.java:256)
           at comp.iam.oim.client.ClientRequest.<init>(ClientRequest.java:25)
           at compiam.oim.client.RequestResourceCreate.<init>(RequestResourceCreate.java:44)
           at comp.iam.oim.client.RequestResourceCreate.main(RequestResourceCreate.java:57)
      Caused by: java.lang.reflect.InvocationTargetException
           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:513)
           at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:275)
           ... 4 more
      Caused by: java.lang.NoClassDefFoundError: org/eclipse/persistence/indirection/ValueHolderInterface
           at java.lang.Class.forName0(Native Method)
           at java.lang.Class.forName(Class.java:169)
           at $Proxy4.<clinit>(Unknown Source)
           at sun.reflect.GeneratedSerializationConstructorAccessor23.newInstance(Unknown Source)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:924)
           at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1736)
           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
           at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:208)
           at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:599)
           at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:204)
           at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
           at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:243)
           at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
           at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
           at weblogic.jndi.internal.ServerNamingNode_1036_WLStub.lookup(Unknown Source)
           at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:424)
           at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:412)
           at javax.naming.InitialContext.lookup(InitialContext.java:392)
           at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:132)
           at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
           at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
           at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:155)
           at oracle.iam.request.api.RequestServiceDelegate.<init>(Unknown Source)
           ... 9 more
      Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.indirection.ValueHolderInterface
           at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
           at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
           ... 34 more
      Process exited with exit code 1.



      Gone through few forum having this mentioned:
      https://cn.forums.oracle.com/forums/thread.jspa?threadID=2432434

      But the entire code is not getting executed (as I can verify that few sys out is not getting printed) and hence request is not raised in my case.

      Any assistance on this please.

      Thanks
        • 1. Re: OIM 11g R2 -Client code -JRF is unable to determine the current application
          Dhananjay Neeraj2
          Simple...

          Just use System.setProperty("weblogic.Name", "oim_server1");

          Or in the script for calling, use -Dweblogic.Name=oim_server1
          • 2. Re: OIM 11g R2 -Client code -JRF is unable to determine the current application
            user608228
            Thanks a lot it solved the issue. But now I have started getting the following error:

            Exception in thread "main" oracle.iam.platform.utils.NoSuchServiceException: java.lang.reflect.InvocationTargetException
                 at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:279)
                 at oracle.iam.platform.OIMClient.getService(OIMClient.java:256)
                 at comp.iam.oim.client.ClientRequest.<init>(ClientRequest.java:25)
                 at comp.iam.oim.client.RequestResourceCreate.<init>(RequestResourceCreate.java:44)
                 at comp.iam.oim.client.RequestResourceCreate.main(RequestResourceCreate.java:57)

            Any clue on this one?

            Thanks again
            • 3. Re: OIM 11g R2 -Client code -JRF is unable to determine the current application
              Dhananjay Neeraj2
              This means you need wlfullclient.jar in your CLASSPATH...

              How to generate wlfullclient.jar:
              cd $MIDDLEWARE_HOME/wlserver_10.3/server/lib
              java -jar ../../../modules/com.bea.core.jarbuilder_1.7.0.0.jar


              Instead of 1.7.0.0, it may be something else too specific to your env...
              • 4. Re: OIM 11g R2 -Client code -JRF is unable to determine the current application
                user608228
                Hi,

                I have wlfullclient.jar in my classpath and I have my design console working fine which is using it.

                Thanks
                • 5. Re: OIM 11g R2 -Client code -JRF is unable to determine the current application
                  Dhananjay Neeraj2
                  Make sure you have all required jars in the class path:-

                  From $Oracle_IDM1/server/clent/oimclient.zip you obtain 4 jars:-

                  oimclient.jar
                  spring.jar
                  eclipselink.jar
                  common-logging.jar


                  Also, you already have wlfullclient.jar and jrf-api.jar

                  Plus you must have already set System Property: -DAPPSERVER_TYPE=wls

                  Make sure you revisit the following link:-


                  http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/apis.htm#BCFCDJGJ

                  Also, are you able to ping and telnet your oim host name from your Windows machine???

                  Firewall etc can be issue...

                  You said you are using Design Console??? From where??? From your Windows machine or directly from the UNIX server using XMing or VNC etc???

                  If you are doing it from UNIX server, copy the designconsole folder to your Windows machine AND configure things in the xlclient.cmd...

                  If you are getting NoSuchServiceException means, it is connectivity issue...

                  In the etc/hosts file on your Windows machine, add IP Address for the OIM machine...

                  It will definitely work...





                  Moreover, in .bash_profile, I have set the following environment variables... See whether you are missing something:-

                  JAVA_HOME=/usr/java/jdk1.6.0_21
                  MIDDLEWARE_HOME=/home/oracle/Oracle/Middleware
                  WL_HOME=$MIDDLEWARE_HOME/wlserver_10.3
                  ANT_HOME=$MIDDLEWARE_HOME/modules/org.apache.ant_1.7.1
                  PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$ANT_HOME/bin