Private Constructs in Packages

Can't I refer a private function in a SQL statement which is inside a Public Procedure. Both Private Function and Public Procedure are in the same Package.
I just recreated the scenario using a simple procedure and a function inside a Package. Please take a look at the errors which I got when trying to create the package body.
CREATE OR REPLACE PACKAGE Pac_1 AS
PROCEDURE Pub_Pro;
END pac_1;
CREATE OR REPLACE PACKAGE BODY Pac_1 AS
FUNCTION Pri_Fun RETURN VARCHAR2 AS
BEGIN
RETURN 'Vamsi';
END Pri_Fun;
PROCEDURE Pub_Pro AS
BEGIN
INSERT INTO Test VALUES (Pri_Fun);
END Pub_Pro;
END Pac_1;
ERROR I GOT
Line Pos Text
116 Create package body, executed in 0.107 sec.
130 26 PLS-00231: function 'PRI_FUN' may not be used in SQL
130 26 PL/SQL: ORA-00904: "PRI_FUN": invalid identifier
130 1 PL/SQL: SQL Statement ignored
Total execution time 0.122 sec.
* Same execution works if the make the Function I used as a Public Function by also declaring it in the Package Specification AND also works if I use the function in a PL/SQL expression and not in a SQL statement.*
Thanks in Advance.
Vamsi

This is absolutely natural behaviour.
Look at in what Oracle translates your call of the SQL statement from PL/SQL then the function
is specified as public:
SQL> CREATE OR REPLACE PACKAGE Pac_1 AS
  2 
  3   PROCEDURE Pub_Pro;
  4   FUNCTION Pri_Fun RETURN VARCHAR2;
  5 
  6  END pac_1;
  7  /
Package created.
SQL> CREATE OR REPLACE PACKAGE BODY Pac_1 AS
  2 
  3 
  4   FUNCTION Pri_Fun RETURN VARCHAR2 AS
  5 
  6    BEGIN
  7 
  8    RETURN 'Vamsi';
  9 
10   END Pri_Fun;
11 
12 
13   PROCEDURE Pub_Pro AS
14 
15   BEGIN
16 
17    INSERT INTO Test easy_to_find VALUES (Pri_Fun);
18 
19   END Pub_Pro;
20 
21  END Pac_1;
22  /
Package body created.
SQL> exec pac_1.pub_pro
PL/SQL procedure successfully completed.
SQL> select sql_text from v$sqlarea where sql_text like '%EASY_TO_FIND%';
SQL_TEXT
INSERT INTO TEST EASY_TO_FIND VALUES (PAC_1.PRI_FUN)The last row is the real form of INSERT operator. It shows that Oracle resolves this reference by
trying to use the public function from the package specification.
If you want to use private function in SQL you have to use local variables:
SQL> CREATE OR REPLACE PACKAGE Pac_1 AS
  2 
  3   PROCEDURE Pub_Pro;
  4 
  5  END pac_1;
  6  /
Package created.
SQL> CREATE OR REPLACE PACKAGE BODY Pac_1 AS
  2 
  3 
  4   FUNCTION Pri_Fun RETURN VARCHAR2 AS
  5    BEGIN
  6    RETURN 'Vamsi';
  7   END Pri_Fun;
  8 
  9 
10   PROCEDURE Pub_Pro AS
11    x varchar2(10);
12   BEGIN
13    x := pri_fun;
14    INSERT INTO Test easy_to_find VALUES (x);
15   END Pub_Pro;
16 
17  END Pac_1;
18  /
Package body created.And meanwhile it would be better to use local variable form even if your function is public ;)
Rgds.

Similar Messages

  • Declaring private cursors in package header

    Hi.
    Im tunning a PLSQL package , and im having the following doubt.
    This package has alot of cursors declared in the package header, but the cursors are private. (called within the package only)
    Could the public functions from the package have a loss of performance by using those cursors? (should the private cursors be declared within the functions or at least inside package body?)
    Im kind of new with plsql, so please bare with me :) .
    Cheers.

    there's no performance loss.
    however, unless the cursors are to be accessible outside the package (which is what happens when they are declared in the spec (not header)), then there's no benefit either. if they are truely meant to be private, then you can remove them from the spec. and if you're wrong, and they are called from elsewhere, you'll find out soon enough.

  • Public n private function in pl/sql

    hello guyz,
    i wanna create a package which contains public function and private function.
    the package should contain finding highest number as one private function and lowest number as the other private function. Also i need a public function which uses the above private functions to display the result.
    Your help is appreciated.

    Here is a sample script from where you should take the concept and implement it in your case --
    satyaki>create or replace package pack_vakel
      2  is
      3    procedure aa(a in number,b out varchar2);
      4  end;
      5  /
    Package created.
    satyaki>
    satyaki>create or replace package body pack_vakel
      2  is
      3    procedure test_a(x in varchar2,y out varchar2)
      4    is
      5      str varchar2(300);
      6    begin
      7      str := 'Local ->'||x;
      8      y := str;
      9    end;
    10   
    11    procedure aa(a in number,b out varchar2)
    12    is
    13      cursor c1(eno in number)
    14      is
    15        select ename
    16        from emp
    17        where empno = eno;
    18       
    19      r1 c1%rowtype;
    20     
    21      str2  varchar2(300);
    22      str3  varchar2(300);
    23    begin
    24      open c1(a);
    25      loop
    26        fetch c1 into r1;
    27        exit when c1%notfound;
    28        str2 := r1.ename; 
    29      end loop;
    30      close c1;
    31     
    32      test_a(str2,str3);
    33      b := str3;
    34    exception
    35      when others then
    36        b := sqlerrm;
    37    end;
    38  end;
    39  /
    Package body created.
    satyaki>
    satyaki>
    satyaki>set serveroutput on
    satyaki>
    satyaki>
    satyaki>declare
      2    u   number(10);
      3    v   varchar2(300);
      4  begin
      5    u:= 7369;
      6    pack_vakel.aa(u,v);
      7    dbms_output.put_line(v);
      8  end;
      9  /
    Local ->SMITH
    PL/SQL procedure successfully completed.
    satyaki>
    satyaki>declare
      2    p   varchar2(300);
      3    q   varchar2(300);
      4  begin
      5    p:= 'SMITH';
      6    pack_vakel.test_a(p,q);
      7    dbms_output.put_line(q);
      8  exception
      9   when others then
    10    dbms_output.put_line(sqlerrm);
    11  end;
    12  /
      pack_vakel.test_a(p,q);
    ERROR at line 6:
    ORA-06550: line 6, column 14:
    PLS-00302: component 'TEST_A' must be declared
    ORA-06550: line 6, column 3:
    PL/SQL: Statement ignoredRegards.
    Satyaki De.

  • What is the difference between the function declared in the package and pac

    What is the difference between defining a function in the package and package body ?
    Edited by: user10641405 on Nov 19, 2009 1:29 PM

    If you describe a package, you will only see the functions declared in the spec.
    If you only declare them in the body then they are not available to other packages (they are private to the package, not public)

  • Invalid package status

    Hi all,
    I have following problem:
    To speed up some checking I created a cache inside package body. But everytime portal uses different session to serve show request I get ORA-04068 error.
    It's saying something about invalid state. I thought that
    private data in package body remain same tgrough a session
    and that each session has it's own copy. But it looks like some session change state of the package and others receive mentioned error. When I try it second time within same session it's ok.
    I tried to find some information in PL/SQL Guide, but there is nothing about this error.
    Can you help me with this problem?
    Is it my fault or is this "normal" behaviour?
    Thanks
    David

    Hi David,
    YES it's your fault. Answer is hidden inside your question. Portal is using different sessions to server your requests. After you made some change and recompiled the package . Most of the sessions had old information and thus rised the error message. So be patient and try all sessions to get uptodate information.
    Sorry for wasting your time.
    David

  • Accessing a packaged variable through db link

    How do I access a packaged variable remotely? (Syntax)

    You cannot do that:
    SQL> conn xx/xx@xx
    Connected.
    SQL> create package p is
      2   a number;
      3  end;
      4  /
    Package created.
    SQL> conn yy/yy@yy
    Connected.
    SQL> desc p@yy
    SQL> set serveroutput on
    SQL> create synonym p1 for p@xx;
    Synonym created.
    SQL> desc p1;
    SQL> begin
      2    p1.a := 1;
      3    dbms_output.put_line(p.a);
      4  end;
      5  /
      p1.a := 1;
    ERROR at line 2:
    ORA-06550: line 2, column 6:
    PLS-00512: Implementation Restriction: 'P1.A': Cannot directly access remote package variable or cursor
    ORA-06550: line 2, column 3:
    PL/SQL: Statement ignoredInstead you should access these variables via functions and/or procedures. In following example I've created the private variable in package p but this doesn't matter whether it is private or public.
    SQL> conn xx/xx@xx
    SQL> create or replace package p is
    2 procedure set_a (v in number);
    3 function get_a return number;
    4 end;
    5 /
    Package created.
    SQL> ed
    Wrote file afiedt.buf
    1 create or replace package body p is
    2 a number;
    3 procedure set_a (v in number) is
    4 begin
    5 a := v;
    6 end;
    7 function get_a return number is
    8 begin
    9 return a;
    10 end;
    11* end;
    SQL> /
    Package body created.
    SQL> conn yy/yy@yy
    Connected.
    SQL> set serveroutput on
    SQL> desc p1
    FUNCTION GET_A RETURNS NUMBER
    PROCEDURE SET_A
    Argument Name Type In/Out Default?
    V NUMBER IN
    SQL> ed
    Wrote file afiedt.buf
    1 begin
    2 p1.set_a(1);
    3 dbms_output.put_line(p1.get_a);
    4* end;
    SQL> /
    1
    PL/SQL procedure successfully completed.
    Gints Plivna
    http://www.gplivna.eu

  • Jsp name clashes with package of same name (WL5.1)

              I have the following directory structure, well not really, but anyway...
              foo.jsp
              foo/bar.jsp
              The compilation of foo.jsp will fail stating that "jsp_servlet/_foo clashes with
              package of same name".
              The problem is that you can't have a jsp and directory of the same name. Actually,
              to be specific, you can't only if that directory contains another jsp, which in
              my case it does.
              What can I do so that weblogic will allow me to have a directory and jsp with
              the same name?
              thanks,
              -Steve
              

              Well, adding a prefix like dir to get dir_foo only works if you
              don't have a class called dir_foo, right?
              I'm sure you can come up with other mechanims for munging names
              and I'm also sure that I can come up with examples where they
              don't work.
              Mike
              "steve" <[email protected]> wrote:
              >
              >I'd like to say no, but unfortunately that's not really an
              >option. It should be possible to drop in a jsp file
              >under my document root anywhere that I might have an html file.
              >
              >I agree java limits you from having a class and package of the
              >same name. But weblogic constructs the package names, so it can ensure
              >a conflict
              >does not happen.
              >
              >For instance, the "packagePrefix" JSPServlet initialization
              >argument that defaults to "jsp_servlet" avoids package
              >conflicts. Similarly, I'm suggesting a "directoryPrefix"
              >argument that would avoid the conflict that I'm running up
              >against.
              >
              >Given the same boring example:
              >foo.jsp
              >foo/bar.jsp
              >
              >and using a directoryPrefix of "_dir" it would be mapped to
              >
              >jsp_servlet/_foo.class
              >jsp_servlet/_dir_foo/bar.class
              >
              >Any thoughts?
              >
              >"Mike Reiche" <[email protected]> wrote:
              >>
              >>I believe that is a limitation of Java, not Weblogic.
              >>
              >>Just say no.
              >>
              >>Mike
              >>
              >>"Steve" <[email protected]> wrote:
              >>>
              >>>I have the following directory structure, well not really, but anyway...
              >>>foo.jsp
              >>>foo/bar.jsp
              >>>
              >>>The compilation of foo.jsp will fail stating that "jsp_servlet/_foo
              >>clashes
              >>>with
              >>>package of same name".
              >>>
              >>>The problem is that you can't have a jsp and directory of the same
              >name.
              >>>Actually,
              >>>to be specific, you can't only if that directory contains another jsp,
              >>>which in
              >>>my case it does.
              >>>
              >>>What can I do so that weblogic will allow me to have a directory and
              >>>jsp with
              >>>the same name?
              >>>
              >>>thanks,
              >>>-Steve
              >>
              >
              

  • Differences between Package & procedure/function

    hi everybody,
    can anyone tell me why we need to go for functions eventhough we are having procedures and why we need to go for packages eventhough we are having procedures&functions
    Best Regards,
    bobby

    Hi,
    We have to go for functions though we have procedures, because in cases we have to return the values to a select statement.
    ex: select abc from dual;
    where abc is a function which will return a value to the select statement on computing the result.
    And also functions must and should return a value.
    We use packages though we have both procedures and functions
    1) Overloading : Use the same subprogram name for multiple times by changing the parameters
    2) Security : We can declare any of the subprograms as private with in package. so that the subprogram can't accessed outside of this package. And the functions and procedures with in packages are more secured than outside ones because they have to call by package name.
    ex: there a procedure abc with in xyz package
    you have call it by xyz.abc
    3) Reduce Network traffic : when you call procedure/function with in a package entire body will store in RAM. so further if u want use other subprograms with in the package it will take directly from RAM, no need to go to the database again.
    4) Ease of maintainable : We can easily maintain.

  • Pre/post processing

    Hello group!
    Configuration:
    Oracle 8.1.7
    XDK 9.0.0.0.0(beta)
    We use XSQL Servlet scripts (great framework!). We tried to provide single entry point into our webapp. We want to replace XSQLServlet class, and gain control of our servlet environment (transactions, thread synchronization, logs...).
    Problem is, if we replace XSQLServlet class with our own class (which extends HttpServlet), we can't use XSQLPageProcesor directly because it is declared private for XSQLServlet package.
    So, we try to use XSQLRequest class and construct an instance with XSQLServletPageRequest as parameter and then call XSQLRequest.process().
    It works ,but ...
    When we attach object with setRequestObject (), requestProcessed is never called.
    Why? We mist something?
    If we use XSQLRequest (URL url), must we handle sessions, request parameters, cookies ...?
    Where is the best place to put pre/post processing of request?
    Thanks in advance
    Tomi
    null

    We found just XSQLPageRequest.setRequestObject(), that we already try to use (first post in thread).
    We associate *.xsql with our HttpServlet because we want to transparently add controller object(s), and we want to turn this feature off in servlet engine config whenever we want. If we forward it (getServletContext().getRequestDispatcher().forward()), with same name and extension ...
    Some code:
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    XSQLServletPageRequest req = new XSQLServletPageRequest(request, response, myContext);
    //TransactionController implements the XSQLRequestObjectListener
    req.setRequestObject("transaction",new TransactionController(req));
    XSQLRequest xsqlrequest = new XSQLRequest(request.getRequestURI(), req);
    try
    xsqlrequest.process(response.getOutputStream() ,new PrintWriter(System.err));
    catch(Exception ex)
    ex.printStackTrace();
    return;
    }When we call XSQLRequest.process, servlet response just fine (except we lost default encoding windows-1250?).
    TransactionController is properly attached, but requestProcessed is never called.
    We found why. Maybe?
    XSQLRequest.process call createNestedRequest from XSQLServletPageRequest, and then setIncludingRequest.
    This seems like little overhead :)
    We just want to keep our XSQL Scripts clean from including controllers via custom actions in every page.
    Can we do that?
    Anybody tried something similar?
    Thanks for your time
    Tomi
    null

  • Abstract class & final class

    Which is more correct... Or which is the more preferred way.
    abstract class A
      final method1(){}
      final method2(){}
      final method30(){}
    }or
    final class A
      private A(){}
      method1(){}
      method2(){}
      method3(){}
    }My understanding is that both classes cannot be instantiated. The first one requires writing 'final' for EACH method. The second one involves writing a private constructor.

    It depends on what you are trying to do. If you are trying to make a class that can be sub-classed but has some methods that cannot be overriden, then "abstract class A" with final methods is the way to go. If you want a class that cannot be sub-classed or instantiated then "final class A" with private constructor is the way to go.
    classes cannot be instantiatedOnly true for "final class A" because you made the only constructor private. Not true for the abstract one.// you forgot return values for the methods
    abstract class A
      final static /*void*/ method1(){}  // package private
      final static /*void*/ method2(){}  // package private
      final static /*void*/ method30(){} // package private
    // this would work
    A a = new A(){};
    // if I am in the same package as A, then this would work
    a.method1();
    // or this
    public class B extends A
      public B(String whatever)
        // Although, I cannot override the super methods
        // becuase they are all declared as final
        // I can only invoke them if I am in the same package.  You
        // declared them as package private instead of class "private"
    }Using final as a class modifier disables the ability to sub-class it but does not disable the ability to create an object of that class. You must make a private constructer. If the only constructor is "private" then you can't subclass or instantiate, so making the class final is uneeded.

  • How to improve the speed of creating multiple strings from a char[]?

    Hi,
    I have a char[] and I want to create multiple Strings from the contents of this char[] at various offsets and of various lengths, without having to reallocate memory (my char[] is several tens of megabytes large). And the following function (from java/lang/String.java) would be perfect apart from the fact that it was designed so that only package-private classes may benefit from the speed improvements it offers:
        // Package private constructor which shares value array for speed.
        String(int offset, int count, char value[]) {
         this.value = value;
         this.offset = offset;
         this.count = count;
        }My first thought was to override the String class. But java.lang.String is final, so no good there. Plus it was a really bad idea to start with.
    My second thought was to make a java.lang.FastString which would then be package private, and could access the string's constructor, create a new string and then return it (thought I was real clever here) but no, apparently you cannot create a class within the package java.lang. Some sort of security issue.
    I am just wondering first if there is an easy way of forcing the compiler to obey me, or forcing it to allow me to access a package private constructer from outside the package. Either that, or some sort of security overrider, somehow.

    My laptop can create and garbage collect 10,000,000 Strings per second from char[] "hello world". That creates about 200 MB of strings per second (char = 2B). Test program below.
    A char[] "tens of megabytes large" shouldn't take too large a fraction of a second to convert to a bunch of Strings. Except, say, if the computer is memory-starved and swapping to disk. What kind of times do you get? Is it at all possible that there is something else slowing things down?
    using (literally) millions of charAt()'s would be
    suicide (code-wise) for me and my program."java -server" gives me 600,000,000 charAt()'s per second (actually more, but I put in some addition to prevent Hotspot from optimizing everything away). Test program below. A million calls would be 1.7 milliseconds. Using char[n] instead of charAt(n) is faster by a factor of less than 2. Are you sure millions of charAt()'s is a huge problem?
    public class t1
        public static void main(String args[])
         char hello[] = "hello world".toCharArray();
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 1000 * 1000; m++) {
              String s1 = new String(hello);
              String s2 = new String(hello);
              String s3 = new String(hello);
              String s4 = new String(hello);
              String s5 = new String(hello);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    public class t2
        static int global;
        public static void main(String args[])
         String hello = "hello world";
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 10 * 1000 * 1000; m++) {
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    }

  • Error in initializing a class of IPC 3.0 application in WAS 6.4

    Hello,
         When i trying to run IPC 3.0 application in WAS 6.4. I am getting an error as
    #1.5#005056A244130043000000020000126800042596C6349F2A#1167229407602#/System/Server/WebRequests#sap.com/ipc_cesar#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#Guest#2####d19eb52095b511dba9f9005056a24413#SAPEngine_Application_Thread[impl:3]_34##0#0#Warning#1#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#Plain###Processing an http request to servlet [jsp] finished with error.The error is: Util is not yet initialized. No valid handle available. Invoke Util.initialize() method first.#
    It Looks like the UTIL Initilization is not happening..... as the error says.
    Please let me know Why Util is not getting initialized. Will this be because of Application not deployed properly or some other settings should be done for the same.
    I have made entries in init-config.xml also . I have given the Information for the same below,
    This Util is Initialized in UtilInitializer.java, I.e
         public static final String PROPERTIES_FILE = "PropertiesFile";
         public void initialize(InitializationEnvironment env, Properties props) {
              Util.initialize(props.getProperty(PROPERTIES_FILE));
    This UtilInitializer.java program is called in init-Config.xml, which should be called when starting the application.The content is,
    <initializations>
         <initialization className="com.sapmarkets.isa.core.logging.LogConfigurator">
              <!--       <param name="type"         value="log4j" />
           <param name="version"      value="1.04" />
           <param name="config-file"  value="/WEB-INF/cfg/log-config.xml" />-->
              <!-- this entry enables the SAP Logging API -->
              <param name="type" value="sapmarkets"/>
              <param name="config-file" value="/WEB-INF/cfg/log-config.properties"/>
         </initialization>
        <initialization className="com.sapmarkets.isa.core.businessobject.management.MetaBOMConfigReader" >
            <param name="config-file" value="/WEB-INF/cfg/bom-config.xml" />
        </initialization>
        <initialization className="com.sapmarkets.isa.ipc.ui.jsp.container.ConfigContainer">
        </initialization>
    <!-- [ES] added to initialize the ConfigHelper log -->
        <initialization className="com.dcx.cesar.ipc.c2.init.UtilInitializer" >
            <param name="PropertiesFile"
                value="./services/servlet_jsp/work/jspTemp/ipc_cesar/root/WEB-INF/classes/C2Interface.properties" />
        </initialization>
    </initializations>
    Please let me know why am i getting this error and what can be done for solving this.
    Regards,
    -Shabir.

    From the error message, it sounds like you need to define the actionPerformed(ActionEvent) required of implementing ActionListener as exactly
    public void actionPerformed(ActionEvent e) {
        // whatever
    }and you tried to give it non-public access, either private, protected, or package-private (default) access. Once you change it back to being public, your code should compile again.
    In general, if you override a method, you must give it the same or greater accessibility as it had in the parent class. A method that is public has the greatest accessibility, followed by one that is protected, then one that is package-private (default), and finally one that is private.
    Shaun

  • Mapping issue in QA

    *Hai Experts!*
    *I am facing an issue in Quality server. The scenario is SOAP to JDBC. Which is working fine in Development server. But in QA the mapping is not happening and the Following error is displaying in the Trace view.*
    *Can any one help me in solve this issue.*
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Message Split According to Receiver List --> <SAP:Trace xmlns:SAP="http://sap.com/xi/XI/Message/30"><Trace level="1" type="T">CL_XMS_MAIN-&gt;DETERMINE_EXT_PID: CENTRAL</Trace>
    <Trace level="1" type="T">Party normalization: sender </Trace>
    <Trace level="1" type="T">Sender scheme external = XIParty</Trace>
    <Trace level="1" type="T">Sender agency external = http://sap.com/xi/XI</Trace>
    <Trace level="1" type="T">Sender party external = </Trace>
    <Trace level="1" type="T">Sender party normalized = </Trace>
    <Trace level="1" type="B" name="CL_XMS_HTTP_HANDLER-HANDLE_REQUEST"></Trace><!-- ************************************ -->
    <Trace level="1" type="T">XMB was called with URL /sap/xi/engine?type=entry</Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-ENTER_XMS">
    <Trace level="1" type="T">CL_XMS_MAIN-&gt;DETERMINE_EXT_PID: CENTRAL</Trace>
    <Trace level="1" type="T">CL_XMS_MAIN-&gt;DETERMINE_INT_PID: SAP_CENTRAL</Trace>
    <Trace level="1" type="B" name="CL_XMS_TROUBLESHOOT-ENTER_PLSRV">
    </Trace>
    <Trace level="1" type="T">system-ID = OXQ</Trace>
    <Trace level="1" type="T">client = 300</Trace>
    <Trace level="1" type="T">language = E</Trace>
    <Trace level="1" type="T">user = PIAFUSER</Trace>
    <Trace level="1" type="Timestamp">2011-08-09T05:06:42Z CET  </Trace>
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_UC_EXECUTE"></Trace><!-- ************************************ -->
    <Trace level="1" type="T">Message-GUID = 5EE4A690C24511E08056E41F1320CC6A</Trace>
    <Trace level="1" type="T">PLNAME = CENTRAL</Trace>
    <Trace level="1" type="T">QOS = EO</Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_ASYNC">
    <Trace level="1" type="T">Queue name : XBTI0007</Trace>
    <Trace level="1" type="T">Generated prefixed queue name = </Trace>
    <Trace level="1" type="T">Schedule message in qRFC environment </Trace>
    <Trace level="1" type="T">Setup qRFC Scheduler OK! </Trace>
    <Trace level="1" type="T">----
    </Trace>
    <Trace level="1" type="T">Going to persist message </Trace>
    <Trace level="1" type="T">NOTE: The following trace entries are always lacking </Trace>
    <Trace level="1" type="T">- Exit WRITE_MESSAGE_TO_PERSIST </Trace>
    <Trace level="1" type="T">- Exit CALL_PIPELINE_ASYNC </Trace>
    <Trace level="1" type="T">Async barrier reached. Bye-bye ! </Trace>
    <Trace level="1" type="T">----
    </Trace>
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST">
    <Trace level="1" type="T">--start determination of sender interface action </Trace>
    <Trace level="1" type="T">select interface ShipmentAdvice_iOlam_OUT_ASYN_SI </Trace>
    <Trace level="1" type="T">select interface namespace urn:olam-com:ShipmentAdvice::iOlam:OPS:10 </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE">
    </Trace>
    <Trace level="1" type="T">Exception from packaging: No messages for constructing a package available.</Trace>
    <Trace level="1" type="T">Continue single processing </Trace>
    <Trace level="1" type="T">Note: the following trace entry is written delayed (after read from persist)</Trace>
    <Trace level="1" type="B" name="SXMS_ASYNC_EXEC"></Trace><!-- ************************************ -->
    <Trace level="1" type="T">----
    </Trace>
    <Trace level="1" type="T">Starting async processing with pipeline CENTRAL</Trace>
    <Trace level="1" type="T">system-ID = OXQ</Trace>
    <Trace level="1" type="T">client = 300</Trace>
    <Trace level="1" type="T">language = E</Trace>
    <Trace level="1" type="T">user = PIAFUSER</Trace>
    <Trace level="1" type="Timestamp">2011-08-09T05:06:42Z CET  </Trace>
    <Trace level="1" type="T">----
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_SYNC"></Trace><!-- ************************************ -->
    <Trace level="1" type="T">&gt;&gt;&gt;PID delete old pid determination coding </Trace>
    <Trace level="1" type="B" name="PLSRV_XML_VALIDATION_RQ_INB">
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    <Trace level="1" type="B" name="CL_XMS_PLSRV_VALIDATION-ENTER_PLSRV">
    <Trace level="1" type="T">Reading sender agreement </Trace>
    <Trace level="1" type="T">Inbound validation by Integration Engine does not take place </Trace>
    </Trace>
    </Trace>
    </Trace>
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST">
    </Trace>
    <Trace level="1" type="B" name="PLSRV_RECEIVER_DETERMINATION">
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    <Trace level="1" type="B" name="CL_RD_PLSRV-ENTER_PLSRV">
    <Trace level="1" type="T">R E C E I V E R - D E T E R M I N A T I O N </Trace>
    <Trace level="1" type="T"> Cache Content is up to date </Trace>
    </Trace>
    </Trace>
    </Trace>
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST">
    </Trace>
    <Trace level="1" type="B" name="PLSRV_INTERFACE_DETERMINATION">
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    <Trace level="1" type="B" name="CL_ID_PLSRV-ENTER_PLSRV">
    <Trace level="1" type="T">I N T E R F A C E - D E T E R M I N A T I O N </Trace>
    <Trace level="1" type="T"> Cache Content is up to date </Trace>
    </Trace>
    </Trace>
    </Trace>
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST">
    </Trace>
    <Trace level="1" type="B" name="PLSRV_RECEIVER_MESSAGE_SPLIT">
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL"></Trace><!-- ************************************ -->
    <Trace level="1" type="B" name="CL_XMS_PLSRV_RECEIVER_SPLIT-ENTER_PLSRV">
    <Trace level="1" type="T">number of receivers: 2 </Trace>
    <Trace level="1" type="T">Multi-receiver split case </Trace>
    <Trace level="1" type="T">Persisting initial (pre-split) message </Trace>
    <Trace level="1" type="T">Persisting split messages (split kids) </Trace>
    <Trace level="1" type="T">----
    </Trace>
    <Trace level="1" type="T">Splitting loop start </Trace>
    <Trace level="1" type="T">----
    </Trace>
    <Trace level="1" type="T">Split Induced Change EO -&gt; EOIO with QId: XI_SERIALIZE0000</Trace>
    <Trace level="1" type="T">Post-split internal queue name = XBQO3___</Trace>
    <Trace level="1" type="T">Persisting split kid = 4E4085AB74480E30E1008000C0A8004E</Trace>
    <Trace level="1" type="T">Generated prefixed queue name = </Trace>
    <Trace level="1" type="T">Schedule message in qRFC environment </Trace>
    <Trace level="1" type="T">Setup qRFC Scheduler OK! </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST">
    <Trace level="1" type="T">--start determination of sender interface action </Trace>
    <Trace level="1" type="T">select interface ShipmentAdvice_iOlam_OUT_ASYN_SI </Trace>
    <Trace level="1" type="T">select interface namespace urn:olam-com:ShipmentAdvice::iOlam:OPS:10 </Trace>
    <Trace level="1" type="T">--start determination of receiver interface action </Trace>
    <Trace level="1" type="T">Loop 0000000001 </Trace>
    <Trace level="1" type="T">select interface ShipmentAdvice_OPS_IN_ASYN_SI </Trace>
    <Trace level="1" type="T">select interface namespace urn:olam-com:ShipmentAdvice::iOlam:OPS:10 </Trace>
    <Trace level="1" type="T">--start determination of sender interface action </Trace>
    <Trace level="1" type="T">Hence set action to DEL </Trace>
    </Trace>
    <Trace level="1" type="T">Split Induced Change EO -&gt; EOIO with QId: XI_SERIALIZE0000</Trace>
    <Trace level="1" type="T">Post-split internal queue name = XBQO3___</Trace>
    <Trace level="1" type="T">Persisting split kid = 4E4085AC74480E30E1008000C0A8004E</Trace>
    <Trace level="1" type="T">Generated prefixed queue name = </Trace>
    <Trace level="1" type="T">Schedule message in qRFC environment </Trace>
    <Trace level="1" type="T">Setup qRFC Scheduler OK! </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST">
    <Trace level="1" type="T">--start determination of sender interface action </Trace>
    <Trace level="1" type="T">select interface ShipmentAdvice_iOlam_OUT_ASYN_SI </Trace>
    <Trace level="1" type="T">select interface namespace urn:olam-com:ShipmentAdvice::iOlam:OPS:10 </Trace>
    <Trace level="1" type="T">--start determination of receiver interface action </Trace>
    <Trace level="1" type="T">Loop 0000000001 </Trace>
    <Trace level="1" type="T">select interface ShipmentAdvice_iOlam_IN_ASYN_SI </Trace>
    <Trace level="1" type="T">select interface namespace urn:olam-com:ShipmentAdvice::iOlam:OPS:10 </Trace>
    <Trace level="1" type="T">--start determination of sender interface action </Trace>
    <Trace level="1" type="T">Hence set action to DEL </Trace>
    </Trace>
    <Trace level="1" type="T">----
    </Trace>
    <Trace level="1" type="T">Splitting loop end </Trace>
    <Trace level="1" type="T">----
    </Trace>
    <Trace level="1" type="T">Going to Call qRFC for execution of split kids ... </Trace>
    <Trace level="1" type="T">Async barrier reached. Bye-bye ! </Trace>
    <Trace level="1" type="T">----
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST"></Trace><!-- ************************************ -->
    <Trace level="1" type="T">--start determination of sender interface action </Trace>
    <Trace level="1" type="T">select interface ShipmentAdvice_iOlam_OUT_ASYN_SI </Trace>
    <Trace level="1" type="T">select interface namespace urn:olam-com:ShipmentAdvice::iOlam:OPS:10 </Trace>
    <Trace level="1" type="T">--start determination of receiver interface action </Trace>
    <Trace level="1" type="T">Loop 0000000001 </Trace>
    <Trace level="1" type="T">select interface ShipmentAdvice_OPS_IN_ASYN_SI </Trace>
    <Trace level="1" type="T">select interface namespace urn:olam-com:ShipmentAdvice::iOlam:OPS:10 </Trace>
    <Trace level="1" type="T">--start determination of receiver interface action </Trace>
    <Trace level="1" type="T">Loop 0000000002 </Trace>
    <Trace level="1" type="T">select interface ShipmentAdvice_iOlam_IN_ASYN_SI </Trace>
    <Trace level="1" type="T">select interface namespace urn:olam-com:ShipmentAdvice::iOlam:OPS:10 </Trace>
    <Trace level="1" type="T">--start determination of sender interface action </Trace>
    <Trace level="1" type="T">Hence set action to DEL </Trace>
    </Trace>
    </Trace>
    </Trace>
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST"></Trace><!-- ************************************ -->
    </SAP:Trace>
    Regard's
    Preethi
    Edited by: preethi_malu on Aug 9, 2011 7:59 AM

    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Receiver Grouping
      -->
    - <SAP:Trace xmlns:SAP="http://sap.com/xi/XI/Message/30">
      <Trace level="1" type="T">CL_XMS_MAIN->DETERMINE_EXT_PID: CENTRAL</Trace>
      <Trace level="1" type="T">Party normalization: sender</Trace>
      <Trace level="1" type="T">Sender scheme external = XIParty</Trace>
      <Trace level="1" type="T">Sender agency external = http://sap.com/xi/XI</Trace>
      <Trace level="1" type="T">Sender party external =</Trace>
      <Trace level="1" type="T">Sender party normalized =</Trace>
      <Trace level="1" type="T">Party normalization: receiver</Trace>
      <Trace level="1" type="T">Receiver scheme external =</Trace>
      <Trace level="1" type="T">Receiver agency external =</Trace>
      <Trace level="1" type="T">Receiver party external =</Trace>
      <Trace level="1" type="T">Receiver party normalized =</Trace>
      <Trace level="1" type="B" name="CL_XMS_HTTP_HANDLER-HANDLE_REQUEST" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">XMB was called with URL /sap/xi/engine?type=entry</Trace>
    - <Trace level="1" type="B" name="CL_XMS_MAIN-ENTER_XMS">
      <Trace level="1" type="T">CL_XMS_MAIN->DETERMINE_EXT_PID: CENTRAL</Trace>
      <Trace level="1" type="T">CL_XMS_MAIN->DETERMINE_INT_PID: SAP_CENTRAL</Trace>
      <Trace level="1" type="B" name="CL_XMS_TROUBLESHOOT-ENTER_PLSRV" />
      <Trace level="1" type="T">system-ID = OXQ</Trace>
      <Trace level="1" type="T">client = 300</Trace>
      <Trace level="1" type="T">language = E</Trace>
      <Trace level="1" type="T">user = PIAFUSER</Trace>
      <Trace level="1" type="Timestamp">2011-08-10T08:23:48Z CET</Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_UC_EXECUTE" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">Message-GUID = BE8DFF410EFD44533BEDA93E4E7FD402</Trace>
      <Trace level="1" type="T">PLNAME = CENTRAL</Trace>
      <Trace level="1" type="T">QOS = EO</Trace>
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_ASYNC">
      <Trace level="1" type="T">Queue name : XBTI0006</Trace>
      <Trace level="1" type="T">Generated prefixed queue name =</Trace>
      <Trace level="1" type="T">Schedule message in qRFC environment</Trace>
      <Trace level="1" type="T">Setup qRFC Scheduler OK!</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Going to persist message</Trace>
      <Trace level="1" type="T">NOTE: The following trace entries are always lacking</Trace>
      <Trace level="1" type="T">- Exit WRITE_MESSAGE_TO_PERSIST</Trace>
      <Trace level="1" type="T">- Exit CALL_PIPELINE_ASYNC</Trace>
      <Trace level="1" type="T">Async barrier reached. Bye-bye !</Trace>
      <Trace level="1" type="T">----
    </Trace>
      </Trace>
    - <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST">
      <Trace level="1" type="T">--start determination of sender interface action</Trace>
      <Trace level="1" type="T">select interface dealTicket_OPS_OUT_ASYN_SI</Trace>
      <Trace level="1" type="T">select interface namespace urn:olam-com:DealTicket:OPS:iOlam:20</Trace>
      <Trace level="1" type="T">--start determination of receiver interface action</Trace>
      <Trace level="1" type="T">Loop 0000000001</Trace>
      <Trace level="1" type="T">select interface</Trace>
      <Trace level="1" type="T">select interface namespace</Trace>
      <Trace level="1" type="T">--start determination of sender interface action</Trace>
      <Trace level="1" type="T">Hence set action to DEL</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE" />
      <Trace level="1" type="T">Exception from packaging: No messages for constructing a package available.</Trace>
      <Trace level="1" type="T">Continue single processing</Trace>
      <Trace level="1" type="T">Note: the following trace entry is written delayed (after read from persist)</Trace>
      <Trace level="1" type="B" name="SXMS_ASYNC_EXEC" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Starting async processing with pipeline CENTRAL</Trace>
      <Trace level="1" type="T">system-ID = OXQ</Trace>
      <Trace level="1" type="T">client = 300</Trace>
      <Trace level="1" type="T">language = E</Trace>
      <Trace level="1" type="T">user = PIAFUSER</Trace>
      <Trace level="1" type="Timestamp">2011-08-10T08:23:48Z CET</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_SYNC" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">>>>PID delete old pid determination coding</Trace>
    - <Trace level="1" type="B" name="PLSRV_XML_VALIDATION_RQ_INB">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_XMS_PLSRV_VALIDATION-ENTER_PLSRV">
      <Trace level="1" type="T">Reading sender agreement</Trace>
      <Trace level="1" type="T">Inbound validation by Integration Engine does not take place</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
    - <Trace level="1" type="B" name="PLSRV_RECEIVER_DETERMINATION">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_RD_PLSRV-ENTER_PLSRV">
      <Trace level="1" type="T">R E C E I V E R - D E T E R M I N A T I O N</Trace>
      <Trace level="1" type="T">Cache Content is up to date</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
    - <Trace level="1" type="B" name="PLSRV_INTERFACE_DETERMINATION">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_ID_PLSRV-ENTER_PLSRV">
      <Trace level="1" type="T">I N T E R F A C E - D E T E R M I N A T I O N</Trace>
      <Trace level="1" type="T">Cache Content is up to date</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
      <Trace level="1" type="B" name="PLSRV_RECEIVER_MESSAGE_SPLIT" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_XMS_PLSRV_RECEIVER_SPLIT-ENTER_PLSRV" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">number of receivers: 2</Trace>
      <Trace level="1" type="T">Multi-receiver split case</Trace>
      <Trace level="1" type="T">Persisting initial (pre-split) message</Trace>
      <Trace level="1" type="T">Persisting split messages (split kids)</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Splitting loop start</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Split Induced Change EO -> EOIO with QId: XI_SERIALIZE0067</Trace>
      <Trace level="1" type="T">Post-split internal queue name = XBQO0___</Trace>
      <Trace level="1" type="T">Persisting split kid = 4E42267021350B00E1008000C0A8004E</Trace>
      <Trace level="1" type="T">Generated prefixed queue name =</Trace>
      <Trace level="1" type="T">Schedule message in qRFC environment</Trace>
      <Trace level="1" type="T">Setup qRFC Scheduler OK!</Trace>
    - <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST">
      <Trace level="1" type="T">--start determination of sender interface action</Trace>
      <Trace level="1" type="T">select interface dealTicket_OPS_OUT_ASYN_SI</Trace>
      <Trace level="1" type="T">select interface namespace urn:olam-com:DealTicket:OPS:iOlam:20</Trace>
      <Trace level="1" type="T">--start determination of receiver interface action</Trace>
      <Trace level="1" type="T">Loop 0000000001</Trace>
      <Trace level="1" type="T">select interface InterfaceCollection</Trace>
      <Trace level="1" type="T">select interface namespace http://sap.com/xi/XI/System</Trace>
      <Trace level="1" type="T">--start determination of sender interface action</Trace>
      <Trace level="1" type="T">Hence set action to DEL</Trace>
      </Trace>
      <Trace level="1" type="T">Split Induced Change EO -> EOIO with QId: XI_SERIALIZE0067</Trace>
      <Trace level="1" type="T">Post-split internal queue name = XBQO0___</Trace>
      <Trace level="1" type="T">Persisting split kid = 4E42267121350B00E1008000C0A8004E</Trace>
      <Trace level="1" type="T">Generated prefixed queue name =</Trace>
      <Trace level="1" type="T">Schedule message in qRFC environment</Trace>
      <Trace level="1" type="T">Setup qRFC Scheduler OK!</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">--start determination of sender interface action</Trace>
      <Trace level="1" type="T">select interface dealTicket_OPS_OUT_ASYN_SI</Trace>
      <Trace level="1" type="T">select interface namespace urn:olam-com:DealTicket:OPS:iOlam:20</Trace>
      <Trace level="1" type="T">--start determination of receiver interface action</Trace>
      <Trace level="1" type="T">Loop 0000000001</Trace>
      <Trace level="1" type="T">select interface dealTicket_OPS_IN_ASYN_SI</Trace>
      <Trace level="1" type="T">select interface namespace urn:olam-com:DealTicket:OPS:iOlam:20</Trace>
      <Trace level="1" type="T">--start determination of sender interface action</Trace>
      <Trace level="1" type="T">Hence set action to DEL</Trace>
      </Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Splitting loop end</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Going to Call qRFC for execution of split kids ...</Trace>
      <Trace level="1" type="T">Async barrier reached. Bye-bye !</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    - <!--  ************************************
      -->
      </SAP:Trace>

  • .au sound format is not working

    Hello everybody,
    Infact this Alarm.java (attached) using sun proprietary API sun.audio classes, now these are deprecated so i want to replace it with java se 6 classes.
    This Alarm.java is beeping the PC but not able to run alarm.au audio file and gives Following exception
    Exception Occurred....java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame, is supported.
    Kindly help to make it work with alarm.au
    NOTE: i hav commented all those sun proprietary API sun.audio code and tried with the alternate code in the same Alarm.java
    Thanks
    //Alarm.java
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.sound.sampled.*;
    public class Alarm implements ActionListener
    private static final int BEEP_INTERVAL = 1000;
    private static javax.swing.Timer beepTimer = null;
    private static Alarm theInstance = null;
    private static boolean usePcSpeaker = false;
    //old code
    //private static sun.audio.ContinuousAudioDataStream soundClip = null;
    //my code
    private static AudioInputStream soundClip;
    private static AudioFormat audioFormat;
    private static SourceDataLine sourceDataLine;
    //end my code
    private static boolean isAlarmOn = false;
    * Privately constructs a new Alarm. If useSpeaker is true, the method
    * for sounding an alarm is to beep the pc speaker, otherwise we play
    * a sound file.
    private Alarm(boolean newUseSpeaker)
    String alarmFilename = "Alarm.au";
    usePcSpeaker = newUseSpeaker;
    System.out.println("my code.. usePcSpeaker...."+usePcSpeaker);
    if (!usePcSpeaker)
    try
    //my code
    System.out.println("my code.. while usePcSpeaker..is false alarmFilename.."+alarmFilename);
                   java.io.File file = new java.io.File(alarmFilename);
                   soundClip = AudioSystem.getAudioInputStream(file);
                   audioFormat = soundClip.getFormat();
                   DataLine.Info dataLineInfo = new DataLine.Info(SourceDataLine.class,audioFormat);
                   sourceDataLine = (SourceDataLine)AudioSystem.getLine(dataLineInfo);
    //end my code
    //old code
    soundClip = new sun.audio.ContinuousAudioDataStream
    new sun.audio.AudioStream
    new java.io.FileInputStream(alarmFilename)
    ).getData()
    catch (java.io.FileNotFoundException e)
    System.out.println(alarmFilename + " not found");
         usePcSpeaker = true;
    catch (java.io.IOException e)
    System.out.println("Could not create audio stream");
         usePcSpeaker = true;
    catch (java.lang.UnsatisfiedLinkError e)
    System.out.println("Could not load audio driver");
         usePcSpeaker = true;
              catch (java.lang.Exception e)
    System.out.println("Exception Occurred...."+e);
         usePcSpeaker = true;
    if (usePcSpeaker)
    beepTimer = new javax.swing.Timer(BEEP_INTERVAL, this);
    beepTimer.setRepeats(true);
    System.out.println("my code.. Using PC Speaker....");
    * This method turns on the Alarm. By design the Alarm does not
    * care who controls it or how. Controlled access to this object, if
    * desired, must be handled outside this class. Excessive calls to
    * this method when the Alarm is already on are simply ignored.
    public void turnOn()
    synchronized(theInstance)
    System.out.println("my code.. in turnOn isAlarmOn..."+isAlarmOn+"...usePcSpeaker...."+usePcSpeaker);
    if (isAlarmOn)
    System.out.println("Alarm already on");
    else
         if (usePcSpeaker)
    beepTimer.start();
         else
    //old code
         //sun.audio.AudioPlayer.player.start(soundClip);
    //my code
                        try
                                  sourceDataLine.open(audioFormat);
                                  sourceDataLine.start();
                                  int cnt;
                                  byte tempBuffer[] = new byte[128000];
                                  //Keep looping until the input read method
                                  // returns -1 for empty stream
                                  while((cnt = soundClip.read(tempBuffer,0,tempBuffer.length)) != -1 )
                                       if(cnt > 0)
                                            //Write data to the internal buffer of
                                            // the data line where it will be
                                            // delivered to the speaker.
                                            sourceDataLine.write(tempBuffer, 0, cnt);
                                       }//end if
                                  }//end while
                                  //Block and wait for internal buffer of the
                                  // data line to empty.
                                  sourceDataLine.drain();
                                  sourceDataLine.close();
                        catch (java.lang.Exception e)
                             e.printStackTrace();
    System.out.println(" < < < ALARM ON > > > Exception... "+e);
                             //usePcSpeaker = true;
    //end my code
    System.out.println(" < < < ALARM ON > > > while usePcSpeaker is flase and isAlarmOn is false");
         isAlarmOn = true;
    * This method is called by the timer object when the timer fires.
    * It simply calls a method to BEEP.
    * @param evt the timer action event
    public void actionPerformed(ActionEvent evt)
    java.awt.Toolkit.getDefaultToolkit().beep();
    * Test Main, not production code
    public static void main(String[] args)
    Alarm alarm = Alarm.getInstance(false);
    System.out.println("test-main: turning alarm ON");
    alarm.turnOn();
    try
         System.out.println("test-main: with CPU burn activity in background");
    double b = 12;
    double a = 0;
    for(int ii = 0; ii < 100000; ii++)
    // garbage formula to do busy work
    a = Math.sqrt(1234.4567 * b) / ( (a+ii) / b) + ii;
    b += 1;
         java.lang.Thread.sleep(5000);
    catch (Exception e)
         e.printStackTrace();
    System.out.println("test-main: turning alarm OFF");
    try
         System.out.println("test-main: sleeping 3 seconds");
         java.lang.Thread.sleep(3000);
    catch (Exception e)
         e.printStackTrace();
    System.out.println("test-main: turning alarm ON");
    alarm.turnOn();
    try
         System.out.println("test-main: sleeping 5 seconds");
         java.lang.Thread.sleep(5000);
    catch (Exception e)
         e.printStackTrace();
    System.out.println("PROGRAM EXITING");
    // The Unit Test program will run forever if we dont kill it
    // this way (because the timer/awt dispatch thread is still running)
    System.exit(1);
    }

    You can try to convert alarm.au to a supported format.
    Here is an example how to find available converters:
    import javax.sound.sampled.*;
    import java.io.File;
    public class ShowConverters {
        public static void main(String[] args) {
            AudioFormat format = null;
            try {
                AudioInputStream in =
                    AudioSystem.getAudioInputStream(new File("alarm.au"));
                format = in.getFormat();
            } catch (Exception e) {
                e.printStackTrace();
            AudioFormat.Encoding[] encodings =
                AudioSystem.getTargetEncodings(format.getEncoding());
            if (encodings.length == 0) {
                System.out.println("No available format converters.");
                return;
            for (AudioFormat.Encoding encoding : encodings) {
                AudioFormat[] formats =
                    AudioSystem.getTargetFormats(encoding, format);
                for (AudioFormat toFormat : formats) {
                    System.out.println("--> " + toFormat);
    }Good luck.

  • Integration of Idoc to OAGIS XML...

    Hi All,
    Can any one please help me how to integrate IDOC to OAGIS XML for Delivery alert in sap PI.
    any document or steps to integrate would be really helpful.
    As a start i have done the below steps :
    1. downloaded all the XSD file from OAGIS site.
    2. imported the XSD as external system into PI.
    3. imported required idoc into sap PI.
    4. created service interface for external system (OAGIS XSD).
    5. during mapping there multiple nodes that has to be selected in target, but i think this is wrong because mapping can only be done with single node.
    i am stuck with the mapping of idoc to OAGIS.
    any help would be appreciated.
    Thanks & Regards,
    akshay ruia

    Hi,
    I managed to Integrate Idoc to OAGIS asynchronously, but now i am getting an error for "No party or service found" in SXMB_MONI. Please find the trace below :
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--
    Message Branch According to Receiver List
    -->
    - <SAP:Trace xmlns:SAP="http://sap.com/xi/XI/Message/30"> 
    <Trace level="1" type="B" name="IDX_INBOUND_XMB" /> 
    - <!-- ************************************
    -->  
    <Trace level="1" type="T">User: SAPUSER</Trace> 
    <Trace level="1" type="T">Language: E</Trace> 
    <Trace level="1" type="T">ALE-AUDIT-IDoc-Inbound Handling</Trace> 
    <Trace level="1" type="T">IDoc-Inbound-Handling</Trace> 
    <Trace level="1" type="T">Syntax-Check-Flag X</Trace> 
    <Trace level="1" type="T">IDoc-Tunnel-Flag X</Trace> 
    <Trace level="1" type="T">Queueid</Trace> 
    - <Trace level="1" type="B" name="IDX_IDOC_TO_XML"> 
    <Trace level="1" type="T">Docnum 0000000001010778</Trace> 
    <Trace level="1" type="T">Get the Metadata for port SAPEED</Trace> 
    <Trace level="1" type="T">Convert Segment-Definitions to Types</Trace> 
    <Trace level="1" type="T">Make Syntax check of current IDoc</Trace> 
    </Trace>
    <Trace level="1" type="T">party normalization error: scheme = ALE#KU#WE</Trace> 
    <Trace level="1" type="T">Set Receiver Routing-object</Trace> 
    <Trace level="1" type="T">---------------------------------------------</Trace> 
    <Trace level="1" type="B" name="CL_IDX_IDOC_RESOURCE-SET_IDOC" /> 
    <Trace level="1" type="T">Exit Function IDX_INBOUND_XMB</Trace> 
    <Trace level="1" type="T">Work Process ID: 3140</Trace> 
    - <Trace level="1" type="B" name="CL_IDX_IDOC_RESOURCE-GETBLOBDATA"> 
    <Trace level="1" type="B" name="CL_IDX_IDOC_RESOURCE-ITAB_TO_BINARY" /> 
    </Trace>
    <Trace level="1" type="T">Message ID = 94DE801F74491ED48E831FB43F6DF2A8</Trace> 
    - <Trace level="1" type="B" name="CL_XMS_MAIN-ENTER_XMS"> 
    <Trace level="1" type="T">CL_XMS_MAIN->DETERMINE_EXT_PID: CENTRAL</Trace> 
    <Trace level="1" type="T">Hop engine name = is.00.sapsrv5</Trace> 
    <Trace level="1" type="T">Hop engine type = IS</Trace> 
    <Trace level="1" type="T">Hop adapter name = XI</Trace> 
    <Trace level="1" type="T">Hop adapter namespace = http://sap.com/xi/XI/System</Trace> 
    <Trace level="1" type="B" name="CL_XMS_TROUBLESHOOT-ENTER_PLSRV" /> 
    <Trace level="1" type="T">system-ID = EP1</Trace> 
    <Trace level="1" type="T">client = 001</Trace> 
    <Trace level="1" type="T">language = E</Trace> 
    <Trace level="1" type="T">user = SAPUSER</Trace> 
    <Trace level="1" type="Timestamp">2014-09-09T12:01:12Z CET</Trace> 
    <Trace level="1" type="T">ACL Check is performed</Trace> 
    <Trace level="1" type="T">XML validation is executed</Trace> 
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_UC_EXECUTE" /> 
    - <!-- ************************************
    -->  
    <Trace level="1" type="T">PLNAME = CENTRAL</Trace> 
    <Trace level="1" type="T">QOS = EO</Trace> 
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_ASYNC"> 
    <Trace level="1" type="T">Queue name : XBTI0003</Trace> 
    <Trace level="1" type="T">Going to persist message</Trace> 
    </Trace>
    <Trace level="1" type="T">Generated prefixed queue name =</Trace> 
    <Trace level="1" type="T">Schedule message in qRFC environment</Trace> 
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" /> 
    - <!-- ************************************
    -->  
    <Trace level="1" type="T">--start determination of sender interface action</Trace> 
    <Trace level="1" type="T">select interface CARNOT.DELVRY03</Trace> 
    <Trace level="1" type="T">select interface namespace urn:sap-com:document:sap:idoc:messages</Trace> 
    <Trace level="1" type="T">--start determination of receiver interface action</Trace> 
    <Trace level="1" type="T">Loop 0000000001</Trace> 
    <Trace level="1" type="T">ALE receiver ALE#KU#WE found during inbound processing. Quit determination of receiver interface action.</Trace> 
    <Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE" /> 
    <Trace level="1" type="T">Work Process ID: 3864</Trace> 
    <Trace level="1" type="T">Exception from packaging: No messages for constructing a package available.</Trace> 
    <Trace level="1" type="T">Continue single processing</Trace> 
    <Trace level="1" type="T">Starting async processing with pipeline CENTRAL</Trace> 
    <Trace level="1" type="T">system-ID = EP1</Trace> 
    <Trace level="1" type="T">client = 001</Trace> 
    <Trace level="1" type="T">language = E</Trace> 
    <Trace level="1" type="T">user = SAPUSER</Trace> 
    <Trace level="1" type="Timestamp">2014-09-09T12:01:12Z CET</Trace> 
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_SYNC" /> 
    - <!-- ************************************
    -->  
    <Trace level="1" type="T">>>>PID delete old pid determination coding</Trace> 
    - <Trace level="1" type="B" name="PLSRV_XML_VALIDATION_RQ_INB"> 
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV"> 
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL"> 
    - <Trace level="1" type="B" name="CL_XMS_PLSRV_VALIDATION-ENTER_PLSRV"> 
    <Trace level="1" type="T">Reading sender agreement</Trace> 
    <Trace level="1" type="T">Message does not contain a sender agreement</Trace> 
    <Trace level="1" type="T">Inbound validation by Integration Engine does not take place</Trace> 
    </Trace>
    </Trace>
    </Trace>
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" /> 
    - <Trace level="1" type="B" name="PLSRV_RECEIVER_DETERMINATION"> 
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV"> 
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL"> 
    - <Trace level="1" type="B" name="CL_RD_PLSRV-ENTER_PLSRV"> 
    <Trace level="1" type="T">R E C E I V E R - D E T E R M I N A T I O N</Trace> 
    <Trace level="1" type="T">Cache content is up to date</Trace> 
    <Trace level="1" type="T">No Relation found - accept given Receivers.</Trace> 
    </Trace>
    </Trace>
    </Trace>
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" /> 
    - <Trace level="1" type="B" name="PLSRV_INTERFACE_DETERMINATION"> 
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV"> 
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL"> 
    - <Trace level="1" type="B" name="CL_ID_PLSRV-ENTER_PLSRV"> 
    <Trace level="1" type="T">I N T E R F A C E - D E T E R M I N A T I O N</Trace> 
    <Trace level="1" type="T">Cache content is up to date</Trace> 
    <Trace level="1" type="T">...There is no Interface Determination configured for receiver party 0000003271 and receiver service</Trace> 
    </Trace>
    </Trace>
    </Trace>
    </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" /> 
    <Trace level="1" type="B" name="PLSRV_RECEIVER_MESSAGE_SPLIT" /> 
    - <!-- ************************************
    -->  
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV"> 
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL" /> 
    - <!-- ************************************
    -->  
    - <Trace level="1" type="B" name="CL_XMS_PLSRV_RECEIVER_SPLIT2->ENTER_PLSRV"> 
    <Trace level="1" type="T">number of receivers: 1</Trace> 
    <Trace level="1" type="T">Single-receiver split case</Trace> 
    <Trace level="1" type="System_Error">Party and service not defined</Trace> 
    </Trace>
    </Trace>
    <Trace level="1" type="System_Error">Error exception return from pipeline processing!</Trace> 
    <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" /> 
    - <!-- ************************************
    --> </SAP:Trace>
    Please help with the solution.
    Thanks & Regards,
    Akshay Ruia

Maybe you are looking for

  • How do I make tags under image display in a different order in PE 4

    I have Photoshop Elements 4 and in the organizer I am dropping tags onto the single photo view. I clicked the single photoview icon at the bottom and have the name associated with the tag displayed. I want the tag sequence to reflect the position of

  • ITunes 7.4 and windows vista

    I recently purchased a laptop w/win vista and a preinstalled iTunes version 4. I downloaded the newest version of iTunes 7.4 and when trying to install it an error message of ...itunes.exe is not a valid win32 application. Can anyone guide me in the

  • How to convert xml file into internal table in ABAP Mapping.

    Hi All, I am trying with ABAP mapping. I have one scenario in which I'm using below xml file as a sender from my FTP server. <?xml version="1.0" encoding="UTF-8" ?> - <ns0:MTO_ABAP_MAPPING xmlns:ns0="http://Capgemini/Mumbai/sarsingh">   <BookingCode>

  • I'm drowning in the sea of HD export presets. Salvation wanted please..

    Hello, I hope the forum proves again its functionality like it did before. Cause my head's getting a little bit blurry now, from all the presets. So, the big issue is that I want to export a HD project to a format in which I dont get a wrongly croppe

  • Running Rules on "Locked"/Promoted Planning Units

    Hi All, I'm using Hyperion Planning and Smart View Version 11.1.2.2. Does anyone know if it is possible to prevent users from being able to run rules on data that is supposedly "locked out" by virtue of a Planning Unit? I was under the impression tha