ATG 10.1.1 - MySQL foriegn key issues

Hi All,
Am trying to setup ATG 10.1.1 in a distributed environment for development purpose.
I have 2 boxes.
Windows box: contains MySQL installation and will be treated as DB Server
Linux box: contains ATG/Weblogic installation and will be treated as APP Server
All CIM activities of creating schema and importing data to databases (for CRS) along with all other things completed successfully. BCC/Dynamo Admin are up and running successfully.
When I try to do full deployment for CRS site in BCC i get following error:
     Error'      Deployment Failed      lpxsku2505_14:price      Sep 18, 2012 1:38:32 PM
Message Detail:
CONTAINER:atg.deployment.DistributedDeploymentException; SOURCE:CONTAINER:atg.repository.RepositoryException; SOURCE:com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`switchb`.`dcs_price`, CONSTRAINT `dcs_pricpric_lst_f` FOREIGN KEY (`price_list`) REFERENCES `dcs_price_list` (`price_list_id`)) at atg.deployment.repository.RepositoryWorkerThread.processMarkerForAddUpdatePhase(RepositoryWorkerThread.java:273) at atg.deployment.DeploymentWorkerThread.processMarkerPhase(DeploymentWorkerThread.java:562) at atg.deployment.DeploymentWorkerThread.run(DeploymentWorkerThread.java:335)
Any thoughts? Does ATG 10.1.1 (CRS) even support MySQL?

HI there,
I am too getting the same problem. Can you please let me out?
I have installed ATG 10.1. on Weblogic 10.3.5 with JDK1.6_25 on Windows8.
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production SQL Statement Failed: [++SQLInsert++]
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production INSERT INTO dcs_price(price_id,version,price_list,product_id,sku_id,parent_sku_id,pricing_scheme,list_price)
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production VALUES(?,?,?,?,?,?,?,?)
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production -- Parameters --
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production p[1] = {pd} lpxsku2505_14 (java.lang.String)
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production p[2] = {pd: version} 1 (java.lang.Integer)
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production p[3] = {pd: priceList} plist3130005 (atg.adapter.gsa.SingleValueGSAId)
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production p[4] = {pd: productId} null
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production p[5] = {pd: skuId} xsku2505_14 (java.lang.String)
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production p[6] = {pd: parentSkuId} null
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production p[7] = {pd: pricingScheme} 0 (java.lang.Integer)
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production p[8] = {pd: listPrice} 129.0 (java.lang.Double)
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production [--SQLInsert--]
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`switchingb`.`dcs_price`, CONSTRAINT `dcs_pricpric_lst_f` FOREIGN KEY (`price_list`) REFERENCES `dcs_price_list` (`price_list_id`))
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
**** Error Thu Dec 06 17:47:48 EST 2012 1354834068934 /atg/commerce/pricing/priceLists/PriceLists_production at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

Similar Messages

  • Primary & Foriegn Key Relation

    I have to tables TABLE-A, TABLE-B
    CREATE TABLE A(HEADER_ID NUMBER(4) PRIMARY KEY,BROKER_CODE VARCHAR2(10),E_DATE DATE,AGENT VARCHAR2(10))
    CREATE TABLE B(LINE_ID NUMBER(4) PRIMARY KEY,HEADER_ID NUMBER REFERENCES XX_JVG_HEADER(HEADER_ID),INVOICE_NO NUMBER(4),LOT_NO NUMBER(4))
    1) I will insert the data manually raaa.I'm taking HEADER_ID as a Primary Key in Table-A & Foriegn Key in Table-B.
    2) Again i have taken LINE_ID as a Primary Key in Table-B .If i try to insert the data into Table-B the HEADER_ID automatically should enter in Table-B.
    3) But the HEADER_ID should be the same for Table-A & Table-B.
    Table-A
    2,'abc','12-mar-2002','chennai'
    Table-B
    1,2,1,1
    Header_id should be same in 2 tables i.e -- 2
    we have to create triggers or any...pls let me know ASAP.

    So what is the issue with the tables? The script above looks ok to me, assuming table A is really called XX_JVG_HEADER, although you should really define B.HEADER_ID as NUMBER(4).
    If i try to insert the data into Table-B the HEADER_ID automatically should enter
    in Table-BThis is not something you can do in the table creation script or with triggers. You're inserting data manually so only the front-end program (or you if you're using something like sql plus) can know which record in table A is the parent of the new records in table B, so that will decide the value to insert into the header_id column. I suspect that this line, as well as the fact that this is Forms forum, prompted answers concerning master-detail forms. For database issues you should use the sql forum.

  • Tecra M10 - Stuck CTRL key issue -- perhaps to do with BIOS?

    Hello and thanks for reading.
    I recently switched my Tecra M10 to Windows 7 (from XP) and it soon developed the dreaded "stuck CTRL key" issue. This causes the keyboard to behave as if the CTRL key is permanently depressed. Sometimes hitting a combination of keys, or bringing up the onscreen keyboard, temporarily solves the issue, but then it returns.
    It seems to be an issue many people have, with no simple solution. I've looked at every thread about it I can find, and tried many things to do with drivers etc. without any success.
    So firstly, if anyone knows a remedy that works for this particular machine, I would be very grateful to learn it!
    Then, there are two things I've not yet done: update BIOS and disable pinch zoom.
    I was looking at the following BIOS update:
    http://www.toshiba-asia.com/sg/support/drivers/details/25244
    ... which is version 3.00 and seems to be most recent. My own version is 1.90.
    However version 3.00 is labelled "For PTMB0* ONLY". I don't know what this means or whether it applies to me. Can anyone help? Should I install this BIOS?
    For the pinch zoom, I've been told that disabling it does sometimes cure the CTRL problem -- but I can't find any pinch zoom facility on the M10. I suspect it simply doesn't have one. Is that right?
    Many thanks for any help you can give.

    Hi
    > I was looking at the following BIOS update. which is version 3.00 and seems to be most recent. My own version is 1.90.
    There are different Tecra M10 models on the market.
    Check the labels at the bottom of the unit. There you should find some numbers like for example PTMB0E-01K00LGR
    The first 6 characters are important: for example PTMB0E
    I assume your notebook belongs to European series.
    In such case you should check the Toshiba EU driver page for possible BIOS update.
    http://www.toshiba.eu/innovation/download_drivers_bios.jsp
    However, on Toshiba EU driver page you will find also the BIOS v3.0 for all European Tecra M10 units.
    Anyway, back to the CTRL button issue: guess what, you should connect an external USB keyboard and should check how the CTRL button acts.
    In case the USB keyboard would work properly, the CTRL button of internal keyboard is affected and you will need to replace the internal keyboard.
    PS: it could be possible that the option "sticky keys" has been enabled. To disable this function, you have to press SHIFT button 5 times in the row.

  • Windows 8 Key Issue

    Here's my problem.  Windows 8 came preinstalled on my computer; however, I accidently deleted the Windows 8 key from the bios and now Windows keeps asking me to enter the correct key.  Since there is no longer a sticker with the key included with the computer I have no way of finding the key.  Does HP keep a record of the keys tagged to the serial number?  Or am I just out of luck?
      I called HP Support about this and they told me to get the key off the CDs which were included with the computer.  When I told him there were no CDs, he said I had bought a used computer mascarading as new because all of their computers ship with Windows CDs.  When I disputed this he said that Microsoft could solve the issue for me.  Microsoft said that HP could solve it.  Can anyone help me?  I'd rather not spend money on buying Windows 8
    Thanks in advance,
    Mike
    This question was solved.
    View Solution.

    HP does not retain records of the keys issued .  HP also does not ship Windows CD's with the computers unless they were specifically ordered.  If you have somehow deleted the key then you are out of luck, sorry.
    Please mark my post as SOLVED if it has resolved your problem. It helps others with similar situations.

  • Composite foreign key issue

    Hi,
    I am trying to create a composite foriegn key. I have created my primary key as a composite key, made up of three fields.
    Table 1
    PatientID - Made from 3 fields(a,b,c)(primry key)
    Table B
    PatiendID- (should be the foreign key which references table1)
    However i am finding that when i try to create my constraint i get the following messages
    error 02270 - no matching unique or primarty key for this column list.
    below is the sample code i am using to create my foreign key)
    (ALTER TABLE XD_PatientSedation ADD CONSTRAINT fk_Sedation_PatientID FOREIGN KEY (PatientID)REFERENCES XD_Patient_Demographics(PatientID)
    I am really stuck on this and dont quite know what to do.
    Hope you can help.
    Thanks
    Jagdish

    Just speaking about design, when you want to use a foreign key, it already means that the referenced columns represent something important enough to be a primary key of some other table. I don't understand the business logic of your example (using real table and column names would help), but the solution is probably one of these two :
    a) your foreign key should in fact refer to (a,b,c), the complete primary key of the first table (what was suggested by the others).
    b) your foreign key should stay as 'a' (patientid?), you should have a third table (patients?) whose primary key is 'a', and your "Table 1" should have a foreign key on 'a', referencing the third table. In this case you may find it silly to create a new table with only one column, but I would bet that you will very soon think of interesting attributes which could be added to this table.
    In any case, I think that Oracle did a good job by forcing an improvement of your design !

  • T400 stuck key issue

    I bought my T400 2764-CTO in last December, and started using it on mini dock without any problem. Until recently, it starts to show stuck key issue randomly (not always failure) both at boot up or under Windows Vista.
    ERROR
    0210 Stuck Key FF
    Press <F1> to SetUp
    Note: the stuck key keeps changing, sometimes 13, sometimes 1F, sometimes other key.
    I opened the laptop, and checked the connection of the keyboard but couldn't locate any problem there. Can this be a keyboard issue? Or even a motherboard issue?
    Can Lenovo swap a new keyboard for me? If so, what do I need to do then? 
    Thanks!
    Best Regards  

    You can call Lenovo service, and log a service call, they will make the necessary arrangements. If you are not confident with bios update then please don't do it youself, and let the warranty department do it for you, as any mistakes can make your laptop useless and you will be paying couple hundreds of euros to get the motherboard replaced. 
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • Repeating key issue

    I just moved to the Mac a couple of months ago. I love it and haven't looked back. However, today, I used my Mac twice. First, this morning, I didn't do anything unusual. I cleared out my trash, browsed a bit on the Internet and answered e-mail. Then I modeled some artwork. I shutdown my machine, shutdown my cable modem & router and went to work. When I came back at lunch nothing was wrong and I hardly did anything (Internet still wasn't on).
    However when I came home after work, I started the machine up and the hard drive icon kept popping up and it was difficult to use the menu because I had to hold down the mouse button instead of just click. It turns out that the space key is repeating spontaniously. I thought it might be the keyboard but it doesn't stop when I unplug the keyboard.
    Has anyone had this before? How do I cure it? Thanks.

    Hi Redspark,
    Did you arrive at any solution to your repeating key issue? I've recently joined the discussions forum because I'm having a similar problem - without having typed anything, my backslash spontaneously inserts itself into any text box available and starts repeating itself across the page. In the Finder, I also get various folders spontaneously highlighting themselves, if I pull down a finder menu, it flashes which makes it almost impossible to select anything. As well I get sudden outbursts of the error chime.
    Have done an Archive and Install, reset the PMU. I've also zapped the PRAM, checked my RAM slots, checked Permissions, etc.
    Let me know if you've got any further insights.
    Thanks.

  • Hi guru's what is forign key , and what is foriegn key table

    hi guru's what is forign key , and what is foriegn key table

    hi...
    Foreign key is nothing but simply we can say,
    A field in one table related to field in another table..see the below example...
    consider, there are two tables like emp_personal and emp_official .
    In emp_personal table , the fields are  empid,empname, dob for example. In this table, empid is the primary key field.
    In emp_official table , the fields are empid,dept,designat ion for example. In this also, empid is the Primary key or may not be a Primary key field.
    now we relate these two tables using the foreign key relationship. Foreign key relationship is used to avoid the redundancy mainly...
    now, emp_personal is the Check table( Bcos it holds the empid field, which has the primary key...)
    emp_official table is the Foreign key table (Bcos it holds the empid field, which may or may not be a Primary key).
    now, we foreign key relationship is given. (click the KEY Like  icon in ABAP Dict - Database Table : Emp Official )
    Tables are ready to enter the records...for example create some 5 records in the emp_personal table .
    Table : emp_personal :   Primary Key - empid
    empid     empname    empdob             Status
       1            AAA          1.1.1990          Record saved successfully
       2            BBB          2.2.1990          Record saved successfully
       3            CCC          3.3.1990          Record saved successfully
       4            DDD          4.4.1990          Record saved successfully
       5            EEE          5.5.1990          Record saved successfully
    records are saved in the table : emp_personal.
    now, we are tryiing to create records in emp_official table.
    Table : emp_official :   Primary Key or not a Primary Key - empid
    empid          dept        designation             Status
       1            Dept1        S.E                 Record saved successfully
       2            Dept2       S.SE               Record saved successfully
    now, if u try to create the record which is not in the table emp_personal , which has the empid = 6. but it'll not allow us to create the record 6, bcos of the foreign key relationship between these two tables....
       6            Dept6       P.M                Record doesn't exist......
    now, the foreign key relationship helps us to avoid the duplicate entry......
    Foreign key relationship is possbile between the tables having atleast one same type of field. Also the Technical characteristics of the fields should be same . this is done in the value table.....
    this is the concept of Foreign key...I think this explantion is enough to describe the Foreign key....

  • Prcedure to joining of two tables and pls explore the primary & foriegn key

    Dear All,
    Am new to this forum looking forward to have some discussions and guidance reg ABAP.
    <b>My query is</b>
    what is the prcedure to joining of two tables and pls explore the primary & foriegn key relationships.
    Your kind help is required in this query .
    Thanks n regards
    Carol P

    Hi Carol,
    Joining two tables fetch data from tables that has relevent entry based on the keys. like LIKP and LIPS these are delivery tables. if the business requirement is fetching delivery data that are exists in both two tables. here LIKP will conatins a single entry against a condition and LIPS may contains several entry because one delivery may has multiple line items. so, fetch the data joining the two tables on vbeln that is delivrey number. this is used to increase the performance of the program except for all entries.
    Foreign key is poiting twowards primary key; it may be 1:1 , 1:many and many:many. if field1 of table a is pointing towards field1 of table b. then based on these condition at the time of entry SAP will check how many entry can be entred in field1 of table a.
    regards
    Krishnendu

  • Failure to install Arch Linux via netinstall AIF; PGP key issues

    Hello,
    I'm am attempting a fresh install Arch Linux on a clean machine: Dell 1420, 4GB RAM. I am using the archlinux-2012.02.09_04-00-01-netinstall-dual.iso installer.
    Installation progresses nicely through the package selection (I choose core, core-dev, xfce, and xorg packages only, to keep it simple for now). The packages download quickly, and then the installation fails during installation indicating that none of the PGP keys are known for any of the downloaded files. The process essentially aborts and I press 'Continue' returning me to the main menu. I have repeated this process several times.
    What needs to be done to install Arch Linux?
    Thanks.

    Hi,
    Thanks, I have been through the Beginners Guide. I just want to get Arch Linux to "start" with a very basic GUI. during one of my installation iterations I did install only 'core' files, but the same failure occurred. so I'm at a loss as to how to get even a basic installation to take hold. Thoughts on the pgp key issues?
    Thanks.
    Update: I've switched to using the default net installer (2011.08.19) and the installation succeeded!
    Last edited by zaleksf (2012-02-12 05:12:32)

  • SM30 - Deleting a record with Foriegn Key Constraints

    I have a two custom tables ZCCED_STATUS and ZCCED_COSTITEM. 
    ZCCED_COSTITEM has a status column with a foriegn key to a (PK) status record in ZCCED_STATUS.
    I have generated table maintenance objects for the table ZCCED_STATUS.
    When I go to SM30 and maintain the table ZCCED_STATUS I can select a status record and delete it. (still ZCCED_COSTITEM records using that status)
    Is there any way that SM30 can warn or stop a user from deleting a ZCCED_STATUS record when there are child records in the ZCCED_COSTITEM table?
    Regards,

    Create a maintenance view , link both tables and generate a table maintenance for the maintenance view . it will work.

  • Key issues involved while  technical upgrade of 4.6c to ecc 6

    Hi Guru's
      Will anyone share the key issues and time consuming activities involved  in  tech upgrade project from  4.6 c to ecc 6 at different stages.
      Mail  me [email protected]
      Reward full points for the answer
            Regards,
    Venkat

    Dear Venkatesh ,
    Please visit the following links:
    http://service.sap.com/erp
    http://solutionbrowser.erp.sap.fmpmedia.com/ (Functional prespective)
    http://service.sap.com/instguides --> mySAP Business Suite Applications --> mySAP ERP --> mySAP ERP 2005 --> Upgrade
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOVC/LOVC.pdf
    For Functionality Differences pls refer to the below site -
    http://solutionbrowser.erp.sap.fmpmedia.com/
    After opening the site, please select the Source Release Version which is 4.6 b Then Select the Target Release Version which is "mySAP ERP 2005" or ECC 6.0
    Select the Solution Area like Financials, Human Capital Management, Sales....
    Select module like MM, PP, SD, QM.....
    Click on Search
    Then it displays the Release Version and the Delta Functionality. which can be downloaded to a word document if required.
    and also check the release notes of ECC 6.0 in service.sap.com.
    Hope this helps you.
    Do award points if you found them useful.
    Regards,
    Rakesh

  • Trouble adding foriegn keys

    I am trying to add a foriegn key to a table through the wizard in the sql server diagram tools. I select the foriegn key table which is film_actors_lookup. The film_actors_lookup table has 2 fields: ActorID and FilmID. Both are primary keys for the film_actors_lookup
    table. The Film table has a FilmID primary key. The Actor table has an ActorID as a primry key. When I go to add a foriegn key relationship between the Actors table and the film_actors_lookup table, I get the error that both tables must
    have the same number of fields. Why is this not working?

    Please post the error message.
    Both ActorID and FilmID needs to be PRIMARY KEY in respective tables.
    You can see it with below script:
    USE [TestDatabase]
    GO
    CREATE TABLE [dbo].[film_actors_lookup] ([FilmID] INT, [ActorID] INT)
    GO
    CREATE TABLE [dbo].[actors] ([ActorID] INT PRIMARY KEY)
    GO
    CREATE TABLE [dbo].[films] ([FilmID] INT PRIMARY KEY)
    GO
    /* Add Foreign Key - ActorID */
    ALTER TABLE [dbo].[film_actors_lookup] ADD CONSTRAINT [FK_Actors_Lookup_Actors_ActorID] FOREIGN KEY ([ActorID]) REFERENCES [dbo].[Actors] ([ActorID])
    GO
    /* Add Foreign Key - FilmID */
    ALTER TABLE [dbo].[film_actors_lookup] ADD CONSTRAINT [FK_Actors_Lookup_Films_FilmID] FOREIGN KEY ([FilmID]) REFERENCES [dbo].[Films] ([FilmID])
    GO
    - Vishal
    SqlAndMe.com

  • MySQL JDBC Performance Issues

    Hi, First off, let me admit, im a java newbie. I've been using java for about 6 months now, although im a fast learner, some things still elude me.
    I've searched these forums and google high and low for an answer to my question before signing up and posting here, so i'm kind of at my wits end.
    Let me explain my specs so noone blames lack of power for this issue.
    System specs:
    Linux Cent OS 4 2.6.19 SMP
    JRE 1.6
    MySQL 4.2.2 ICC Compiled Enterprise Edition
    4x HyperThreaded Xeon 1.9Ghz cpus (Displays as 8)
    16GB ECC Double-Parity Double-Buffered Memory. (Rediculous IBM proprietary memory)
    Problem:
    I first wrote this application in PHP as it my stong suit (that should tell you plenty). But the PHP CLI was eating up way to much CPU power/MySQL bandwith to execute this script, and taking way to long, so i started re-writing it in C++, well when my feeble C++ powers failed me, i went to Java. I know more Java then C++ but i picked C first because i thought it would be the fastest. Java, however, is slower then PHP when i write the identical logic, i dont know if i should blame Java or my assumption that i can copy logic from one language to another.
    Here is the details:
    I have 1 MySQL database and 2 Tables im pulling from, This mysql database is optimized by the people from MySQL, so i know its not the DB, Server, or Tables. 1 table (bfpax) has around 45k rows (45000), the second table (bfbdet) has around 100k rows (100000). What this program has to do, its objective, is:
    1. Pull the indexed ID from table 1;
    2. With that ID, pull other data from table 2 and table 1 for each ID;
    3. Compile that data together for each ID
    4. Insert compiled data into a HEAP table for fast access for each ID.
    In PHP (pseudocode):
    SELECT ID FROM bfpax;
    Loop:
    Foreach id pull various data pieces i.e. name, client code, address, zip, etc.
    String format name: "A-GARY/COLE" becomes "Gary/Cole"
    String format hotel: "ACUNMIP" becomes CUNMIP
    Insert all formatted/fixed data into heap table
    End loop.
    In Java (pseudocode):
    SELECT ID FROM cpax;
    Loop:
    Create object with ID as constructor variable (see below for object declaration) and add to an arrayList;
    End Loop;
    Create 6 threads to execute each of the objects methods for data collection/formatting
    Start each thread using inner classes to loop through the object arraylist and execute dedicated methods per thread.
    Thread 1: Pull air data
    Thread 2: Pull destination
    Thread 3: Pull hotel
    Thread 4: Pull gateway
    Thread 5: Pull the rest (price, dates, etc)
    Thread 6: Start executing the update method
    The above kind of failed, so i reduced the complexity by nuking the whole thread idea and now i just have a simple function that loops through the arraylist of objects and executes each method in order.
    Booking Object:
    public class Booking extends ReportingConstants{
        private ArrayList<String> myData = new ArrayList<String>();
        private int myBookNum;
        private static Connection myCon;
        public static int numBookings;
        public int updateCount = 0;
        public boolean isFinished = false;
        public Booking(int booking_number, Connection conn) {
            if (booking_number > 9999) {
                myBookNum = booking_number;
            numBookings++;
            myCon = conn;
            //Run loop to make sure myData has the proper spaces for insert, ensureCapacity didnt work.
            for (int i = 0; i < 15; i++) {
                myData.add("");
            myData.set(_BOOKNUM,String.valueOf(myBookNum));
            if (Integer.valueOf(_ARGS[_DEBUG][1]) > 0) {
                System.out.println("Initialized booking number "+myBookNum+" count "+numBookings);
        public void getAir() {
            ResultSet res;
            ArrayList<String> total_air = new ArrayList<String>();
            String airlines = "";
            String query = "SELECT operator_id FROM EDITED.bfbdet WHERE record_type = 'A' AND item_desc LIKE '-%' AND booking_number = "+myBookNum+" AND operator_id IS NOT NULL";
            if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
                System.out.println("Starting Air: "+query);
            res = MySQL.sqlQuery(query,myCon,5);
            try {
                while(res.next()) {
                    if (res.getString(1).length() > 1) {
                        String id = res.getString(1).substring(0,2);
                        if (!total_air.contains(id)) {
                            airlines += id+",";
                        total_air.add(id);
                res.close();
                MySQL.close();
            } catch (Exception ex) {
                ex.printStackTrace();
            myData.set(_AIR,airlines);
            updateCount++;
        public void getDest() {
            String query = "SELECT booking_code FROM EDITED.bfpax WHERE booking_number = "+myBookNum+" LIMIT 1";
            ResultSet res;
            String isSv ="Y";
            String dest;
            if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
                System.out.println("Starting Dest: "+query);
            res = MySQL.sqlQuery(query,myCon,1);
            try {
                while (res.next()) {
                    dest = res.getString(1).substring(1,4);
                    if (dest != "FRE") {
                        if (dest == "GYY") {
                            String realDest = res.getString(1).substring(4,2);
                            if (realDest == "GY") {
                                dest = "GYY";
                            } else if (realDest == "MC") {
                                dest = "MCO";
                            } else if (realDest == "FL") {
                                dest = "FLL";
                            } else if (realDest == "IW") {
                                dest = "IWA";
                            } else if (realDest == "PI") {
                                dest = "PIE";
                            } else if (realDest == "LA") {
                                dest = "LAS";
                            } else {
                                dest = "GYY";
                        } else {
                            isSv = "N";
                        myData.set(_DEST,dest);
                        myData.set(_SV,isSv);
                        updateCount++;
                res.close();
                MySQL.close();
            } catch (Exception ex) {
                ex.printStackTrace();
        public void getGateway() {
            String query = "SELECT item_desc FROM EDITED.bfbdet WHERE (booking_number = '"+myBookNum+"' OR booking_number = ' "+myBookNum+"') AND item_desc LIKE '-%' ORDER BY booking_suffix ASC LIMIT 1";
            if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
                System.out.println("Starting GW: "+query);
            ResultSet res = MySQL.sqlQuery(query,myCon,1);
            String gw;
            try {
                while (res.next()) {
                    gw = res.getString(1).substring(1,3);
                    myData.set(_GW,gw);
                updateCount++;
                res.close();
                MySQL.close();
            } catch (Exception ex) {
                ex.printStackTrace();
        public void getHotel() {
            String query = "SELECT operator_id FROM EDITED.bfbdet WHERE record_type = 'H' AND (booking_number = '"+myBookNum+"' OR booking_number = ' "+myBookNum+"') LIMIT 1";
            if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
                System.out.println("Starting Hotel: "+query);
            ResultSet res = MySQL.sqlQuery(query,myCon,1);
            String hotel = "";
            try {
                while (res.next()) {
                    hotel = res.getString(1).substring(0,6);
                    if (myData.get(_DEST) == "") {
                        myData.set(_DEST,res.getString(1).substring(0,3));
                        updateCount++;
                myData.set(_HOTEL,hotel);
                updateCount++;
                res.close();
                MySQL.close();
            } catch (Exception ex) {
                ex.printStackTrace();
        public void getRest() {
            String query = "SELECT client_code, passenger1_name, agentid, booked_date, dep_date, total_price, total_received, total_commission, number_pax FROM EDITED.bfpax WHERE booking_number = "+myBookNum+" LIMIT 1";
            if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
                System.out.println("Starting Rest: "+query);
            ResultSet res = MySQL.sqlQuery(query,myCon,1);
            try {
                while (res.next()) {
                    myData.set(_AGENCY,res.getString(1));
                    if (res.getString(3) != "null") {
                        myData.set(_AGENT,res.getString(3));
                    } else {
                        myData.set(_AGENT,"");
                    myData.set(_PAXNAME,res.getString(2).replace("'",""));
                    myData.set(_BKDATE,String.valueOf(res.getDate(4)));
                    myData.set(_DEPDATE,String.valueOf(res.getDate(5)));
                    myData.set(_TPRICE,String.valueOf(res.getDouble(6)));
                    myData.set(_TRECV,String.valueOf(res.getDouble(7)));
                    myData.set(_TCOM,String.valueOf(res.getDouble(8)));
                    myData.set(_NUMPAX,String.valueOf(res.getInt(9)).trim());
                    //System.out.println("NUMPAX: |"+myData.get(_NUMPAX)+"|");
                updateCount++;
                res.close();
                MySQL.close();
            } catch(Exception ex) {
                ex.printStackTrace();
        public void storeData() {
            if (!isFinished) {
                String query = "INSERT INTO "+tmpTable+" (`booking_number`, `destination`, `gateway`, `airline`, `hotel`, `agency`, `agent`, `booked_date`, `dep_date`, `total_price`, `total_received`, `total_commission`, `number_pax`, `passenger_name`, `is_skyvalue`) VALUES('"+myData.get(0)+"','"+myData.get(1)+"','"+myData.get(2)+"','"+myData.get(3)+"','"+myData.get(4)+"','"+myData.get(5)+"','"+myData.get(6)+"','"+myData.get(7)+"','"+myData.get(8)+"','"+myData.get(9)+"','"+myData.get(10)+"','"+myData.get(11)+"','"+myData.get(12)+"','"+myData.get(13)+"','"+myData.get(14)+"')";
                if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
                    System.out.println(query);
                MySQL.sqlExec(query,myCon);
                isFinished = true;
                if (Integer.valueOf(_ARGS[_DEBUG][1]) > 0) {
                    System.out.println("Booking number "+myBookNum+" is finished!");
            } else {
                //System.out.println("Not fully populated!");
    }Please dont laugh too hard heh, i know my code is sloppy and probably not optimized at all, i dont pretend to be a hardcore java guy, but i would love to learn. Im also posting below my static MySQL class so you can see what happens when i call sqlQuery();
    public abstract class MySQL {
        private static ResultSet res;
        private static Statement stmt;
        public static ResultSet sqlQuery(String query,Connection con, int limit) {
            try {
                stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
                stmt.setFetchSize(limit);
                res = stmt.executeQuery(query);
            } catch(Exception ex) {
                ex.printStackTrace();
                res = null;
                System.out.println("Cant Query!: "+query);
            return res;
        public static void sqlExec(String query,Connection con) {
            Statement stmt;
            try {
                stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
                stmt.executeUpdate(query);
                stmt.close();
            } catch(Exception ex) {
                ex.printStackTrace();
                System.out.println("Cant Query!: "+query);
        public static void close() {
            try {
                stmt.close();
                res.close();
            } catch (Exception ex) {
                ex.printStackTrace();
    }If you notice, i require the connection to be passed when executing a query, i do this because even if i made a static connection state in the MySQL class, for some reason, it still gets duplicated every time its called. This way, i create 1 connection with the calling static main class, and pass that same conn back and forth through the whole script. I know in PHP this is the best way to do it, in Java it may require many different connections.
    By the way, this is an update that runs once per hour, it does not have to worry about users or anything like that, it gets executed by cron on the hour.
    PHP does this job of updating about 40000 entries in 9-12 minutes. for an average of 0.0135 seconds per entry, Java rolls around at 0.06 seconds per query, 6x slower, this puts execution time at about 40 minutes, obviously this is an issue if its supposed to run every hour. The java app does not tax the system, on top/htop it does not even make it to the first page so its not resources, ive looked at the verbose gc info, and i didnt see anything to clue me in there either.
    I'm sure this is a simple error and my lack of knowledge with Java is what's holding me back, but if i cant figure this out ill have to go back to struggling with C++.
    Thanks in advance, and im sorry for the horribly long post.
    Thanks,
    Dave

    I didnt want to include this in the original post, so here is where my main is located:
    public class ReportingUpdate extends ReportingConstants {
        private ArrayList bookings;
        private static String[] argList;
        private static ArrayList<String> provArg = new ArrayList<String>();
        public ArrayList notDone = new ArrayList();
        private static Connection conn;
        public int bookingsUpdated;
        public static boolean isUpdating = false;
        private static int _ERRORS = 0;
        public static ArrayList doneBookings = new ArrayList();
        public static void main(String[] args) {
            if (args.length > 0) {
                if (args[0].contains("-help")) {
                    printHelp();
                } else {
                    setupArgs();
                    argList = args;
                    parseArgs();
            if (_ERRORS == 0) {
                new ReportingUpdate().go();
            } else {
                return;
        private static void parseArgs() {
            for (String s : argList) {
                if (s.indexOf("-") != 0) {
                    printHelp();
                    break;
                if (s.length() > 2) {
                    provArg.add(s.substring(1,2));
                } else {
                    printHelp();
                    break;
            for (int i = 0; i < _ARGS.length; i++) {
                if (provArg.contains(_ARGS[0])) {
    int pos = provArg.indexOf(_ARGS[i][0]);
    ReportingConstants._ARGS[i][1] = argList[pos].substring(2);
    //Commented out argument testing loop.
    /*for (String[] s : _ARGS) {
    System.out.println("Arg: "+s[0]+" Value: "+s[1]);
    _ERRORS++;*/
    public static void printHelp() {
    System.out.println("\nReporting Update 1.1 (2007 February 1, compiled Feb 19 2007 11:12:24)");
    System.out.println("");
    System.out.println("Usage: java -jar /path/to/ReportingUpdate.jar [arguments]");
    System.out.println("");
    System.out.println("Arguments:");
    System.out.println(" -d<level>\tDebug Level: 0-No Output(Default), 1-Start and finish output, 2-Functional Output(Lots of output)");
    System.out.println(" -l<limit>\tBooking Limit. How many bookings will be updated, only use this for testing.");
    System.out.println(" -a<0,1> \tBool choice to run the air update function, speed testing option. (0-0ff,1-On)\n \t\tIf this is not set, on is assumed");
    System.out.println(" -e<0,1> \tSame as above, but for destination.");
    System.out.println(" -g<0,1> \tSame as above, but for gateway.");
    System.out.println(" -h<0,1> \tSame as above, but for hotel.");
    System.out.println(" -r<0,1> \tSame as above, but for agency,agent,price & dates.");
    System.out.println(" -u<0,1> \tSame as above, but for each bookings actual insert into the db.");
    System.out.println("");
    System.out.println("Example: java -jar /path/to/ReportingUpdate.jar -d1 -l500 -a0 -d0 -u0");
    System.out.println("Run the reportingupdate with debug level 1, limit 500 bookings and do not run the air, destination or insert functions.\n");
    _ERRORS++;
    public void go() {
    String limitString;
    if (Integer.valueOf(_ARGS[_LIMIT][1]) > 0) {
    limitString = "LIMIT "+_ARGS[_LIMIT][1];
    } else {
    limitString = "";
    bookings = new ArrayList();
    ResultSet res;
    connect();
    res = MySQL.sqlQuery("SELECT booking_number FROM EDITED.bfpax WHERE booking_number IS NOT NULL "+limitString,conn,Integer.valueOf(_ARGS[_LIMIT][1]));
    try {
    int i = 0;
    while (res.next()) {
    String booking = res.getString("booking_number");
    booking = booking.trim();
    if (booking.length() > 1) {
    //System.out.println("Reading booking "+booking);
    bookings.add(new Booking(Integer.valueOf(booking),conn));
    i = 1;
    startTheFire();
    } catch(Exception ex) {
    ex.printStackTrace();
    private void startTheFire() {
    /*Thread a = new Thread(new DoAir());
    Thread b = new Thread(new DoDest());
    Thread c = new Thread(new DoGW());
    Thread d = new Thread(new DoHotel());
    Thread e = new Thread(new DoRest());
    Thread f = new Thread(new DoUpdate());
    a.setName("Air");
    a.start();
    b.setName("Dest");
    b.start();
    c.setName("GW");
    c.start();
    d.setName("Hotel");
    d.start();
    e.setName("Rest");
    e.start();
    f.setName("Update");
    f.start();
    try {
    f.sleep(20000);
    } catch (Exception ex) {
    ex.printStackTrace();
    Iterator it = bookings.iterator();
    while (it.hasNext()) {
    Booking b = (Booking) it.next();
    if (Integer.valueOf(_ARGS[_AIRARG][1]) > 0) {
    b.getAir();
    if (Integer.valueOf(_ARGS[_DESTARG][1]) > 0) {
    b.getDest();
    if (Integer.valueOf(_ARGS[_GWARG][1]) > 0) {
    b.getGateway();
    if (Integer.valueOf(_ARGS[_HOTELARG][1]) > 0) {
    b.getHotel();
    if (Integer.valueOf(_ARGS[_RESTARG][1]) > 0) {
    b.getRest();
    if (Integer.valueOf(_ARGS[_UPDATEARG][1]) > 0) {
    b.storeData();
    class DoAir implements Runnable {
    public void run() {
    Iterator it = bookings.iterator();
    while(it.hasNext()) {
    Booking tempBooking = (Booking) it.next();
    tempBooking.getAir();
    if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
    System.out.println("Air is done!");
    class DoDest implements Runnable {
    public void run() {
    Iterator it = bookings.iterator();
    while(it.hasNext()) {
    Booking tempBooking = (Booking) it.next();
    tempBooking.getDest();
    if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
    System.out.println("Dest is done!");
    class DoGW implements Runnable {
    public void run() {
    Iterator it = bookings.iterator();
    while(it.hasNext()) {
    Booking tempBooking = (Booking) it.next();
    tempBooking.getGateway();
    if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
    System.out.println("Gateway is done!");
    class DoHotel implements Runnable {
    public void run() {
    Iterator it = bookings.iterator();
    while(it.hasNext()) {
    Booking tempBooking = (Booking) it.next();
    tempBooking.getHotel();
    if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
    System.out.println("Hotel is done!");
    class DoRest implements Runnable {
    public void run() {
    Iterator it = bookings.iterator();
    while(it.hasNext()) {
    Booking tempBooking = (Booking) it.next();
    tempBooking.getRest();
    if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
    System.out.println("The Rest is done!");
    class DoUpdate implements Runnable {
    public void run() {
    while (bookingsUpdated <= Booking.numBookings) {
    if (doneBookings.size() > 0) {
    isUpdating = true;
    Iterator it = doneBookings.iterator();
    while (it.hasNext()) {
    Booking b = (Booking) it.next();
    b.storeData();
    bookingsUpdated++;
    it.remove();
    isUpdating = false;
    if (Integer.valueOf(_ARGS[_DEBUG][1]) > 1) {
    System.out.println("Update is done!");
    private void connect() {
    try {
    Class.forName("com.mysql.jdbc.Driver");
    conn = DriverManager.getConnection(_URL,_USER,_PASS);
    } catch(Exception ex) {
    System.out.println("Cannot Connect to: "+_URL);
    ex.printStackTrace();
    createTempTable();
    private void createTempTable() {
    String create_query = "CREATE TABLE IF NOT EXISTS `"+tmpTable+"` (`ID` INT( 5 ) NOT NULL AUTO_INCREMENT ,`booking_number` INT( 6 ) NULL ,`destination` CHAR( 3 ) NULL ,`gateway` CHAR( 3 ) NULL ,`airline` VARCHAR( 15 ) NULL ,`hotel` CHAR( 6 ) NULL ,`agency` VARCHAR( 15 ) NULL ,`agent` VARCHAR( 20 ) NULL ,`booked_date` VARCHAR( 10 ) NULL ,`dep_date` VARCHAR( 10 ) NULL ,`total_price` VARCHAR( 10 ) NULL ,`total_received` VARCHAR( 10 ) NULL ,`total_commission` VARCHAR( 10 ) NULL ,`number_pax` INT( 5 ) NULL ,`passenger_name` VARCHAR( 50 ) NULL,`is_skyvalue` CHAR( 1 ) NULL,PRIMARY KEY ( `ID` ),INDEX ( `booking_number` ),INDEX ( `agency` ) ) TYPE = memory;";
    String trunc = "TRUNCATE TABLE `"+tmpTable+"`";
    MySQL.sqlExec(create_query,conn);
    MySQL.sqlExec(trunc,conn);

  • Satellite U400-15B hangs on Internet and Touch media keys issue

    Hi All,
    Had two issues with my U400-15B which I am hoping to resolve.
    1) The first issue is that I have noticed that my internet occasionally seems to hang on Internet Explorer when using website's which have a couple of images e.t.c.
    It will freeze but the rest of the laptop works fine - I mean you can go into the start menu and open other programs fine. However, if you open Microsoft Word while this is happening, it will take slightly longer to load up than normal. Does anyone know what this could be or how I can resolve this?
    I am using Vista Home Premium 32 bit and the laptop has 4GB of RAM / P7350 Intel Centrino 2 - so is pretty powerful.
    2) The second issue is that when I press the 'sound' touch key, the white lights and the white bar above the touchpad become unlit. When I press this again the lights come back on but it doesn't mute the sound. Only when the the laptop is put to sleep mode and then woken up again, does the key work correctly. All others work fine. Does anyone know whats causing this?
    I have exchanged this laptop 3 times now and all of them have done issue (2) this but surely this isn't normal.
    Any help or advice to rectify these issues is very much appreciated.
    Thanks

    > but the problem of when you press the sound mute touch key still turns the white lights off and the white bar on top of the mouse off - instead of muting the sound.
    Ive got U400 too and installed Win XP. When I press the first button near the power button then I can enable and disable the LEDs.
    To be honest this is not a problem!
    You can configure the Toshiba Control buttons.
    This can be done in the Toshiba Button Support Utility. And this tool can be found in Toshiba Assist -> Optimize -> Toshiba Button Support
    There you can chose the button (button name) and can assign the certain function.
    I think the mute.exe could be fund in Toshiba folder.

Maybe you are looking for

  • How do I get more volume when watching a movie and can I use headphones?

    How do I get more volume when watching a movie? And can I also use headphones?

  • Can't edit an event in my Calendar.

    Yesterday I noticed that I can't edit an event in my Calendar. Also when I type a new event it drops some of the type off when I hit return. And it's not necessarily dropping off the end of the sentence! I'm using OSX10.8.5. The only thing that's dif

  • CS4 Bridge not interfacing with Photoshop.

    I am evaluating the new Photoshop CS4 (it is purchased copy and not running on the 30 day trial) and have run into a problem in using Bridge CS4. I am able to open an image using Photoshop's File Open command BUT when I attempt to do so in Bridge I g

  • XML Forms on the Portal posting to an IDOC

    Scenario Goals 1. Portal Based XML form being used by users to enter information 2. Posting to an IDOC in R3 Current Solution 1. The XML form outputs a file to local file system through the EP 2. XI then takes this file transforms 3. XI Posts IDOC Qu

  • Display faux spreadsheet on front-panel

    Hey, thanks to all that have been helping me answer all my LV questions. This site is awesome. My newest question: I am writing data to a spreadsheet in my program... I recieve a measurement from my scale via rs232... then, I display the data (floati