Packing using WS_DELIVERY_UPDATE Error

Hi Experts,
I've been browsing the forums, and, despite the many examples available I can't put this FM(WS_DELIVERY_UPDATE) to work.
I want to do Packing of outbound Delivery using VL02N.I am using below Code ,But it's not Working.
it's not giving any  error (Sy-subrc 0 & i_prot is empty )but it's not create any HU or Updating Delivery Document no.I also tried some BAPI for Create HU but still not woring.
->BAPI_HU_CREATE
->BAPI_HU_PACK
DATA:
wa_vbkok TYPE vbkok,
wa_hus TYPE TABLE OF vekpvb,
wa_pack TYPE REPACK_HU_WM OCCURS 0 WITH HEADER LINE,
i_prot LIKE STANDARD TABLE OF prott WITH HEADER LINE.
data : VERKO type VERKO occurs 0 with header line.
wa_vbkok-vbeln = pvbeln.
wa_vbkok-vbeln_vl = pvbeln.
**wa_pack-desthu = exidv.
wa_pack-quantity = pqty.
wa_pack-meins = pmeins.
wa_pack-matnr = pmatnr.
**wa_pack-charg = pcharg.
wa_pack-werks = pwerks.
wa_pack-lgort = plgort.
wa_pack-vbeln_vl = pvbeln.
wa_pack-posnr_vl = pposnr.
wa_pack-object = '01'.
wa_pack-objkey = pvbeln.
APPEND wa_pack.
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
VBKOK_WA = wa_vbkok
SYNCHRON = 'X'
COMMIT = 'X'
DELIVERY = wa_vbkok-vbeln
TABLES
prot = i_prot
VERKO_TAB = VERKO
IT_PACKING = wa_pack
ET_CREATED_HUS = wa_hus
EXCEPTIONS
ERROR_MESSAGE = 1
OTHERS = 2.
COMMIT WORK AND WAIT.
Thanks,
Nehal.

The BAPIs for HU create/change work when HU management is switched on in your system. I had a similar requirement where packing was required without HU management. I got it working using Fm -BAPI_OUTB_DELIVERY_CONFIRM_DEC. Below is relevant code.
  ls_headerdata-deliv_numb = lv_delivery.
  ls_control-deliv_numb = lv_delivery.
    ls_bapidlvhdunhdr-hdl_unit_exid    = <fs_hdunhdr>-hdl_unit_exid.
    ls_bapidlvhdunhdr-hdl_unit_exid_ty = 'F'.                        "External identifier
    ls_bapidlvhdunhdr-plant            = <fs_hdunhdr>-plant.
    ls_bapidlvhdunhdr-ship_mat         = <fs_hdunhdr>-ship_mat.
    ls_bapidlvhdunhdr-sh_mat_typ       = <fs_hdunhdr>-sh_mat_typ.
    append ls_bapidlvhdunhdr to lt_hdunhdr.
    ls_bapidlvhdunitm-hdl_unit_exid_into  = <fs_hdunitm>-hdl_unit_exid_into.
    ls_bapidlvhdunitm-batch               = <fs_hdunitm>-batch.
    ls_bapidlvhdunitm-pack_qty            = <fs_hdunitm>-pack_qty_base.
    ls_bapidlvhdunitm-deliv_item          = <fs_hdunitm>-deliv_item.
    ls_bapidlvhdunitm-deliv_numb          = iv_delivery.
    append ls_bapidlvhdunitm to lt_hdunitm.
    call function 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'
      exporting
        header_data          = ls_headerdata
        header_control       = ls_control
        delivery             = lv_delivery
      tables
        item_data            = lt_bapiobdlvitemcon
        item_control         = lt_bapiobdlvitemctrlcon
        item_data_spl        = lt_bapiobdlvitemdataspl
        handling_unit_header = lt_hdunhdr
        handling_unit_item   = lt_hdunitm
        return               = lt_return.
I hope it helps.

Similar Messages

  • Packing in WS_DELIVERY_UPDATE

    I am updating the packing for an existing delivery using WS_DELIVERY_UPDATE.
    The HU's are being updated with no problem, but the the Packing Status is not being updated (VBUK-PKSTK).

    Sorry I forgot a very imortant thing in the earlier post which might be your problem.
    Comment and executable statements prior to the FM call:
    *-- WARNING - Save the no_commit and restore after FM run.
         dg_no_commit = v50agl-no_commit.
    If you execute the FM within the userexit with commit = ' ' then the userexit's no_commit value is 'X' and it will not complete the changes like status updating etc.   After the FM run I have the statement:
    v50agl-no_commit = dg_no_commit. 
    That restores the value the original userexit had. 
    Jim Shupe, Eastman Chemical Co.

  • HU Creation using WS_DELIVERY_UPDATE

    Hi All,
    I am using FM WS_DELIVERY_UPDATE to create HU and update the inbound delivery. This works good if my delivery has one line item.
    But when my delivery has more than one line item I want to create those many number of HUs for that delivery. But when i try this it still creates one HU even though I am passing multiple entries (depending on number of line items in delivery) in table VERKO_TAB
    For example: Delivery 80001234 has 2 line items. So I am appending two entries with same packaging material in VERKO_TAB.
    Since this delivery has 2 line items I am expecting 2 HUs created for this delivery.
    My question is can we create multiple HUs for this delivery? If so, what parameter I should pass to create multiple HUs.
    I do not want to loop through the line items of the delivery and call up this FM to create one HU at a time since it is not efficient. I want to call this FM only once per delivery and create those many HUs depending on the number of line items in delivery.
    Any idea in this regard would be greatly appreciated.
    Thanks,
    sandeep

    Hi Keshav
    The FM mentioned by you creates one HU at a time. Also it can be used to pack multiple items into the created HU.
    But my requirement is like this.
    If a delivery has 10 delivery line items, we should create 10 HUs for that delivery. I am not concerned about the packing at this moment as it can be achived easily using WS_DELIVERY_UPDATE.
    Any ides?
    Thanks,
    Sandeep

  • Unable to load performance pack, using Java I/O.

    Hi there,
    I am trying to start weblogic 6.0 from jBuilder. It does start, and
    working. But, I got the one problem about loading performance pack. The
    message is the following. Any comment?
    Thank you
    ----------------------------------------->Starting WebLogic Server ....
    <Jun 27, 2001 1:35:13 PM EDT> <Notice> <Management> <Loading configuration
    file C:\bea\wlserver6.0sp1\config\mydomain\config.xml ...>
    log file:
    C:\bea\wlserver6.0sp1\config\mydomain\config\config\mydomain\logs\weblogic.l
    og
    <Jun 27, 2001 1:35:14 PM EDT> <Info> <Logging> <Only log messages of
    severity "Error" or worse will be displayed in this window. This can be
    changed at Admin Console> mydomain> Servers> myserver> Logging> General>
    Stdout severity threshold>
    <Jun 27, 2001 1:35:46 PM EDT> <Notice> <WebLogicServer> <ListenThread
    listening on port 7001>
    <Jun 27, 2001 1:35:46 PM EDT> <Notice> <WebLogicServer> <WebLogic Server
    started>
    <Jun 27, 2001 1:35:46 PM EDT> <Error> <Performance Pack> <Unable to load
    performance pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: no wlntio in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.NTSocketMuxer.<init>(NTSocketMuxer.java:173)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:126)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:83)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:224)
    >

    Thank you
    But, it does not work. It does the same. Here is the message.
    ------------------------------------------------------------>C:\bea\jdk130\bin\javaw -classpath
    "S:\Java\classes;C:\jdk1.3\jre\lib\rt.jar;S:\Java\lib\activation.jar;S:\Java
    \lib\classes12.zip;S:\Java\lib\cos.jar;S:\Java\lib\dx3.0.jar;S:\Java\lib\dx3
    .0-res.jar;S:\Java\lib\fscontext.jar;S:\Java\lib\j2ee.jar;S:\Java\lib\java40
    .jar;S:\Java\lib\jgl3.1.0.jar;S:\Java\lib\jsdk21.jar;S:\Java\lib\junit.jar;S
    :\Java\lib\mail.jar;S:\Java\lib\msclasses.zip;S:\Java\lib\rootriver.report.j
    ar;S:\Java\lib\servlet.jar;S:\Java\lib\ServletExecDebugger.jar;S:\Java\lib\s
    truts.jar;C:\bea\wlserver6.0sp1\lib\weblogic.jar;C:\bea\wlserver6.0sp1\lib\x
    mlx.jar;C:\bea\wlserver6.0sp1\bin;C:\junit3.5\junit.jar;C:\jakarta-struts-1.
    0-b1\lib\struts.jar;C:\JBuilder4\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\JBu
    ilder4\jdk1.3\jre\lib\i18n.jar;C:\JBuilder4\jdk1.3\jre\lib\jaws.jar;C:\JBuil
    der4\jdk1.3\jre\lib\rt.jar;C:\JBuilder4\jdk1.3\jre\lib\sunrsasign.jar;C:\JBu
    ilder4\jdk1.3\lib\dt.jar;C:\JBuilder4\jdk1.3\lib\tools.jar" -ms64m -mx64m -
    classpath
    "C:\bea\wlserver6.0sp1;C:\bea\wlserver6.0sp1\bin;C:\bea\wlserver6.0sp1\lib\w
    eblogic_sp.jar;C:\bea\wlserver6.0sp1\lib\weblogic.jar;S:\Java\classes;S:\Jav
    a\lib\classes12.zip;C:\jakarta-struts-1.0-b1\lib\struts.jar;S:\Java\lib\dx3.
    0.jar;S:\Java\lib\rootriver.report.jar;S:\Java\lib;S:\Java\lib\struts.jar;"
    "-Dweblogic.RootDirectory=C:\bea\wlserver6.0sp1"
    "-Dweblogic.Domain=mydomain" "-Dweblogic.Name=myserver" "-Dbea.home=c:\bea"
    "-Djava.security.policy==c:\bea\wlserver6.0sp1\lib\weblogic.policy"
    "-Dweblogic.management.password=password" weblogic.Server -hotspot
    Starting WebLogic Server ....
    <Jun 27, 2001 4:00:39 PM EDT> <Notice> <Management> <Loading configuration
    file C:\bea\wlserver6.0sp1\config\mydomain\config.xml ...>
    log file:
    C:\bea\wlserver6.0sp1\config\mydomain\config\config\mydomain\logs\weblogic.l
    og
    <Jun 27, 2001 4:00:50 PM EDT> <Info> <Logging> <Only log messages of
    severity "Error" or worse will be displayed in this window. This can be
    changed at Admin Console> mydomain> Servers> myserver> Logging> General>
    Stdout severity threshold>
    <Jun 27, 2001 4:02:32 PM EDT> <Notice> <WebLogicServer> <WebLogic Server
    started>
    <Jun 27, 2001 4:02:32 PM EDT> <Notice> <WebLogicServer> <ListenThread
    listening on port 7001>
    <Jun 27, 2001 4:02:32 PM EDT> <Error> <Performance Pack> <Unable to load
    performance pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: no wlntio in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.NTSocketMuxer.<init>(NTSocketMuxer.java:173)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:126)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:83)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:224)
    >

  • Unable to load performance pack, using Java I/O instead

    I'm writing because we're having some troubles with the performance pack load.
    We're getting this error message when the server starts:
    <Feb 1, 2005 11:30:26 AM CST> <Error> <Performance Pack> <Unable to load performance pack, using Java I/O instead.
    Please ensure that libmuxer library is in /bea/jdk131/jre/bin/../lib/PA_RISC2.0/native_threads:/bea/jdk131/jre/bin/../lib/PA_RISC2.0/server:/bea/jdk131/jre/bin/../lib/PA_RISC2.0:/siven/shlib:/bea/wlserver/lib/hpux11:/bea/wlserver/lib/hpux11/oci816_8:/usr/lib
    java.lang.UnsatisfiedLinkError: getBuildTime
    We have checked the following things:
    1.- The library libmuxer.sl exists in the path: /bea/wlserver/lib/hpux11
    2.- The file has the correct privileges so it can be read by the server
    3.- We've run an 'nm -o libmuxter.sl |grep getBuildTime' to ensure that the method exists in the library
    We have four managed servers running in the same machine and the error message apears only in one of them.
    Any idea of what might be happening?
    Does any one know on what OS librarys depends libmuxer.sl?
    We're running WebLogic Server 6.1 SP6 on HP-UX 11.0

    That's very odd that the same machine has 4 servers and only 1 sees this
    error.
    I'm assuming they all have the same environment/user etc. If not,
    that's the first thing you should check.
    I wonder if this is a resource issue in the OS. If you start a 5th
    server, does it also see this error? Is it the 4th server you start
    that hits this error, or just one of the 4 you run?
    -- Rob
    Miguel Chavez wrote:
    I'm writing because we're having some troubles with the performance pack load.
    We're getting this error message when the server starts:
    <Feb 1, 2005 11:30:26 AM CST> <Error> <Performance Pack> <Unable to load performance pack, using Java I/O instead.
    Please ensure that libmuxer library is in /bea/jdk131/jre/bin/../lib/PA_RISC2.0/native_threads:/bea/jdk131/jre/bin/../lib/PA_RISC2.0/server:/bea/jdk131/jre/bin/../lib/PA_RISC2.0:/siven/shlib:/bea/wlserver/lib/hpux11:/bea/wlserver/lib/hpux11/oci816_8:/usr/lib
    java.lang.UnsatisfiedLinkError: getBuildTime
    We have checked the following things:
    1.- The library libmuxer.sl exists in the path: /bea/wlserver/lib/hpux11
    2.- The file has the correct privileges so it can be read by the server
    3.- We've run an 'nm -o libmuxter.sl |grep getBuildTime' to ensure that the method exists in the library
    We have four managed servers running in the same machine and the error message apears only in one of them.
    Any idea of what might be happening?
    Does any one know on what OS librarys depends libmuxer.sl?
    We're running WebLogic Server 6.1 SP6 on HP-UX 11.0

  • Unable to load performance pack, using Java I/O on WL60, sp2

    Dear friends,
    I am seeking help from you. When we start WL60 SP2 on Sun Soloris 5.6, we got
    the following exception:
    <Jul 31, 2001 5:39:53 PM EDT> <Error> <Performance Pack> <Unable to load performance
    pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: getFdLimit
    at weblogic.socket.PosixSocketMuxer.getFdLimit(Native Method)
    at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:104)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:128)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:83)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:224)
    >
    Hoever, the server itself started, and our applications runs ok
    (at least so far). But this exception appears every time on some user accounts.
    I was wondering what causes this exception. Some user accounts in the same machine
    don't have this problem.
    I also wondering if it will cause performance problem when the traffic is high.
    We already applied the patches.
    Any hits and suggestions are welcome.
    Thanks in advance.
    -Ju

    Dear Deyan,
    Thanks for your help. We do have $WEBLOGIC_HOME/lib/solaris in LD_LIBRARY_PATH,
    which is set when running ". setEnv.sh" before startWebLogic.sh.
    We failed on one patch: 105210-27, for some reason.
    The strange thing is: in the same machine, all WL60 instances running under user
    accounts (under /users/developers/) have no such error. But it happens under some
    account, like accounts under /export/home/, etc. /user/developers is mounted on
    another physical machine.
    -Ju
    "Deyan D. Bektchiev" <[email protected]> wrote:
    >
    You should have the $WEBLOGIC_HOME/lib/solaris directory in your LD_LIBRARY_PATH
    so that
    the server can load the performance pack (which is a shared library called
    libmuxer.so).
    If it is present then do a ldd libmuzer.so and you will see if any libraries
    that it
    depends on are missing.
    Also make sure you have all of the requered patches for 2.6 installed.
    --dejan
    Ju Rao wrote:
    Dear friends,
    I am seeking help from you. When we start WL60 SP2 on Sun Soloris 5.6,we got
    the following exception:
    <Jul 31, 2001 5:39:53 PM EDT> <Error> <Performance Pack> <Unable toload performance
    pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: getFdLimit
    at weblogic.socket.PosixSocketMuxer.getFdLimit(Native Method)
    at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:104)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:128)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:83)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:224)
    >
    Hoever, the server itself started, and our applications runs ok
    (at least so far). But this exception appears every time on some useraccounts.
    I was wondering what causes this exception. Some user accounts in thesame machine
    don't have this problem.
    I also wondering if it will cause performance problem when the trafficis high.
    We already applied the patches.
    Any hits and suggestions are welcome.
    Thanks in advance.
    -JuContent-Description: Card for Deyan D. Bektchiev
    begin:vcard
    n:Bektchiev;Deyan
    tel;home:1-650-363-6055
    tel;work:1-650-289-1046
    x-mozilla-html:TRUE
    url:http://www.appl.net/
    org:Application Networks
    adr:;;444 Ramona St;Palo Alto;CA;94301;USA
    version:2.1
    email;internet:[email protected]
    fn:Deyan D. Bektchiev
    end:vcard

  • Deployment of Turkish Language Pack using GPO shutdown script

    Running the following command through cmd installs the desired language pack successfully on a client machine with Office 2010:
    \\server\share\Office\setup.exe /config
    \\server\share\Office\OMUI.tr-tr\config.xml
    The question now is "How can I deploy the language pack via GPO?"
    I'm using the following batch to deploy office 2010 in my environment, so far my attempts to deploy the language pack using a modified version of this batch failed...
    What would I need in this batch file to achieve language pack deployment? 
    setlocal
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
    REM Get ProductName from the Office product's core Setup.xml file, and then add "office14." as a prefix.
    set ProductName=Office14.PROPLUS
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\xx\Office2010SourceFiles32bit
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\xx\Office2010SourceFiles32bit\ProPlus.WW\config.xml
    REM Set LogLocation to a central directory to collect log files. (the user doing the install needs write access)
    set LogLocation=\\xx\Office2010LogFiles32bit
    REM *********************************************************************
    REM Deployment code begins here. Do not modify anything below this line.
    REM *********************************************************************
    IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
    REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
    :ARP64
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if NOT %errorlevel%==1 (goto End)
    REM Check for 32 and 64 bit versions of Office 2010. (Office 64bit would also appear here on a 64bit OS)
    :ARP86
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if %errorlevel%==1 (goto DeployOffice) else (goto End)
    REM If 1 returned, the product was not found. Run setup here.
    :DeployOffice
    start /wait \\xx\Office2010SourceFiles32bit\setup.exe /adminfile \\xx\Office2010SourceFiles32bit\updates\office2010custom32bit.msp
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
    REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
    :End
    Endlocal
    Ideally what I want to achieve at start up is to check for Office 2010, deploy Office 2010 if it's not already deployed, check for language pack, deploy language pack if it's not already deployed.
    Thanks

    To deploy Office 2010 va GPO, refer to the following video, follow the detailed steps in it to see if it works well:
    http://www.youtube.com/watch?v=dYPbFyLH66k
    Here's also a link for your reference:
    http://blogs.technet.com/b/office_resource_kit/archive/2010/01/19/deploying-office-2010-with-multiple-languages.aspx
    http://technet.microsoft.com/en-us/library/ff602181.aspx
    Hope it helps

  • Printing dunning notices using SMARTFORMS,error during parameter transfer

    Hi Friends,
                    I face a error message "Include text ZGA_DUN_HDR does not exist (object TEXT, ID ST)" when i run the dunning run.
                    I had searched every node for text ZGA_DUN_HDR in the smartform,I didnt find the text in it.
    However when I execute the smart form for print preview an error message "Printing dunning notices using SMARTFORMS,error during parameter transfer".This error i believe is due to wrong parameter passing in the fm 'GET_SF_DUNN_DATA'.It raises an error no_parameters_found.All parameters are passed correctly.
                    Can you guys help me out.
    Edited by: RAJIV KAUSHAL on Nov 14, 2008 6:03 PM

    you can create this text ZGA_DUN_HDR  in SO10 tcode and try ...

  • JNI - How to use the error reporting mechanism?

    I've developed a C++ DLL which is loaded from a commercial Win32 application (not written by me) as a plug-in for external calculations. On its initialization the C++ DLL launches the Java VM via the JNI invocation interface. When the DLL functions are called by the application, they forward the calls to Java objects inside the Java VM, again via JNI invocation interface.
    This works well, but I have encountered a weird error.
    From Java I open a JFrame containing a JTextArea as small console for debug output messages. If I turn output to this debug console off (my printToConsole routine checks whether a boolean flag is set), the string concatenation operator may lead to a crash of the Java VM.
    For example, if in one of the Java functions called from the
    DLL via JNI invocation interface the following is the first statement,
    it leads to a crash of the Java VM and the application that loaded the C++ proxy DLL.
    String test=""+Math.random(); // String test not used later
    Interestingly, if I comment this statement out, the Java code works fine WITHOUT any crash. I've already thought about potential races and synchronization issues in my code, but I don't see where this is the case. And the string concatenation error fails as well, if I insert sleep() statements in front of it and at other places in the code. However, if I turn on log messages printed to my JFrame debug console (containing a JTextArea), the String concatenation works without problems.
    So maybe the JNI interface has a bug and affects the Java VM; I don't see where my JNI code is wrong.
    One problem is that I do not get any stdout output, as the C++ proxy DLL is loaded by the Windows application, even if I start the Windows application from the DOS command line (under Windows).
    Does anyone know how to use the error reporting mechanism?
    http://java.sun.com/j2se/1.4.2/docs/guide/vm/error-handling.html
    Is it possible that the JVM, when it crashes, writes debug information about the crash into a file instead of stdout/stderr?
    My C++ proxy DLL was compiled in debug mode, but the commercial application (which loaded the DLL) is very likely not.
    I do not know hot to find the reason why the String concatenation fails inside the Java function called from the C++ DLL via JNI.

    Yes, I've initially thought about errors in the C++ code too. But the C++ code is actually very simple and short. It doesn't allocate anything on the C++ side. It allocates a couple of ByteBuffers inside the Java VM however via JNI invocation interface calls of env->NewDirectByteBuffer(). The native memory regions accessed via the ByteBuffers are allocated not by my own C++ code, but by the program that calls my DLL (the program is Metastock).
    The interesting thing is that everything works fine if output to my debug console is enabled, which means that in the Java print routine getConsoleLoggingState() returns true and text is appended to the jTextArea.
    static synchronized void print(String str)
    { MetaStockMonitor mMon=getInstance();
    if ( mMon.getFileLoggingState() && mMon.logFileWriter!=null) {
    mMon.logFileWriter.print(str);
    mMon.logFileWriter.flush();
    if ( mMon.getConsoleLoggingState() ) {
    mMon.jTextArea1.append(str);
    Only if output to the JTextArea is turned off (ie. getConsoleLoggingState()==false), the crash happens when the FIRST statement in the Java routine called via JNI invocation interface is a (useless) String concatenation operation, as described above.
    String test=""+Math.random(); // String test not used later
    Moreover, the crash happens BEFORE the allocated ByteBuffer objects are accessed in the Java code. But again, if console output is turned on, it works stable. If console output is turned off, it works when the (useless) String concatenation operation is removed in the Java routine called from C++.
    I've already thought about potential races (regarding multiple threads), but this can be ruled out in my case. It almost appears as if the JVM can have problems when called by the invocation interface (I tested it with Java 1.4.2 b28).
    All the calls between C++ and Java go ALWAYS in the direction from C++ code to Java. Unfortunately, there is no special JRE version with extensive logging capabilities to facilitate debugging. And the problem is not easily reproducible either.
    JNIEnv* JNI_GetEnv()
    JNIEnv *env;
    cached_jvm->AttachCurrentThread((void**)&env,NULL);
    fprintf(logfile,"env=%i\n",env);
    fflush(logfile);
    return env;
    // function called by Metastock's MSX plug-in interface
    BOOL __stdcall createIndEngine (const MSXDataRec *a_psDataRec,
    const MSXDataInfoRecArgsArray *a_psDataInfoArgs,
    const MSXNumericArgsArray *a_psNumericArgs,
    const MSXStringArgsArray *a_psStringArgs,
    const MSXCustomArgsArray *a_psCustomArgs,
    MSXResultRec *a_psResultRec)
    a_psResultRec->psResultArray->iFirstValid=0;
    a_psResultRec->psResultArray->iLastValid=-1;
    jthrowable ex;
    jmethodID mid;
    JNIEnv* env=JNI_GetEnv();
    jobject chart=getChart(env, a_psDataRec);
    if ( chart==NULL) {
    return MSX_ERROR;
    jobject getChart (JNIEnv* env, const MSXDataRec *a_psDataRec)
    jthrowable ex;
    jmethodID mid;
    int closeFirstValid, closeLastValid;
    closeFirstValid=a_psDataRec->sClose.iFirstValid;
    closeLastValid=a_psDataRec->sClose.iLastValid;
    long firstDate, firstTime;
    if (closeFirstValid>=1 && closeFirstValid<=closeLastValid) {
    firstDate = a_psDataRec->psDate[closeFirstValid].lDate;
    firstTime = a_psDataRec->psDate[closeFirstValid].lTime;
    } else {
    firstDate=0;
    firstTime=0;
    jclass chartFactoryClass = env->FindClass("wschwendt/metastock/msx/ChartFactory");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find class ChartFactory\n");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetStaticMethodID(chartFactoryClass, "getInstance", "()Lwschwendt/metastock/msx/ChartFactory;");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getInstance()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject chartFactory=env->CallStaticObjectMethod(chartFactoryClass, mid);
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getInstance()");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetMethodID(chartFactoryClass, "getChartID", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IIIIIII)F");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getChartID()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject symbolBuf=env->NewDirectByteBuffer(a_psDataRec->pszSymbol, strlen(a_psDataRec->pszSymbol) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate symbolBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityNameBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityName, strlen(a_psDataRec->pszSecurityName) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityNameBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityPathBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityPath, strlen(a_psDataRec->pszSecurityPath) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityPathBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityOnlineSourceBuf=env->NewDirectByteBuffer(a_psDataRec->pszOnlineSource, strlen(a_psDataRec->pszOnlineSource) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate onlineSourceBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    // Java Function call leads to crash, if console output is turned off and
    // the first statement in the Java routine is a (useless) string concatenation.
    // Otherwise it works stable.
    jfloat chartID=env->CallFloatMethod(chartFactory, mid, securityNameBuf, symbolBuf,
    securityPathBuf, securityOnlineSourceBuf, (jint)(a_psDataRec->iPeriod),
    (jint)(a_psDataRec->iInterval), (jint)(a_psDataRec->iStartTime),
    (jint)(a_psDataRec->iEndTime), (jint)(a_psDataRec->iSymbolType),
    (jint)firstDate, (jint)firstTime );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getChartID()");
    printSBufViaJava(sbuf);
    return NULL;

  • Family Pack use in a company?

    Are there any license restrictions regarding the use of the iWork Family Pack?
    Some software has a "commercial use" clause preventing the use in a corporate environment, does iWork have anything like this regarding the family pack.
    So...
    Can I buy the family pack & use it for example on 5 computers in a small company?
    Other licences prevent installation on more than 1 premesis.
    So...
    Can I install on 3 computers at the office & 2 at home?
    and lastly where can I get a copy of the license agreement?
    Thanks

    OK, found the license, all questions are answered in one neat paragraph:
    B. iWork Family Pack License. This License allows you to install and use one copy of the Apple Software on up to a maximum of five (5) Apple-
    labeled computers at a time as long as those computers are located in the same household and used by persons who occupy that same
    household. By "household" we mean a person or persons sharing the same housing unit such as a home, apartment, mobile home or
    condominium. This license does not extend to students who reside at a separate on-campus location or to business or commercial users. You
    may not make the Apple Software available over a network.

  • Net Use give error 67 when trying to mount network share in Windows PE

    I am trying to deploy Windows 7 Pro by PXE booting Windows PE5 and applying a WIM file over a network share.  The problem that I am running into is that I get an system error 67.  I can ping the server with the network share with both the IP
    and the FQDN, but whether I use the machine name OR the IP I get a system error 67.  I verified that the account that I am using to connect has permissions, but even excluding the user name and waiting for it to prompt me for a user name gives the same
    error.  Any idea what is going on?

    Check : http://social.technet.microsoft.com/Forums/en-US/9c429bef-edf0-4bad-83a3-644e6ba28ea8/net-use-system-error-67?forum=winservergen
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

  • Error when uninstalling App-V RDS client: Product: Microsoft Application Virtualization (App-V) Client for Remote Desktop Services 5.0 Service Pack 2 x64 -- Error 1324. The folder path 'C:' contains an invalid character

    Issue:  experienced when attempting to uninstall the App-V 5.0 SP2 RDS client. 
    Event Log:  Product: Microsoft Application Virtualization (App-V) Client for Remote Desktop Services 5.0 Service Pack 2 x64 -- Error 1324. The folder
    path 'C:' contains an invalid character
    Symptoms (when in this current state): 
    Unable to uninstall the SP2 client
    You can upgrade the client (via hotfix) and uninstall the hotfix, but you will not be able to remove the SP2 client
    AppvVfs filter driver will not create an instance, therefore applications will not be able to read into existing streamed VFS content, or trigger sparse files to stream content.  (you can still stream the content via other means, like the UI or powershell)
    Because of the AppvVfs filter driver not instantiating, applications that depend on licences that exist in VFS will not be able to be read causing certain applications to react as if the license does not exist or is an incorrect format

    Resolution:
    Check for the existence of a hidden folder named %appdata% in the C:\Program Files\Microsoft Application Virtualization\Client folder.  (You will need to un-check the folder options box in windows explorer for "Hide
    protected operating system files" to see it)
    If the hidden %appdata% folder exists, delete it.
    Proceed to uninstall the App-V client
    After a clean uninstall and removal of remnants of the client, reinstall the client again and apply the latest hotfix available (Hotfix 2 for SP2 at a minimum).

  • MacPro backed up to Time Machine, added Mac Mini now get "The backup disk image "/Volumes/Data/Jerry Booher's MacBook Pro.sparsebundle" is already in use." error when Mac Pro tries to back up

    MacPro backed up to Time Machine, added Mac Mini now get "The backup disk image “/Volumes/Data/Jerry Booher’s MacBook Pro.sparsebundle” is already in use." error when Mac Pro tries to back up

    It is standard Mountain Lion error due to the networking ability which is comparable to wet string. (actually that was lion.. it dried out some with Mountain Lion.. higher in the hills perhaps!!)
    See C12 and C17
    http://pondini.org/TM/Troubleshooting.html
    But many people are suffering the same issue..
    And the above is even a little out of date.. you might need to do a reset to the TC.
    Welcome to Apple's beta program for everyone.

  • Is there a way to find out that a variant is of type vt_null, without using an error handler?

    i am using an persistant ado-recordset. some fields may return a variant of type vt_null (sql-null value).
    i want to figure out if a field contains a null or an empty string. when i checked the "view type" at a variant control, i see that labview correctly recognize a null value.
    making a compare with "not a refnum/number/..." does not work. checking against a null string also don't work.
    i used "variant flatten string" and "flatten string" but there is no difference between a field containing data and a null field (the type string tells me that is a reference to the variant, neither function 'flatten' the refrenced variant)
    "varaint to data" results in an error, whe
    n used with lv-native datatype and trying to convert a null-value. but the function has to return a variant, so using an error-handler is not an option. (converting variant-null to variant-data does not produce an error)
    i also tried to get the "attribute" "value type"; it is not accessable with this function, like "attribute" "value".
    is there a way to extract the variant data-type from a variant? or any other soloution to find out that a variant carries a null-value?

    Hi,
    sorry, i got no idea how to get the datatype of a variant, but there are properties "ActualSize" and "Type" of the ADO Field-Object. In case of an empty field the ActualSize is zero. Maybe you can use that. See VI below.
    best regards
    chris
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"
    Attachments:
    DB_Test.vi ‏67 KB

  • Build error when using custom error codes

    When I try to build my application using custom error codes I receive the following error:
    Error 1 occurred at Copy in AB_Engine_Copy_Error_Files.vi->AB_Application.lvclass:Copy_Error_Files.vi->AB_Application.lvclass:Copy_Files.vi->AB_Build.lvclass:Build.vi->AB_EXE.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller
    Possible reason(s):
    LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
    =========================
    NI-488:  Command requires GPIB Controller to be Controller-In-Charge.
    C:\Program Files\National Instruments\LabVIEW 8.5\user.lib\errors\BPMS-errors.txt
    This only occurs the first time I attempt to build my application. If I build again immediately after receiving the error, everything works fine. My custom error codes were created using the provided editor, and I have included the file in my project. I have also checked the "Copy error codes" box in the advanced build specification settings.

    Hi Donovan,
    The attached project is giving me the error previously discussed. Thanks for your help.
    Attachments:
    BuildError.zip ‏10 KB

Maybe you are looking for