oramds未知协议错误

时间:2013-04-05 10:53:16

标签: bpm

我在下面给出了从bpm引擎获取数据的代码,但遇到了如下所述的错误。有人可以告诉我一些工作代码或帮我解决问题

Exception in thread "main" java.lang.ExceptionInInitializerError
    at oracle.integration.platform.blocks.FabricConfigManager.getMetadataManager(FabricConfigManager.java:205)
    at oracle.integration.platform.blocks.FabricConfigManager.loadConfigObject(FabricConfigManager.java:620)
    at oracle.tip.pc.services.identity.config.ISConfiguration.init(ISConfiguration.java:170)
    at oracle.tip.pc.services.identity.config.ISConfiguration.<clinit>(ISConfiguration.java:130)
    at bpm.BpmTester.main(BpmTester.java:52)
Caused by: oracle.fabric.common.FabricException: oracle.fabric.common.FabricException: java.net.MalformedURLException: unknown protocol: oramds: unknown protocol: oramds: java.net.MalformedURLException: unknown protocol: oramds: unknown protocol: oramds
    at oracle.fabric.common.FabricMetadataManagerFactory.createMetadataManager(FabricMetadataManagerFactory.java:217)
    at oracle.integration.platform.blocks.FabricConfigManager$MDMHolder.<clinit>(FabricConfigManager.java:200)
    ... 5 more
Caused by: oracle.fabric.common.FabricException: java.net.MalformedURLException: unknown protocol: oramds: unknown protocol: oramds
    at oracle.integration.platform.common.MDSMetadataManagerImpl.<init>(MDSMetadataManagerImpl.java:171)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at oracle.fabric.common.FabricMetadataManagerFactory.createMetadataManager(FabricMetadataManagerFactory.java:213)
    ... 6 more
Caused by: java.net.MalformedURLException: unknown protocol: oramds
    at java.net.URL.<init>(URL.java:574)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at oracle.integration.platform.common.MDSMetadataManagerImpl.<init>(MDSMetadataManagerImpl.java:138)
    ... 13 more

JavaCode ::

IWorkflowServiceClient wfSvcClient;
            try{

             Map properties = new HashMap<IWorkflowServiceClientConstants.CONNECTION_PROPERTY, String>();
             properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.SOAP_END_POINT_ROOT, "http://hostname:port");
             properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.SECURITY_POLICY_URI, "oracle/wss10_saml_token_client_policy"); 
             properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.MANAGEMENT_POLICY_URI, "oracle/log_policy");


        wfSvcClient=WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.SOAP_CLIENT,properties,null);

        IWorkflowContext wfCtx=wfSvcClient.getTaskQueryService().authenticate(userId, password.toCharArray(),oracle.tip.pc.services.identity.config.ISConfiguration.getDefaultRealmName() 
            );
            IWorkflowContext adminCtx = wfSvcClient.getTaskQueryService().authenticate(adminUserId, pwd, 
                                            oracle.tip.pc.services.identity.config.ISConfiguration.getDefaultRealmName(),
                                             userId);
            ITaskQueryService querySvc=wfSvcClient.getTaskQueryService();
            Predicate.enableXMLSerialization(true);
            // Build the predicate
               Predicate statePredicate = new Predicate(TableConstants.WFTASK_STATE_COLUMN,
                                            Predicate.OP_NEQ,
                                            IWorkflowConstants.TASK_STATE_ASSIGNED);
                    statePredicate.addClause(Predicate.AND,
                                     TableConstants.WFTASK_NUMBERATTRIBUTE1_COLUMN,
                                     Predicate.OP_IS_NULL,
                                     nullParam);
               Predicate datePredicate = new Predicate(TableConstants.WFTASK_ENDDATE_COLUMN,
                                            Predicate.OP_ON,
                                            new Date());
               Predicate predicate = new Predicate(statePredicate, Predicate.AND, datePredicate);

               // Create the ordering
               Ordering ordering = new Ordering(TableConstants.WFTASK_TITLE_COLUMN, true, true);        
                 ordering.addClause(TableConstants.WFTASK_PRIORITY_COLUMN, true, true);

               // List of display columns
               // For those columns that are not specified here, the queried Task object will not hold any value.
               // For example: If TITLE is not specified, task.getTitle() will return null
               // For the list of most comonly used columns, check the table below
               // Note: TASKID is fetched by default. So there is no need to explicitly specity it.
               List queryColumns = new ArrayList();
                 queryColumns.add("TASKNUMBER");     
                 queryColumns.add("TITLE");
                 queryColumns.add("PRIORITY");
                 queryColumns.add("STATE");
                 queryColumns.add("ENDDATE");
                 queryColumns.add("NUMBERATTRIBUTE1");
                 queryColumns.add("TEXTATTRIBUTE1");

               // List of optional info
               // Any optionalInfo specified can be fetched from the Task object
               // For example: if you have specified "CustomActions", you can retrieve
               // it using task.getSystemAttributes().getCustomActions();
               // "Actions" (All Actions) - task.getSystemAttributes().getSystemActions()
               // "GroupActions" (Only group Actions: Actions that can be permoded by the user as a member of a group)
               //                - task.getSystemAttributes().getSystemActions()
               // "ShortHistory" - task`enter code here`.getSystemAttributes().getShortHistory()
               List optionalInfo = new ArrayList();
                 optionalInfo.add("Actions");
                 //optionalInfo.add("GroupActions");
                 //optionalInfo.add("CustomActions");
                 //optionalInfo.add("ShortHistory");
                 // The following is reserved for future use. 
                 // If you need them, please use getTaskDetailsById (or) getTaskDetailsByNumber,
                 // which will fetch all information related to a task, which includes these
                    //optionalInfo.add("Attachments");
                    //optionalInfo.add("Comments");
                    //optionalInfo.add("Payload");

               List tasksList = querySvc.queryTasks(wfCtx,
                                           queryColumns,
                                           optionalInfo,
                                           ITaskQueryService.ASSIGNMENT_FILTER_MY_AND_GROUP,
                                           keyword,
                                           predicate, 
                                           ordering, 
                                           0,0); // No Paging

               // How to use paging:
               // 1. If you need to dynamically calculate paging size (or) to display/find 
               //    out the number of pages, the user has to scroll (Like page X of Y)
               //      Call queryTasks to find out the number of tasks it returns. Using this 
               //      calculate your paging size (The number of taks you want in a page)
               //      Call queryTasks successively varing the startRow and endRow params.  
               //      For example: If the total number of tasks is 30 and your want a paging size
               //      of 10, you can call with (startRow, endRow): (1, 10) (11, 20) (21, 30) 
               // 2. If you have fixed paging size, just keep calling queryTasks successively with 
               //      the paging size (If your paging size is 10, you can call with (startRow, endRow): 
               //      (1, 10) (11, 20) (21, 30) (31, 40).....  until the number of tasks returned is 
               //      less than your paging size (or) there are no more tasks returned     

               if (tasksList != null) { // There are tasks 
                 System.out.println("Total number of tasks: " + tasksList.size()); 
                 System.out.println("Tasks List: ");
                 Task task = null; 
                 for (int i = 0; i < tasksList.size(); i++) { 
                   task = (Task) tasksList.get(i);          
                   System.out.println("Task Number: " + task.getSystemAttributes().getTaskNumber());
                   System.out.println("Task Id: " + task.getSystemAttributes().getTaskId());
                   System.out.println("Title: " + task.getTitle());
                   System.out.println("Priority: " + task.getPriority());
                   System.out.println("State: " + task.getSystemAttributes().getState());
                   System.out.println();
                   // Retrive any Optional Info specified
                   // Use task service, to perform operations on the task
                 }
               }
        }
        catch(WorkflowException e){
            e.printStackTrace();
        }


        catch(BPMConfigException e){
            System.out.print("hello");
        } 

1 个答案:

答案 0 :(得分:0)

olapds是一个oracle soa特定的东西,你在开发一个在soa套件之外运行的客户端吗?然后你必须得到引用的wsdl / xsd,并确保它们在其他工具如eclipse或soapui中看起来不错