JAR Not Executable!

I have tried making an executable jar file. However, it just tells me that "Can't find the main class. Progeam will now exit". Yes, I have made a manifest file:
Main-Class: EnurScapeThe main class IS EnurScape, but it refuses to load even though the EnurScape class file is where it should be!!!
I've even opened the resulting file in WinZip, and the EnurScape file is there!!!

1 - if EnurScape is in a package then specify it. exp:
Main-Class: com.mycompany.EnurScape2 - The manifest file must end with a new line or carriage return. The last line will not be parsed properly if it does not end with a new line or carriage return.
http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html
3 - Check if EnurScape has an entry point : public static main(String[] args){}hth

Similar Messages

  • Class not found, Jar not executing

    Hello,
    I created a JAR file and cannot execute it by running java -jar myjarfile.jar. I get no error message and it does not execute.
    If I extract the JAR, and run my main class with java packagename.myclass it works fine
    If I run javaw myjarfile.jar it tells me it cannot find the main class
    My manifest file looks like this:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 1.5.0_14-b03 (Sun Microsystems Inc.)
    Main-Class: mypackage.Main
    This program works fine when unjarred and also from my IDE.

    xarfox wrote:
    Ok, in that case - is this behavior acceptable:
    The first thing I do is:
    configFile = reader.read(System.getProperty("user.dir") + "\\CustomConfig.xml");This stores the xml file in a variable of type document (which represents an xml document)
    From that point forward I have all the info I need. Can I do this inside a JAR?
    Additionally, do you have any feedback on how I can fix what seems to be a classpath issue. What command should I be using to run my JAR file to ensure that it is able to find "mypackagename.Main"
    Thank you!If I understand correctly, the file CustomConfig.xml is inside the jar. You do not need user.dir because getClass().getResourceAsStream() will look inside the jar, assuming the object you use was loaded from the jar. If I remember correctly, if your class is in a named package, you need to start the file path string with a / character - ...getResource("/CustomConfig.xml").
    Second question: If you correctly specify the main class, then you just need java -jar yourjarfile.jar

  • Compile target 1.6 = JAR not executable anymore (double click)

    I made my JAR executable by adding "Main-Class:" and "Class-Path:" entries into the manifest file. This works great with Java 1.5 compiled code. But simple switching the compile target from "1.5" to "1.6", the generated JAR is not executable anymore and shows an error dialog instead:
    Java Virtual Machine Launcher
    Could not find the main class. Programm will exit.
    I create the JAR with an ANT script. Just toggling between target "1.5" and "1.6" forth and back results in an executable JAR (for target "1.5") or this error (for target "1.6").
    Strange: it works when I call the JAR from command line (java -jar myJar.jar), so the error above only occurs when double clicking. (Running on Windows 2000, JDK 1.6.0_03)
    I haven't found any notes about changes in the manifest file for target 1.6 compiled classes.

    PraveenKJain wrote:
    I have created a executable jar file of an swing desktop application, It is working fine if i use the command line (java -jar option) but when i try to execute it by double clicking its shows the error message (could not find the main class. program will exit).If this is a Windows icon, then I suspect the "Start in:" directory is wrong. Mind you, judging by the classpath, it doesn't look like whatever tool created your executable jar did a very good job.
    Winston

  • JNLP running but JAR not executing

    I have a wierd problem... My JNLP gets deplyed the entire procedure of copying the file and checking for updates takes place... But the JAR file does not get executed... or rather the application doesn't start... When i try to run the jar file otherwise it works out perfectly... but with the JWS deployment it's not working...
    The same deployment works with the other jar files and runs perfectly...
    This JAR application is a dashboard that gives a screenshot of various device statuses....
    If anyone can help soon, it'll be a great help...
    Warm Regards,
    Saurabh Dubey

    I ran into something similar with the release of Java 1.4.2_05:
    If you're using a manifest file to create your .jar, make sure you're using ' . ' characters instead of ' / ' characters for the designation of your starting class.
    For example, if your manifest reads:
    "Main-Class: com/yourCompany/aDirectory/YourStartingClass"
    Change it to read:
    "Main-Class: com.yourCompany.aDirectory.YourStartingClass"
    For myself, I discovered that my Java Web Start files would download but no longer execute once I upgraded to 1.4.2_05. A post somewhere else on these forums led me to the above solution, which resolved the (quite frustrating) problem for me. Hope it works for you!

  • JAR executable not executing

    This isn't a question, it is just a brief description of a problem I had and the solution since this bugged me for a bit.
    I was running my application on netBeans and it was working wonderfully etc...netBeans also will create an executable JAR for you when you build your app. However this JAR was not executing I was getting a null pointer exception where I was loading one of my images.
    The problem was a basic one...case sensitivity. My filename was .png instead of .PNG.
    The interesting thing is netBeans didn't care about this as it runs the app from the build directory and not the JAR it creates. So all along I never thought my file names were wrong. But apparently JAR files care about the case I guess because of running on different platforms like linux who care about case.
    So make sure your case is right even if your IDE is compiling your code.
    Just a heads up.

    see this link
    http://neptune.netcomp.monash.edu.au/JavaHelp/howto/jar.htm
    for ex - usuppose ur project located in D:/ dir like this pakage structure
    test
    ----src
    --- one.java
    --- two.java
    if u want to create jar file for this package u have to give command prompt like this
    d:\test\src>jar cf filename.jar *.java - this jar file contains only java files

  • Error code returned if the business rules not executed

    Recently we found that some Hyperion business rules are not executed during the daily batch file but no error code was returned.
    Is there any method to force the return of error code so that we can check the batch result more easier?
    Thanks a lot!

    For information, we are using the batch file under EAS console directory of Essbase:
    \Hyperion\products\Essbase\eas\console\bin\CmdLnLauncher.bat
    @echo off
    set CPATH=..\lib\CmdLnLauncher.jar
    set CPATH=%CPATH%;..\lib\easclientplugin.jar
    set CPATH=%CPATH%;..\lib\log4j-1.2.8.jar
    set CPATH=%CPATH%;..\lib\framework_common.jar
    set CPATH=%CPATH%;..\lib\eas_common.jar
    set CPATH=%CPATH%;..\lib\jaxp-api.jar
    set CPATH=%CPATH%;..\lib\jdom.jar
    set CPATH=%CPATH%;..\lib\dom.jar
    set CPATH=%CPATH%;..\lib\xercesImpl.jar
    java -DHBR_HOME=..\.. -cp %CPATH% com.hyperion.hbr.cmdlnlauncher.CmdLineLauncher %1 %2 %3 %4 %5 %6

  • BPM send step not executed in BPM (after Message split)

    Hello everybody,
    we use BPM:
    We have a paralell Block which should send the rows of a multiline element. In SXMB_BPE_MONI the send step is not executed?
    Any idea?
    Thanks  lot, regards Mario

    HI,
    Go to SXMB_MONI_BPE->and check the workflow log (technical details).and go to SXI_CACHE and check the return code of the Integration Process. It should be zero. If not try to activate the same
    If there is no error then go with like this-
    Also check the Syntax in Integration Repository with F7. Change the IP and activate it. If there is no syntax errors.
    Then reimport the IP into Directory and then test your scenario
    Regards,
    Moorthy

  • MS Office Report (Report Generation toolkit) is not executable​, Xnode broken?

    Hi, I am trying to generate an excel report, and I figured it would be easier to use the MS Office report VI, but I am getting the broken arrow saying the SubVI is not executable and that the library that defines the xnode is broken... here is a screensot attached, I already uninstall and reinstall the report generation toolkit and still the same... this is what I found on NI: "This error occurs when the library that defines the XNode you used is broken. To correct this error, reconfigure the XNode." but no idea how to reconfigure xnode
    Attachments:
    Error.png ‏67 KB

    What version of LabVIEW are you using?
    What is the nature of your Report?  What should it look like?  What kind of data should it contain?
    Can you show us some code that you've tried to use?  If so, include the code as either a Snippet or as a VI attachment (so we can plug it into our own LabVIEW installations and experiment with it).
    I generally find that the Report Generation Toolkit is a very easy way to generate Excel Workbooks.  I work primarily with LabVIEW 2012 and LabVIEW 2014.
    Bob Schor

  • I recieve the following error when running an executable ("This VI is not Executable. The full development version of Labview is required to fix the errors"

    I recieve the following error when trying to build and run a labview executable. I am able to build the executable but when trying to run the executable, a pop up window comes up asking the user to select a dll. (please see screen shot attached). Once the DLL is selected, I get the error that This VI is not Executable. The full development version of Labview is required to fix the errors. (please see screen shot attached). I have also attached a snapshot of the project window.
    I have the professional development system
    I can run the main VI
    all the required DLL's are in the dependencies section of the project window.
    I am trying to find the root cause of this error but to no avail. can anyone give me a clue to what i am missing here. Any suggestions on where i should look to find the problem ?
    Thanks in advance to all labview users for your help
    Attachments:
    project window.PNG ‏36 KB

    other PNG
    Attachments:
    Broken Arrow on EXE.PNG ‏179 KB

  • I get a "vi is not executable" error when building an application.

    I have an ongoing project that has worked fine in the past when building an application. I have recently added some report generation toolkit vis(Excel) and get an error for some of the ni vis and some of my own that call lower level excel vis. The error is that he vi is not executable, however they run fine in the development environment. I do not get this error if I save all vi's into one llb with save with options command and then build. However, when I try to run the app, this error re-appears. Also, do I have to add the dynamically loaded vi's that are part of the toolkit in my build script? Could this be the cause of the problem? If so, what's the best way to find all of them? Any suggestions?

    You have hit in on the nail! You do need to add the dynamically loaded VIs when you are creating an executable from your VI. You need to add _wordsub.lib and _exclsub.lib as dynamically loaded VIs into your executable. Try this and let us know if you have any more problems with it.
    J.R. Allen

  • PROCEDURE IS NOT EXECUTED WITH IN THE DATABASE TRIGGER

    The follwing databse trigger works fine but the procedure lv_calc_pkg.p_orders_executed(:new.stock_code,:new.selling,:new.buying,:new.qty,:new.price); is not executed
    please help
    CREATE OR REPLACE TRIGGER SE.LV_SUMMARY_TRADE_TR
    AFTER INSERT
    ON SE.LV_DAILY_TRADES
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    vstock gn_stocks.stock_code%TYPE;
    CURSOR stock_cur
    IS
    SELECT stock_code
    FROM lv_trade_summary
    WHERE stock_code = :NEW.stock_code;
    BEGIN
    OPEN stock_cur;
    FETCH stock_cur
    INTO vstock;
    IF stock_cur%NOTFOUND
    THEN
    INSERT INTO lv_trade_summary(
         the_time,
         the_date,
         stock_code,
         stock_type_id,
         market_id,
         deals,
         price,
         qty,
         trade_value,
         le_value,
         buying,
         selling,
         rec_count,
         rec_serial,
         buying_count,
         close_price,
         coupon_value,
         currency,
         dividend_yield_perc,
         eps,
         free_stocks,
         hi_offer,
         hi_req,
         hi_req_qty,
         high_date,
         high_price,
         last_offer,
         last_request,
         last_trade_date,
         less_offer,
         less_offer_qty,
         less_request,
         liquid,
         low_date,
         low_price,
         market_cap,
         off_count,
         prev_close,
         prop_avg_ofr_10,
         prop_avg_rqst_10,
         prop_avg_ofr_5,
         prop_avg_rqst_5,
         prop_avg_offers,
         prop_avg_rqst,
         req_count,
         rqst_to_offers,
         sector_desc_a,
         sector_desc_e,
         selling_count,
         simple_avg_ofrs_10,
         simple_avg_rqst_10,
         simple_avg_ofr_5,
         simple_avg_rqst_5,
         simple_avg_offers,
         simple_avg_rqst,
         stock_count,
         stock_desc_a,
         stock_desc_e,
         sum_less_ofr_10,
         sum_less_rqst_10,
         sum_less_5_rqst,
         sum_offer,
         sum_volume_traded,
         trx_count,
         sum_request,
         last_request_qty,
         last_offer_qty )
    VALUES (
         :NEW.the_time,
         :NEW.the_date,
         :NEW.stock_code,
         :NEW.stock_type_id,
         :NEW.market_id,
         :NEW.deals,
         :NEW.price,
         :NEW.qty,
         :NEW.trade_value,
         :NEW.le_value,
         :NEW.buying,
         :NEW.selling,
         :NEW.rec_count,
         :NEW.rec_serial,
         lv_calc_pkg.f_buying_count (:NEW.stock_code),
         lv_calc_pkg.f_close_price (:NEW.stock_code),
         lv_calc_pkg.f_coupon_value (:NEW.stock_code),
         lv_calc_pkg.f_currency (:NEW.stock_code),
         lv_calc_pkg.f_dividend_yield_perc (:NEW.stock_code),
         lv_calc_pkg.f_eps (:NEW.stock_code),
         lv_calc_pkg.f_free_stocks (:NEW.stock_code),
         lv_calc_pkg.f_hi_offer (:NEW.stock_code),
         lv_calc_pkg.f_hi_request (:NEW.stock_code),
         lv_calc_pkg.f_hi_request_qty (:NEW.stock_code),
         lv_calc_pkg.F_HIGH_DATE (:new.stock_code),
         lv_calc_pkg.F_HIGH_price (:new.stock_code),
         lv_calc_pkg.f_last_offer (:NEW.stock_code),
         lv_calc_pkg.f_last_request (:NEW.stock_code),
         lv_calc_pkg. F_LAST_TRADE_DATE(:new.stock_code),
         lv_calc_pkg.f_less_offer (:NEW.stock_code),
         lv_calc_pkg.f_less_offer_qty (:NEW.stock_code),
         lv_calc_pkg.f_less_request (:NEW.stock_code),
         lv_calc_pkg.f_liquid (:NEW.stock_code),
         lv_calc_pkg.f_low_date(:new.stock_code),
         lv_calc_pkg.f_low_price(:new.stock_code),
         lv_calc_pkg.f_market_cap(:new.stock_code),
         lv_calc_pkg.f_off_count (:NEW.stock_code),
         lv_calc_pkg.f_prev_close (:NEW.stock_code),
         lv_calc_pkg.f_prop_avg_best_10_ofrs (:NEW.stock_code),
         lv_calc_pkg.f_prop_avg_best_10_rqst (:NEW.stock_code),
         lv_calc_pkg.f_prop_avg_best_5_ofrs (:NEW.stock_code),
         lv_calc_pkg.f_prop_avg_best_5_rqst (:NEW.stock_code),
         lv_calc_pkg.f_prop_avg_offers (:NEW.stock_code),
         lv_calc_pkg.f_prop_avg_rqst (:NEW.stock_code),
         lv_calc_pkg.f_req_count (:NEW.stock_code),
         lv_calc_pkg.f_rqst_to_offers (:NEW.stock_code),
         lv_calc_pkg.f_sector_desc_a(:new.stock_code),
         lv_calc_pkg.f_sector_desc_e(:new.stock_code),
         lv_calc_pkg.f_selling_count (:NEW.stock_code),
         lv_calc_pkg.f_simple_avg_best_10_ofrs (:NEW.stock_code),
         lv_calc_pkg.f_simple_avg_best_10_rqst (:NEW.stock_code),
         lv_calc_pkg.f_simple_avg_best_5_ofrs (:NEW.stock_code),
         lv_calc_pkg.f_simple_avg_best_5_rqst (:NEW.stock_code),
         lv_calc_pkg.f_simple_avg_offers (:NEW.stock_code),
         lv_calc_pkg.f_simple_avg_rqst (:NEW.stock_code),
         lv_calc_pkg.f_stock_count (:NEW.stock_code),
         lv_calc_pkg.f_stock_desc_a(:new.stock_code),
         lv_calc_pkg.f_stock_desc_e(:new.stock_code),
         lv_calc_pkg.f_sum_less_10_offers,
         lv_calc_pkg.f_sum_less_10_rqst,
         lv_calc_pkg.f_sum_less_5_rqst,
         lv_calc_pkg.f_sum_offerst (:NEW.stock_code),
         lv_calc_pkg.f_sum_volume_traded (:NEW.stock_code),
         lv_calc_pkg.f_trx_count (:NEW.stock_code),
         lv_calc_pkg.f_sum_request (:NEW.stock_code),
         lv_calc_pkg.f_last_request_qty (:NEW.stock_code),
         lv_calc_pkg.f_last_offer_qty (:NEW.stock_code) );
    ELSIF stock_cur%FOUND THEN
         UPDATE lv_trade_summary
         SET the_time = :NEW.the_time,
         deals = :NEW.deals,
         price = :NEW.price,
         qty = :NEW.qty,
         trade_value = :NEW.trade_value,
         le_value = :NEW.le_value,
         buying = :NEW.buying,
         selling = :NEW.selling,
         rec_count = :NEW.rec_count,
         rec_serial = :NEW.rec_serial,
         buying_count = lv_calc_pkg.f_buying_count (:NEW.stock_code),
         close_price = lv_calc_pkg.f_close_price (:NEW.stock_code),
         coupon_value = lv_calc_pkg.f_coupon_value (:NEW.stock_code),
         currency = lv_calc_pkg.f_currency (:NEW.stock_code),
         dividend_yield_perc =
         lv_calc_pkg.f_dividend_yield_perc (:NEW.stock_code),
         hi_offer = lv_calc_pkg.f_hi_offer (:NEW.stock_code),
         hi_req = lv_calc_pkg.f_hi_request (:NEW.stock_code),
         hi_req_qty = lv_calc_pkg.f_hi_request_qty (:NEW.stock_code),
         last_offer = lv_calc_pkg.f_last_offer (:NEW.stock_code),
         last_request = lv_calc_pkg.f_last_request (:NEW.stock_code),
         last_trade_date = lv_calc_pkg.f_last_trade_date (:NEW.stock_code),
         less_offer = lv_calc_pkg.f_less_offer (:NEW.stock_code),
         less_offer_qty = lv_calc_pkg.f_less_offer_qty (:NEW.stock_code),
         less_request = lv_calc_pkg.f_less_request (:NEW.stock_code),
         liquid = lv_calc_pkg.f_liquid (:NEW.stock_code),
         off_count = lv_calc_pkg.f_off_count (:NEW.stock_code),
         prev_close = lv_calc_pkg.f_prev_close (:NEW.stock_code),
         prop_avg_ofr_10 =
         lv_calc_pkg.f_prop_avg_best_10_ofrs (:NEW.stock_code),
         prop_avg_rqst_10 =
         lv_calc_pkg.f_prop_avg_best_10_rqst (:NEW.stock_code),
         prop_avg_ofr_5 =
         lv_calc_pkg.f_prop_avg_best_5_ofrs (:NEW.stock_code),
         prop_avg_rqst_5 =
         lv_calc_pkg.f_prop_avg_best_5_rqst (:NEW.stock_code),
         prop_avg_offers = lv_calc_pkg.f_prop_avg_offers (:NEW.stock_code),
         prop_avg_rqst = lv_calc_pkg.f_prop_avg_rqst (:NEW.stock_code),
         req_count = lv_calc_pkg.f_req_count (:NEW.stock_code),
         rqst_to_offers = lv_calc_pkg.f_rqst_to_offers (:NEW.stock_code),
         sector_desc_a = lv_calc_pkg.f_sector_desc_a (:NEW.stock_code),
         sector_desc_e = lv_calc_pkg.f_sector_desc_e (:NEW.stock_code),
         selling_count = lv_calc_pkg.f_selling_count (:NEW.stock_code),
         simple_avg_ofrs_10 =
         lv_calc_pkg.f_simple_avg_best_10_ofrs (:NEW.stock_code),
         simple_avg_rqst_10 =
         lv_calc_pkg.f_simple_avg_best_10_rqst (:NEW.stock_code),
         simple_avg_ofr_5 =
         lv_calc_pkg.f_simple_avg_best_5_ofrs (:NEW.stock_code),
         simple_avg_rqst_5 =
         lv_calc_pkg.f_simple_avg_best_5_rqst (:NEW.stock_code),
         simple_avg_offers =
         lv_calc_pkg.f_simple_avg_offers (:NEW.stock_code),
         simple_avg_rqst = lv_calc_pkg.f_simple_avg_rqst (:NEW.stock_code),
         stock_count = lv_calc_pkg.f_stock_count (:NEW.stock_code),
         stock_desc_a = lv_calc_pkg.f_stock_desc_a (:NEW.stock_code),
         stock_desc_e = lv_calc_pkg.f_stock_desc_e (:NEW.stock_code),
         sum_less_ofr_10 = lv_calc_pkg.f_sum_less_10_offers,
         sum_less_rqst_10 = lv_calc_pkg.f_sum_less_10_rqst,
         sum_less_5_rqst = lv_calc_pkg.f_sum_less_5_rqst,
         sum_offer = lv_calc_pkg.f_sum_offerst (:NEW.stock_code),
         sum_volume_traded =
         lv_calc_pkg.f_sum_volume_traded (:NEW.stock_code),
         trx_count = lv_calc_pkg.f_trx_count (:NEW.stock_code),
         sum_request = lv_calc_pkg.f_sum_request (:NEW.stock_code),
         last_request_qty = lv_calc_pkg.f_last_request_qty (:NEW.stock_code),
         last_offer_qty = lv_calc_pkg.f_last_offer_qty (:NEW.stock_code)
         WHERE stock_code = :NEW.stock_code;
    END IF;
    lv_calc_pkg.p_orders_executed(:new.stock_code,:new.selling,:new.buying,:new.qty,:new.price);
    CLOSE stock_cur;
    END;

    Well, you can use merge statement or exception :
    CREATE OR REPLACE TRIGGER SE.LV_SUMMARY_TRADE_TR
    AFTER INSERT
    ON SE.LV_DAILY_TRADES
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
         BEGIN
              UPDATE lv_trade_summary
              SET the_time = :NEW.the_time,
              deals = :NEW.deals,
              price = :NEW.price,
              qty = :NEW.qty,
              trade_value = :NEW.trade_value,
              le_value = :NEW.le_value,
              buying = :NEW.buying,
              selling = :NEW.selling,
              rec_count = :NEW.rec_count,
              rec_serial = :NEW.rec_serial,
              buying_count = lv_calc_pkg.f_buying_count (:NEW.stock_code),
              close_price = lv_calc_pkg.f_close_price (:NEW.stock_code),
              coupon_value = lv_calc_pkg.f_coupon_value (:NEW.stock_code),
              currency = lv_calc_pkg.f_currency (:NEW.stock_code),
              dividend_yield_perc =
              lv_calc_pkg.f_dividend_yield_perc (:NEW.stock_code),
              hi_offer = lv_calc_pkg.f_hi_offer (:NEW.stock_code),
              hi_req = lv_calc_pkg.f_hi_request (:NEW.stock_code),
              hi_req_qty = lv_calc_pkg.f_hi_request_qty (:NEW.stock_code),
              last_offer = lv_calc_pkg.f_last_offer (:NEW.stock_code),
              last_request = lv_calc_pkg.f_last_request (:NEW.stock_code),
              last_trade_date = lv_calc_pkg.f_last_trade_date (:NEW.stock_code),
              less_offer = lv_calc_pkg.f_less_offer (:NEW.stock_code),
              less_offer_qty = lv_calc_pkg.f_less_offer_qty (:NEW.stock_code),
              less_request = lv_calc_pkg.f_less_request (:NEW.stock_code),
              liquid = lv_calc_pkg.f_liquid (:NEW.stock_code),
              off_count = lv_calc_pkg.f_off_count (:NEW.stock_code),
              prev_close = lv_calc_pkg.f_prev_close (:NEW.stock_code),
              prop_avg_ofr_10 =
              lv_calc_pkg.f_prop_avg_best_10_ofrs (:NEW.stock_code),
              prop_avg_rqst_10 =
              lv_calc_pkg.f_prop_avg_best_10_rqst (:NEW.stock_code),
              prop_avg_ofr_5 =
              lv_calc_pkg.f_prop_avg_best_5_ofrs (:NEW.stock_code),
              prop_avg_rqst_5 =
              lv_calc_pkg.f_prop_avg_best_5_rqst (:NEW.stock_code),
              prop_avg_offers = lv_calc_pkg.f_prop_avg_offers (:NEW.stock_code),
              prop_avg_rqst = lv_calc_pkg.f_prop_avg_rqst (:NEW.stock_code),
              req_count = lv_calc_pkg.f_req_count (:NEW.stock_code),
              rqst_to_offers = lv_calc_pkg.f_rqst_to_offers (:NEW.stock_code),
              sector_desc_a = lv_calc_pkg.f_sector_desc_a (:NEW.stock_code),
              sector_desc_e = lv_calc_pkg.f_sector_desc_e (:NEW.stock_code),
              selling_count = lv_calc_pkg.f_selling_count (:NEW.stock_code),
              simple_avg_ofrs_10 =
              lv_calc_pkg.f_simple_avg_best_10_ofrs (:NEW.stock_code),
              simple_avg_rqst_10 =
              lv_calc_pkg.f_simple_avg_best_10_rqst (:NEW.stock_code),
              simple_avg_ofr_5 =
              lv_calc_pkg.f_simple_avg_best_5_ofrs (:NEW.stock_code),
              simple_avg_rqst_5 =
              lv_calc_pkg.f_simple_avg_best_5_rqst (:NEW.stock_code),
              simple_avg_offers =
              lv_calc_pkg.f_simple_avg_offers (:NEW.stock_code),
              simple_avg_rqst = lv_calc_pkg.f_simple_avg_rqst (:NEW.stock_code),
              stock_count = lv_calc_pkg.f_stock_count (:NEW.stock_code),
              stock_desc_a = lv_calc_pkg.f_stock_desc_a (:NEW.stock_code),
              stock_desc_e = lv_calc_pkg.f_stock_desc_e (:NEW.stock_code),
              sum_less_ofr_10 = lv_calc_pkg.f_sum_less_10_offers,
              sum_less_rqst_10 = lv_calc_pkg.f_sum_less_10_rqst,
              sum_less_5_rqst = lv_calc_pkg.f_sum_less_5_rqst,
              sum_offer = lv_calc_pkg.f_sum_offerst (:NEW.stock_code),
              sum_volume_traded =
              lv_calc_pkg.f_sum_volume_traded (:NEW.stock_code),
              trx_count = lv_calc_pkg.f_trx_count (:NEW.stock_code),
              sum_request = lv_calc_pkg.f_sum_request (:NEW.stock_code),
              last_request_qty = lv_calc_pkg.f_last_request_qty (:NEW.stock_code),
              last_offer_qty = lv_calc_pkg.f_last_offer_qty (:NEW.stock_code)
              WHERE stock_code = :NEW.stock_code;
         EXCEPTION WHEN OTHERS THEN
              INSERT INTO lv_trade_summary(
              the_time,
              the_date,
              stock_code,
              stock_type_id,
              market_id,
              deals,
              price,
              qty,
              trade_value,
              le_value,
              buying,
              selling,
              rec_count,
              rec_serial,
              buying_count,
              close_price,
              coupon_value,
              currency,
              dividend_yield_perc,
              eps,
              free_stocks,
              hi_offer,
              hi_req,
              hi_req_qty,
              high_date,
              high_price,
              last_offer,
              last_request,
              last_trade_date,
              less_offer,
              less_offer_qty,
              less_request,
              liquid,
              low_date,
              low_price,
              market_cap,
              off_count,
              prev_close,
              prop_avg_ofr_10,
              prop_avg_rqst_10,
              prop_avg_ofr_5,
              prop_avg_rqst_5,
              prop_avg_offers,
              prop_avg_rqst,
              req_count,
              rqst_to_offers,
              sector_desc_a,
              sector_desc_e,
              selling_count,
              simple_avg_ofrs_10,
              simple_avg_rqst_10,
              simple_avg_ofr_5,
              simple_avg_rqst_5,
              simple_avg_offers,
              simple_avg_rqst,
              stock_count,
              stock_desc_a,
              stock_desc_e,
              sum_less_ofr_10,
              sum_less_rqst_10,
              sum_less_5_rqst,
              sum_offer,
              sum_volume_traded,
              trx_count,
              sum_request,
              last_request_qty,
              last_offer_qty )
              VALUES (
              :NEW.the_time,
              :NEW.the_date,
              :NEW.stock_code,
              :NEW.stock_type_id,
              :NEW.market_id,
              :NEW.deals,
              :NEW.price,
              :NEW.qty,
              :NEW.trade_value,
              :NEW.le_value,
              :NEW.buying,
              :NEW.selling,
              :NEW.rec_count,
              :NEW.rec_serial,
              lv_calc_pkg.f_buying_count (:NEW.stock_code),
              lv_calc_pkg.f_close_price (:NEW.stock_code),
              lv_calc_pkg.f_coupon_value (:NEW.stock_code),
              lv_calc_pkg.f_currency (:NEW.stock_code),
              lv_calc_pkg.f_dividend_yield_perc (:NEW.stock_code),
              lv_calc_pkg.f_eps (:NEW.stock_code),
              lv_calc_pkg.f_free_stocks (:NEW.stock_code),
              lv_calc_pkg.f_hi_offer (:NEW.stock_code),
              lv_calc_pkg.f_hi_request (:NEW.stock_code),
              lv_calc_pkg.f_hi_request_qty (:NEW.stock_code),
              lv_calc_pkg.F_HIGH_DATE (:new.stock_code),
              lv_calc_pkg.F_HIGH_price (:new.stock_code),
              lv_calc_pkg.f_last_offer (:NEW.stock_code),
              lv_calc_pkg.f_last_request (:NEW.stock_code),
              lv_calc_pkg. F_LAST_TRADE_DATE(:new.stock_code),
              lv_calc_pkg.f_less_offer (:NEW.stock_code),
              lv_calc_pkg.f_less_offer_qty (:NEW.stock_code),
              lv_calc_pkg.f_less_request (:NEW.stock_code),
              lv_calc_pkg.f_liquid (:NEW.stock_code),
              lv_calc_pkg.f_low_date(:new.stock_code),
              lv_calc_pkg.f_low_price(:new.stock_code),
              lv_calc_pkg.f_market_cap(:new.stock_code),
              lv_calc_pkg.f_off_count (:NEW.stock_code),
              lv_calc_pkg.f_prev_close (:NEW.stock_code),
              lv_calc_pkg.f_prop_avg_best_10_ofrs (:NEW.stock_code),
              lv_calc_pkg.f_prop_avg_best_10_rqst (:NEW.stock_code),
              lv_calc_pkg.f_prop_avg_best_5_ofrs (:NEW.stock_code),
              lv_calc_pkg.f_prop_avg_best_5_rqst (:NEW.stock_code),
              lv_calc_pkg.f_prop_avg_offers (:NEW.stock_code),
              lv_calc_pkg.f_prop_avg_rqst (:NEW.stock_code),
              lv_calc_pkg.f_req_count (:NEW.stock_code),
              lv_calc_pkg.f_rqst_to_offers (:NEW.stock_code),
              lv_calc_pkg.f_sector_desc_a(:new.stock_code),
              lv_calc_pkg.f_sector_desc_e(:new.stock_code),
              lv_calc_pkg.f_selling_count (:NEW.stock_code),
              lv_calc_pkg.f_simple_avg_best_10_ofrs (:NEW.stock_code),
              lv_calc_pkg.f_simple_avg_best_10_rqst (:NEW.stock_code),
              lv_calc_pkg.f_simple_avg_best_5_ofrs (:NEW.stock_code),
              lv_calc_pkg.f_simple_avg_best_5_rqst (:NEW.stock_code),
              lv_calc_pkg.f_simple_avg_offers (:NEW.stock_code),
              lv_calc_pkg.f_simple_avg_rqst (:NEW.stock_code),
              lv_calc_pkg.f_stock_count (:NEW.stock_code),
              lv_calc_pkg.f_stock_desc_a(:new.stock_code),
              lv_calc_pkg.f_stock_desc_e(:new.stock_code),
              lv_calc_pkg.f_sum_less_10_offers,
              lv_calc_pkg.f_sum_less_10_rqst,
              lv_calc_pkg.f_sum_less_5_rqst,
              lv_calc_pkg.f_sum_offerst (:NEW.stock_code),
              lv_calc_pkg.f_sum_volume_traded (:NEW.stock_code),
              lv_calc_pkg.f_trx_count (:NEW.stock_code),
              lv_calc_pkg.f_sum_request (:NEW.stock_code),
              lv_calc_pkg.f_last_request_qty (:NEW.stock_code),
              lv_calc_pkg.f_last_offer_qty (:NEW.stock_code) );
         END;
         lv_calc_pkg.p_orders_executed(:new.stock_code,:new.selling,:new.buying,:new.qty,:new.price);
    END;
    /Nicolas.

  • For Loop Will Not Execute

    I have been a software engineer for a number of years now, and thus far I have never come across any coding issues that truly merit a post such as this. Someone has almost always run across the issue before, so there is no need to reinvent the wheel, or solution as it were.
    However, a number of times I have run across instances where the JRE simply... does not execute parts of my code, and throws no exceptions.
    The sample code is a simple logging application, watered down to the bare minimum for the purposes of this forum:
    public class Log {
    public static void main(String[] args)    {Log log = new Log();}
    public Log() {Logger.log("Hello World");}
    import java.util.*;*
    import java.io.*;
    import java.text.SimpleDateFormat;
    public abstract class Logger {
    private static final int SIZE = 2;
    private static final SimpleDateFormat DAY = new SimpleDateFormat("EEEE");
    private static final String
      DIR = "logs/",
      EXT = ".log",
      FILTER = ".*log\\z",
      DNE = "DNE";
    private static int i,oldest;
    private static long previous = 0;
    private static FileFilter filter = new LogFilter();
    private static FileWriter out;
    private static File file,directory;
    private static File[] list;
    public synchronized static void log(String param) {
      try {
       directory = new File(DIR);
       file = new File(DIR + getDay() + EXT);
       list = directory.listFiles(filter);
       if (file.createNewFile()) {
        readOnly();
        reconcile();
       write(param);
      catch (Exception exception) {}
    private static void write(String param) throws Exception {
      out = new FileWriter(file, true);
      out.write(param);
      out.close();
    private static void readOnly() throws Exception {
      for (i=0;i<list.length;i++) {list.setReadOnly();}
    private static void reconcile() {
    try {
    previous = list[SIZE].lastModified();
    oldest = SIZE;
    for (i=SIZE;i<=0;i--) {
    if (list[i].lastModified() <= previous) {
    previous = list[i].lastModified();
    oldest = i;
    list[oldest].delete();
    catch (Exception exception) {System.out.println("Skipping reconciliation...");}
    private static String getDay() throws Exception {
    return DAY.format(Calendar.getInstance().getTime());
    private static class LogFilter implements FileFilter {
    public LogFilter() {}
    public boolean accept(File param) {
    try {
    if ((param.getName()).matches(FILTER)) {return true;}
    else {return false;}
    catch (Exception exception) {return false;}
    *The problem*:
    Ok, easy visual, this is the "log/" directory as I run the Log.java application repeatedly and iterate the date on my computer as I do so.
    Thursday
    *log/*
    +Thursday.log+
    Friday
    *log/*
    +Thursday.log+
    +Friday.log+
    Saturday
    *log/*
    +Thursday.log+
    +Friday.log+
    +Saturday.log+
    Sunday
    *log/*
    +Friday.log+
    +Saturday.log+
    +Sunday.log+
    Monday
    *log/*
    +Friday.log+
    +Saturday.log+
    +Monday.log+
    This is the point at which I go ???
    Turns out, the JRE skips the execution of my for loop in the *reconcile()* method when the date rolls over to Monday, and from then on it simply deletes the previous day's log instead of the oldest log.
    Why?  Who knows.
    Things I have tried:
    - Using another variable integer for the *readOnly()* method
    - Removing the synchronized keyword from the *log(String param)* method
    - Second call to *directory.listFiles(filter)* and setting *SIZE* to *3* after the old files have been set to read-only
    - Removing the call to *readOnly()*
    - Verified that the call to *readOnly()* does not alter the +modified+ date on the log files
    - Changed Logger.java from a +static+ class to a +local+ class
    Things I cannot do:
    This log application stores privy information about end-users at locations across the country in the event that there are support issues that need to be resolved, and the agreement is that we store this information no more than three days.  Just wanted to make sure, that the hopefully informed respondants to this issue, know that the obvious solution (storing seven day records), is unfortunately not available to me.
    Edited by: Threadstorm on Jan 8, 2009 8:24 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    HA! Most excellent. The last place I would ever look.
    Yes, seems like Java sorts the files in such a way that everything works fine without the loop until Monday rolls over.
    Now I can have a better appreciation for that second set of eyes.
    I use for loops so frequently that I never look at them (though I did stare at this one myself prior to this post, much to my chagrin now) but the subtracting iteration (which I use once in a blue moon) was necessary for the nature of the code.
    But ok, up and running! (whew) was going to be a long day until now.
    To answer your question though, the Logger is static so I don't have to pass it around to dozens and dozens of other modules but rather just include the package on the fly as I develop new modules that need to log information, and I like to write most mundane things myself if I can, that way I have the freedom to modify them at will.
    Thanks again! I'm now a happy camper once more.
    I'm also thankful that I don't have to chalk up another notch on the wall of cases where the JRE behaves magically and truly ignores code which I have definitely run into before. Something about listCellRenderers and the order of calls made to them, or some such and JRE doesn't read one of the lines. It's been a year or two.
    Edited by: Threadstorm on Jan 8, 2009 8:47 AM

  • SSIS Script task not executing macro through SQL Agent (but it does through bids)

    <p>Hello everyone,</p><p>I am having an issue with SQL Agent when executing a macro contained in a script task component. The script task actually opens an excel file, runs the macro, save and closes the file. </p><p>When
    I execute the package via BIDS/Visual studio, it works like a charm. However, when i execute the package with SQL agent, the package runs successfully but it seems that the macro is not executed as the excel file has not been modified as it should have. Also,
    the history log does not show any error messages. </p><p>Could </p>

    Thanks!I did create a credential and a proxy too but still the macro is not executed.I have searched online for solutions but no one has experimented this kind of issue before it seems. Please have a look at the script task code:
    Imports
    Excel = Microsoft.Office.Interop.Excel
    Imports
    System
    Imports
    System.Data
    Imports
    System.Math
    Imports
    Microsoft.SqlServer.Dts.Runtime
    <System.AddIn.AddIn(
    "ScriptMain", Version:="1.0",
    Publisher:="", Description:="")>
    <System.CLSCompliantAttribute(
    False)> _
    Partial
    Public
    Class ScriptMain
    Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    Enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    End
    Enum
    Public
    Sub Main()
    Dim Macro_name
    As
    String
    Dim ExcelObject
    As
    New Microsoft.Office.Interop.Excel.Application
    Dim oBook
    As Microsoft.Office.Interop.Excel.Workbook
    Dim oBooks
    As Microsoft.Office.Interop.Excel.Workbooks
    Try
    Macro_name =
    "Macro001"
    ExcelObject =
    CType(CreateObject("Excel.Application"),
    Excel.Application)
    ExcelObject.Visible =
    True
    ExcelObject.UserControl =
    False
    ExcelObject.DisplayAlerts =
    False
    oBooks = ExcelObject.Workbooks
    oBook =
    CType(oBooks.Open("C\Book1.xls"),
    Excel.WorkbookClass)
    ExcelObject.Run(Macro_name)
    Catch ex
    As Exception
    ExcelObject.Application.Quit()
    ExcelObject.DisplayAlerts =
    True
    ExcelObject =
    Nothing
    End
    Try
    Dts.TaskResult = ScriptResults.Success
    End
    Sub
    End
    Class

  • Error message "VI is not executable"! Need help with Application Builder

    Hello,
    I have a problem with an application, built with the Application Builder. I have read some threads about the problem I have, but I still don't know a solution.
    When I run my front panel from LabVIEW, everything is good. So, now I created an application (and an installer) to be able to run it on other PCs as well. This application does not work. Everytime I start it on my PC, I get the error "VI is not executable. ...". I read in several forums solutions for this error, but I cannot fix it! I've changed my properties for the builder, but with no success. Perhaps, anybody has more ideas, what's the problem.
    To get a better idea from my project, here a little description of it:
    In the block diagram there is a while loop which is continuously runned. In this loop I only set some properties for the layout of the front panel, such as decorations which will be hidden/shown and changes of colours of indicators... For the rest, it waits for a click on the button "Start" in the front panel. After that, a DLL is called to communicate with a USB device. Some measurements are carried out and the DLL is closed. I hope, you can get a global idea from my block diagram...
    I use LabVIEW 8.5, the DLL is a third-party DLL, which we wrote on our own. But I think the DLL works properly, if it is called from a C# application it works and it works, too, by calling it from LabVIEW when I am in development mode.
    It's a project for university and I'm just a beginner in LabVIEW, so I don't have so much experiences in it, but I think i improved my knowlegde about LabVIEW very well in the last weeks!
    So, i hope to get an answer soon (the deadline for the project is not soooo far away )
    If you need more information, please let it know...
    I would be very grateful if there is someone with a working solution...
    Kind regards from the Netherlands,
    Sebastian

    Sebastian,
    Your architecture makes it very difficult to debug this and other problems.  Does the error message mention which VI is causing the problem?  It is very important to wire your error clusters everywhere.  In LabVIEW, when a node throws an error (Error.Status = T), future nodes do not execute.  At the end, place an error cluster indicator that you can see on your front panel.  When an error posts, you can right click the indicator (even in a compiled application) and select "Explain Error".
    This is a start, but you really need to push this into a queued-state machine before this gets any more complicated.  As it were, if anything in your loop hangs, your whole application hangs.  See attached for a queued-message handler (not advisable for actual applications, but you get the point.  You would want to have a type defined enum in lieu of strings, and shared data between states differently, etc.)
    -Jason
    Message Edited by LabBEAN on 01-20-2009 08:36 AM
    Certified LabVIEW Architect
    Wait for Flag / Set Flag
    Separate Views from Implementation for Strict Type Defs
    Attachments:
    State Machine.vi ‏18 KB

  • The process could not execute 'sp_repldone/sp_replcounters' error for Log Reader Agent and SQL Server Assertion 17066 & 3624 errors in SQL Logs

    One of our SQL Server started creating SQLDUMP file and and on investigation I found the error longs are filled with Errors 3624 & 17066. There is transnational replication configured on one of the databases is the LogReader Agent is failing error "The
    process could not execute 'sp_repldone/sp_replcounters' on XXXXX". 
    Not sure if both these Assertion & Logreader Agent errors are related. Before I remove and put the replication, I wanted to check if anyone has experienced the same issues or aware of what the cause. 
    ***********Error messages from SQL Logs******
    **Dump thread - spid = 0, EC = 0x0000000111534460
    Message
    A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to
    Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a QFE from Technical Support.
    Error: 3624, Severity: 20, State: 1.
    SQL Server Assertion: File: <logscan.cpp>, line=2123 Failed Assertion = 'UtilDbccIsInsideDbcc () || (m_ProxyLogMgr->GetPru ()->GetStartupState () < RecoveryUnit::Recovered)'. This error may be timing-related. If the error persists after rerunning
    the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.
    Error: 17066, Severity: 16, State: 1.
    External dump process return code 0x20000001.
    External dump process returned no errors.
    Thank you in advance.

    You need to determine if this error is a transient one or a show stopper one.
    It sounds like your log reader agent has crashed and can't continue.
    If so your best bet is to call Microsoft CSS and open a support incident.
    It also sounds like DBCC CHECKDB was running while the log reader agent crashed.
    If you need to get up and running again run sp_replrestart, but then you might find that replicated commands are not picked up. You will need to run a validation to determine if you need to reinitialize the entire publication or a single article.
    I have run into errors like this, but they tend to be transient, ie the log reader agent crashes, and on restart it works fine.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

Maybe you are looking for

  • Insert Textpool with dictionary reference

    Hi! I want to translate a textpool per down and upload in excel. I translate the downloaded textpool in excel and upload it for the new language. The problem is: if the parameters are with dictionary reference, it doesn´t work - after INSERT TEXTPOOL

  • Removing br from JTextPane

    Hi All - I created a JTextPane with an HTMLEditorKit and initialized the String without a <p> tag. Something like "<html><head></head><body></body></html>" for some word wrapping issues. Everything works fine but I have a problem deleting a <BR> tag

  • Procedure names in lowercase (export/import)

    After an export/import into a new schema all package/procedure/function names are written in uppercase and within ". The rule in our norms and standards defines to write object names in lowercase. Is there a solution to keep object names in lowercase

  • HT1589 my iTunes library in my external drive

    I followed the steps in 'HT1589: How to open an alternate iTunes Library file or create a new one', but when I try to play a song I receive the error message "the song --- could not be used because the original file could not be found. Would you like

  • Printing Problem with Konica-Minolta CF2002

    I have two different MacPro 2.66Ghz models running 10.4.8. I can not get them to provide full functionality to our Minolta CF2002. Using the EFI Driver w/ the PPD provided my Minolta I can print, but can not access features such as duplexing and pape