J2ME's Java Code Compact issues...

HI,
I am recently trying to integrated some files of JSR 180 with MIDP 2.0/CLDC 1.1. After compiling successfully and the generation of
"classes.zip" and "nativeFunctionTable.c" when the java code compactor tries to generate RomJava<platform> file
it gives an exception with the following message:
Exception in thread "main" java.lang.NullPointerException
at components.FMIrefConstant.findInInterfaces(FMIrefConstant.java:154)
at components.FMIrefConstant.find(FMIrefConstant.java:134)
at components.FMIrefConstant.isResolved(FMIrefConstant.java:169)
at vm.ClassClass.isPartiallyResolved(ClassClass.java:177)
at vm.ClassClass.adjustSymbolicConstants(ClassClass.java:154)
at JavaCodeCompact.writeROMFile(JavaCodeCompact.java:539)
at JavaCodeCompact.process(JavaCodeCompact.java:343)
at JavaCodeCompact.main(JavaCodeCompact.java:354)
I think the above problem is becasue JCC is unable to locate some interfaces. Has anybody faced similar situation. Any suggestions to fix it.
Regards
Faisal

Hi Faiz,
Actually I am having exactly the same problem as you are facing. I am using JSR-75 with CLDC 1.1. I am using Linux Redhat 9. It seems the problem here is that since we dont have the source code for the API's that we are using, it doesn't get into the classes.zip and classesUnix.zip and hence JCC gives an error. Actually, I tried to manually put the files in the classes.zip but unfortunately couldn't make it work. Where are you wrt to this? Did you find a solution?
Thanks ...
regards,
daj

Similar Messages

  • How to re-issue an SQL query in java code in deadlock situation ?

    Hi all..
    I have a java application (in Struts) which is running on JBoss 4.0.1 server. The database is MySql 6.0. It is an
    application made to be used among multiusers. The background operating system is Windows Vista.
    Now a days i am facing a peculiar problem due to which the further things go wrong. I am getting following error :
    com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
    I searched over forums and i got response as restart the transaction in deadlock.
    In my java code it is a delete query where i get such exception when multiple users are accessing the application. What i tried for time being is as follows :
    Statement stmt = null;
    String temp = null;
    Connection conn = null;
    String sUserID =(String) session.getAttribute("username")
    try
    conn = DBConnection.getJndiConnection();
    stmt = conn.createStatement();
    temp = "Delete FROM temptable where Login ='"+sUserID+"'";
    System.out.println("QUERY:"+temp);
    int rowCount = stmt.executeUpdate(temp);
    System.out.println("Rows affected in try ="+rowCount+" for user :"+sUserID);
    // in catch i re-issue the delete query in deadlock..
    catch (com.mysql.jdbc.exceptions.MySQLTransactionRollbackException ne)
    System.out.println("Error ....Deadlock occured for user: "+sUserID);
    ne.printStackTrace();
    try
    int rowCount = s.executeUpdate(temp);
    System.out.println("Rows affected in catch ="+rowCount+" for user :"+sUserID);
    catch (Exception e)
    System.out.println("Exception again after restarting transaction..with user :"+sUserID);
    e.printStackTrace();
    (all necessary imports are present in code)
    Here i am properly establishing the database connection with the help of other class DBConnection. As most of the forum insisted to re-issue the transaction, i have tried upto one level with above code. But still the problem is just partially solved.
    How can i write my code so that every time if there is MySQLTransactionRollbackException , then the delete query should be re-issued again and again untill the transaction is complete.
    Can i use GOTO statement ? or is it bad programming practice?
    What are the other possible ways ??
    Can someone please help in this regard ??
    Thanks in advance..
    Regards
    Prasad

    Hi all
    i am new for these kind of databae transaction operation i am getting following error
    /resetattendancedata.dqlMessage: Deadlock found when trying to get lock; Try restarting transaction, message from server: "Lock wait timeout exceeded; try restarting transaction" Cause: null Error Message: Deadlock found when trying to get lock; Try restarting transaction, message from server: "Lock wait timeout exceeded; try restarting transaction" Cause: null Error code: 1205 Error state: 41000 java.sql.SQLException: Deadlock found when trying to get lock; Try restarting transaction, message from server: "Lock wait timeout exceeded; try restarting transaction"
    Here is my code i have written
    if(movements.equalsIgnoreCase("ON"))
    System.out.println("Movement");
    if(submovements.equalsIgnoreCase("statusonly"))
    query="";
    query="UPDATE TRNMOVEMENT SET PROCESSED='N',STATUSPUT='N',ATTDATE=NULL,TIMEDIFF='' "
    +"WHERE ATTDATE BETWEEN '"datefrom1"' AND '"dateto"' AND EMPID IN "
    +"(SELECT SYSEMPID "
    +"FROM (((MSTPERSONALDETAILS PD LEFT JOIN MSTCATEGORY CAT ON PD.CATEGCODE=CAT.SYSCATEGCODE)"
    +"LEFT JOIN MSTUNITDETAILS U ON PD.UNITCODE=U.SYSUNITCODE) "
    +"LEFT JOIN MSTDESIGNATION DES ON PD.DESIGCODE=DES.SYSDESIGCODE) "
    +"LEFT JOIN MSTDEPARTMENT DEP ON PD.DEPTCODE=DEP.SYSDEPTCODE "strFltrString" ) ";
    leaveStmt.executeUpdate(query);
    leaveStmt.executeUpdate("commit");
    else if(submovements.equalsIgnoreCase("flagstatus"))
    query="";
    query="UPDATE TRNMOVEMENT SET PROCESSED='N',STATUSPUT='N',ATTDATE=NULL,FLAG='',TIMEDIFF='',BREAK='N'WHERE ATTDATE BETWEEN '"datefrom1"' AND '"dateto"' AND EMPID IN (SELECT SYSEMPID FROM(((MSTPERSONALDETAILS PD LEFT JOIN MSTCATEGORY CAT ON PD.CATEGCODE=CAT.SYSCATEGCODE) LEFT JOIN MSTUNITDETAILS U ON PD.UNITCODE=U.SYSUNITCODE) LEFT JOIN MSTDESIGNATION DES ON PD.DESIGCODE=DES.SYSDESIGCODE) LEFT JOIN MSTDEPARTMENT DEP ON PD.DEPTCODE=DEP.SYSDEPTCODE WHERE EMPID IS NOT NULL "strFltrString" ) ";
    leaveStmt.executeUpdate(query);
    synchronized(leaveStmt)
    //leaveStmt1.executeUpdate("set TRANSACTION ISOLATION LEVEL REPEATABLE READ"); // setting transaction level using SQL
    // leaveStmt1.executeUpdate("start transaction"); // Starting a transaction using SQL     
    query1="DELETE FROM TRNDAILYATTENDANCE WHERE ATTDATE BETWEEN '"datefrom1"' AND '"dateto"' AND EMPID IN (SELECT SYSEMPID FROM (((MSTPERSONALDETAILS PD "
    +"LEFT JOIN MSTCATEGORY CAT ON PD.CATEGCODE=CAT.SYSCATEGCODE) LEFT JOIN MSTUNITDETAILS U ON PD.UNITCODE=U.SYSUNITCODE) LEFT JOIN MSTDESIGNATION DES ON PD.DESIGCODE = DES.SYSDESIGCODE )LEFT JOIN MSTDEPARTMENT DEP ON PD.DEPTCODE=DEP.SYSDEPTCODE WHERE EMPID IS NOT NULL "strFltrString" )";
    //leaveStmt.addBatch(query1);
    leaveStmt.executeUpdate(query1);
    synchronized(leaveStmt)
    query2="UPDATE TRNLEAVEAPPLICATION SET TAKENTOATT='N' WHERE '"datefrom1"' BETWEEN FROMDATE AND "
    +"TODATE AND '"dateto"' BETWEEN FROMDATE AND TODATE AND EMPID IN (SELECT SYSEMPID FROM (((MSTPERSONALDETAILS PD LEFT JOIN MSTCATEGORY CAT ON "
    +"PD.CATEGCODE=CAT.SYSCATEGCODE) LEFT JOIN MSTUNITDETAILS U ON PD.UNITCODE=U.SYSUNITCODE) LEFT JOIN "
    +"MSTDESIGNATION DES ON PD.DESIGCODE=DES.SYSDESIGCODE) LEFT JOIN MSTDEPARTMENT DEP ON PD.DEPTCODE=DEP.SYSDEPTCODE WHERE EMPID IS NOT NULL "+strFltrString +") ";
    //leaveStmt.addBatch(query2);
    //leaveStmt.executeBatch();
    leaveStmt.executeUpdate(query2);
    //} // end of for loop
    else
    leaveStmt.executeUpdate("commit");
    Please Solve my problem for this error thanks in advance........

  • Adding rows to J2ME WTK/Settings/User Defined (through Java code)

    Hi all..
    Just a quick question..
    Is it possible to add Key/Value pairs to a MIDlet's 'User Defined' field through Java code..(ie) - add a new row to the User Defined field..
    If not, can anyone tell me how a Bluetooth-Client GUI can save an image it has been sent by a Bluetooth-Server GUI?
    Thanks in advance..
    Rookie

    if i understand you, you want to call application module method when user clicks on add button on the UI and your table is from VO
    so what i can come up for now is:
    1) create variable binding from the iterator for both name and price.
    2) on your UI action button :
    <af:commandButton actionListener="yourbean.addToCart">
    <f:attribute name="pName" value ="binding.<created name bind variable>"
    <f:attribute name="pPrice" value = "binding.<created price bind variable>"
    </af:commandButton>
    3) custom Managed Bean:
    //yourBean.java
    public void addToCart(ActionEvent e){
    // get binding here
    // use executeWitParams method to send parameter to the function "testMethod" and execute
    //AppModuleImp.java
    public void testMethod(String pName,String pPrice) {
    CardVOImpl vo = this.getCartVO1();
    CardVORowImpl r = (CardVORowImpl)vo.createRow();
    r.setAttribute("NAME", pName);
    r.setAttribute("PRICE", pPrice);
    vo.insertRow(r);
    Hope this helps...
    Let me know if not..
    Thanks
    Edited by: MavenDev on Oct 30, 2011 8:08 PM

  • Some java code returns a null resultset from 10.2.0.1 DB, but works w/ 9.2

    I am a Java noob guys, but we have java code the calls an Oracle Function. This code is unchanged from what successfully runs against an Oracle 9.2 database returning, in this case, one row from the database. A ref cursor is used. When the same Java code calls the same ref cursor function from a 10.2.0.1 database, a null resultset occurs. The function correctly returns a single row when executed by the same database user via sql-plus. So it must be a java thing. Does the jdbc driver need to be upgraded to correctly run against a 10.2 database? And is this null resultset type of anomaly a potential result of having a wrong version of ojdbc14.jar? Nothing else has changed except pointing the code to the same package and tables in a 10.2 database.
    Thanks in advance for your comments.
    Phil McDermott

    I realize now that this is the wrong forum to post in, but I was linked here from a google search on the issue.
    I downloaded the 10.2.0.1 ojdbc14.jar from oracle, but the problem persists.
    yeesh! now what?

  • EXCEPTION_ACCESS_VIOLATION (0xc0000005) on compiled Java code

    I'm confronted with the following error of this code.
    http://db-www.naist.jp/~makoto-y/tmp/Int2LongHash.java
    The exception appears only when the system gets high-load.
    Is there work-arounds?
    I've tried also with jdk1.5.0_06, but the same error occurred.
    Converting the inner class to a top-level class has no effects.
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00a2cd75, pid=1540, tid=2968
    # Java VM: Java HotSpot(TM) Client VM (1.6.0-beta2-b86 mixed mode)
    # Problematic frame:
    # J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x003f6800): JavaThread "main" [_thread_in_Java, id=2968]
    siginfo: ExceptionCode=0xc0000005, writing address 0xfc2cee54
    Registers:
    EAX=0x42d43500, EBX=0x03d3ee00, ECX=0x03d3ee00, EDX=0x07911838
    ESP=0x0091f760, EBP=0x0091f778, ESI=0x0790f9f8, EDI=0xfc2cee38
    EIP=0x00a2cd75, EFLAGS=0x00010203
    Top of Stack: (sp=0x0091f760)
    0x0091f760: 0790ac30 079220b0 00000200 03d917f8
    0x0091f770: 00000000 6d955aa7 0091f7a8 00a2c9dc
    0x0091f780: 00000200 00000000 0091f7e8 00a12d50
    0x0091f790: 5ab674cf 00000000 07911838 03d3ee00
    0x0091f7a0: 03d8b700 00000010 0091f7f8 00a2c000
    0x0091f7b0: 03d8b700 078e4af4 00000010 00a2ab04
    0x0091f7c0: 078e4af4 03d8b700 00000010 00000001
    0x0091f7d0: 00000000 6d955ae7 5ab674d0 00000000
    Instructions: (pc=0x00a2cd75)
    0x00a2cd65: 20 8b fe c1 ef 09 c6 87 80 b1 5b 48 00 8b 79 20
    0x00a2cd75: 89 77 1c c1 ef 09 c6 87 80 b1 5b 48 00 8b e5 5d
    Stack: [0x008d0000,0x00920000), sp=0x0091f760, free space=317k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.remove(I)J
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap.addEntry(IIJLorg/metabrick/xbird/util/collections/Int2LongHash$BucketEntry;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.put(IJ)J
    J org.metabrick.xbird.xquery.util.StringChunk.storeCharChunk([CII)J
    J org.metabrick.xbird.xquery.util.StringChunk.store([CII)J
    J org.metabrick.xbird.xquery.dm.dtm.BigDocumentTable.setTextAt(J[CII)J
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.createTextNode()V
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.endElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    J org.apache.xerces.parsers.AbstractSAXParser.endElement(Lorg/apache/xerces/xni/QName;Lorg/apache/xerces/xni/Augmentations;)V
    J org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement()I
    J org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z
    j org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z+24
    j org.apache.xerces.parsers.XML11Configuration.parse(Z)Z+132
    j org.apache.xerces.parsers.XML11Configuration.parse(Lorg/apache/xerces/xni/parser/XMLInputSource;)V+29
    j org.apache.xerces.parsers.XMLParser.parse(Lorg/apache/xerces/xni/parser/XMLInputSource;)V+9
    j org.apache.xerces.parsers.AbstractSAXParser.parse(Lorg/xml/sax/InputSource;)V+43
    j org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Lorg/xml/sax/InputSource;)V+43
    j org.metabrick.xbird.xquery.dm.instance.DocumentTableModel.loadDocument(Ljava/io/InputStream;)V+35
    j org.metabrick.xbird.client.tools.command.ImportDocument.process([Ljava/lang/String;)Z+99
    j org.metabrick.xbird.client.tools.CommandInvoker.executeCommand([Ljava/lang/String;)Z+8
    j org.metabrick.xbird.client.tools.CommandInvoker.run([Ljava/lang/String;)V+66
    j org.metabrick.xbird.client.tools.CommandInvoker.main([Ljava/lang/String;)V+19
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x48aa5000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3636]
    0x48aa0800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4076]
    0x48a9e400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3144]
    0x48aac400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2248]
    0x48a86c00 JavaThread "Finalizer" daemon [_thread_blocked, id=2664]
    0x48a82800 JavaThread "Reference Handler" daemon [_thread_blocked, id=2700]
    =>0x003f6800 JavaThread "main" [_thread_in_Java, id=2968]
    Other Threads:
    0x48a7f400 VMThread [id=4028]
    0x48aa6800 WatcherThread [id=3704]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 72576K, used 28616K [0x029d0000, 0x07890000, 0x07890000)
    eden space 64512K, 32% used [0x029d0000, 0x03e6fdd0, 0x068d0000)
    from space 8064K, 92% used [0x068d0000, 0x07022230, 0x070b0000)
    to space 8064K, 0% used [0x070b0000, 0x070b0000, 0x07890000)
    tenured generation total 967936K, used 253073K [0x07890000, 0x429d0000, 0x429d0000)
    the space 967936K, 26% used [0x07890000, 0x16fb4788, 0x16fb4800, 0x429d0000)
    compacting perm gen total 12288K, used 5879K [0x429d0000, 0x435d0000, 0x469d0000)
    the space 12288K, 47% used [0x429d0000, 0x42f8dd08, 0x42f8de00, 0x435d0000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\Program Files\Java\jdk1.6.0\bin\javaw.exe
    0x7c940000 - 0x7c9dd000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c931000      C:\WINDOWS\system32\kernel32.dll
    0x77d80000 - 0x77e29000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e30000 - 0x77ec1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77cf0000 - 0x77d7f000      C:\WINDOWS\system32\USER32.dll
    0x77ed0000 - 0x77f17000      C:\WINDOWS\system32\GDI32.dll
    0x762e0000 - 0x762fd000      C:\WINDOWS\system32\IMM32.DLL
    0x60740000 - 0x60749000      C:\WINDOWS\system32\LPK.DLL
    0x73f80000 - 0x73feb000      C:\WINDOWS\system32\USP10.dll
    0x77bc0000 - 0x77c18000      C:\WINDOWS\system32\msvcrt.dll
    0x7c340000 - 0x7c396000      C:\Program Files\Java\jdk1.6.0\jre\bin\msvcr71.dll
    0x6d7f0000 - 0x6da2f000      C:\Program Files\Java\jdk1.6.0\jre\bin\client\jvm.dll
    0x76af0000 - 0x76b1b000      C:\WINDOWS\system32\WINMM.dll
    0x6d310000 - 0x6d318000      C:\Program Files\Java\jdk1.6.0\jre\bin\hpi.dll
    0x76ba0000 - 0x76bab000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d7a0000 - 0x6d7ac000      C:\Program Files\Java\jdk1.6.0\jre\bin\verify.dll
    0x6d3a0000 - 0x6d3bf000      C:\Program Files\Java\jdk1.6.0\jre\bin\java.dll
    0x6d7e0000 - 0x6d7ef000      C:\Program Files\Java\jdk1.6.0\jre\bin\zip.dll
    0x6d560000 - 0x6d573000      C:\Program Files\Java\jdk1.6.0\jre\bin\net.dll
    0x719e0000 - 0x719f7000      C:\WINDOWS\system32\WS2_32.dll
    0x719d0000 - 0x719d8000      C:\WINDOWS\system32\WS2HELP.dll
    0x6d580000 - 0x6d589000      C:\Program Files\Java\jdk1.6.0\jre\bin\nio.dll
    VM Arguments:
    jvm_args: -Xmx1024m -Xms1024m
    java_command: org.metabrick.xbird.client.tools.CommandInvoker -col /xmark import document C:\Software\xmark\xmark100.xml
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0
    PATH=C:\Program Files\Java\jdk1.6.0\bin;D:\Software\maven-1.0.2\bin;D:\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Software\apache-ant-1.6.5\bin;C:\ghc\ghc-6.4.2\bin;C:\Program Files\QuickTime\QTSystem\
    USERNAME=yui
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 4, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 2096404k(108924k free), swap 3511144k(1471688k free)
    vm_info: Java HotSpot(TM) Client VM (1.6.0-beta2-b86) for windows-x86, built on Jun 2 2006 00:36:31 by "java_re" with unknown MS VC++:1310

    The following is the error that I got with using JDK 1.5.
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00b8c9f8, pid=4024, tid=1608
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode)
    # Problematic frame:
    # J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    --------------- T H R E A D ---------------
    Current thread (0x00036190): JavaThread "main" [_thread_in_Java, id=1608]
    siginfo: ExceptionCode=0xc0000005, writing address 0xfa424094
    Registers:
    EAX=0x00040e40, EBX=0xfa424078, ECX=0x05bd3fc0, EDX=0x05bd3fc0
    ESP=0x0007f578, EBP=0x0007f590, ESI=0xfa424078, EDI=0x081c8168
    EIP=0x00b8c9f8, EFLAGS=0x00010203
    Top of Stack: (sp=0x0007f578)
    0x0007f578: 081c1fa8 6d7d1061 022dd1c8 00000000
    0x0007f588: 00000200 00000200 0007f5c8 00b8c598
    0x0007f598: 0899f428 05bd3fc0 00000200 00000000
    0x0007f5a8: 0007f5c8 00b41018 00000200 000001cb
    0x0007f5b8: 05c50338 05c19448 05bd3fc0 000001a8
    0x0007f5c8: 0007f648 00b8b880 07dd565c 0899f428
    0x0007f5d8: 022dd1cb 00000000 08976190 00b8054c
    0x0007f5e8: 00001000 0000af89 00001000 6d7d1061
    Instructions: (pc=0x00b8c9f8)
    0x00b8c9e8: 89 5f 20 c1 e8 09 c6 80 00 a9 6c 48 00 8b 72 20
    0x00b8c9f8: 89 7e 1c c1 ee 09 c6 86 00 a9 6c 48 00 8b e5 5d
    Stack: [0x00040000,0x00080000), sp=0x0007f578, free space=253k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.remove(I)J
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap.addEntry(IIJLorg/metabrick/xbird/util/collections/Int2LongHash$BucketEntry;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.put(IJ)J
    J org.metabrick.xbird.xquery.util.StringChunk.storeCharChunk([CII)J
    J org.metabrick.xbird.xquery.util.StringChunk.store([CII)J
    J org.metabrick.xbird.xquery.dm.dtm.BigDocumentTable.setTextAt(J[CII)J
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.createTextNode()V
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.endElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    J com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Lcom/sun/org/apache/xerces/internal/xni/QName;Lcom/sun/org/apache/xerces/internal/xni/Augmentations;)V
    J com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement()I
    J com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z
    v ~OSRAdapter
    j com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z+24
    j com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Z)Z+118
    j com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Lcom/sun/org/apache/xerces/internal/xni/parser/XMLInputSource;)V+29
    j com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Lcom/sun/org/apache/xerces/internal/xni/parser/XMLInputSource;)V+9
    j com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Lorg/xml/sax/InputSource;)V+43
    j org.metabrick.xbird.xquery.dm.instance.DocumentTableModel.loadDocument(Ljava/io/InputStream;)V+35
    j org.metabrick.xbird.client.tools.command.ImportDocument.process([Ljava/lang/String;)Z+102
    j org.metabrick.xbird.client.tools.CommandInvoker.executeCommand([Ljava/lang/String;)Z+8
    j org.metabrick.xbird.client.tools.CommandInvoker.run([Ljava/lang/String;)V+66
    j org.metabrick.xbird.client.tools.CommandInvoker.main([Ljava/lang/String;)V+19
    v ~StubRoutines::call_stub
    V [jvm.dll+0x845a9]
    V [jvm.dll+0xd9317]
    V [jvm.dll+0x8447a]
    V [jvm.dll+0x8b44a]
    C [java.exe+0x14c5]
    C [java.exe+0x64dd]
    C [kernel32.dll+0x16fd7]
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x00aa7490 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1780]
    0x00aa60f0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3456]
    0x00aa53f8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2544]
    0x00a96c80 JavaThread "Finalizer" daemon [_thread_blocked, id=856]
    0x00a957e8 JavaThread "Reference Handler" daemon [_thread_blocked, id=816]
    =>0x00036190 JavaThread "main" [_thread_in_Java, id=1608]
    Other Threads:
    0x0003fbd0 VMThread [id=3592]
    0x00ab0e20 WatcherThread [id=3108]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 72576K, used 59965K [0x02ae0000, 0x079a0000, 0x079a0000)
    eden space 64512K, 80% used [0x02ae0000, 0x05d8f7b0, 0x069e0000)
    from space 8064K, 99% used [0x069e0000, 0x071bfff8, 0x071c0000)
    to space 8064K, 0% used [0x071c0000, 0x071c0000, 0x079a0000)
    tenured generation total 967936K, used 451270K [0x079a0000, 0x42ae0000, 0x42ae0000)
    the space 967936K, 46% used [0x079a0000, 0x23251ab0, 0x23251c00, 0x42ae0000)
    compacting perm gen total 8192K, used 5367K [0x42ae0000, 0x432e0000, 0x46ae0000)
    the space 8192K, 65% used [0x42ae0000, 0x4301dfb0, 0x4301e000, 0x432e0000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040c000      C:\Program Files\Java\jdk1.5.0_06\bin\java.exe
    0x7c940000 - 0x7c9dd000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c931000      C:\WINDOWS\system32\kernel32.dll
    0x77d80000 - 0x77e29000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e30000 - 0x77ec1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77bc0000 - 0x77c18000      C:\WINDOWS\system32\MSVCRT.dll
    0x6d6e0000 - 0x6d874000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\client\jvm.dll
    0x77cf0000 - 0x77d7f000      C:\WINDOWS\system32\USER32.dll
    0x77ed0000 - 0x77f17000      C:\WINDOWS\system32\GDI32.dll
    0x76af0000 - 0x76b1b000      C:\WINDOWS\system32\WINMM.dll
    0x762e0000 - 0x762fd000      C:\WINDOWS\system32\IMM32.DLL
    0x60740000 - 0x60749000      C:\WINDOWS\system32\LPK.DLL
    0x73f80000 - 0x73feb000      C:\WINDOWS\system32\USP10.dll
    0x6d2f0000 - 0x6d2f8000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\hpi.dll
    0x76ba0000 - 0x76bab000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d6b0000 - 0x6d6bc000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\verify.dll
    0x6d370000 - 0x6d38d000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\java.dll
    0x6d6d0000 - 0x6d6df000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\zip.dll
    0x6d530000 - 0x6d543000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\net.dll
    0x719e0000 - 0x719f7000      C:\WINDOWS\system32\WS2_32.dll
    0x719d0000 - 0x719d8000      C:\WINDOWS\system32\WS2HELP.dll
    0x6d550000 - 0x6d559000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\nio.dll
    VM Arguments:
    jvm_args: -Xmx1024m -Xms1024m -ea
    java_command: org.metabrick.xbird.client.tools.CommandInvoker -col /xmark import document C:\Software\xmark\xmark100.xml
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0
    PATH=C:\Program Files\Java\jdk1.6.0\bin;D:\Software\maven-1.0.2\bin;D:\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Software\apache-ant-1.6.5\bin;C:\ghc\ghc-6.4.2\bin;C:\Program Files\QuickTime\QTSystem\
    USERNAME=yui
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 4, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 2096404k(370660k free), swap 3511144k(1545452k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0

  • How to get the selected node value of a tree which is build on java code

    Hi Experts,
    How can i get the selected node value if I build the tree programatically.
    I am using the following code in selectionListener but it is throwing error.
    RichTreeTable treeTable = (RichTreeTable)getQaReasontreeTable();
    CollectionModel _tableModel =
    (CollectionModel)treeTable.getValue();
    RowKeySet _selectedRowData = treeTable.getSelectedRowKeys();
    Iterator rksIterator = _selectedRowData.iterator();
    String selectedQaCode ="";
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding =
    treeTableBinding.findNodeByKeyPath(key);
    String nodeStuctureDefname =
    nodeBinding.getHierTypeBinding().getStructureDefName();
    selectedQaCode = selectedQaCode + nodeBinding.getAttribute(0);
    where I am using following link to create a tree with java code.
    http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html
    Please help me in resolving this issue.
    Regards
    Gayaz

    Hi,
    you should also move
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    out of the while loop as this is not necessary to be repeated for each key in the set
    Frank

  • JAVA CODE  NOT CREATING IDOC

    Hi all
    I m facing problem to upload data through idoc.the scenario is like we receive electric meter reading in flat file format. And to upload that data JAVA code is written which will create an IDOC FILE this authorization is only give to 2-3 person in organization and to basis guy also as user changed it’s password in SAP and in JAVA the java code is not going to create the IDOC file and data is not going to upload. after changing user password in sap system ,user not able to upload the data.
    ISU_MR_UPLOAD01 is the idoc file generated. So is there any authorization issue, password issue how to see and view IDOC IN SAP, can any one help me out into this.
    The error with java throws is as;
    1ST ERROR IN TRACE FILE
    ERROR file opened at 20061109 133610 India Standard, SAP-REL 640,0,59 RFC-VER 3  MT-SL
    T:2736 ======> User TR has no RFC authorization for function group SYST .
    T:2736 <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
    2ND ERROR ON COMMAND PROMT
    C:\j2sdk1.4.2_07>cd bin
    C:\j2sdk1.4.2_07\bin>java sandsupload
    Creating IDoc...Exception in thread "main" com.sap.mw.idoc.IDoc$Exception: (2) I
    DOC_ERROR_METADATA_UNAVAILABLE: The meta data for the IDoc type "ISU_MR_UPLOAD01
    " is unavailable.
            at com.sap.mw.idoc.jco.JCoIDoc$JCoDocument.<init>(JCoIDoc.java:233)
            at com.sap.mw.idoc.jco.JCoIDoc$JCoDocument.<init>(JCoIDoc.java:187)
            at com.sap.mw.idoc.jco.JCoIDoc.createDocument(JCoIDoc.java:10521)
            at sandsupload.main(sandsupload.java:35)
    the part of java code
    try {
                //create a JCo client pool
                JCO.addClientPool( "MyPool",    //pool name
                                   3,           //maximum pool connections
                                   "333",       //SAP client
                                   " TR",    //user ID
                                   " XYZ",  //password
                                   "EN",        //language
                                   " 1.1.1.1   ", //app server host name
                                   "00" );   //system number
                //create an IDoc repository
                IDoc.Repository idocRep = JCoIDoc.createRepository("MyIDocRepository", "MyPool");
                //create a new and empty MATMAS02 document
                System.out.print("Creating IDoc...");
         Line where it shows error
                IDoc.Document doc = JCoIDoc.createDocument(idocRep, "ISU_MR_UPLOAD01");
                //get the root segment from the document
                //The root segment does not contain any fields or data. It is only
                //used as the standard parent segment and won't be transmitted when
                //the document is sent to an SAP system.
                IDoc.Segment segment = doc.getRootSegment();
                //create and add a new and empty child segment of type E1MARAM
                //and fill the segment data

    Hi Gaurav,
    Same exception on the same line has been reported and marked as solved here :
    IDOC_ERROR_METADATA_UNAVAILABLE:
    Btw, I think this forum is not visited often by JCO and ABAP connectivity experts, so maybe you could get a faster response to your problems while posting in "Java Programming" or maybe in some forum under the category ABAP Development.
    HTH
    Peter

  • Calling java code from oracle apps form

    I've created my own java .class file and am attempting to call it from an oracle applications form. I am getting a runtime error while running the form, but I don't know what the error is because nothing is being reported to me.
    I've created the .java file in JDeveloper, compiled it into a .class file, deployed it to a .jar file, and placed it on the application server in a directory that the CLASSPATH can see it. I've added it to the archive parameter of the appsweb.cfg file and see that the .jar file is being downloaded when the JInitiator of Oracle Apps is started.
    I have also imported the .class file into the form via the Program -> Import Java Classes which resulted in PL/SQL package stubs created to call the .class methods.
    When I run the form, the java code is activated on a triggering event, PRE-INSERT. There is no java bean item in a block or on a canvas anywhere. I dont' think I need there to be since I am simply using the java code to perform actions during PRE-INSERT, not to display anything on the canvas.
    I have placed debug messages throughout my code and see that the error is occuring in the PL/SQL packaged stub at the line "JNI.GET_CLASS()" where the parameter to that call is the name of my class. I know it's erroring there because I am handling the "java_error" exception. I am displaying "ora_java.last_error" in the exception handling, but it is null.
    I am at a loss as to determine why I am having problems and how to display an error. Any suggestions? I'm happy to outline my steps and problem in more detail if I have missed something obvious.
    We are using Forms 6.0.8.21.3 with Oracle Apps 11.5.7.
    Shane.

    Shane,
    Don't loose the heart. You have come too close to end.
    The scenario you have mentioned is very unique and something which will fit more in the forms forum. So I think that was a sincere answer to help you and not a "pass the buck" card type game :)
    You are lucky that you got Tapash interested into this issue, otherwise you see there is no OAF component involved out here.
    I have an article promised to some of the guys but will follow this issue.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error while sending Email through Java Code in OIM

    Hi All,
    I have created a java code using tcEmailNotificationUtil, and integrated the same with the adapter.
    I am triggering this adapter when an approval process gets completed.
    As soon as the approval process gets completed my email task is triggering but the task is getting rejected.
    I have checked my system configuration for mail server settings.Everything seems working fine.
    Can you please help me in this issue how to debug?
    Thanks in advance.

    Hi,
    Here is my log file:
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SERVER] - Class/Method: QuartzWrapper/insertTaskHistory left.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/run entered.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: ReIssueAuditMessage/execute entered.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: ReIssueAuditMessage/initialize entered.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/getAttribute entered.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/getAttribute left.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/getUtility entered.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/getUtility left.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.ACCOUNTMANAGEMENT] - Class/Method: tcUtilityFactory/getRemoteUtility - Data: moUtil - Value: Thor.API.Operations.tcAuditOperationsClient
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: ReIssueAuditMessage/initialize left.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: ReIssueAuditMessage/processAllByIdentifier entered.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/isStopped entered.
    DEBUG,25 Apr 2011 10:40:00,099,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/isStopped left.
    DEBUG,25 Apr 2011 10:40:00,100,[XELLERATE.DATABASE] - select A.* from (select aud_jms_key, aud_class, identifier from aud_jms order by aud_jms_key) A where rownum <= ?
    INFO,25 Apr 2011 10:40:00,101,[XELLERATE.PERFORMANCE] - Query: DB: 1, LOAD: 0, TOTAL: 1
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/isStopped entered.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/isStopped left.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/isStopped entered.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/isStopped left.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SCHEDULER.TASK] - Class/Method: ReIssueAuditMessage/execute left.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/run left.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/isSuccess entered.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SCHEDULER.TASK] - Class/Method: SchedulerBaseTask/isSuccess left.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SERVER] - Class/Method: SchedulerTaskLocater /removeLocalTask entered.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SERVER] - Class/Method: SchedulerTaskLocater /removeLocalTask left.
    DEBUG,25 Apr 2011 10:40:00,102,[XELLERATE.SERVER] - Class/Method: QuartzWrapper/updateStatusToInactive entered.
    DEBUG,25 Apr 2011 10:40:00,104,[XELLERATE.SERVER] - Class/Method: QuartzWrapper/updateStatusToInactive left.
    DEBUG,25 Apr 2011 10:40:00,104,[XELLERATE.SERVER] - Class/Method: QuartzWrapper/updateTaskHistory entered.
    DEBUG,25 Apr 2011 10:40:00,106,[XELLERATE.SERVER] - Class/Method: QuartzWrapper/updateTaskHistory left.
    DEBUG,25 Apr 2011 10:40:00,106,[XELLERATE.SERVER] - Clearing Security Associations with thread executing Scheduled task
    DEBUG,25 Apr 2011 10:40:00,106,[XELLERATE.SERVER] - Class/Method: QuartzWrapper/run left.
    DEBUG,25 Apr 2011 10:40:00,106,[XELLERATE.SERVER] - Class/Method: QuartzWrapper/execute left.
    and I just wanted to ensure that my coding part is also fine.
    Posting the code even:
    tcDataProvider ioDatabase = new tcDataBaseClient();
    tcEmailNotificationUtil sendMail = new tcEmailNotificationUtil(ioDatabase);
    sendMail.setBody("Sample Message");
    sendMail.setSubject("subject");
    sendMail.setFromAddress("fromemailaddress");
    sendMail.sendEmail("recepient");
    Thanks in Advance.

  • How to find out top 10 records from the R/3 using Java code (WD Program)

    Hi Experts,
    I have used Java Web Dynpro program to fetch records from the backend. Following code helps me and fetches record. As per the customer reqirement, we have to fetch only top 10 records (Actual Cost) from the backend. So I have to modify the Java code. How I can do so? Please help.
              wdContext.nodeGraphData().invalidate();
              IPublicCostcnt.IGraphDataElement categoryElement;
                   for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
                   categoryElement = wdContext.createGraphDataElement();
                   categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
                   categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
                   categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
                   wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

    Dear SDN Users,
    This is how I resolved the issue.
    1) Requested ABAPer to provide me sorted data. The data has been sorted in descending order of actual_cost.
    2) After that I used following code. This resolved the issue.
         if (wdContext.nodeItab_Final1().size()>10){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < 10; i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
         if (wdContext.nodeItab_Final1().size()<=10){
         if (wdContext.nodeItab_Final1().size()>0){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

  • [UCCx] Change volume of an audio file (java code)

    Hello guys,
    Thanks to the many examples I compiled on the subject, I was able to create a script that mixes 2 audio wav files into a 3rd one. Basically the goal is to mix a first audio file containing some speech with a second one containing some music, these files being encoded identically (8 bits, 8KHz, mono wav files). The resulting file must be encoded in the same format than the initial ones.
    The mixing operation is performed thanks to the MixingAudioInputStream library found online (it can be found here).
    It is not the most beautiful Java code (I am no developer), but it works:
    Document doc1 = (Document) promptFlux1;
    Document doc2 = (Document) promptFlux2;
    Document docFinal = (Document) promptFinal;
    javax.sound.sampled.AudioFormat formatAudio = null;
    java.util.List audioInputStreamList = new java.util.ArrayList();
    javax.sound.sampled.AudioInputStream ais1 = null;
    javax.sound.sampled.AudioInputStream ais2 = null;
    javax.sound.sampled.AudioInputStream aisTemp = null;
    javax.sound.sampled.AudioFileFormat formatFichierAudio = javax.sound.sampled.AudioSystem.getAudioFileFormat(new java.io.BufferedInputStream(doc1.getInputStream()));
    java.io.File fichierTemp = java.io.File.createTempFile("wav", "tmp");
    ais1 = javax.sound.sampled.AudioSystem.getAudioInputStream(doc1.getInputStream());
    formatAudio = ais1.getFormat();
    aisTemp = javax.sound.sampled.AudioSystem.getAudioInputStream(doc2.getInputStream());
    byte[] bufferTemp = new byte[(int)ais1.getFrameLength()];
    int nbOctetsLus = aisTemp.read(bufferTemp, 0, bufferTemp.length);
    java.io.ByteArrayInputStream baisTemp = new java.io.ByteArrayInputStream(bufferTemp);
    ais2 = new javax.sound.sampled.AudioInputStream(baisTemp, formatAudio, bufferTemp.length/formatAudio.getFrameSize());
    audioInputStreamList.add(ais1);
    audioInputStreamList.add(ais2);
    MixingAudioInputStream mixer = new MixingAudioInputStream(formatAudio, audioInputStreamList);
    javax.sound.sampled.AudioSystem.write(mixer, formatFichierAudio.getType(), fichierTemp);
    return fichierTemp;
    The only downside to this is that the music can be a little loud comparing to the speech. So I am now trying to use the AmplitudeAudioInputStream library to adjust the volume of the second file (it can be found here).
    Here are the additional lines I wrote to do this:
    ais2 = new javax.sound.sampled.AudioInputStream(baisTemp, formatAudio, bufferTemp.length/formatAudio.getFrameSize());
    org.tritonus.dsp.ais.AmplitudeAudioInputStream amplifiedAudioInputStream = new org.tritonus.dsp.ais.AmplitudeAudioInputStream(ais2, formatAudio);
    amplifiedAudioInputStream.setAmplitudeLinear(0.2F);
    audioInputStreamList.add(ais1);
    audioInputStreamList.add(amplifiedAudioInputStream);
    MixingAudioInputStream mixer = new MixingAudioInputStream(formatAudio, audioInputStreamList);
    javax.sound.sampled.AudioSystem.write(mixer, formatFichierAudio.getType(), fichierTemp);
    return fichierTemp;
    The problem is I always get the following exception when executing the code:
    could not write audio file: file type not supported: WAVE; nested exception is: java.lang.IllegalArgumentException: could not write audio file: file type not supported: WAVE (line 30, col:2)
    The error is on the last line (the write method), but after many hours of tests and research I cannot understand why this is not working... so I have added some "debugging" information to the code:
    System.out.println("file1 audio file format: " + formatFichierAudio.toString());
    System.out.println("file1 file format: " + ais1.getFormat().toString());
    System.out.println("file2 file format: " + ais2.getFormat().toString());
    System.out.println("AIS with modified volume file format: " + amplifiedAudioInputStream.getFormat().toString());
    System.out.println("Mixed AIS (final) file format: " + mixer.getFormat().toString());
    AudioFileFormat.Type[] typesDeFichiers = AudioSystem.getAudioFileTypes(mixer);
    for (int i = 0; i < typesDeFichiers.length ; i++) {
    System.out.println("Mixed AIS (final) #" + i + " supported file format: " + typesDeFichiers[i].toString());
    System.out.println("Is WAVE format supported by Mixed AIS (final): " + AudioSystem.isFileTypeSupported(AudioFileFormat.Type.WAVE, mixer));
    System.out.println("Destination file format: " + (AudioSystem.getAudioFileFormat((java.io.File)f)).toString());
    AudioInputStream aisFinal = AudioSystem.getAudioInputStream(f);
    System.out.println("Is WAVE format supported by destination file: " + AudioSystem.isFileTypeSupported(AudioFileFormat.Type.WAVE, aisFinal));
    try {
    // Ecriture du flux résultant dans un fichier
    javax.sound.sampled.AudioSystem.write(mixer, formatFichierAudio.getType(), fichierTemp);
    return fichierTemp;
    catch (Exception e) {
    System.err.println("Caught Exception: " + e.getMessage());
    Which gives the following result during execution:
    file1 audio file format: WAVE (.wav) file, byte length: 146964, data format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame, , frame length: 146906
    file1 file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    file2 file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    AIS with modified volume file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    Mixed AIS (final) file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    Mixed AIS (final) #1 supported file format: WAVE
    Mixed AIS (final) #2 supported file format: AU
    Mixed AIS (final) #3 supported file format: AIFF
    Is WAVE format supported by Mixed AIS (final): true
    Destination file format: WAVE (.wav) file, byte length: 146952, data format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame, , frame length: 146906
    Is WAVE format supported by destination file: true
    So everything tends to show that the format should be supported and the mixed AIS should be written to the file... but I still get the error.
    I am really confused here, if someone could help it would be great.
    Thanks in advance!
    PS: I have attached print screens of the actual script, without the "volume adjustment" code.

    Hi,
    well I started writing a similar solution but it did not work either so I just put it on hold.
    I also tried to get hold of the streaming "device" abstraction of UCCX to adjust the volume while "playing" but that was a dead end, too, unfortunately.
    Sorry about my previous comment on your StackOverflow post, that time I thought it was kind of out of context but I believe you only wanted to ask about this issue on all available forums.
    G.

  • JSP precompilation and my .java files compilation issues /  building WAR file using ANT

    Hello.
    I am new to working with WAR files and the whole process of it. A little
    background on what we are using. We are using, WLS 6.1 SP3. I am using the
    ant.bat that is supplied in the bin directory of the WLS install.
    I am trying to work with ANT and getting it to build the file. I am making
    progress, but at a point where I am having trouble getting my java code
    files to compile using ant. I am having one issue and looking to do one
    other item.
    1) I would like to precompile the JSPs if possible prior to putting into the
    WAR file. Not sure if this is done or not, but there was a utility when I
    was working with ibm's app server that gave us the ability to do a batch
    complile. Was thinking that maybe a similair concept is possibly here.
    2) Having issue getting ant to compile code properly. In the compile
    section of the build.xml file for ant, I tell it where the source files are,
    and the destionation folder for the compiled class files. I then try to set
    the classpath so that it finds the .jar files that are necessary for my
    source files to complile. But, it won't find them. And not sure how come.
    I may be going about this all wrong, but dont know. Here is the compile
    section of the build.xml I am using:
    <target name="compile" depends="prepare">
    <javac srcdir="classes" destdir="${deploy.home}/WEB-INF/classes"
    classpath="$(lib.home)"
    debug="on" optimize="on" deprecation="off"/>
    </target>
    One note, I've tried many different items in the classpath line, which
    don't work. if I do *.jar it fails at complie time, invalid argument. As
    well as if I use *.* and so on. if I list the explicit file names, it still
    doesn't seem to find them.
    I was wondering if anyone could help, if you need anymore information let me
    know, I can send the entire build.xml if necessary. I may be missing
    items, seeing that this is my first try at using ANT.
    Any help is appreciated and thanks in advance. Hopefully not sounding too
    off the wall. Hopefully get some clarification and understanding.
    Thank you.
    Kevin.

    Kevin Price wrote:
    Hello.
    I am new to working with WAR files and the whole process of it. A little
    background on what we are using. We are using, WLS 6.1 SP3. I am using the
    ant.bat that is supplied in the bin directory of the WLS install.
    I am trying to work with ANT and getting it to build the file. I am making
    progress, but at a point where I am having trouble getting my java code
    files to compile using ant. I am having one issue and looking to do one
    other item.
    1) I would like to precompile the JSPs if possible prior to putting into the
    WAR file. Not sure if this is done or not, but there was a utility when I
    was working with ibm's app server that gave us the ability to do a batch
    complile. Was thinking that maybe a similair concept is possibly here.you can use weblogic.jspc
    http://e-docs.bea.com/wls/docs70/jsp/reference.html#57794
    or just set the precompile flag in weblogic.xml
    You can configure WebLogic Server to precompile your JSPs when a Web
    Application is deployed or re-deployed or when WebLogic Server starts up
    by setting the precompile parameter to true in the <jsp-descriptor>
    element of the weblogic.xml deployment descriptor.
    >
    2) Having issue getting ant to compile code properly. In the compile
    section of the build.xml file for ant, I tell it where the source files are,
    and the destionation folder for the compiled class files. I then try to set
    the classpath so that it finds the .jar files that are necessary for my
    source files to complile. But, it won't find them. And not sure how come.
    I may be going about this all wrong, but dont know. Here is the compile
    section of the build.xml I am using:
    <target name="compile" depends="prepare">
    <javac srcdir="classes" destdir="${deploy.home}/WEB-INF/classes"
    classpath="$(lib.home)"
    debug="on" optimize="on" deprecation="off"/>
    </target>
    maybe because you are not using curly braces there on lib.home??
    if you do it the way above, you would have to list all your jars
    classpath="$(lib.home)\lib1.jar:$(lib.home)\lib2.jar"
    or you can nest
    <javac srcdir="classes" destdir="${deploy.home}/WEB-INF/classes"
    debug="on" optimize="on" deprecation="off">
         <classpath>
              <fileset dir="${lib.home}" includes="*.jar" />
         </classpath>
    </javac>
    One note, I've tried many different items in the classpath line, which
    don't work. if I do *.jar it fails at complie time, invalid argument. As
    well as if I use *.* and so on. if I list the explicit file names, it still
    doesn't seem to find them.
    I was wondering if anyone could help, if you need anymore information let me
    know, I can send the entire build.xml if necessary. I may be missing
    items, seeing that this is my first try at using ANT.
    Any help is appreciated and thanks in advance. Hopefully not sounding too
    off the wall. Hopefully get some clarification and understanding.
    Thank you.
    Kevin.

  • Java Code to Connect to OIM on HTTPS

    Hi All,
    I have recently disabled the HTTP Port for OIM and enabled only HTTPS Port. I have java code that I used to connect to OIM on HTTP Port but that doesn't working anymore.
    I have update the OIM_URL to use t3s but not sure what else in system property I need to add (I think its has to be keystore path). So, i added System Property
    weblogic.security.SSL.trustedCAKeyStore = "Path of Kesytore"
    but I am getting below error:
    javax.security.auth.login.LoginException: java.lang.NoSuchMethodError: com/certicom/net/ssl/SSLContext.getCertificateSupport()Lcom/certicom/tls/interfaceimpl/CertificateSupport;
    at com.bea.sslplus.CerticomSSLContext.setTrustManager(Unknown Source)
    at weblogic.security.utils.SSLContextWrapper.<init>(SSLContextWrapper.java:62)
    at weblogic.security.utils.SSLContextWrapper.getInstance(SSLContextWrapper.java:55)
    at weblogic.security.utils.SSLSetup.getSSLContext(SSLSetup.java:323)
    Any pointers on what I have to add?
    TIA

    The issue was due to the order of jar files in build path:
    This is the correct order :
    1. Crypto.jar
    2. wlfullclient.jar
    3. wlcipher.jar
    4. webserviceclient+ssl.jar
    I use the JDK Keystore configured with IDE cacerts, import root ca cert and it worked.

  • Calling functions of the inner class in .java code file

    Hello,
    I created a .java code file in Visual J#.Net and converted it into
    the application by adding the "public static void main(String args[])"
    function.
    I have created the two classes one extends from Applet, and the other
    extends from Frame. The class which I inherited from the Frame class becomes
    the inner class of the class extended from the Applet. Now How do I
    call the functions of the class extended from Frame class - MenuBarFrame
    class. the outline code is
    public class menu_show extends Applet
    ------init , paint action function---------
    public class MenuBarFrame extends Frame
    paint,action function for Menu
    public static void main(String args[])
    applet class instance is created
    instance of frame is created
    Menu , MenuBar, MenuItem instance is created
    and all these objects added
    I have Created MenuBarFrame class instance as
    Object x= new menu_show().new MenuBarFrame
    ????? How to call the functions such as action of MenuBarFrame class - what
    should be its parameters??????
    }

    Here's how I would do it:
    interface Operation {
        public int op(int y);
    class X {
        private int x;
        public X(int x) {
            this.x = x;
        private class Y implements Operation {
            public int op(int y) {
                return x+y;
        public Operation createOperation() {
            return new Y();
        public static void main(String[] args) {
            X app = new X(17);
            Operation f = app.createOperation();
            System.out.println(f.op(-11));
    }Your code, however, has some serious "issues". You typically don't
    instantiate an applet class -- that's the job of the applet viewer or Java plugin
    your browser is using. If you instantiate the applet directly, you're going
    to have to supply it an AppletStub. Do you really want to go that way?
    Again, use an applet viewer or browser, or better yet, why write applets at all?

  • Java code for BAPI_SalesOrder_getlist_Input

    Hi Experts,
    I have done sales order using bapi in web dynpro.  I have complete all my design part related to this like  context mapping, model binding etc an all are working fine, now i have to write some java code in the Implementaion tab., 
    I have taken fields for this BAPI
    1-Output · Return
      Output · SalesOrders
      Customer_Number
      Document_Date
      Document_Date_To
      Sales_Organization
    I have wriiten something but, i am not sure as i do not have java background.
    so please help me out this issue or send me some documets on this topic.
    thanks & regards,
    Iqbal Ahmad

    Hi,
    This is the best thread to find all the flow and no need to write more code.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202f1dfb-74db-2910-e48e-a7430c317df9.
    U can add the followng code n the init method of any view or custom controller
    wdContext.nodeControllernodename().bind(new FnModule());
    // pass the nput.
    try{
    WdContext.CurrentControllerNodeElement().modelObject().execute();
    wdContext.nodeOutput().invalidate();
    close the brace and
    catch(Excepton e)
    e.prntStacTrace();
    close the trace.
    Thans
    Lohi
    Message was edited by:
            Lohitha M

Maybe you are looking for