ORACLE.FDK.MaximumConcurrentRequestsPerUserReached

Hi Could you please help us
I have create a BPEL polling adapter which polls on database table. As soon as a record is inserted into this table, the BPEL process will kick of and creates a folder in OCS using Webservices API. Polling will run every 5 mins.
When there are more than 10 records then I am getting this error from OCS.
ORACLE.FDK.SessionError:ORACLE.FDK.MaximumConcurrentRequestsPerUserReached
Is there any system parameter That I can setup to bump up this value to max 100 concurrent processes per user?

Try looking under Content --> Node Configuration --> Node in EM.

Similar Messages

  • ORACLE.FDK.ServerError while creating document and assigning category

    Hi,
    I try tro create a new Document in Content Services and assigning an existing category
    here is the code snippet:
    public static Item createDocumentWithCategory(Item parent, Item category)
    throws FdkException, RemoteException
    // get the Manager instances
    FileManager fm =s_WsCon.getFileManager();
    System.out.println("Ok document");
    RechercheCategorie categorie=RechercheCategorie();
    categorie.catValeur2();
    Item cat=categorie.getCat();
    Item workspace =fm.resolvePath("/solaria/E-TOP2", null);
    System.out.println("id dans create document:"+cat.getId()+"workspace name:=
    "+workspace.getName()+ "workspaceid:"+workspace.getId());
    // create Category definition for category instance
    NamedValue[] categoryDefs =WsUtility.newNamedValueArray(new Object[]=
    { Options.CATEGORY_ID, new Long(cat.getId()) }/*,
    { Options.CATEGORY_DEFINITION_ATTRIBUTES,
    WsUtility.newNamedValueArray(new Object[][] {
    { "CUSTOM_Attribute", "Value One" } }) }*/
    System.out.println("Ok document");
    // create document specifying category definition
    Item newDoc =fm.createDocument(
    WsUtility.newNamedValueArray(new Object[][] {
    { Attributes.NAME, "MyDoc41" },
    { Options.CATEGORY_DEFINITION, categoryDefs },
    { Options.DESTFOLDER, new Long(workspace.getId()) } }), null, null);
    System.out.println("Ok document2");
    return newDoc;
    It throws an Exception essage d'erreur:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:=
    faultString: ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError
    faultActor:=
    faultNode:=
    faultDetail:=
         {http://xmlns.oracle.com/content/ws}fault:<detailedErrorCode xsi:type="x=
    sd:string">ORACLE.FDK.ServerError</detailedErrorCode><errorCode xsi:type=
    "xsd:string">ORACLE.FDK.UnexpectedError</errorCode><exceptionEntries xsi:ty=
    pe="ns1:ArrayOfFdkExceptionEntry" xsi:nil="true"/><info xsi:type="ns1=
    :ArrayOfNamedValue" xsi:nil="true"/><serverStackTraceId xsi:type="xsd:s=
    tring">139-1170838513360</serverStackTraceId>
    What is wrong with the code?
    Please advise
    Jo

    The stack trace is incomplete. Please post the complete exception stack trace.
    regards,
    -sancho

  • Urgent :ORACLE.FDK.UnexpectedError --how to rectify this error

    Hello,
    I am getting the following error when I am running a standalone java program, where I am trying to list the folders in a container.
    ===========================
    log created on console
    ===========================
    FdkException:
    Error Code: ORACLE.FDK.UnexpectedError
    Detailed Error Code: ORACLE.FDK.ServerError
    Trace Id: 1-1194351196408
    info (NamedValue[]): null
    ======================
    Log created in <ocdbhome>\content\log\Content\<cdbinstance_node.log>
    ======================
    no log created when this error occurs.
    I am unable to understand, what is happening with the server.
    Could you shed somelight on this issue.
    thanks
    Siva.......

    Thanks to those who have viewed this thread.
    I have rectified this problem. The problem was occuring because I was creating more than one session in my code and infact while calling logout method also I was creating a new session. So the accumulation of session has created this error.
    I think, server should show proper error message instead of saying "UnexpectedError"
    Cheers
    ~Siva

  • ORACLE.FDK.FEATURENOTENABLED error in Oracle Web Services

    I downloaded Oracle Web Services (10.1.2) sample code from the link - http://www.oracle.com/technology/products/cs/developer/contentservicesdev/contenservicesdevkit.html to upload documents into OCS. I modified the properties file (ws.properties) and UploadDownload.java for environment specific details.
    I executed the UploadDownload class file as a standalone file. Sometimes it executes fine and the file gets uploaded. But sometimes an error occurs expecially when it trys to authenticate the user using RemoteLoginManager.login() method.
    But the next time when I execute the file without modifying any file, it runs
    successfully.
    The error message is
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: ORACLE.FDK.UnexpectedError:ORACLE.FDK.FeatureNotEnabled

    RemoteLoginManager:
    Tip – Cleartext authentication works only through HTTPS unless you change the domain property IFS.DOMAIN.WS.CleartextAuthenticationRequiresHttps to false. Use the Oracle Enterprise Manager 10g
    Application Server Control for Collaboration Suite (Oracle Collaboration Suite Control) to modify domain properties;
    click Content on the Collaboration Suite Home page, then click Domain Properties. You must restart the domain once
    you modify this property. Using RemoteLoginManager.login() over HTTP without setting this property to false will likely
    result in a FeatureNotEnabled exception.

  • Updating the GRANTS of a Container: error ORACLE.FDK.ServerError

    Hi there,
    Am trying to update the grants of a container and adding new Users with admin roles using SecurityManagers.addGrants() method. But when ever i excute the method i recieve the following error, ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError. Below is the code.
    First am preparing the GRANTS, as follows.
    private NamedValue[] prepareGrants() {
            NamedValue[] attributes = null;
            NamedValue[] roles1 = null;
            NamedValue[] roles2 = null;
            Item user1 = null;
            Item user2 = null;
            Item libAdminRole;
            Item quotaAdminRole;
            Item secAdminRole;
            try {
    //            sm.keepAlive();
                user2 = um.getUser("karthik.rajashekar",null);
                user1 = um.getUser("test.user1",null);
                libAdminRole = secm.getRoleByName("WorkspaceAdministrator",null);
                quotaAdminRole = secm.getRoleByName("QuotaAdministrator",null);
                roles1 = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTEE,new Long(user1.getId())},
                    {Attributes.ROLES,new Long[]{new Long(libAdminRole.getId()),new Long(quotaAdminRole.getId())}},
                    {Attributes.PROPAGATING, new Boolean(true)},
                    {Attributes.HAS_ADMIN_ROLES,new Boolean(true)}
                secAdminRole = secm.getRoleByName("SecurityAdministrator",null);
                roles2 = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTEE,new Long(user2.getId())},
                    {Attributes.ROLES,new Long[]{new Long(secAdminRole.getId())}},
                    {Attributes.PROPAGATING, new Boolean(true)},
                    {Attributes.HAS_ADMIN_ROLES,new Boolean(true)}
                NamedValueSet[] secConfig = new NamedValueSet[]{newNamedValueSet(roles1),newNamedValueSet(roles2)};
                attributes = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTS,secConfig}
            } catch (RemoteException ex) {
                ex.printStackTrace();
                logout();
            return attributes;
        }Then am using calling addGrants() with the attributes i have prepared from the former function, Below is the code
    public void addGrants(String path, NamedValue[] grants) {
            try {
                Item mycontainer = fm.resolvePath(path,null);
    //            Long id = new Long(mycontainer.getId());
                secm.addGrants(mycontainer.getId(),grants,null);
            } catch (RemoteException ex) {
                ex.printStackTrace();
                logout();
            } catch (Exception ex) {
                ex.printStackTrace();
                logout();
        }Below using the log file entry, of OC4J_Content, related to the error,
    07/09/19 20:32:12 content:  [oracle.ifs.fdk.http.HttpAuthManager] [85] 1273949 orcladmin INFO: HTTP Login: User = orcladmin;
    IP = 192.9.200.7; UA = Axis/1.2
    07/09/19 20:32:13 content:  [oracle.ifs.fdk.ExceptionLogger] [85] 1273949 orcladmin SEVERE: Exception ID: 9-1190214133370
    ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError
            at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:181)
            at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:74)
            at oracle.ifs.fdk.impl.SecurityManagerImpl.addGrants(SecurityManagerImpl.java:563)
            at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
            at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
            at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
            at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
            at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
            at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
            at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
            at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
            at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
            at oracle.ifs.fdk.http.AxisSecurityFilter.doFilter(AxisSecurityFilter.java:83)
            at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
            at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
            at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
            at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
            at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
            at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
            at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.ClassCastException
            at oracle.ifs.fdk.impl.Utils.createSecurityConfigurationDefinition(Utils.java:624)
            at oracle.ifs.fdk.impl.SecurityManagerImpl.addGrants(SecurityManagerImpl.java:524)
            ... 28 more
    FdkException Details: oracle.ifs.fdk.FdkException: ErrorCode = ORACLE.FDK.UnexpectedError; DetailedErrorCode = ORACLE.FDK.Ser
    verError; Cause = null; ServerStackTraceId = 9-1190214133370; Info = null; Entries = nullCan anyone help me out on this?

    Hi there,
    Am trying to update the grants of a container and adding new Users with admin roles using SecurityManagers.addGrants() method. But when ever i excute the method i recieve the following error, ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError. Below is the code.
    First am preparing the GRANTS, as follows.
    private NamedValue[] prepareGrants() {
            NamedValue[] attributes = null;
            NamedValue[] roles1 = null;
            NamedValue[] roles2 = null;
            Item user1 = null;
            Item user2 = null;
            Item libAdminRole;
            Item quotaAdminRole;
            Item secAdminRole;
            try {
    //            sm.keepAlive();
                user2 = um.getUser("karthik.rajashekar",null);
                user1 = um.getUser("test.user1",null);
                libAdminRole = secm.getRoleByName("WorkspaceAdministrator",null);
                quotaAdminRole = secm.getRoleByName("QuotaAdministrator",null);
                roles1 = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTEE,new Long(user1.getId())},
                    {Attributes.ROLES,new Long[]{new Long(libAdminRole.getId()),new Long(quotaAdminRole.getId())}},
                    {Attributes.PROPAGATING, new Boolean(true)},
                    {Attributes.HAS_ADMIN_ROLES,new Boolean(true)}
                secAdminRole = secm.getRoleByName("SecurityAdministrator",null);
                roles2 = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTEE,new Long(user2.getId())},
                    {Attributes.ROLES,new Long[]{new Long(secAdminRole.getId())}},
                    {Attributes.PROPAGATING, new Boolean(true)},
                    {Attributes.HAS_ADMIN_ROLES,new Boolean(true)}
                NamedValueSet[] secConfig = new NamedValueSet[]{newNamedValueSet(roles1),newNamedValueSet(roles2)};
                attributes = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTS,secConfig}
            } catch (RemoteException ex) {
                ex.printStackTrace();
                logout();
            return attributes;
        }Then am using calling addGrants() with the attributes i have prepared from the former function, Below is the code
    public void addGrants(String path, NamedValue[] grants) {
            try {
                Item mycontainer = fm.resolvePath(path,null);
    //            Long id = new Long(mycontainer.getId());
                secm.addGrants(mycontainer.getId(),grants,null);
            } catch (RemoteException ex) {
                ex.printStackTrace();
                logout();
            } catch (Exception ex) {
                ex.printStackTrace();
                logout();
        }Below using the log file entry, of OC4J_Content, related to the error,
    07/09/19 20:32:12 content:  [oracle.ifs.fdk.http.HttpAuthManager] [85] 1273949 orcladmin INFO: HTTP Login: User = orcladmin;
    IP = 192.9.200.7; UA = Axis/1.2
    07/09/19 20:32:13 content:  [oracle.ifs.fdk.ExceptionLogger] [85] 1273949 orcladmin SEVERE: Exception ID: 9-1190214133370
    ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError
            at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:181)
            at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:74)
            at oracle.ifs.fdk.impl.SecurityManagerImpl.addGrants(SecurityManagerImpl.java:563)
            at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
            at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
            at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
            at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
            at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
            at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
            at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
            at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
            at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
            at oracle.ifs.fdk.http.AxisSecurityFilter.doFilter(AxisSecurityFilter.java:83)
            at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
            at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
            at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
            at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
            at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
            at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
            at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.ClassCastException
            at oracle.ifs.fdk.impl.Utils.createSecurityConfigurationDefinition(Utils.java:624)
            at oracle.ifs.fdk.impl.SecurityManagerImpl.addGrants(SecurityManagerImpl.java:524)
            ... 28 more
    FdkException Details: oracle.ifs.fdk.FdkException: ErrorCode = ORACLE.FDK.UnexpectedError; DetailedErrorCode = ORACLE.FDK.Ser
    verError; Cause = null; ServerStackTraceId = 9-1190214133370; Info = null; Entries = nullCan anyone help me out on this?

  • Error "ORACLE.FDK.AggregateError:ORACLE.FDK.AggregateError"

    I get the following error when executing either checkoutDocuments or checkin against Content DB 10g:
    ORACLE.FDK.AggregateError:ORACLE.FDK.AggregateError
    Following are the exact commands I am executing:
    versionM.checkoutDocuments(new long[] { doc.getId() }, null, null,
    null, null);
    Item[] docs =
    versionM.checkin(new long[] { doc.getId() }, null, null,
    requestedAttributes);
    I used the Versioning.java example from Oracle Content DB 10.2 Java Developer Kit as my base.
    Any idea what the error means and what I can do to prevent it from occurring?

    Hi Adrian,
    Are you using the Web Services API in your JDeveloper application, making calls to a running Content DB server?
    If this is the case, you will find the additional error code and stack trace information you are looking for in the log file of the Content DB HTTP Node. Note that you may need to raise the logging level of the Content DB HTTP Node using the Enterprise Manager administration console.

  • Multithread in dotnet devkit ?

    Using the dotNet dev kit, I am developing an application which loads ContentDb.
    I have an upload class that has self contained access to a ContentDb. This class works perfectly when run by itself. Each upload class has its own session manager, etc. into contentdb
    In the multithreaded environoment, there are 5 instances of the upload class running.
    After a few instance creations, the connections begin to fail and folder creation fails.
    At this point, even manual folder creation using the browser interface fails, and the ContentDb box needs to be rebooted.
    During updates that do run, there are frequent errors:
    Mar-02 13:23:53:0221,ERROR,,Error Creating Definition PDG22711792007-02-09-18.23.56.262000.PDFSystem.Net.WebException: The request failed with HTTP status 409: Conflict.
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at oracle.ifs.fdk.impl.SessionManagerService.beginTransaction()
    at oracle.ifs.fdk.impl.SessionManagerImpl.beginTransaction()
    at oracle.ifs.fdk.impl.FileManagerImpl.createDocumentDefinitions(NamedValueSet[] defs, AttributeRequest[] attributes)
    at oracle.ifs.fdk.impl.FileManagerImpl.createDocumentDefinition(NamedValue[] def, AttributeRequest[] attributes)
    at ImageServer2.ClsContentDb.AddDocument(String p_CDbLibraryFolderPath, String p_CDbDocumentName, String p_FilePathAndName, String[] p_Attributes) in C:\ImageServer\Development\ContentDb_Access\ClsContentDb.cs:line 232,,
    Is the dotNet dev kit threadsafe?
    What can I do to avoid or recover from the conflict errors?
    Thank you

    This was likely a result of FdkException
    ORACLE.FDK.SessionError
    ORACLE.FDK.MaximumConcurrentRequestsPerUserReached
    Edit the HTTP Node Configurations (OC4J_Content) and alter the Maximum Concurrent Requests Per User value to the size of the max number of concurrent worker threads of your application for a particular user concerned.
    Here is some pretty useful sample code showing creation of a Content DB connection pool - and also demonstrating multitple concurrent uploads :-
    -Matt
    ConnectionPool.cs
    * Copyright (c) 2007, Oracle. All rights reserved.
    * History:
    *  2007-03-09  Matt Shannon
    * Note - If receiving ORACLE.FDK.SessionError:ORACLE.FDK.MaximumConcurrentRequestsPerUserReached
    * one must edit the OC4J_Content (HTTP) Node Configuration - and change the
    * "Maximum Concurrent Requests Per User" value to at least the max connections size
    * specified for this ConnectionPool class!  OC4J_Content must then be bounced.
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.IO;
    using oracle.ifs.fdk;
    public class ConnectionPool : IDisposable
      object locker = new object();
      Queue<ManagersFactory> connectionQ = new Queue<ManagersFactory>();
      /// Overall total number of connections that have been allocated
      private int m_AllocatedNum = 0;
      /// Default maximum we permit to be allocated
      private int m_MaxConnections = 10;
      /// Default maximum we permit in the pool; this will be less than m_MaxConnections
      private int m_TargetConnections = 5;
      private FdkCredential m_Credential;
      private string m_Url;
      private StreamWriter m_Writer = null;
      public ConnectionPool(string url, FdkCredential credential) : base()
        m_Url = url;
        m_Credential = credential;
      public ConnectionPool(string url, string username, string password)
        : this(url, new SimpleFdkCredential(username,password))
      public ConnectionPool(
        string url, FdkCredential credential, int target, int max)
        : this(url, credential)
        if (target <= max)
          m_TargetConnections = target;
          m_MaxConnections = max;
      public ConnectionPool(
        string url, string username, string password, int target, int max)
        : this(url, new SimpleFdkCredential(username, password), target, max)
      public void setDebug(StreamWriter writer)
        m_Writer = writer;
        m_Writer.AutoFlush = true;
      private void log(string msg)
        if (m_Writer != null)
          m_Writer.WriteLine(msg);
      private ManagersFactory obtainConnection()
        return ManagersFactory.login(m_Credential, m_Url);
      private bool isSessionValid(ManagersFactory session)
        bool result = false;
        try
          session.getSessionManager().keepAlive();
          result = true;
        catch (FdkException) {}
        // May also get a System.Net.WebException: The request failed with HTTP status 409: Conflict.
        // should maximum concurrent requests per user be reached
        return result;
      public ManagersFactory getSession()
        ManagersFactory sess = null;
        lock (locker)
          if (connectionQ.Count != 0)
            log("Dequeueing session from pool...");
            sess = connectionQ.Dequeue();
            if (!isSessionValid(sess))
              log(" ... session stale from pool - attempting to obtain replacement session...");
              try
                sess = obtainConnection();
                log("Obtained replacement session.");
              catch (FdkException fe)
                log("Attempt to obtain replacement session failed.");
              log(fe.getErrorCode() + ":" + fe.getDetailedErrorCode());
                --m_AllocatedNum;
            else
              log(" ... session good from pool.");
          else if (m_AllocatedNum < m_MaxConnections)
            try
              sess = obtainConnection();
              ++m_AllocatedNum;
              log("Allocated new session.");
            catch (FdkException fe)
              log("Attempt to obtain new session failed.");
              log(fe.getErrorCode() + ":" + fe.getDetailedErrorCode());
          else
            log("No sessions available.");
        return sess;
      public void releaseSession(ManagersFactory sess)
        if (sess == null)
          throw new Exception("Attempt to release null Connection.");
        else
          lock (locker)
            if (!isSessionValid(sess))
              log("Releasing stale session.");
              --m_AllocatedNum;
            else if (connectionQ.Count < m_TargetConnections)
              log("Adding session back to pool.");
              connectionQ.Enqueue(sess);
            else
              log("Disconnecting connection - target size already met.");
              try
                sess.logout();
              catch (FdkException){}
              --m_AllocatedNum;
      public void Dispose()
        log("Disposing ...");
        while (connectionQ.Count != 0)
          ManagersFactory sess = connectionQ.Dequeue();
          try
            log("Calling session logout ...");
            sess.logout();
          catch (FdkException){}
          --m_AllocatedNum;
        log(m_AllocatedNum +" connections remain potentially logged-in.");
      public static void Main(string[] args)
        ArrayList v = new ArrayList();
        using (ConnectionPool pool = new ConnectionPool(
          "http://content1.au.oracle.com:7777/content/ws", "matt", "welcome1", 5, 8))
          pool.setDebug(new StreamWriter(Console.OpenStandardOutput()));
          for (int i=0; i<10 ; i++ )
            ManagersFactory session = pool.getSession();
            if (session != null)
              Console.WriteLine(session.getUser(null).getName());
              v.Add(session);
          foreach (object item in v)
            pool.releaseSession((ManagersFactory)item);
        // Exiting the using statement calls pool's Dispose method - as we implement IDisposable
    }UploadQueue.cs
    * Copyright (c) 2007, Oracle. All rights reserved.
    * History:
    *  2007-03-09  Matt Shannon
    using System;
    using System.Threading;
    using System.Collections.Generic;
    using System.IO;
    using oracle.ifs.fdk;
    public class UploadTask
      private long m_DestinationId;
      private string m_SourcePath;
      private string m_Name;
      public UploadTask(long destinationId, string sourcePath)
        m_DestinationId = destinationId;
        m_SourcePath = sourcePath;
        m_Name = m_SourcePath.Substring(m_SourcePath.LastIndexOf("\\") + 1);
      public string getName()
        return m_Name;
      public long getDestination()
        return m_DestinationId;
      public FileStream getStream()
        FileStream stream = null;
        stream = new FileStream(m_SourcePath,
            FileMode.Open, FileAccess.Read //, FileShare.ReadWrite
        return stream;
    public class UploadQueue : IDisposable {
      object locker = new object();
      Thread[] workers;
      Queue<UploadTask> taskQ = new Queue<UploadTask>();
      ConnectionPool m_Pool;
      public UploadQueue (ConnectionPool pool, int threadCount)
        m_Pool = pool;
        workers = new Thread [threadCount];
        // Create and start a separate thread for each worker
        for (int ii = 0; ii < threadCount; ii++)
          workers[ii] = new Thread(new ThreadStart(Consume));
          workers[ii].Name = "Thread "+ (ii+1);
          workers[ii].Priority = ThreadPriority.Normal;
          workers[ii].Start();
      public void Dispose()
        foreach (Thread worker in workers) EnqueueTask (null);
        foreach (Thread worker in workers) worker.Join();
      public void EnqueueTask (UploadTask task)
        // block until one able to obtain lock
        lock (locker)
          // once lock obtained enqueue task
          taskQ.Enqueue (task);
          // send out pulse
          Monitor.PulseAll (locker);
        } // release lock
      void Consume()
        while (true)
          UploadTask task;
          // block until one able to obtain lock
          lock (locker)
            while (taskQ.Count == 0)
              // Monitor.Wait temporarily releases, or toggles the underlying lock while
              // waiting, so another thread (such as the one performing the Pulse) can obtain it.
              Monitor.Wait (locker);
            task = taskQ.Dequeue();
          } // release lock
          string threadName = Thread.CurrentThread.Name;
          Console.WriteLine(threadName + ":- received task");
          if (task == null)
            return; // This signals our exit
          ManagersFactory session;
          while ((session = m_Pool.getSession()) == null)
            Console.WriteLine(threadName + ":- No session currently available - Sleeping for 1 second ...");
            Thread.Sleep(1000);
          Console.WriteLine(threadName + ":- Obtained session  ...");
          FileManager fileM = session.getFileManager();
          Console.WriteLine(threadName + ":- Creating document definition ...");
          Item docDef = fileM.createDocumentDefinition(
            new NamedValue[]
              ClientUtils.newNamedValue(Attributes.NAME, task.getName()),
              ClientUtils.newNamedValue(
                Options.CONTENTSTREAM, task.getStream()),
            }, null);
          AttributeRequest[] requestedAttributes = null;
          Console.WriteLine(threadName + ":- Creating document ...");
          Item doc = fileM.createDocument(
            new NamedValue[]
              // folder to upload the document to
              ClientUtils.newNamedValue(Options.DESTFOLDER, task.getDestination()),
              // the document should be created using the previously created
              // document definition
              ClientUtils.newNamedValue(
                Options.USE_SAVED_DEFINITION, docDef.getId()),
            }, null, requestedAttributes);
          Console.WriteLine(threadName + ":- File "+doc.getName()+" created with ID "+doc.getId());
          Console.WriteLine(threadName + ":- Releasing session back to pool ...");
          m_Pool.releaseSession(session);
    }A crappy windows app
    Explorer.cs
    * Copyright (c) 2007, Oracle. All rights reserved.
    * History:
    *  2007-03-09  Matt Shannon
    using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;
    using oracle.ifs.fdk;
    public class Explorer : System.Windows.Forms.Form
      private ListBox uploadBox;
      private ListBox statusBox;
      private System.ComponentModel.Container components = null;
      private ConnectionPool pool;
      private UploadQueue queue;
      private long folderId;
      public Explorer()
        // Required for Windows Form Designer support
        InitializeComponent();
        // TODO: Add any constructor code after InitializeComponent call
         statusBox.Items.Add("Creating connection pool ...");
        pool = new ConnectionPool("http://content1.au.oracle.com:7777/content/ws", "matt", "welcome1", 5, 10);
        pool.setDebug(new System.IO.StreamWriter(Console.OpenStandardOutput()));
        statusBox.Items.Add("Attempting to obtainin session from pool ...");
        ManagersFactory session = pool.getSession();
        if (session != null)
          statusBox.Items.Add("Obtained session.");
          FileManager fileM = session.getFileManager();
          string path = "/oracle/users/Users-M/matt/Private Documents";
          statusBox.Items.Add("Looking up Sandbox "+path+ " ...");
          Item sandbox = fileM.resolvePath(path, null);
          if (sandbox != null)
            folderId = sandbox.getId();
            statusBox.Items.Add("Sandbox located - id: "+folderId);
          else
            statusBox.Items.Add("Unable to locate sandbox - disabling upload box.");
            uploadBox.Enabled=false;
          statusBox.Items.Add("Releasing session back to pool.");
          pool.releaseSession(session);
        else
          statusBox.Items.Add("Unable to obtain session - disabling upload box.");
          uploadBox.Enabled=false;
        if (folderId > 1)
          int size = 5;
          statusBox.Items.Add("Creating UploadQueue with "+size+" threads");
          queue = new UploadQueue(pool, size);
      /// <summary>
      /// Clean up any resources being used.
      /// </summary>
      protected override void Dispose( bool disposing )
        if( disposing )
          if (components != null)
            components.Dispose();
        base.Dispose( disposing );
        queue.Dispose();
        pool.Dispose();
      private void InitializeComponent()
        uploadBox = new ListBox();
        statusBox = new ListBox();
        this.SuspendLayout();
        statusBox.Name = "statusBox";
        statusBox.Enabled = true;
        statusBox.Location = new System.Drawing.Point(0,30);
        statusBox.Size = new System.Drawing.Size(492, 75);
        statusBox.AllowDrop = false;
        statusBox.MultiColumn = false;
        statusBox.TabIndex = 1;
        uploadBox.Name = "uploadBox";
        uploadBox.Location = new System.Drawing.Point(0, 145);
        uploadBox.Size = new System.Drawing.Size(494, 95);
        uploadBox.AllowDrop = true;
        uploadBox.TabIndex = 2;
        uploadBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.uploadBox_DragDrop);
        uploadBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.uploadBox_DragEnter);
        this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
        this.ClientSize = new System.Drawing.Size(500, 250);
        this.Controls.Add(statusBox);
        this.Controls.Add(uploadBox);
        this.KeyPreview = true;
        this.Name = "Explorer";
        this.Text = "CDB Explorer";
        this.ResumeLayout(false);
      private void uploadBox_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
        if (e.Data.GetDataPresent(DataFormats.FileDrop, false))
          e.Effect = DragDropEffects.Copy;
        else
          e.Effect = DragDropEffects.None;
      private void uploadBox_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
        foreach (string fileName in (string[])e.Data.GetData(DataFormats.FileDrop) )
          uploadBox.Items.Add(fileName);
          UploadTask task = new UploadTask(this.folderId, fileName);
          queue.EnqueueTask(task);
      /// <summary>
      /// The main entry point for the application.
      /// </summary>
      [STAThread]
      static void Main()
        Application.Run(new Explorer());
    }

  • Oracle Content unexpected error

    Hello.
    When I try to OCS Content Services, on my server, to appear me the following message:
    http://myserver/content/app/explorerPage.jspx
    Error: unexpected error. To try again.
    May you explain me which is the origin of the error and how resolve it ?
    Thanks in advance.
    Antonino Sanacori

    Thanks for that,
    Now I have too much information....
    A hugestack dump which I'm having trouble interpreting.
    It starts like this
    07/03/05 22:43:06.958 content: [oracle.ifs.server.IdmCredentialManagerUtilities] [37] INFO: Property File = /home/oracle/product/10.1.3.2.0/OracleAS_1/content/settings/userrole_content.properties
    07/03/05 22:43:07.410 content: [oracle.ifs.web.application.EcmViewHandler] [37] SEVERE: Error during rendering
    ORACLE.FDK.AuthenticationError:ORACLE.FDK.InvalidCredentials
         at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:189)
         at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:81)
         at oracle.ifs.fdk.impl.SessionPool.getSession(SessionPool.java:238)
         at oracle.ifs.fdk.impl.FdkUserSessionImpl.pinSession(FdkUserSessionImpl.java:828)
         at oracle.ifs.fdk.impl.FdkUserSessionImpl.<init>(FdkUserSessionImpl.java:152)
    and ends like this
         at oracle.ias.opmn.optic.OpmnQuery.getProc(OpmnQuery.java:709)
         at oracle.oc4j.admin.jmx.shared.Oc4jOpmnRmiDomain.getOc4jProcs(Oc4jOpmnRmiDomain.java:592)
         ... 106 more
    FdkException Details: oracle.ifs.fdk.FdkException: ErrorCode = ORACLE.FDK.AuthenticationError; DetailedErrorCode
    07/03/05 22:43:08.200 content: = ORACLE.FDK.InvalidCredentials; Cause = IFS-21008: Unable to connect to iFS service; ServerStackTraceId = ; Info = null; Entries = null
    I've put the whole thing here....
    http://www.mechos.net/log.txt
    I can't see where to start with this. Anyone got any clues ?
    Cheers,
    Donald.

  • Error while executing HelloWorld.java program

    Hi All,
    I am trying to execute the samples(HelloWorld.java) program from Jdeveloper and provided the following details in runtime.defaults:
    CONTENT_DB_URL
    ADMIN_USER_NAME
    ADMIN_USER_PASSWORD
    however getting the following exception:
    FdkException:
    Error Code: ORACLE.FDK.UnexpectedError
    Detailed Error Code: ORACLE.FDK.FeatureNotEnabled
    Trace Id:
    info (NamedValue[]): null
    can any one please help me to resolve this issue.
    Thanks
    Krrish.

    See the Cleartext Authentication note in the running_client_samples.html file of the CDB devkit.
    The default configuration for an out-of-box Oracle Content DB installation allows Cleartext Authentication only if SSL has been enabled (and the Web Services connection string begins with https). See the authentication topic for details.
    To allow Cleartext Authentication to take place over standard (non-SSL) HTTP, set the Oracle Content DB domain property IFS.DOMAIN.WS.CleartextAuthenticationRequiresHttps to false using Enterprise Manager (Application Server Control). See the Content DB Administration Guide for details.
    If the domain property above is not modified to false and Cleartext Authentication is attempted using using standard HTTP, an FdkException will be thrown:
    ORACLE.FDK.UnexpectedError : ORACLE.FDK.FeatureNotEnabled
    cheers
    Matt.

  • Creation of a new Role in Content 10.0.1

    Hi everyone,
    I would like to create a new standard role in my domain.
    To do this I noticed the SecurityManager and its method createRole. I tried to create a new role with it using the default domain as target. I always get the error ORACLE.FDK.AccessDenied even if I use user orcladmin.
    If I use a library as target I get error ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError…
    Moreover in the javadoc I did not notice any attribute that associate permissions to a newly create role.
    Could anyone have an idea on these points?
    Thanks for any help.
    Emmanuel

    Hi,
    1) Is the CUST_BI database user in the right place ?Yes, though you should add the language code to the user name, e.g. CUST_BI_US. This will be the EUL owner, the schema that holds all the EUL tables. The temporary tablespace you specify in the create_eul command is only used when you connect as the EUL owner, so is not important.
    When you connect as an apps user the connection will be made using the APPS database user, and therefore the temporary tablespace used (and location of MVs) will be the temporary and default tablespaces associated with the APPS user. You can change the temporary tablespace just for the Discoverer users by issuing a ALTER SESSION SET CURRENT_SCHEMA command in a PL/SQL procedure called during the initialisation of the Discoverer sessions.
    2) As you can see, I need to separate the BI administration from EBS administration... and DISCOADMIN is a new Apps user... any checklist/recommendation for this new Apps. user? The disco administration user can be any apps user who has EUL administration privileges in the EUL. This user should then be used to create all business areas, etc.
    Rod West

  • Error while calling ManagersFactory.login

    I am trying to get a connection with a ContentDB instance and I have verified that the server is up. I am using the following code to call ManagersFactory.login
    FdkCredential credential = new SimpleFdkCredential(
    "orcladmin", "welcome1");
    ManagersFactory session = null;
    try
    System.out.println("Trying to connect to the server oaf1.idc.oracle.com ....\n");
    session = ManagersFactory.login(credential, "http://oaf1.idc.oracle.com:7778/content/ws/");
    System.out.println("Connected to the server oaf1.idc.oracle.com ....\n");
    Item user = session.getUser(AttributeRequests.USER_ATTRIBUTES);
    //s_Logger.log("Connected user: "+LoggingUtils.log(user));
    catch (Exception t)
    System.out.println("Exception .....\n");
    System.out.println(t.getMessage());
    t.printStackTrace();
    //System.out.println(t.printStackTrace());
    //s_Logger.log(t);
    I get the following exception when ManagersFactory.login is called:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: ORACLE.FDK.UnexpectedError:ORACLE.FDK.FeatureNotEnabled
    faultActor:
    faultNode:
    faultDetail:
         {http://xmlns.oracle.com/content/ws}fault:<detailedErrorCode xsi:type="xsd:string">ORACLE.FDK.FeatureNotEnabled</detailedErrorCode><errorCode xsi:type="xsd:string">ORACLE.FDK.UnexpectedError</errorCode><exceptionEntries xsi:type="ns1:ArrayOfFdkExceptionEntry" xsi:nil="true"/><info xsi:type="ns1:ArrayOfNamedValue" xsi:nil="true"/><serverStackTraceId xsi:type="xsd:string"/>
         {http://xml.apache.org/axis/}hostname:oaf1.idc.oracle.com
    ORACLE.FDK.UnexpectedError:ORACLE.FDK.FeatureNotEnabled
         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 java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
         at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
         at oracle.ifs.fdk.FdkException.getDeserializer(FdkException.java:270)
         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 org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
         at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
         at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
         at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
         at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:205)
         at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
         at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
         at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
         at org.apache.axis.client.Call.invoke(Call.java:2748)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:2347)
         at org.apache.axis.client.Call.invoke(Call.java:1804)
         at oracle.ifs.fdk.RemoteLoginManagerSoapBindingStub.login(RemoteLoginManagerSoapBindingStub.java:242)
         at oracle.ifs.fdk.client.impl.AxisRemoteManagersFactory.<init>(AxisRemoteManagersFactory.java:199)
         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 view.ConnectionTest.main(ConnectionTest.java:29)
    Any help?
    Thanks /Santanu

    No solution still?

  • Updating a document with category metadata using updateDocument(): error!

    I have studied the sample code and the API docs, and I feel pretty sure I am coding it according to the docs, but I cannot successfully update a document with category metadata. I always get a MetaDataSchemaInvalid exception.
    My process goes like this:
    1. Upload a new file, creating a new document publicobject.
    2. Create a CATEGORY_DEFINITION with all the metadata name/value pairs I wish to write.
    3. Call FileManager.updateDocument() with this CATEGORY_DEFINITION.
    My process differs from the docs in that I am first uploading the document, and then adding the metadata as a second step. I want to get it working this way to make my system more modular. I do not want to make my upload method dependent upon metadata attributes, and vice versa.
    Step 1 is working fine. The document is being uploaded to the right folder. Good to go.
    Step 3 is where I get the error. If the error is my fault, then it must be a result of what I do in step 2. The structure of my CATEGORY_DEFINITION must be messed up.
    Here is my code for creating the CATEGORY_DEFINITION. The Document class is my own entity that encapsulates the binary data for a document, as well as the metadata attributes that are to be assigned to the document once it is uploaded into Content Services. We don't need to worry about where the data comes from. Just assume the raw data is correct.
    public NamedValue[] newCategoryAttributeDefinition(Document document, String categoryDisplayName) throws WebserviceClientException {
    /* Get the category attribute name-value pairs as a 2-D array. */
    Map metadataMap = document.getMetadataParser().getAttributeNameMapping();
    List categoryDefinitionAttributeList = new ArrayList();
    for(Iterator i = metadataMap.entrySet().iterator(); i.hasNext();) {
    Map.Entry entry = (Map.Entry)i.next();
    String name = "CUSTOM_" + (String)entry.getKey();
    Object value = entry.getValue();
    if(value != null) {
    categoryDefinitionAttributeList.add(new Object[] { name, value });
    Object[][] categoryDefinitionAttributeArray = new Object[categoryDefinitionAttributeList.size()][];
    int index = 0;
    for(Iterator i = categoryDefinitionAttributeList.iterator(); i.hasNext();) {
    Object[] value = (Object[])i.next();
    categoryDefinitionAttributeArray[index++] = value;
    /* Create the NamedValue tree that describes this category's attribute values. */
    Long categoryId = new Long(getCategoryClassId(categoryDisplayName));
    NamedValue[] categoryAttributeDefinition = WebserviceUtils.newNamedValueArray(new Object[][] {
    { Options.CATEGORY_ID, categoryId },
    { Options.CATEGORY_DEFINITION_ATTRIBUTES, WebserviceUtils.newNamedValueArray(categoryDefinitionAttributeArray) }
    NamedValue[] categoryDefinition = WebserviceUtils.newNamedValueArray(Options.CATEGORY_DEFINITION, categoryAttributeDefinition);
    return categoryDefinition;
    And below is the resulting CATEGORY_DEFINITION, as seen in a jdb debugger.
    -- The OPT.CATEGORY_ID value is equal to the ID column in ODMV_SCHEMACATEGORY, otherwise known as the category class id.
    -- My OPT.CATEGORY_DEFINITION_ATTRIBUTES tree for this document has the 4 attributes that I want to set. The category has more than these 4 attributes; I am not populating every attribute. None of the attributes are required, and all are editable. I don't need to include every attribute in my CATEGORY_DEFINITION, even if the values are null, do I? Also, all the attribute names start with "CUSTOM_", which I believe is necessary - right?
    -- I am setting only the OPT.CATEGORY_ID and OPT.CATEGORY_DEFINITION_ATTRIBUTES. Am I missing some other required attribute?
    http-8888-Processor5[1] http-8888-Processor5[1] dump categoryDefinition
    categoryDefinition = {
    instance of oracle.ifs.fdk.NamedValue(id=2562)
    http-8888-Processor5[1] dump categoryDefinition[0]
    categoryDefinition[0] = {
    name: "OPT.CATEGORY_DEFINITION"
    value: instance of oracle.ifs.fdk.NamedValue[2] (id=2559)
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[0]
    categoryDefinition[0].value[0] = {
    name: "OPT.CATEGORY_ID"
    value: instance of java.lang.Long(id=2558)
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[0].value.toString()
    categoryDefinition[0].value[0].value.toString() = "60068"
    http-8888-Processor5[1] dump categoryDefinition[0].value[1]
    categoryDefinition[0].value[1] = {
    name: "OPT.CATEGORY_DEFINITION_ATTRIBUTES"
    value: instance of oracle.ifs.fdk.NamedValue[4] (id=2570)
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[1].value[0]
    categoryDefinition[0].value[1].value[0] = {
    name: "CUSTOM_From"
    value: "SA"
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[1].value[1]
    categoryDefinition[0].value[1].value[1] = {
    name: "CUSTOM_Footer Number"
    value: "PRM 34-318"
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[1].value[2]
    categoryDefinition[0].value[1].value[2] = {
    name: "CUSTOM_To"
    value: "PROJECT TEAM"
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[1].value[3]
    categoryDefinition[0].value[1].value[3] = {
    name: "CUSTOM_Subject"
    value: "Riverside Energy Resource Center Meeting Minutes-Internal"
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    After building this CATEGORY_DEFINITION, I go on to attempt an update to the document with this information. Here is the method I call. I always fall into the catch(), and the error dump follows the code snippet. Unfortunately, the error doesn't tell me a lot about what's wrong. That's why I am asking for help in spotting any conspicuous errors in my CATEGORY_DEFINITION.
    public Item addCategoryToDocument(Item documentItem,
    NamedValue[] categoryDefinition)
    throws WebserviceClientException {
    FileManager fileManager = getWebserviceClient().getFileManager();
    Item documentItemWithCategory = null;
    try {
    documentItemWithCategory = fileManager.updateDocument(documentItem.getId(), categoryDefinition, null);
    } catch(Exception e) {
    throw new WebserviceClientException("Could not update document with category definition.", e);
    return documentItemWithCategory;
    http-8888-Processor4[1] http-8888-Processor4[1] dump e
    e = {
    detailedErrorCode: "ORACLE.FDK.AggregateError"
    errorCode: "ORACLE.FDK.AggregateError"
    exceptionEntries: instance of oracle.ifs.fdk.FdkExceptionEntry[1] (id=2691)
    info: null
    serverStackTraceId: ""
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2694)
    class$oracle$ifs$fdk$FdkException: instance of java.lang.Class(reflected class=oracle.ifs.fdk.FdkException, id=1972)
    org.apache.axis.AxisFault.log: instance of org.apache.commons.logging.impl.Log4JLogger(id=2695)
    org.apache.axis.AxisFault.faultCode: instance of javax.xml.namespace.QName(id=2696)
    org.apache.axis.AxisFault.faultSubCode: null
    org.apache.axis.AxisFault.faultString: "ORACLE.FDK.AggregateError:ORACLE.FDK.AggregateError"
    org.apache.axis.AxisFault.faultActor: null
    org.apache.axis.AxisFault.faultDetails: instance of java.util.Vector(id=2698)
    org.apache.axis.AxisFault.faultNode: null
    org.apache.axis.AxisFault.faultHeaders: null
    org.apache.axis.AxisFault.class$org$apache$axis$AxisFault: instance of java.lang.Class(reflected class=org.apache.axis.AxisFault, id=1928)
    java.rmi.RemoteException.serialVersionUID: -5148567311918794206
    java.rmi.RemoteException.detail: null
    java.lang.Exception.serialVersionUID: -3387516993124229948
    java.lang.Throwable.serialVersionUID: -3042686055658047285
    java.lang.Throwable.detailMessage: null
    java.lang.Throwable.cause: null
    java.lang.Throwable.stackTrace: instance of java.lang.StackTraceElement[76] (id=2699)
    http-8888-Processor4[1] dump e.exceptionEntries[0]
    e.exceptionEntries[0] = {
    detailedErrorCode: "ORACLE.FDK.MetadataSchemaInvalid"
    errorCode: "ORACLE.FDK.MetaDataError"
    id: 348018
    info: null
    serverStackTraceId: ""
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2705)
    class$oracle$ifs$fdk$FdkExceptionEntry: instance of java.lang.Class(reflected class=oracle.ifs.fdk.FdkExceptionEntry, id=1973)
    }

    1 – For an existing document, how do I determine what category instances have been applied to it and their attribute values
    FdkSession session = …;
    // Consider we have an existing item myDoc of type document
    Item myDoc = …;
    CommonManager cm = Managers.getCommonManager(session);
    AttributeRequest[] requestedAttributes = new AttributeRequest[]
      // The Categories associated with this Document, if any
    new AttributeRequest(Attributes.CATEGORIES,
      // sub attributerequest
      new AttributeRequest[] {
        // the actual attributes name/values for the category instance – returns a namedvalue array
        new AttributeRequest(Attributes.CUSTOM_ALL,null),
        // the actual category class for the category instance – returns an item
        new AttributeRequest(Attributes.CATEGORY_CLASS_OBJECT,null)
    myDoc = cm.getItem(myDoc.getId(), requestedAttributes);
    log(myDoc); /* output could look like:
    (Item) 14385 DOCUMENT sample3.doc
    requested attributes ...
    CATEGORIES (Item[])=
    (Item) 14387 CATEGORY
    requested attributes ...
    CUSTOM_ALL (NamedValue[])=
    CUSTOM_14352=true (Boolean)
    CUSTOM_14353=Internal Only Pending Review (String)
    CATEGORY_CLASS_OBJECT (Item)=
    (Item) 14354 CATEGORY_CLASS 5044-14351
    This means, that for document sample3.doc, we have 1 instance of a category object applied to it.
    The category object instance has id 14387. The instance is of a category class object type 14354. The instance has two attributes with internal names CUSTOM_14352, and CUSTOM_15353. The values of these attributes are of type Boolean and String respectively.
    2 - How do I update an attribute value of an existing category instance applied to an item
    FdkSession session = …;
    // Consider we have an existing item myDoc of type document
    Item myDoc = …;
    .. perform code along the lines of that shown in step1 above to determine existing category instance info on the document ..
    FileManager fm = Managers.getFileManager(session);
    NamedValue[] categoryInstanceAttributes = new NamedValue[] {
      // use the internal attribute name for all attributes
      new NamedValue("CUSTOM_14352", Boolean.FALSE),
      new NamedValue("CUSTOM_14352", "Company Confidential")
    NamedValue[] categoryDef = new NamedValue[] {
      // the category instance that we are updating
    new NamedValue(Options.UPDATE_CATEGORY_ID,new Long(14387)),
    // the updated values of the category instance
      new NamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES, categoryInstanceAttributes)
    NamedValue[] documentDef = new NamedValue[] {
    new NamedValue(Options.CATEGORY_DEFINITION, categoryDef)
    requestedAttributes = ...
    myDoc = fm.updateDocument(myDoc.getId(),documentDef,requestedAttributes) ;
    3 – For a document item X, what is the associated category configuration which could include
    a) what are the category objects I can apply on it (either explicitly restricted by way of ALLOWED_CATEGORIES on the folder configuration, or any site/domain category by way of ALLOW_ALL_CATEGORIES)
    b) is there any attribute overrides
    c) is there any enforced categories
    FdkSession session = …;
    // Consider we have an existing item myDoc of type document
    Item myDoc = …;
    CommonManager cm = Managers.getCommonManager(session);
    AttributeRequest[] categoryObjectAttributes = new AttributeRequest[]
    // What is the category object class name
    new AttributeRequest(Attributes.CLASS_NAME,null),
      // What is the category classobject display name
    new AttributeRequest(Attributes.DISPLAY_NAME,null),
    // get attributes inherited and introduced by category object
    new AttributeRequest(Attributes.METADATA_ATTRIBUTES,
      new AttributeRequest[]
        // Attribute internal name
        new AttributeRequest(Attributes.ATTRIBUTE_NAME,null),
        // Attribute display name
        new AttributeRequest(Attributes.DISPLAY_NAME,null),
        new AttributeRequest(Attributes.ATTRIBUTE_TYPE,null),
        new AttributeRequest(Attributes.ATTRIBUTE_DEFAULT,null),
        new AttributeRequest(Attributes.ATTRIBUTE_ENUMERATION,null),
        new AttributeRequest(Attributes.ATTRIBUTE_REQUIRED,null),
        new AttributeRequest(Attributes.ATTRIBUTE_SETTABLE,null),
        new AttributeRequest(Attributes.ATTRIBUTE_UPDATEABLE,null),
        new AttributeRequest(Attributes.ATTRIBUTE_HIDDEN,null),
        new AttributeRequest(Attributes.ATTRIBUTE_PROMPTED,null),
        new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDEABLE,null),
    AttributeRequest[] overrideAttributes = new AttributeRequest[]
    // id of the attribute to be overridden
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_ATTRIBUTE,null),
    // id of the category class object to which this attribute override applies
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_CATEGORY_CLASS,null),
    // new default value
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_DEFAULT,null),
    // should attribute now be prompted
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_PROMPT,null),
    // is the attribute now required
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_REQUIRED,null),
    // can instances of this attribute have there value updated
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_SETTABLE,null),
    AttributeRequest[] requestedAttributes = new AttributeRequest[]
    // what is the category configuration for the item
    new AttributeRequest(Attributes.CATEGORY_CONFIGURATION,
      new AttributeRequest[]
        // Is the category configuration enabled
         new AttributeRequest(Attributes.CONFIGURATION_ENABLED,null),
         // Can the category configuration be overridden or is it final
        new AttributeRequest(Attributes.CONFIGURATION_FINAL,null),
        // What are the required categories for the category configuration and associated attribute information
        new AttributeRequest(Attributes.REQUIRED_CATEGORIES,categoryObjectAttributes),
        // Can any categories in the site be utilized
        new AttributeRequest(Attributes.ALLOW_ALL_CATEGORIES,null),
        // or .. are we restricting the categories to only the following
        new AttributeRequest(Attributes.ALLOWED_CATEGORIES,categoryObjectAttributes),
        // are there any attribute overrides on category object attributes for this category config?
        new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDES,overrideAttributes)
    log(cm.getItem(myDoc.getId(), requestedAttributes); /*
    If ALLOW_ALL_CATEGORIES is set to true, any category in the domain can be utilized that is not abstract. To determine these, the domain item has a property CATEGORY_CLASSES that returns all category objects in the domain. It also has a property ROOT_CATEGORY_CLASSES which returns just the top level categories (those that have no custom category superclass). You would create a sub AttributeRequest[] checking for CLASS_ABSTRACT when requesting the appropriate categories attribute from the domain.
    If ALLOW_ALL_CATEGORIES is set to false, the applicable categories objects that can be utilized on items contained in the folder is determined by the items contained in the ALLOWED_CATEGORIES attribute of the category configuration.
    Finally, the REQUIRED_CATEGORIES attribute list the category items that must be applied to all new items added to the folder.
    4 – How do I manually apply an instance of a category to an existing item
    FdkSession session = …;
    // Consider we have an existing item myDoc of type document
    Item myDoc = …;
    .. use techniques in step3 above to determine what category objects that you planning to apply to the document ..
    .. if the category configuration on the item has ALLOW_ALL_CATEGORIES set to true, you can use any category in the system
    .. otherwise, you must use a category defined in the allowed categories list
    .. the code here is essentially the same as step2 above
    .. you must utilize internal attribute names, and specify the id of the category class object
    FileManager fm = Managers.getFileManager(session);
    NamedValue[] categoryInstanceAttributes = new NamedValue[] {
      // use the internal attribute name for all attributes
      new NamedValue("CUSTOM_14352", Boolean.FALSE),
      new NamedValue("CUSTOM_14352", "Company Confidential")
    NamedValue[] categoryDef = new NamedValue[] {
      // the id of the category object class for which this new category will be an instance of
    new NamedValue(Options.CATEGORY_CLASS_ID,new Long(14354)),
    // the updated values of the category instance
      new NamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES, categoryInstanceAttributes)
    NamedValue[] documentDef = new NamedValue[] {
    new NamedValue(Options.CATEGORY_DEFINITION, categoryDef)
    requestedAttributes = ...
    myDoc = fm.updateDocument(myDoc.getId(),documentDef,requestedAttributes);
    // Note – it is possible for one to peform creation, updating, and deletion of various category instances for an existing item in the fileManager updateDocument call!
    // you simply supply multiple Options.CATEGORY_DEFINITIONs to the fm.updateDocument call along with any Options.REMOVE_CATEGORY_IDs 5 – How do I specify a category instance when creating a new item
    FdkSession session = …;
    .. use techniques in step3 above to determine what category objects that you planning to apply to the new document ..
    .. you get the category configuration information from the destination folder!!!
    Item destinationFolder = …;
    CommonManager cm = Managers.getCommonManager(session);
    AttributeRequest[] requestedAttributes = new AttributeRequest[]
    // what is the category configuration for the item
    new AttributeRequest(Attributes.CATEGORY_CONFIGURATION,
    destinationFolder = cm.getItem(destinationFolder.getId(),requestedAttributes);.. if the category configuration on the folder item has ALLOW_ALL_CATEGORIES set to true, you can use any category in the system
    .. otherwise, you must use a category defined in the allowed categories list
    .. the code here is essentially the same as step2 above, just we are using createDocument and document definitions now
    .. you must utilize internal attribute names, and specify the id of the category class object
    FileManager fm = Managers.getFileManager(session);
    NamedValue[] categoryInstanceAttributes = new NamedValue[] {
      // use the internal attribute name for all attributes
      new NamedValue("CUSTOM_14352", Boolean.FALSE),
      new NamedValue("CUSTOM_14352", "Company Confidential")
    NamedValue[] categoryDef = new NamedValue[] {
      // the id of the category object class for which this new category will be an instance of
    new NamedValue(Options.CATEGORY_CLASS_ID,new Long(14354)),
    // the attribute values for this new category instance
      new NamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES, categoryInstanceAttributes)
    String destinationFile = "sample.doc";
    requestedAttributes = new AttributeRequest[]
      new AttributeRequest(Attributes.URL,null)
    Item docDef = fm.createDocumentDefinition(new NamedValue[]
      new NamedValue(Attributes.NAME, destinationFile),
    },requestedAttributes);
    String defURL = ...  // get URL from document definition
    doFileUpload(...)  // upload file using http put to defURL
    NamedValue[] documentDef = new NamedValue[] {
      new NamedValue(Options.USE_SAVED_DEFINITION,new Long(docDef.getId())),
    new NamedValue(Options.DESTFOLDER, new Long(destinationFolder.getId())),
    // specify character set if appropriate
      new NamedValue(Attributes.DOCUMENT_CHARACTER_SET,"ISO-8859-1"),
      // specify language if appropriate
    new NamedValue(Attributes.DOCUMENT_LANGUAGE,"ENGLISH"),
    // apply category instance information
    new NamedValue(Options.CATEGORY_DEFINITION, categoryDef),
    requestedAttributes = ...
    Item doc = fm.createDocument(documentDef,null, requestedAttributes);
    // Note – it is possible for one to peform creation of multiple category instances on a document at the same time
    // you simply supply multiple Options.CATEGORY_DEFINITIONs to the fm.createDocument call
    // Note – that if a folder has a category configuration containing required categories, and you do not specify
    // all applicable category definitions on createDocument, you will receive an FdkException along the lines of
    // missing metadata. You can catch this exception, and retry the createDocument call supplying the valid category definition(s).

  • Problem in creating user request through ContentDB API

    Hi
    I am trying to create user request on the document. Workflow is configured on the document parent folder. I am trying to submit the document for workflow.
    Here is the code i used to create user request
    RequestManager reqM = session.getRequestManager();
    long[] itemId = { item.getId() };
    NamedValueSet[] docParameters = new NamedValueSet[]
    new NamedValueSet(
    new NamedValue[]
    new NamedValue(Attributes.WORKFLOW_PARAMETER_NAME,"JUSTIFICATION"),
    new NamedValue(Attributes.WORKFLOW_PARAMETER_DEFAULT_VALUE,
    "Edited para 2"),
    new NamedValueSet(
    new NamedValue[]
    new NamedValue(Attributes.WORKFLOW_PARAMETER_NAME,"IFS_ECM_VERBOSE_LOGGING"),
    new NamedValue(Attributes.WORKFLOW_PARAMETER_DEFAULT_VALUE,
    Boolean.FALSE),
    NamedValue[] options2 = new NamedValue[] {
    ClientUtils.newNamedValue(Attributes.WORKFLOW_CONFIGURATION_PARAMETERS,docParameters)};
    reqM.createUserRequest(itemId, options2);
    I got the following error:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError
    faultActor:
    faultNode:
    faultDetail:
         {http://xmlns.oracle.com/content/ws}fault:<detailedErrorCode xsi:type="xsd:string">ORACLE.FDK.ServerError</detailedErrorCode><errorCode xsi:type="xsd:string">ORACLE.FDK.UnexpectedError</errorCode><exceptionEntries xsi:nil="true" xsi:type="ns1:ArrayOfFdkExceptionEntry"/><info xsi:nil="true" xsi:type="ns1:ArrayOfNamedValue"/><serverStackTraceId xsi:type="xsd:string">112-1191017621836</serverStackTraceId>
         {http://xml.apache.org/axis/}hostname:contentdb.sjrwmd.com
    ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError
         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 java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
    However, If i create user request without passing any parameters it is working fine. I get error only when creating request with parameters.
    Please help.

    Hi
    I could able to get the request invoked. Earlier I tried with wrong parameters.
    Thanks

  • ODrive Edit in Place PDF Document Manual Versioning enabled Error

    Hi,
    Any one has tried or able to do edit in place with ODrive and PDF Document type?
    I have manual versioning enable. When I am doing edit in place from ODrive for PDF Document getting following error.
    I have manually check out the document before doing Edit from ODrive.
    Need help to resolve this issue.
    Thanks,
    Jigar
    Error logs
    07/05/31 15:45:07 content: [oracle.ifs.ecm.util.FolderUtilities] [24] 99117 publicuser1 INFO: resolveLegacyPath targetPath =
    07/05/31 15:46:29 content: [oracle.ifs.protocols.dav.ecm.EcmDavServlet] [23] 99117 publicuser1 WARNING: no mapping found for ORACLE.FDK.ItemNotCheckedOut
    07/05/31 15:46:29 content: [oracle.ifs.protocols.dav.ecm.EcmDavServlet] [23] 99117 publicuser1 WARNING: unmapped exception: oracle.ifs.fdk.FdkException:
    ErrorCode = ORACLE.FDK.AggregateError; DetailedErrorCode = ORACLE.FDK.AggregateError; Cause = IFS-90244: Cannot update all of the specified
    items; ServerStackTraceId = ; Info = null; Entries = 1
    Main Exception Stack Trace:
    ORACLE.FDK.AggregateError:ORACLE.FDK.AggregateError
    at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:181)
    at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:74)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocuments(FileManagerImpl.java:1661)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocument(FileManagerImpl.java:1511)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.doPut(EcmDavServlet.java:1688)
    at oracle.ifs.protocols.dav.DavServlet.doPut(DavServlet.java:1929)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2622)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.processRequest(EcmDavServlet.java:3616)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2396)
    at oracle.ifs.protocols.dav.DavServlet.service(DavServlet.java:2361)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: oracle.ifs.common.IfsException: IFS-90244: Cannot update all of the specified items
    at oracle.ifs.ecm.util.BulkUtilities.ecmUpdate(BulkUtilities.java:369)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocuments(FileManagerImpl.java:1653)
    ... 19 more
    FdkException Details: oracle.ifs.fdk.FdkException: ErrorCode = ORACLE.FDK.AggregateError; DetailedErrorCode = ORACLE.FDK.AggregateError;
    Cause = IFS-90244: Cannot update all of the specified items; ServerStackTraceId = ; Info = null; Entries = 1
    Entry[0] = oracle.ifs.fdk.FdkExceptionEntry: ErrorCode = ORACLE.FDK.OperationError; DetailedErrorCode = ORACLE.FDK.ItemNotCheckedOut;
    ItemID = 99150; Cause = IFS-90301: Cannot update a Document under version control that is not checked out; Info = null
    Cause Exception Stack Trace:
    oracle.ifs.common.IfsException: IFS-90301: Cannot update a Document under version control that is not checked out
    at oracle.ifs.ecm.beans.EcmDocument.lowLevelUpdate(EcmDocument.java:938)
    at oracle.ifs.ecm.beans.EcmDocument.ecmUpdate(EcmDocument.java:618)
    at oracle.ifs.ecm.util.BulkUtilities.ecmUpdate(BulkUtilities.java:345)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocuments(FileManagerImpl.java:1653)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocument(FileManagerImpl.java:1511)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.doPut(EcmDavServlet.java:1688)
    at oracle.ifs.protocols.dav.DavServlet.doPut(DavServlet.java:1929)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2622)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.processRequest(EcmDavServlet.java:3616)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2396)
    at oracle.ifs.protocols.dav.DavServlet.service(DavServlet.java:2361)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    Entry[0] = oracle.ifs.fdk.FdkExceptionEntry: ErrorCode = ORACLE.FDK.OperationError; DetailedErrorCode = ORACLE.FDK.ItemNotCheckedOut;
    ItemID = 99150; Cause = IFS-90301: Cannot update a Document under version control that is not checked out; Info = null
    Cause Exception Stack Trace:
    oracle.ifs.common.IfsException: IFS-90301: Cannot update a Document under version control that is not checked out
    at oracle.ifs.ecm.beans.EcmDocument.lowLevelUpdate(EcmDocument.java:938)
    at oracle.ifs.ecm.beans.EcmDocument.ecmUpdate(EcmDocument.java:618)
    at oracle.ifs.ecm.util.BulkUtilities.ecmUpdate(BulkUtilities.java:345)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocuments(FileManagerImpl.java:1653)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocument(FileManagerImpl.java:1511)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.doPut(EcmDavServlet.java:1688)
    at oracle.ifs.protocols.dav.DavServlet.doPut(DavServlet.java:1929)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2622)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.processRequest(EcmDavServlet.java:3616)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2396)
    at oracle.ifs.protocols.dav.DavServlet.service(DavServlet.java:2361)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    07/05/31 15:46:29 content: Servlet error
    ORACLE.FDK.AggregateError:ORACLE.FDK.AggregateError
    at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:181)
    at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:74)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocuments(FileManagerImpl.java:1661)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocument(FileManagerImpl.java:1511)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.doPut(EcmDavServlet.java:1688)
    at oracle.ifs.protocols.dav.DavServlet.doPut(DavServlet.java:1929)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2622)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.processRequest(EcmDavServlet.java:3616)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2396)
    at oracle.ifs.protocols.dav.DavServlet.service(DavServlet.java:2361)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: oracle.ifs.common.IfsException: IFS-90244: Cannot update all of the specified items
    at oracle.ifs.ecm.util.BulkUtilities.ecmUpdate(BulkUtilities.java:369)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocuments(FileManagerImpl.java:1653)
    ... 19 more
    FdkException Details: oracle.ifs.fdk.FdkException: ErrorCode = ORACLE.FDK.AggregateError; DetailedErrorCode = ORACLE.FDK.AggregateError;
    Cause = IFS-90244: Cannot update all of the specified items; ServerStackTraceId = ; Info = null; Entries = 1
    Entry[0] = oracle.ifs.fdk.FdkExceptionEntry: ErrorCode = ORACLE.FDK.OperationError; DetailedErrorCode = ORACLE.FDK.ItemNotCheckedOut;
    ItemID = 99150; Cause = IFS-90301: Cannot update a Document under version control that is not checked out; Info = null
    Cause Exception Stack Trace:
    oracle.ifs.common.IfsException: IFS-90301: Cannot update a Document under version control that is not checked out
    at oracle.ifs.ecm.beans.EcmDocument.lowLevelUpdate(EcmDocument.java:938)
    at oracle.ifs.ecm.beans.EcmDocument.ecmUpdate(EcmDocument.java:618)
    at oracle.ifs.ecm.util.BulkUtilities.ecmUpdate(BulkUtilities.java:345)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocuments(FileManagerImpl.java:1653)
    at oracle.ifs.fdk.impl.FileManagerImpl.updateDocument(FileManagerImpl.java:1511)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.doPut(EcmDavServlet.java:1688)
    at oracle.ifs.protocols.dav.DavServlet.doPut(DavServlet.java:1929)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2622)
    at oracle.ifs.protocols.dav.ecm.EcmDavServlet.processRequest(EcmDavServlet.java:3616)
    at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2396)
    at oracle.ifs.protocols.dav.DavServlet.service(DavServlet.java:2361)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)

    Hi Matt,
    Thank you for your very useful reply.
    I have non blocking serial approval workflow.
    In my workflow I have attachment as PDF document to be signed. URI of that document is from Odrive. Foe example O:\sjrwmd\DMSFAContainer\DMSFALibrary\36397\P041282\978599\Invoice_with_2_blank_sig_OD_2.pdf
    When task has been assign to any user, from task detail page of the worklist application user click / open that pdf file and sign the document. When user save this document Odrive should save that to Contentdb.
    Just wanted to know that why it is not ODrive bug?
    I was able to do following test It works only in Acrobat 6.0.
    Steps I did,
    1) Upload pdf file to folder with manual versioning enable.
    2) Manually checked out file from web ui.
    3) Login to ODrive using same user
    4) Created html file with link (Please replace href portion to your url of the file)
    <HTML>
    <BODY>
    Testing Link <BR>
    <a class="blue" href="O:/sjrwmd/DMSFAContainer/DMSFALibrary/36397/P041282/978599/Invoice_102_wit
    h_blank_sig_OD.pdf" target="_blank">Invoice_101CD.pdf</a> <BR>
    <a class="blue" href="O:/sjrwmd/DMSFAContainer/DMSFALibrary/16966/P040577/246361/ST_Memo.doc"
    target="_blank">ST_Memo.doc</a>
    </BODY>
    </HTML>
    5) Open html in browser
    6) Click on document link
    7) Will open pdf files in browser
    8) Sign the document
    9) Click on save a copy button.
    10) In the save a copy dialog , file name place paste your file url of o drive for example in my
    case
    O:/sjrwmd/DMSFAContainer/DMSFALibrary/36397/P041282/978599/Invoice_102_with_blank_sig_OD.pdf
    click save
    11) This should save updated file
    12) Checked in document
    I will look into programmatically way to achive this.
    Regards,
    Jigar

  • Category attributes default values updating

    Hi,
    I'm developing an application that, upon upload of a file to the specified root folder(through the application), reads some values from a file, creates a folder structure based on those values, and moves the file in the bottom folder. Now, a predefined category should be attached to the file, to enable search by category attributes. My idea is to set the category as required on that bottom folder (or the first), and modify it's attribute default values, so that the file inherits them when moved in it. I have found mshannon's examples in some other thread ( Updating a document with category metadata using updateDocument(): error! ), the first one works only with files, not folders, and the second one doesn't work for me at all, I get an error:
    javax.faces.el.EvaluationException: ORACLE.FDK.AggregateError:ORACLE.FDK.AggregateError
    here is my code:
    public static void updateAttributes() throws FdkException, RemoteException{
    login();
    FileManager fm = s_WsCon.getFileManager();
    Item fajl = fm.resolvePath(prop.getProperty("userhome") + "/root folder/folder1/readme1.txt",
    null);
    long docID = fajl.getId();
    NamedValue[] catInstAtr = new NamedValue[] {
    new NamedValue("CUSTOM_138297", "changed value for att1"),
    new NamedValue("CUSTOM_138299", "changed value for att2")
    NamedValue[] catDef = new NamedValue[] {
    new NamedValue(Options.UPDATE_CATEGORY_ID,new Long(139054)),
    new NamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES, catInstAtr)
    NamedValue[] docDef = new NamedValue[] {
    new NamedValue(Options.CATEGORY_DEFINITION, catDef)
    AttributeRequest[] reqAtr = new AttributeRequest[]{
    new AttributeRequest(Attributes.DESCRIPTION, null)
    fajl = fm.updateDocument(docID, docDef, reqAtr);
    logut();
    This example is (I think) only for updating on document level, but I could use a solution for folder-level updating, as I explained before. Can anyone help me?
    Thanks,
    Pedja

    Pedja,
    Here is my code to get category from Folder this is updated version from sample code TestCategory2.java
    1. It will get the required category of a folder.
    2. gets the internal category attribute names
    3. get Category id if uploading file along with category attribute values OR
    updating file and also updating previous category instance values..
    package oracle.ifs.examples.content.testcases;
    import java.util.Map;
    import java.util.Properties;
    import java.util.*;
    // Facade Objects
    import oracle.ifs.fdk.AttributeRequest;
    import oracle.ifs.fdk.Attributes;
    import oracle.ifs.fdk.FdkConstants;
    import oracle.ifs.fdk.FdkErrorCodes;
    import oracle.ifs.fdk.FdkException;
    import oracle.ifs.fdk.FdkExceptionEntry;
    import oracle.ifs.fdk.Item;
    import oracle.ifs.fdk.Options;
    import oracle.ifs.fdk.NamedValue;
    import oracle.ifs.fdk.NamedValueSet;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import HTTPClient.HTTPConnection;
    import HTTPClient.HTTPResponse;
    import HTTPClient.HttpOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.URL;
    // Web Services Managers
    import oracle.ifs.fdk.CategoryManager;
    import oracle.ifs.fdk.CommonManager;
    import oracle.ifs.fdk.FileManager;
    // Framework
    import oracle.ifs.examples.content.fdk.FdkSession;
    import oracle.ifs.examples.content.fdk.FdkUtils;
    import oracle.ifs.examples.content.fdk.Managers;
    import oracle.ifs.examples.content.fdk.constants.ItemAttributes;
    import oracle.ifs.examples.content.fdk.constants.NamedValueConstants;
    import oracle.ifs.examples.content.testcases.AbstractTest;
    public class TestCategories3
    implements ItemAttributes, NamedValueConstants
    public TestCategories3()
    public static void main(String[] args)
    TestCategories3 tc3= new TestCategories3();
    tc3.getCatinfo();
    * This is where you write your test program.
    public void getCatinfo()
    log(this.getClass().getName()+": starting");
    FdkSession session = null;
    try
    AttributeRequest[] requestedAttributes = null;
    NamedValue[] sortOptions = null;
    Map returnedAttrs = null, map = null;
    log("\nAuthenticating as regular test user ...");
    session = new FdkSession("http://xxx.com:8320/content/","anakkala","sample");
    CommonManager commonM = Managers.getCommonManager(session);
    CategoryManager categoryM = Managers.getCategoryManager(session);
    FileManager fileM = Managers.getFileManager(session);
    // save this attribute request so that it can be used later
    AttributeRequest[] AR_CATEGORY_CONFIGURATION_ATTRIBUTES =
    FdkUtils.newAttributeRequestArray(Attributes.CATEGORY_CONFIGURATION,
    FdkUtils.newAttributeRequestArray(new Object[]
    // Is the category configuration enabled
    FdkUtils.newAttributeRequest(Attributes.CONFIGURATION_ENABLED),
    // Can the category configuration be overridden or is it final
    FdkUtils.newAttributeRequest(Attributes.CONFIGURATION_FINAL),
    // What are the required categories for the category configuration
    FdkUtils.newAttributeRequest(Attributes.REQUIRED_CATEGORIES,
    // for the required categories ...
    FdkUtils.newAttributeRequestArray(new Object[]
    // What is the category classobject display name
    FdkUtils.newAttributeRequest(Attributes.DISPLAY_NAME),
    // get attributes inherited and introduced by category object
    FdkUtils.newAttributeRequest(Attributes.METADATA_ATTRIBUTES,
    // get full settings for each of these attributes
    FdkUtils.newAttributeRequestArray(METADATA_ATTRIBUTE_ATTRIBUTES)
    // Are there any attribute overrides for this category config?
    FdkUtils.newAttributeRequest(Attributes.ATTRIBUTE_OVERRIDES,
    // get full settings for each of these attribute overrides
    FdkUtils.newAttributeRequestArray(ATTRIBUTE_OVERRIDE_ATTRIBUTES))
    log("\nLooking up folder /d-rco/C1/L1/folder1 ...");
    // convert attribute request map to AttributeRequest[]
    requestedAttributes = AR_CATEGORY_CONFIGURATION_ATTRIBUTES;
    Item folder =fileM.resolvePath(
    "/d-rco/C1/L1/folder1",
    requestedAttributes);
    log("folder id is="+folder.getId());
    log("\nProcessing requested attributes - goal: generate override ...");
    //returns a map
    returnedAttrs = FdkUtils.getAttributesMap(folder);
    Item categoryConfig = (Item)
    returnedAttrs.get(Attributes.CATEGORY_CONFIGURATION);
    returnedAttrs = FdkUtils.getAttributesMap(categoryConfig);
    // is CategoryConfiguration enabled?
    Boolean ccEnabled = (Boolean) returnedAttrs.
    get(Attributes.CONFIGURATION_ENABLED);
    // is CategoryConfiguration final? false=subfolders can override
    Boolean ccFinal = (Boolean) returnedAttrs.
    get(Attributes.CONFIGURATION_FINAL);
    // what are the attribute overrides for this category configuration
    log("\nAttribute overrides ...");
    Item[] attributeOverrides = (Item[]) returnedAttrs.
    get(Attributes.ATTRIBUTE_OVERRIDES);
    FdkUtils.log(attributeOverrides);
    // what are the requred categories for this category configuration
    log("\nRequired categories ...");
    Item[] reqCategories = (Item[]) returnedAttrs.get(Attributes.REQUIRED_CATEGORIES);
    FdkUtils.log(reqCategories);
    log("After printing required categories");
    if(ccEnabled.booleanValue() && !ccFinal.booleanValue()
    && reqCategories != null && reqCategories.length >= 1)
    // Folder /<domain>/<basecontainer>/L1/F3.EC has an enabled category
    // configuration that can be overridden and has required categories
    // present ...
    Item category = null;
    for (int i=0; i < reqCategories.length; i++)
    returnedAttrs = FdkUtils.getAttributesMap(reqCategories);
    log( "xxx name="+((String) returnedAttrs.get(Attributes.DISPLAY_NAME) ));
    if ( ((String) returnedAttrs.get(Attributes.DISPLAY_NAME)).
    equals("BG_Serv_Req"))
    category = reqCategories[i];
    break;
    log("category id="+category.getId());
    if (category != null)
    NamedValue[] internalCategoryAttrs = null;
    try {
    internalCategoryAttrs =getInternalCategoryAttrNames("BG_Serv_Req",session);
    }catch(Exception e)
    log("error getting internal names");
    e.printStackTrace();
    log("Category Attribute internal Name ="+ (String)internalCategoryAttrs[0].getValue());
    log("Category Attribute internal Name ="+ (String)internalCategoryAttrs[1].getValue());
    NamedValue[] categoryInstanceAttributes = new NamedValue[] { 
    // use the internal attribute name for all attributes
    new NamedValue((String)internalCategoryAttrs[0].getValue(), "XNXNXNXN 234"),
    new NamedValue((String)internalCategoryAttrs[1].getValue(), "SNKKSKSK 1234")
    NamedValue[] categoryDef = new NamedValue[] { 
    // the id of the category object class for which this new category will be an
    //instance of
    new NamedValue(Options.CATEGORY_CLASS_ID, new Long(category.getId())),
    // the updated values of the category instance
    new NamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES, categoryInstanceAttributes)
    String sourceFile="test.doc";
    String folderPath = "C:\\upload";
    requestedAttributes = FdkUtils.newAttributeRequestArray(Attributes.URL);
    Item doc = fileM.resolveRelativePath(folder.getId(),sourceFile, requestedAttributes);
    log("START ORACLE TEST CODE FROM TAR");
    // this will get the category instance id
    AttributeRequest categoryAR = new AttributeRequest();
    categoryAR.setAttributeName(Attributes.CATEGORIES);
    AttributeRequest[] attrRequests = new AttributeRequest[]
    { categoryAR};
    Item myDoc = commonM.getItem(doc.getId(), attrRequests);
    NamedValue[] requestedAttributesNV = myDoc.getRequestedAttributes();
    int length = requestedAttributesNV == null ? 0 :
    requestedAttributesNV.length;
    Item[] itemCategories = null;
    log("length="+length);
    for (int i = 0; i < length; i++)
    log("requestedAttributesNV[i].getName()="+requestedAttributesNV[i].getName());
    if(requestedAttributesNV[i].getName().equals(Attributes.CATEGORIES))
    itemCategories = (Item[]) requestedAttributesNV[i].getValue();
    length = itemCategories == null ? 0 : itemCategories.length;
    log("length="+length);
    long categoryInstanceId = 0;
    for (int i = 0; i < length; i++)
    log("Category instance " + itemCategories[i].getName() + " has id " +
    itemCategories[i].getId());
    categoryInstanceId = itemCategories[i].getId();
    log("END ORACLE TEST CODE FROM TAR");
    /* If the document does not exist in OCS */
    if (doc == null) {
    requestedAttributes = FdkUtils.newAttributeRequestArray(Attributes.URL);
    NamedValue[] nvdoc = FdkUtils.newNamedValueArray(
    new Object[][] { { Attributes.NAME,sourceFile} }
    Item def = fileM.createDocumentDefinition(nvdoc,requestedAttributes);
    int uploadStatusCode = uploadContent(
    session,
    getSampleFileStream(sourceFile,folderPath),
    (String) FdkUtils.getAttribute(def,Attributes.URL)
    log("Upload Status to definition file: "+uploadStatusCode);
    nvdoc = FdkUtils.newNamedValueArray(
    new Object[][]
    { Attributes.NAME,sourceFile},
    { Options.USE_SAVED_DEFINITION, new Long(def.getId())},
    { Options.DESTFOLDER, new Long(folder.getId()) },
    // apply category instance informationnew
    { Options.CATEGORY_DEFINITION, categoryDef }
    requestedAttributes = FdkUtils.newAttributeRequestArray(Attributes.URL);
    doc = fileM.createDocument(nvdoc,null,requestedAttributes);
    }else /* if document already exist in OCS */
              log(sourceFile+" file exists so updating ...");
    int uploadStatusCode = uploadContent(
    session,
    getSampleFileStream(sourceFile,folderPath),
    (String) FdkUtils.getAttribute(doc ,Attributes.URL)
    log("uploadStatusCode="+uploadStatusCode);
    FileInputStream fi= getSampleFileStream(sourceFile,folderPath);
    log("category id using in update="+ category.getId());
    NamedValue[] updatecatdef = new NamedValue[] {
    //new NamedValue(Options.UPDATE_CATEGORY_ID, new Long(category.getId())),
    new NamedValue(Options.UPDATE_CATEGORY_ID, new Long(categoryInstanceId)),
    new NamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES,
    new NamedValue[] {
    new NamedValue((String)internalCategoryAttrs[0].getValue(), "AH234 V2"),
    new NamedValue((String)internalCategoryAttrs[1].getValue(), "SNHGZ12 V2")
    NamedValue[] nv = FdkUtils.newNamedValueArray(
    new Object[][]
    { Attributes.NAME,sourceFile},
    { Attributes.DESCRIPTION,"Sample file"},
    //{Options.CONTENTSTREAM, fi},
    { Options.CATEGORY_DEFINITION, updatecatdef }//Newly added for category upload
    requestedAttributes = FdkUtils.newAttributeRequestArray(Attributes.URL);
    // THIS IS WHERE WE ARE GETTING ERROR
    fileM.updateDocument(doc.getId(),nv,requestedAttributes);
    System.out.println("doc = fm.updateDocument is complete ........." );
    } // end if (Document Confidentiality category present)
    } // end if category configuration enabled / overridable etc
    catch (FdkException fe)
    FdkUtils.log(fe);
    fe.printStackTrace();
    catch (Exception e)
    // java.net.MalformedURLException;
    // java.rmi.RemoteException;
    // javax.xml.rpc.ServiceException;
    // org.apache.axis.AxisFault
    log("Fatal exception occurred in run():");
    e.printStackTrace();
    finally
    if (session != null)
    session.disconnect();
    log("\n"+this.getClass().getName()+": ending");
    private FileInputStream getSampleFileStream(String filename,String path)
    throws FileNotFoundException
    FileInputStream stream = null;
    if (filename != null && filename.length() >= 1)
    if (path.length() >=1 && !path.endsWith("/"))
    path += "/";
    stream = new FileInputStream(new File(path+filename));
    return stream;
    public int uploadContent(
    FdkSession session,
    InputStream inputStream,
    String destinationURL
    throws Exception
    int statusCode = -1;
    if (inputStream == null) return statusCode;
    HTTPConnection conn = null;
    try
    URL url = new URL(destinationURL);
    conn = session.getHttpConnection(url);
    byte[] buffer = new byte[8192];
    int count=0;
    HttpOutputStream outputStream = new HttpOutputStream();
    HTTPResponse response = conn.Put(url.getFile(), outputStream);
    try
    while ((count = inputStream.read(buffer)) != -1)
    outputStream.write(buffer, 0, count);
    finally
    outputStream.flush();
    outputStream.close();
    statusCode = response.getStatusCode();
    finally
    if (inputStream != null)
    inputStream.close();
    if (conn != null)
    conn.stop();
    conn = null;
    return statusCode;
    // Handle the response. Note that a successful response may not be
    // 200, but may also be 201 Created, 204 No Content or any of the other
    // 2xx range responses.
    public void log(String s)
    System.out.println(s);
    public NamedValue[] getInternalCategoryAttrNames(String categoryName,FdkSession session) throws Exception
    NamedValue[] returnNV = null;
    Map attmap = new HashMap();
                   attmap.put(Attributes.METADATA_ATTRIBUTES,
                   FdkUtils.newAttributeRequestArray(
                   new String[] { Attributes.ATTRIBUTE_NAME,
                   Attributes.DISPLAY_NAME }));
                   AttributeRequest[] request = FdkUtils.getAttributeRequestArray(attmap);
                   Item cat = FdkUtils.getCategoryObject(session, null, categoryName, request);
    log("inside method cat id="+cat.getId());
    /** ANAKKALA START **/
    NamedValue[] catNV = cat.getRequestedAttributes();
    if( catNV != null && catNV.length >0)
    for (int i=0; i<catNV.length; i++)
    if(catNV[i].getName().equals("METADATA_ATTRIBUTES"))
    //log("** CatNV.getName="+catNV[i].getName()+" value="+catNV[i].getValue());
    Item[] meta = (Item[]) catNV[i].getValue();
    log("meta length="+meta.length);
    returnNV = new NamedValue[meta.length];
    for (int j=0; j<meta.length; j++)
    log("--Item getname="+meta[j].getName()+" value="+meta[j].getId()+" gettype="+meta[j].getType()+" gettypedesc="+meta[j].getTypeDesc());
    returnNV[j] = new NamedValue(meta[j].getName(),meta[j].getName());
    NamedValue[] metaNV = meta[j].getRequestedAttributes();
    log("---metaNV length="+metaNV.length);
    for(int k=0; k<metaNV.length; k++)
    log("------metaNV.getName="+metaNV[k].getName()+" value="+metaNV[k].getValue());
    /** ANAKKALA END **/
    //NamedValue[] ret = null;
    return returnNV;

Maybe you are looking for

  • Custom transaction for FBL5N

    HI,   I need to copy the program RFITEMAR to ZRFITEMAR and should create a ZFBL5N. I created a ZRFITEMAR program and created ZFBL5N. When I am executing program standalone it is not giving any dump, but when I am trying to execute newly created trans

  • Procurement of External Requirement

    Hi All, I understand that the Requirement from ECC (as PR) can be sourced in SRM through Shopping Cart created via Plan Driven . This will be driven by tables T160 EX and PR. Now in the Practical Scenario, when once the PR is created and Sent to SRM

  • Placing text beside image in a table cell?

    I'm creating business cards (using a Printworks template), and I want to place text to the right of the inserted picture. I've copied and pasted the jpg fine onto the left side of the cell, yet when I try to type text, the cursor only lets me begin t

  • Printing table in JSP page

    Hi friends, i am developing an web application where customers and vendors can able to view a detailed report of what are all the product they purchase/sold. Here i need to print that report and not the whole page.. I think i am clear my point. Pleas

  • Jumpstart/JET - How to maintain multiple versions of patch clusters

    Is there a way to maintain multiple versions of the recommended patch cluster with JET? Since Sun uses the same filename (10_recommended.zip) but releases several versions over time, its hard to keep new systems at the same baselines as ones built pr