Adding a catch

We have a BPEL process with couple FTP adapters. At the end of the process it is stating an SSH error resulting in a break in the connection. So i tried to add an scope and put my assign in there and my invoke then i created a reply below my scope to reply back to the begnning ftp adapter (Called get) but it says operation does not have an output value which i understand but i want to restart the process if it catches an exception.
So would i include a catch then surround the components i want to identify the exception in. If it doesn't find an exception it should go to the put adapter
well thats what i want
Anyonye offer a good site

Ok so im reading one of the links you had sent and it is talking about fault-policy-binding.
Well its saying in bpel/domains/default/config/fault-policy-binding.xsd
well i see bpel/domains/default/config but i do not see anything around the terms
fault-policy-binding.xsd
Then it says
bpel/domains/default/config/fault-policies <------- directory should be there and i should find fault-policy-binding.xsd in there but the directory dont even exist.
"Oracle delivers the following policy by default". <--------- quoted right out of this document
So my first guess is that they should be here by default?
Well as the document goes on they send you through a little tutorial but most require you to edit these files that dont exist. So my question is do we create the directories and the files or do i need to enable something to do this automatically?

Similar Messages

  • Adding a Catch or CatchAll Branch splits transactions?

    Hi,
    I have a BPEL flow that has to Invokes that insert data into two different tables. If I add a catch or Catch All Branch it will split the transactions so that if one fails the other one doesn't get rolled back. Why is that?
    Flow:
    1. Insert Data into Table1...Invoke1....This one is successful.
    2. Insert Data into Table2...Invoke2...This one fails.
    If I have a catch or catchall Table1 Insert isn't rolled back.
    Also, unless it is a CatchAll I don't see the catch branch even be fired?
    Any thoughts?
    S

    Hi,
    <b> Best Practice Guide says: </b>
    In the 10.1.3.3.0 version (and I suppose in later versions as well) of the database adapter, the TopLink layer has been changed to not mark the transaction for rollback if the integrity of the transaction has not been compromised. For example, if a single insertion fails, the transaction is not marked for rollback. However, if in a sequence of two inserts, the first one succeeds but the second fails, the transaction is rolled back because not doing so breaks the TopLink unit-of-work concept.Looks like same thing is happening here.
    Also, worth-checking is whether both the invokes participate in the same global transaction or not. And, is there any commit issued between the two invokes (which would cause the two invokes to be in different transaction scope)?
    You can also do the following:
    In catch branch, try throwing rollback fault explicitly and check the behaviour. I think it should work.
    Regds,
    http://www.ibiztrack.com
    http://www.ibiztrack.com/html/oraclel-soa11g-bpel-esb-training.html

  • How / Where to Catch : oracle.jbo.TooManyObjectsException: JBO-25013

    Hi OAF Gurus,
    I have read the existing threads on .TooManyObjectsException, but none of them talks about catching this exception.
    Note: We don’t want to avoid this exception, we want it get raised. then we want to catch it and process according to our business needs.
    Our Requirement : We have to catch this exception and display in a user friendly manner
    Question: Where we can catch this exception.?
    What we did by far
    ->TooManyObjectsException is a type of RuntimeException
    -> we added try catch(Exception) blocks in the following
    try{ commit() } catch(Exception e){}
    try{ validate() } catch(Exception e){} // ROW Impl
    try{ validateEntity() } catch(Exception e){} //EO Impl
    The BIG question : where to put the try/catch block to catch the TooManyObjectsException exception.
    (Again: we do not want to avoid this exception, we want to catch it)
    Please let me know your suggestions.
    Thanks
    Chaitanya

    Tapash,
    That is not the correct thing to say, RuntimeException is a derived class of Exception, so any runtime exception will be caught if you use Exception
    Absolutely correct... read my reply carefully... i have written--- For any runtime excetion put a catch block for that runtime exception l... so iot should specially contain that runtime exception ,i,e, oracle.jbo.TooManyObjectsException.--Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Try/catching errors occuring in synchronous event handlers

    Hi,
    I know that using try/catch in flash player it is possible to catch only synchronous errors, but recently I ran into code in our application which I strongly believe is synchronous but it behaves as if it wasn't.
    In example below I create event listener and inside try/catch I dispatch event. Handler function throws error. Executing code stops when error is thrown, so message "after throwing error" won't be logged, but try/catch block catches nothing and code executes as if nothing happened after event dispatch.
    Dispatching event on element executes handler method immediately so it is synchronous execution. Event call stack which is displayed in debug versions of flash player, shows every function from creation of class to execution of handler.
    Generally flash applications relays heavily on events and in my case it caused ours users projects to be irreversibly corrupted, because of this continuing to work after error, which I even can't properly detect and handle, cause it's going throught 5 or more event handlers and adding try/catch to each handler would create enormous chaos in my code. So my question is why does flash player behaves like this? Are there any ways to tell compiled SWF file to treat such cases as synchronous calls, f.e. compilation parameters?
    package
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.EventDispatcher;
        import flash.text.TextField;
        public class TestApp extends Sprite
            public var cTextField:TextField;
            public function TestApp()
                cTextField = new TextField();
                cTextField.width = 300;
                cTextField.height = 200;
                addChild(cTextField);
                onAppCreated();
            protected function onAppCreated():void
                var eventName:String = "my_event";
                var caughtError:Boolean = false;
                var dispatcher:EventDispatcher = new EventDispatcher();
                dispatcher.addEventListener(eventName, handler);
                try
                    dispatcher.dispatchEvent(new Event(eventName));
                } catch (error:Error)
                    caughtError = true;
                cTextField.text += caughtError ? "caught error\n" : "error wasn't caught\n";
            protected function handler(event:Event):void
                cTextField.text += "before throwing error\n";
                throw new Error("throw error");
                cTextField.text += "after throwing error\n";

    Okay, nobody bit.  Sorry. 
    The only way to really figure out what is going on is to look at a running example with a C++ debugger.  I'm particularly curious about whether this problem happens in a specific browser/os combination (we may be working around a quirk of that platform), or if it's something that happens everywhere.
    The most effective way to proceed is going to be to file a bug with a simplified, executable example (source and compiled SWF, ideally) that demonstrates the problem.  This will help me route the bug to a developer and get you an answer in the shortest time possible. 
    You can file a bug here:
    http://bugbase.adobe.com/
    If you reply here with the bug number, I'll get it assigned to an engineer.
    Thanks!

  • Memory Allocation Problems

    My application seems to not free resources the way I would like it to. The main interface consumes somewhere around 40MB. The application has an option to export data to a few PDFs (via itext and JFreeChart). This is handled through a popup JFrame where the user can select options for export. During the export, memory usage spikes to near 105MB, which though concerning, isn't the main problem. Once the export JFrame has been disposed and control is returned the main window, memory usage stays at ~ 105MB and if you export again, the memory usage doesn't budge, leading me to believe that the Objects used during the export aren't being released. I know that memory management is temperamental in Java, but I can't figure out what's going on here.
    Here is an overview of what's happening:
    MainViewer -> SaveView -> ExportFileController:
    I am currently exporting two PDFs: One containing graphs created by JFreeChart and another containing a table created by itext. I've tested them independently and both seem to stay in memory even after I've called document.close() and SaveView.dispose().
    Here is how I'm writing my charts:
    public void writeCharts()
              Iterator chartIter = allCharts.iterator();
              try
                   System.out.println("Writing Charts: Total Number: " + allCharts.size());
                   String outputFile = outputDir.getPath()+"/curvefits.pdf";               
                   writer = PdfWriter.getInstance(document, new FileOutputStream(outputFile));
                   document.open();
                   while(chartIter.hasNext())               
                        numpages++;
                        JFreeChart currentChart = (JFreeChart)chartIter.next();
                        PdfContentByte cb = writer.getDirectContent();
                        PdfTemplate tp = cb.createTemplate(width, height);
                        Graphics2D g2d = tp.createGraphics(width, height, new DefaultFontMapper());
                        Rectangle2D r2d = new Rectangle2D.Double(0, 0, width, height);
                        System.out.println("Writting Chart: " + currentChart.getTitle().getText());          
                        currentChart.draw(g2d, r2d);
                        g2d.dispose();
                        cb.addTemplate(tp, 0, 0);
                        document.newPage();
                        writer.releaseTemplate(tp);  //I had heap errors before I added this
              catch(Exception e)
                   e.printStackTrace();
              document.close();
              writer.flush();
              writer.close();
              allCharts.clear();
              allCharts.trimToSize();          
              System.gc();    //I'm explicitly trying to free up the resources here
              System.runFinalization();
    }

    warnerja wrote:
    Hard to say.
    Once it loads classes, it won't give that memory back, but any memory used on the heap which is no longer needed may be reclaimed.
    Does it keep climbing on repeated exports, or does it basically peak on one export and remain at that usage level upon repeated exports?It peaks on one export and then remains the same on repeated exports (roughly ~105MB). What scares me is the my test set is relatively small (perhaps as small as 1%) of what this application could be used for. I can do some things to minimize memory usage (like writing one page at a time and then appending so I don't have to keep the whole output stream open) at the expense of speed, but some where there has to be a data structure containing all of the items to be written. If the JVM NEVER gives the memory back then this will pretty much cripple the user's system.

  • How to set view options for whole subdirectory tree

    In the "shw view options" menu of the Finder, i can set the "show icon preview" and the "icon size" for a single window.
    I wold like to apply these options to all directories in a given directory sub-tree (but not to all directories).
    Doing this manually would be really tedious, since there are a lot of directories in my subdirectory.
    Does anyone have an idea, how to do that more automatically?
    Best regards,
    Gabriel.

    Hello Justin
    I copied the sample report <b>SALV_DEMO_TREE_FUNCTIONS</b> (available on IDES ECC 5.0) and added the following coding to routine <i>set_columns_technical</i>:
    [code]&----
    *&      Form  set_columns_technical
          text
    FORM set_columns_technical.
      DATA: lr_columns TYPE REF TO cl_salv_columns,
            lr_column  TYPE REF TO cl_salv_column.
      lr_columns = gr_tree->get_columns( ).
      lr_columns->set_optimize( abap_true ).
      lr_columns->set_column_position( columnname = 'PRICE'
                                       position   = 1 ).
    change a column's alignment
      TRY.
          lr_column ?= lr_columns->get_column( 'CURRENCY' ).
          lr_column->set_alignment( if_salv_c_alignment=>right ).
    "$Comment: added coding
          DATA:
            ld_short    TYPE scrtext_s,
            ld_medium   TYPE scrtext_m,
            ld_long     TYPE scrtext_l.
          ld_short = 'Short'.
          lr_column->set_short_text( ld_short ).
          ld_medium = 'Medium Col Text'.
          lr_column->set_medium_text( ld_medium ).
          ld_long = 'Long Column Text'.
          lr_column->set_long_text( ld_long ).
    "$Comment: added coding
        CATCH cx_salv_not_found.                            "#EC NO_HANDLER
      ENDTRY.
    ...[/code]
    At least the new short text is displayed on the ALV tree. I assume that you have to be very careful and scrupulous in choosing the correct data types for the method calls.
    Regards
      Uwe

  • How to get the list of collaboration rooms for a particular user??

    Hello Experts,
    I have a requirement to get the list of all the collaboration rooms for a given user. I have started developing the Web Dynpro application by reusing necessary jars required to the web dynpro application.
    on some action I am trying to execute the below code:
    IRooms roomsAPI = (IRooms) PortalRuntime.getRuntimeResources().getService(IRooms.PORTAL_SERVICE_ID);
    which I have got from help.sap.com
    But, there's some exception being raised and not able to retrieve the list of rooms.
    Could somebody tell me what am I doing wrong.
    Regards,
    Raghu.

    Hi,
    the below is the code that I have used to get the list of rooms. But I'm getting into the NullPointerException .
    I have added the catch block for time being, but could you please let me know the reason for NullPointerException?
    public void onActiongetRooms(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActiongetRooms(ServerEvent)
         IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
         try{
              IService service = PortalRuntime.getRuntimeResources().getService(IRooms.KM_SERVICE_ID);
              IRooms roomsAPI = (IRooms) service;
              String roomID = "00bd6231-fdca-2c10-919c-97bf74054b7d";
              IRoom room = roomsAPI.getRoom(roomID);
              String roomname = room.getName();
              msgMgr.reportSuccess(roomname);
         } catch (NullPointerException e) {
              // TODO: handle exception
              msgMgr.reportException("Null Error:"+e.getMessage(), true);
         catch (RoomInstantiationException e) {
              // TODO: handle exception
              msgMgr.reportException("Error :"+e.getMessage(), true);
        //@@end
    Any thoughts are much appreciated.
    Thanks in advance.
    Raghu

  • Two  different ways of closing Input/Ouput streams

    OK, the Sun tutorial on Exceptions [http://java.sun.com/docs/books/tutorial/essential/exceptions/putItTogether.html] shows an example where a PrintWriter is closed within a finally block.
    Now, the tutorial on bute streams [http://java.sun.com/docs/books/tutorial/essential/io/bytestreams.html] shows another example which is different from the first in that the method which contains all the code has throws IOException in the method header, and no catch blocks.
    As an experiment, I tried altering the second example by removing the throws IOException from the method header, and adding a catch block within the method. The code is shown below. This code does not compile, due to unreported exception errors on the close statements in the finally block.
    My question is, why in the first example can we close a PrintWriter in the finally block without having the method throw IOException, but in the second example we cannot close FileInputStream in a finally block unless we throw the exception in the method header?
    ok, here is my modified code from the second example...
    import java.io.*;
    public class CopyBytes {
         public static void main( String[] args ) {
              FileInputStream inStream = null;
              FileOutputStream outStream = null;
              try {
                   inStream = new FileInputStream("xanadu.txt");
                   outStream = new FileOutputStream("outfile.txt");
                   int c;
                   while( (c = inStream.read()) != -1 ) {
                        outStream.write(c);
              catch( IOException e ) {}
              finally {
                   if( inStream != null ) inStream.close();
                   if( outStream != null ) outStream.close();
    }

    endasil wrote:
    Fguy wrote:
    My question is, why in the first example can we close a PrintWriter in the finally block without having the method throw IOException, but in the second example we cannot close FileInputStream in a finally block unless we throw the exception in the method header?
    Short answer?  Because FileOutputStream/FileInputStream.close are declared to throw an IOException.  PrintWriter.close() is not.
    ...Thanks, that helps. I just checked the API docs and of course they confirm what you say, So I can live with that for my current purposes.
    I did notice that PrintWriter is like a wrapper for FileWriter, and close() for the FIleWriter class is inherited from OutputStreamWriter, and that close() does throw IOException. So it seems logical that there would be an exception "behind the scenes" which needs to be reported, but I guess this is not the case. Anyways, I have a direction for further investigation. Thanks again.

  • SEVERE: SAAJ0009:  How do I stop stack trace being printed to standard out

    Anyone know why the following stack trace is printed when connection.call(message, endpoint); throws an exception? It happens when the server or web service is offline
    using jdb I can see that the next statement to execute is the return("FAIL .... but the stack trace is already printed by then. How do I tell it not to print the stack trace. I've tried adding a catch for java.io.IOException but the compiler says it's not thrown. Any ideas
    SOAPMessage response = null;
    try{
    response = connection.call(message, endpoint); <= blows up here "myClient.auth myClient.java:333)
    connection.close();
    catch (SOAPException ex){
    return("FAIL Error sending authentication soap message " + ex.getMessage());
    java.io.IOException
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:593)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:29)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPCon
    ection.java:151)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:12)
    at myClient.auth(myClient.java:333)
    at myClient.send(myClient.java:93)
    at myClient.main(myClient.java:550)
    Caused by: java.net.ProtocolException: Server redirected too many times (20)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:800)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:27)
    ... 6 more
    May 18, 2004 12:23:05 PM com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection post
    SEVERE: SAAJ0009: Message send failed
    java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send
    failed
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:12)
    at myClient.authenticate(myClient.java:333)
    at myClient.send(myClient.java:93)
    at myClient.main(myClient.java:550)
    Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:30)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConection.java:151)
    ... 5 more
    Caused by: java.io.IOException
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:593)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:29)
    ... 6 more
    Caused by: java.net.ProtocolException: Server redirected too many times (20)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:800)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
    at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:27)
    ... 6 more

    For anyone who's interested, apparently I'm not the only one with this problem, others have asked the developrs to remove printStackTrace() from the SAAJ code. For now we have to redirect standard error or ignore

  • The data from my web page insert in SQL table as question marks

    I use Farsi language in my web page for inserting customer data. The data that is inserted in webpage and submitted, showed as ???? in SQL table. A lot of developers say that I should use N' before the Unicode character, but I don't know how I can use it
    in my code. I attached the code. Can someone say me where I should insert the N in my code?
    protected void cmdInsert_Click(object sender, EventArgs e)
    //Checking the validation of required fields
    if (cboCustomerType.Text == "" || cboTitle.Text == "" || SearchableName.Text == "" ||
    FinalName.Text == "" || NationalID.Text == "" || BusinessID.Text == "" || MobilePhone.Text == "")
    lblStatus.Text = "لطفا فیلدهای اجباری را حتما پر کنید";
    return;
    //define ADO.NET objects.
    string insertSQL;
    insertSQL = "INSERT INTO Customers(";
    insertSQL += "CustomerType,CustomerTitle,CustomerFirstName,CustomerLastName,CompanyType,";
    insertSQL += "CompanyName,SearchableName,FinalName,NationalCode,BusinessID,City,Address,PostalCode,";
    insertSQL += "Zone,MobileNumber,WorkPhone1,WorkPhone2,HomePhone,FaxNumber,Email,Website,Note)";
    insertSQL += "VALUES('";
    insertSQL += cboCustomerType.Text + "','";
    insertSQL += cboTitle.Text + "','";
    insertSQL += CustomerFirstName.Text + "','";
    insertSQL += CustomerLastName.Text + "','";
    insertSQL += cboCompanyType.Text + "','";
    insertSQL += CompanyName.Text + "','";
    insertSQL += SearchableName.Text + "','";
    insertSQL += FinalName.Text + "','";
    insertSQL += NationalID.Text + "','";
    insertSQL += BusinessID.Text + "','";
    insertSQL += City.Text + "','";
    insertSQL += Address.Text + "','";
    insertSQL += PostalCode.Text + "','";
    insertSQL += Zone.Text + "','";
    insertSQL += MobilePhone.Text + "','";
    insertSQL += Phone1.Text + "','";
    insertSQL += Phone2.Text + "','";
    insertSQL += HomePhone.Text + "','";
    insertSQL += FaxNumber.Text + "','";
    insertSQL += Email.Text + "','";
    insertSQL += Website.Text + "','";
    insertSQL += Note.Text + "')";
    SqlConnection con = new SqlConnection(connectionString);
    SqlCommand cmd = new SqlCommand(insertSQL, con);
    //try to open the database and execute the insert
    int added = 0;
    try
    con.Open();
    added = cmd.ExecuteNonQuery();
    lblStatus.Text = added.ToString() + "اضافه شد";
    catch (Exception err)
    lblStatus.Text = "Error inserting record.";
    lblStatus.Text += err.Message;
    finally
    con.Close();
    //If the insert succeed, refresh the customer list.
    if (added > 0)
    FillCustomerList();
    Regards,

    Because you're composing the SQL statement with string concatenation, you would put the "N" before the single quote,
    VALUES(N'";
                insertSQL += cboCustomerType.Text + "',N'";
                insertSQL += cboTitle.Text + "',N'"; // ...etc
    However, composing SQL statements with string concatenation is not a suggested practice because it's open to SQL injection (see:
    https://technet.microsoft.com/en-us/library/ms161953(v=sql.105).aspx). A safer way to do this is to use command parameters to represent the values (see SqlCommand.Parameters
    property). If you use parameters, you can specify parameter data type as SqlDbType.NVarchar, which will ensure your text values are passed in as Unicode. Also ensure that the columns in question are defined in the database table definition as Unicode (NVARCHAR
    rather than VARCHAR).
    Hope this helps, Bob

  • [CS3][CS4][VB] XML, Markup - bug or next "cool" feature ?

    hi
    could anybody please check how it works in JS or AS - what do you get in XML structure - what is tagged - when you try to MarkUp character containing InLine graphic ? or Text object containing only one "character" - InLine graphics
    something like this:
    Set myPageItem = myText.PageItems.Item(a)
    Set myChar = myPageItem.Parent
    With myChart.AssociatedXMLElements.Item(1).Parent.XMLElements.Add("qqq")
         Call .Markup(myChar)
    End With
    robin
    www.adobescripts.co.uk

            Ok, I figured out the problem.  I had read that snippet before and tried it and it didn't work.  I then Dim'd artitem as a compoundpathitem instead of pathitem and it worked on the first iteration of the for each loop.   One the second trip through there was an invalid cast exception..but it had upsized the art!   So I just added try/catch to handle the error and it works!
    For future reference, anyone that reads this will need to add a reference to the CS4(or whichever version) type library COM object, change the hard coded file paths and it should convert from AI to SVG and Scale it up or down by replacing the 125,125 in the scale matrix by whatever percentage you'd like.   The Userinteractionlevel disables any warnings so that it runs automatic.
    Thanks again Carlos...while you didn't give me the exact code I needed, you pointed me at what I had previously dismissed due to a different error.
    -Mark
            Dim illusapp As New Illustrator.Application
            Dim illusdoc As Illustrator.Document
            Dim scalematrix As Illustrator.Matrix
            Dim artitem As Illustrator.CompoundPathItem
            Dim svgOpt = new illustrator.ExportOptionsSVG
            svgOpt.DTD = Illustrator.AiSVGDTDVersion.aiSVG1_0    
            illusapp.UserInteractionLevel = Illustrator.AiUserInteractionLevel.aiDontDisplayAlerts
                illusdoc = illusapp.Open("c:\test\test.ai")
                scalematrix = illusapp.GetScaleMatrix(125,125)
                Try
                    For Each artItem In illusapp.ActiveDocument.PageItems
                        artitem.Transform(scalematrix)
                    Next
                Catch
                End Try
                illusdoc.Export("C:\test\test.svg",Illustrator.AiExportType.aiSVG,svgopt)
                illusdoc.Close

  • Custom XSLT Functions Throw Exception

    Hi,
    I have following requirement-
    1. I have defined and configured some custom XSLT functions in Jdev and BPEL, which throw exception in case of an error.
    2. Now I want to catch that exception in my BPEL process
    3. In My BPEL process I have defined transformation step ( which is using those Custom XSLT functions) in a scope and added a catch branch to that
    4. But even XSLT java function throw an exception , it is not being catch by catch branch.
    Could you please help me regarding this and tell me any other way to catch an exception in BPEL process thrown by Custom XSLT function within transformation step?
    Thanks.

    Hi,
    Its the problem with the date. In the configuration file i used dateTime for java.util.Date, because of this i cant see "User Defined" option in Jdeveloper component pallete. I checked at XML data types i had seen dateTime for java.util.Date Class, but its not working.
    Do anyone created a custom xslt function which has date as parameter or return type?, If so wht they had used as data type for xml and java.
    Thanks,
    RR

  • Write some JAVA for me please, not working the way I wanted it too...

    Here's what I am getting when I go to run it:
    C:\Documents and Settings\Brad.HOME\Desktop\FINAL>java project1
    Usage: project1 [Array File Path]
    C:\Documents and Settings\Brad.HOME\Desktop\FINAL>
    What I need is for it to ask me to enter the location of the numbers file and then calculate the Max, Min, Mean, etc off of that file I enter in. Right now it just says:
    Usage: project1 [Array File Path]
    -------------------------------java below-------------------------------------------------
    import java.io.*;
    public class project1 {
    * Array File Path
    private String location;
    * set Location
    * @param location String
    public void setLocation(String location) {
    this.location = location;
    * Program initialization
    public project1() {
    int ar[] = new int[50];
    ReadFile(location, ar);
    sort(ar);
    System.out.println("Minimum= " + ar[0]);
    System.out.println("Maximum=" + ar[ar.length - 1]);
    System.out.println("Mean= " + mean(ar));
    System.out.println("Mode= " + modal(ar));
    System.out.println("Median= " + median(ar));
    System.out.println("Std Dev= " + stdDev(ar));
    * Main program
    * @param args String[]
    public static void main(String args[]) {
    if (args.length == 1) {
    new project1().setLocation(args[0]);
    else {
    System.out.println("Usage: project1 [Array File Path]");
    * Calculate the mean
    * @param ar int[]
    * @return double
    public double mean(int ar[]) {
    int sum = 0;
    for (int i = 0; i < ar.length; i++) {
    sum += ar;
    return (sum / ar.length);
    * Calculate the mode/modal
    * @param a int[]
    * @return int
    public int modal(int a[]) {
    int n;
    int freq = 0;
    int Mfreq = 0;
    int Mn = a[0];
    for (int i = 0; i < a.length; i++) {
    n = a[i];
    for (int j = 0; j < a.length; j++) {
         if (a[j] == n) {
         freq++;
    if (freq > Mfreq) {
         Mn = n;
    return Mn;
    * Calculate the median
    * @param a int[]
    * @return int
    public int median(int a[]) {
    if (a.length % 2 == 0) {
    int x = a[a.length / 2];
    int y = a[ (a.length + 2) / 2];
    return (x + y) / 2;
    else {
    return a[ (a.length + 1) / 2];
    * Calculate Standard Deviation
    * @param a int[]
    * @return double
    public double stdDev(int a[]) {
    int s2 = 0;
    int s = 0;
    for (int i = 0; i < a.length; i++) {
    s2 += (a[i] * a[i]);
    s += a[i];
    return Math.sqrt( (s2 - (s * 2) / a.length) / (a.length - 1));
    * Sort integer array
    * @param a int[]
    public void sort(int a[]) {
    int tmp;
    for (int i = 0; i < a.length; i++) {
    for (int j = 0; j < a.length; j++) {
         if (a[j] > a[j + 1]) {
         tmp = a[j];
         a[j] = a[j + 1];
         a[j + 1] = tmp;
    * Read integer array from specified file
    * @param filename String
    * @param ar int[]
    * @return int
    public int ReadFile(String filename, int ar[]) {
    File infile = new File(filename);
    int value, n = 0;
    try {
    BufferedReader reader = new BufferedReader(new FileReader(infile));
    String line = null;
    while ( (line = reader.readLine()) != null) {
         value = Integer.parseInt(line);
         ar[n++] = value;
    return n;
    catch (IOException e) {
    System.err.println("Problem reading input file!");
    System.exit(1);
    return n;

    Please use code tags when posting code. There is a
    button labeled code right above the text box
    where you type in your post.
    Your first problem occurs herepublic static
    void main(String args[]) {
    if (args.length == 1) {
    new project1().setLocation(args[0]);
    else {
    System.out.println("Usage: project1 [Array File
    y File Path]");
    }This code executes when you first launch the
    application. It checks to see if there were any
    arguments in the comman line. If the number of
    arguments is not equal to 1, then you get the Usage
    output. You must launch the program with one
    argument.I tried java project1 C:\\Temp.txt, but it still ends up with a NullException handler. I edited the code and added a catch for it so it returns File doesn't exist, but I swear it does and I'm pointing to it correctly...

  • "Do not display" Problem

    hi friends,
    at first, I use a Player to play a DataSource I captured from my webcam, that's ok.
    second, I use a Processor to transcode the cloned DataSource I captured from my webcam, my video disappeared.
    what's the matter? Thx.

    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.io.IOException;
    import javax.media.CannotRealizeException;
    import javax.media.CaptureDeviceInfo;
    import javax.media.CaptureDeviceManager;
    import javax.media.Format;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoDataSourceException;
    import javax.media.NoPlayerException;
    import javax.media.NoProcessorException;
    import javax.media.Player;
    import javax.media.Processor;
    import javax.media.control.TrackControl;
    import javax.media.format.VideoFormat;
    import javax.media.protocol.DataSource;
    import javax.swing.JFrame;
    public class CaptureTranscode {
         private String videoDevice = "vfw:Microsoft WDM Image Capture (Win32):0";
         private String audioDevice = "DirectSoundCapture";
         private CaptureDeviceInfo cdi1 = CaptureDeviceManager
                   .getDevice(videoDevice);
         private CaptureDeviceInfo cdi2 = CaptureDeviceManager
                   .getDevice(audioDevice);
         private DataSource ds1 = null;
         private DataSource ds2 = null;
         private DataSource dsVideo = null;
         private DataSource dsAudio = null;
         private Player player1 = null;
         private Player player2 = null;
         private Processor processor = null;
         private JFrame frame;
         private Container contentPane;
         public CaptureSend() {
              // iniGUI
              frame = new JFrame("");
              frame.setBounds(120, 90, 800, 600);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              contentPane = frame.getContentPane();
              frame.setVisible(true);
              System.out.println("frame initialed!");
         public void play() {
              MediaLocator ml1 = cdi1.getLocator();
              MediaLocator ml2 = cdi2.getLocator();
              System.out.println("MedaiLocator created!");
              try {
                   this.ds1 = Manager.createDataSource(ml1);
                   System.out.println("ds1 created!");
                   this.dsVideo = Manager.createCloneableDataSource(ds1);               
                   System.out.println("dsAudio cloned!");               
                   this.player1 = Manager.createRealizedPlayer(ds1);
                   System.out.println("player1 created!");
                   player1.start();
                   System.out.println("player1 started!");
                   this.ds2 = Manager.createDataSource(ml2);
                   System.out.println("ds2 created!");               
                   this.dsAudio = Manager.createCloneableDataSource(ds2);
                   System.out.println("dsAudio cloned!");
                   this.player2 = Manager.createRealizedPlayer(ds2);
                   System.out.println("player2 created!");
                   player2.start();
                   System.out.println("player2 started!");
                   Component c1 = player1.getVisualComponent();
                   if (c1 != null) {
                        contentPane.add(c1);
                        c1.setBounds(40, 30, 400, 300);
                        System.out.println("visualComponent added!");
                   Component c2 = player1.getControlPanelComponent();
                   if (c2 != null) {
                        contentPane.add(c2);
                        c2.setBounds(40, 330, 400, 20);
                        System.out.println("controlPanelComponent added!");
              } catch (NoDataSourceException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              } catch (NoPlayerException e) {
                   e.printStackTrace();
              } catch (CannotRealizeException e) {
                   e.printStackTrace();
         public void transCode() {
              try {
                   this.processor = Manager.createProcessor(dsVideo);
              } catch (NoProcessorException e) {
                   System.out.println(e);
                   e.printStackTrace();
              } catch (IOException e) {
                   System.out.println(e);
                   e.printStackTrace();
              System.out.println("processor created!");
              this.processor.configure();
              System.out.println();
              this.processor.deallocate();
              TrackControl[] tracks = processor.getTrackControls();
              System.out.println("TrackControl[] tracks created!");
              for (int i = 0; i < tracks.length; i++) {
                   System.out.println("tracks[" + i + "]: " + tracks.toString());
                   Format[] supported = tracks[i].getSupportedFormats();
                   System.out.println("tracks[" + i + "] supported Formats: "
                             + supported);
                   Format chosen = this.checkForVideoSizes(tracks[i].getFormat(),
                             supported[0]);
                   System.out.println("chosen: " + chosen);
                   tracks[i].setFormat(chosen);
                   System.out.println("tracks[" + i + "] setted!");
         public Format checkForVideoSizes(Format original, Format supported) {
              int width, height;
              Dimension size = ((VideoFormat) original).getSize();
              Format jpegFmt = new Format(VideoFormat.JPEG_RTP);
              Format h263Fmt = new Format(VideoFormat.H263_RTP);
              if (supported.matches(jpegFmt)) {
                   width = (size.width % 8 == 0 ? size.width
                             : (int) (size.width / 8) * 8);
                   height = (size.height % 8 == 0 ? size.height
                             : (int) (size.height / 8) * 8);
              } else if (supported.matches(h263Fmt)) {
                   if (size.width < 128) {
                        width = 128;
                        height = 96;
                   } else if (size.width < 176) {
                        width = 176;
                        height = 144;
                   } else {
                        width = 352;
                        height = 288;
              } else {               
                   return supported;
              return (new VideoFormat(null, new Dimension(width, height),
                        Format.NOT_SPECIFIED, null, Format.NOT_SPECIFIED)).intersects
              (supported);
         public void transmitte() {
         public static void main(String[] args) {
              CaptureSend cs = new CaptureSend();
              cs.play();
              cs.transCode();
    oky, and now what does your crystal show?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ** Is it possible to skip messages with error in BPM and continue next msg

    Hi Friends,
    I am doing File to File BPM scenario. My Source XML is like as below.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Employee xmlns:ns0="http://www.test.com/XITEST/FileToFile/BPM">
       <Details>
          <EmpCode>10010</EmpCode>
          <EmpName>Jeg</EmpName>
          <***>M</***>
          <BasicPay>5000</BasicPay>
       </Details>
       <Details>
          <EmpCode>10011</EmpCode>
          <EmpName>Praksh</EmpName>
          <***>M</***>
          <BasicPay>4500</BasicPay>
       </Details>
       <Details>
          <EmpCode>10012</EmpCode>
          <EmpName>Nithya</EmpName>
          <***>F</***>
          <BasicPay>4300</BasicPay>
       </Details>
       <Details>
          <EmpCode>10013</EmpCode>
          <EmpName>Sunil</EmpName>
          <***>F</***>
          <BasicPay>4800</BasicPay>
       </Details>
       <Details>
          <EmpCode>10014</EmpCode>
          <EmpName>Abdul</EmpName>
          <***>M</***>
          <BasicPay>4750</BasicPay>
       </Details>
       <Details>
          <EmpCode>10015</EmpCode>
          <EmpName>Sathya</EmpName>
          <***>F</***>
          <BasicPay>4250</BasicPay>
       </Details>
       <Details>
          <EmpCode>10016</EmpCode>
          <EmpName>Rams</EmpName>
          <***>M</***>
          <BasicPay>8000</BasicPay>
       </Details>
    </ns0:Employee>
    If you look at the above message, the 3rd & 6th employee are female. In the BPM design,  we use
    a) 'Transformation' step, to split the messages (1:n).
    b) Block Step (Mode : For Each) to process one by one message
    c) in the Container Step, thru XPath expression we created one variable and assign '***' to that variable
    d) In the Switch step we check whether variable is 'F' (Female). If it is there we insert control step to throw exception. (But, exception Branch is not added to catch the exception. The reason is that to restart the BPM)
    e) If the *** is 'M' we insert Send Step to send the employee to the output file.
    Note that if we insert exception handler branch, the BPM will tell this is completed. So, we are not able to restart those records (*** = 'F') after correct ***. Once the BPM is completed, that work item will not come in tcode 'Continue Process Following Error' option in tcode SXMB_MONI_BPE
    Requirement is whenever the BPM encounters *** = 'F', it  should throw an error and the same time BPM should not stop and continue with the next records.
    Friends, we tried all the ways thru 'Queue Assignment' property of the BPM and made settings thru tcode SWF_INB_CONF. But, we are not able to achive this requirmenent.
    'Restart possibilitye of the BPM for the error record and the same time should process the remaining correct records'. 
    Any idea friends, to solve this issue.
    Kindly Reply,
    Jeg P.

    Use one more Receiver Abstract interface for this and do the message and interface mapping .
    Collecting :
    If ur record is female (u r checking this in swich step) ,  pass tht record to intreface mapping (use one branch here to collect the message).
    Else you send that message to the target(else branch)
    After that use one block for collecting messages and throw the exception for each record......

Maybe you are looking for

  • FC Studio 2 compatible with Snow Leopard?

    H there, I am in the process of buying a new computer, upgrading from a G4. I use Final Cot Studio 2 (with FCP6) and wonder, if this is compatible with snow leopard. I tired to find an answer on this, but a lot of people seemed to have problems when

  • Error log on jms adapter

    Hi, I have an XI 3.0 connected to an MQ via jms adapter in an Adapter Engine I have this log when sending a message: 15:39:18 (3130): JMS message ID:414d51204d51584944573120202020207a07c64442701b00 sent successfully 15:39:18 (3140): Session commited

  • HP5850 & Wireless EEIIKKK!!!​!!!!!!!!! Need help bad

    To all, bear with my little to no as I aveing a challenge with my Deskjet 5850 wireless and a new installation of the software. This is from the full ge downloaded from this site (5800_enu_win2k_xp.exe ). When I make the choice of the type of network

  • Passing Parameter to Process flow

    Hello, I have a mapping that has input parameter. Now i create a process flow and use this mapping, each time i run the process flow it prompt for the parameter Is there a way to pass the parameter to the process flow directly withput prompting ? Tha

  • Delete a published book

    Hi, Experts, We have SAP BPC 10 NW. After we published a book and saw it at web, we tried to delete it. The first one, the deletion was successful, but at the second one the deletion was failed. The message said that "impossible to find doc/path". Wo