Problems saving results of Headstart Utilities

I've problems with two utilities concerning journalling:
1. Maintain journal tables HSU_CJNT Revision 6.5.0.4
This package does not want to save the changes made to the journal tables in the repository. The error is CDA-01305: Column: UID 1 uniqueness violation. Version of Repository is 6.5.69.2.0
2. Maintain journalling business rules HSU_JNBR Revision 6.5.0.2
This package also doen't want to save adjustments, in this case to the BR's Errors :
CDA-02035: Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_INS): Uniqueness conflict with Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_INS) in Container (Name MAT)
CDA-02035: Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_UPD): Uniqueness conflict with Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_UPD) in Container (Name MAT)
CDA-02035: Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_DEL): Uniqueness conflict with Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_DEL) in Container (Name MAT)
Anyone any suggestions/patches?

Willem,
Regarding your problems:
1. Maintain journal tables HSU_CJNT Revision 6.5.0.4
This package does not want to save the changes made to the journal tables in the repository.
The error is CDA-01305: Column: UID 1 uniqueness violation. Version of Repository is 6.5.69.2.0This UID requires the column name to be unique within the table.
What could be the case is that your table has two or more columns that have almost identical names, and only differ
after the 26th character. The utility creates column names like OLD_<column name> and NEW_<column name>.
If for example you have 2 columns in the same table that are called VERY_VERY_LONG_COLUMN_NAME1 and
VERY_VERY_LONG_COLUMN_NAME2, the utility applies the algorithm 'OLD_'||substr(r_col.col_name, 1, MAX_IDENTIFIER_LENGTH - 4)
and come up with OLD_VERY_VERY_LONG_COLUMN_NAME, for both of the original columns!
Could you check if this is the reason for the failure? If so, you could try renaming the columns, or changing the algorithm for deriving the journal column names in package hsu_cjnt.
2. Maintain journalling business rules HSU_JNBR Revision 6.5.0.2
This package also doen't want to save adjustments, in this case to the BR's Errors :
CDA-02035: Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_INS): Uniqueness conflict with Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_INS) in Container (Name MAT)
CDA-02035: Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_UPD): Uniqueness conflict with Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_UPD) in Container (Name MAT)
CDA-02035: Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_DEL): Uniqueness conflict with Database Trigger (Table 2642375373300319097291377310396885686, Name BR_ADS_JRN_DEL) in Container (Name MAT) It seems like the utility tries to create new database triggers, but they already exist in the Container (=Application System or Folder).
It could be that the database triggers already exist in a different workarea than the one you are running the utility in.
The utility can see only the objects in the context workarea, so it doesn't know about the possible existence of the triggers in another workarea.
You can check this by running the following query while logged in as a Repository user or the Utilities owner:
select name
from ci_database_triggers
where table_definition_reference = 2642375373300319097291377310396885686
If it selects the trigger names BR_ADS_JRN_INS etc, but you cannot see those triggers in your workarea, then they must exist in another workarea.
Try to include them in your workarea or run the utility in the other workarea.
Could you check if this is the case?
kind regards, Sandra

Similar Messages

  • Problems saving results of Headstart Utilities Journalling

    Unique key conflict when re-using Utility Maintain journal tables.
    We experience the same problems.
    Colum names are not too long.
    We are working with an unversioned repository and Headstart Utilities 6.0.5.4
    Als the Static Domain rules utility is not able to update prior generated Triggers.
    Workaround is to drop the previously generated triggers!
    However, this workaround is not an option for the Journal tables, because Module table usages are referencing this table.
    Please let us know as soon as possible.
    Joep

    Unique key conflict when re-using Utility Maintain journal tables.
    We experience the same problems.
    Colum names are not too long.
    We are working with an unversioned repository and Headstart Utilities 6.0.5.4
    Als the Static Domain rules utility is not able to update prior generated Triggers.
    Workaround is to drop the previously generated triggers!
    However, this workaround is not an option for the Journal tables, because Module table usages are referencing this table.
    Please let us know as soon as possible.
    Joep

  • Hello! I'm using Aperture with Efex plugins and notice, what when I saving result in plugin and go back to aperture, preview mode is going to grey color and not working until I reboot Aperture. Did you saw this problem?

    Hello! I'm using Aperture with Efex plugins and notice, what when I saving result in plugin and go back to aperture, preview mode is going to grey color and not working until I reboot Aperture. What is intresting - in full screen mode everything works fine. Did you saw this problem?

    It seems there's a workaround here:
    https://discussions.apple.com/thread/5566037?tstart=0

  • Problem in creating Saved Result Set (SRS) in OBIEE 10.1.3.4

    Hi,
    We have migrated Siebel Analytincs 7.8.5 to OBIEE 10.1.3.4, and we are now unable to create any SRS from OBIEE though we can create Segment and marketing cache for the segment.
    We did the following steps -
    1. Unisntall Siebel Analytincs 7.8.5
    2. Install OBIEE 10.1.3.4
    3. Use MIGRATE tool (sawmigrate) to migrate RPD & WEBCAT
    4. We have ALTERed the SRS tables - M_SR_HEADER, M_SR_ACCOUNT (as in OBIEE version there are many new columns have been added)
    5. We passed GLOBAL CONSISTENCY in the RPD
    6. We followed the steps in the document *"Oracle®Marketing Segmentation Guide Version 10.1.3.4 July 2008"*
    7. We created a Saved Result Set Format as instructed in the document - here we are very confused to select the list of columns - we don't know what should be the excat source / format
    8. Then we click the SRS create button
    9. We got the below error -
    Error Codes: QS2QOLYY:GDL67CY9:IHVF6OM7:OPR4ONWY:U9IM8TAC
    Error in getting cursor for WorkNode (Id:0)
    Authentication Failure.
    Odbc driver returned an error (SQLDriverConnectW).
    *State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused. [nQSError: 43001] Authentication failed for Administrator in repository Star: invalid user/password. (08004)*
    Can anyone help us to resolve the issue ?
    A quick response is much much appreciated.
    Many Thanks,
    Prasanta

    Hi,
    It seems like you didnt setup the Administrator user for Saved Result Sets as it mentioned in the Marketing Segmentation Guide.
    Here is an extract from the guide:
    Setting Up the Web Administrator for Managing Cache and Saved Result Sets
    Some queries issued by the segmentation engine require the use of the Execute Physical stored
    procedure. These queries include delete statements on the cache, delete statements on the saved
    result sets, and insert statements for the cache and saved result set. The Execute Physical stored
    procedure must be run by a user with administrator privileges. The administrator user is set up in
    the instanceconfig.xml file.
    NOTE: The BI Administrator password and login parameters are case sensitive.
    To set up the administrative user in the instanceconfig.xml file
    1 Open a command shell and navigate to the <OracleBI>/web/bin, where <OracleBI> represents
    the root directory of the installation.
    2 Execute the following command:
    cryptotools credstore -add -infile <OracleBIData>/web/config/credentialstore.xml
    3 When prompted, enter the following values:
    Credential Alias: admin
    Username: Administrator
    Password: <enter Admin password here>
    Do you want to encrypt the password? y
    Passphrase for encryption: <password >
    Do you want to write the passphrase to the xml? n
    File "<OracleBIData>/web/config/credentialstore.xml" exists. Do you want to overwrite it? y
    4 Open the credentialstore.xml file and verify that the following section has been created:
    <sawcs:credential type="usernamePassword" alias=“admin">
    <sawcs:username> Administrator </sawcs:username>
    <sawcs:password>
    <xenc:EncryptedData>

  • ORA-20998: Transaction Failed on Headstart Utilities 6.5 installation

    Hello,
    I am having problem when running insthsu.sql script to install
    Headstart utilities 6.5. We are doing client/server approach. The
    server is Sun 450 - Oracle 8.1.7.0.0
    Designer 6i Release 4 repository was installed on the server.
    How far was the installation:
    1. Installed HST65 --> No problem found
    2. Installed HDEMO65 --> No problem found
    3. Failed on the following statement on insthsu.sql script:
    ... installing Quality Check utilities
    execute hsu_qa_app.install;
    error message:
    hsu65@devl> execute hsu_qa_app.install
    BEGIN hsu_qa_app.install; END;
    ERROR at line 1:
    ORA-20998: Transaction Failed
    ORA-06512: at "HST65.QMS$ERRORS", line 128
    ORA-06512: at "HST65.QMS_TRANSACTION_MGT", line 814
    ORA-06512: at "HSU65.CG$AIS_HSU_UTILITIES", line 39
    ORA-04088: error during execution of
    trigger 'HSU65.CG$AIS_HSU_UTILITIES'
    ORA-06512: at "HSU65.HSU_INSTALL", line 132
    ORA-06512: at "HSU65.HSU_QA_APP", line 40
    ORA-06512: at line 1
    Any idea or direction where should I go from here?
    Thanks,
    Sanny Subowo

    Ali,
    You are running into a bug in the install form. It sees the tables that you imported manually (like the message told you to do), and then complains about them. The best thing to do is change the code in the hsdinst.fmb where the check for existing objects is performed in program units CHECK_USERS:
    function hsu_objects_exist
    return boolean
    is
    cursor c_chk
    is
    select 'x'
    from user_objects
    where object_name like 'BL_%'
    -- or object_name like 'HSU_%'
    -- or object_name like 'OMR_%'
    So comment out the two lines as indicated above and recreate the fmx.
    Kind regards,
    Peter

  • Error on HSU_OUTPUT dir when using Headstart Utilities

    Hi all,
    Does anyone have experience with the following problem: when I try to run the Headstart Utilities - Quality checks (elements) - Functions check, I get the following error:
    "Could not create file, possibly because output-directory does not exist. Check output directory in Windows Registry (HSU_OUTPUT)"
    My Registry has the following entry:
    Local Machine\Software\Oracle\Headstart
    which contains keys named HSU_OUTPUT, HTML_BROWSER and IMAGEFILE_PATH.
    So the entry seems to be OK, it refers to an existing dir, what's the problem?
    Regards, Ronald
    P.S. The other checks are working fine, I used entities, sequences and domains without a problem.

    Sandra,
    I've tried to reproduce the error I got in the beginning, but now I'm getting a database error (ORA-02291: integrity constraint (HSU21.HSU_QAR_USE_FK1) violated - parent key not found) While I was looking into that I noticed the following:
    In the package procedure HSU_QA_FUN.run there's a call to HSU_QA.INIT. In the INIT-call the user-id (3rd arg) is hard coded to be 1. In the HSU_QA_ENT.run the call is used with p_use_id, which I would expect te be correct. I noted that in the installation scripts the code is the same, so it's not a change we made.
    My question is: is there to be a pre-defined user in HSU_USERS with user-id 1? Or should the '1' in the call to init be changed into p_use_id, like in HSU_QA_ENT?
    Thanks for your help,
    Ronald

  • URGENT:problems with installation of HeadStart

    After installing Oracle HeadStart R2.1.2 on a common driver and
    then Server-Side as explained in the file inst_oi.htm I have
    launched the program Start->Program->HeadStart Designer R 2.1.2->
    HeadStart Utilities Administration.
    Then it appears to me the program Developer 2000 Forms Runtime
    for Windows 95/NT ad a form asking me UserID, Password and
    database.
    I have inserted the combination that I usually use for Designer
    and then I obtain the following error: FRM-41085 : ERROR
    OBTAINING THE COUNTING OF ROWS OF THE GROUP at which I answer OK
    and then the error FRM-40735 : THE TRIGGER PRE-FORM DOES NOT
    MANAGE THE EXCEPTION ORA-04062.
    Which could be my problem?
    I have also tried a lot of time to reinstall the server side but
    also if the combinations of password and connection in the fifth
    form of the wizard are RIGHT(as when I installed the first time)
    it gives me the error "User name/Password Repository Owner or
    Connect String is not correct". How can I try to reinstall all?
    The type of installation was "new installl" because I didn't
    have a previous release of HeadStart.
    Or the problem are due to the release of Designer/Developer as I
    had written in the letter of 15 Sept 1999 at which nobody has
    not answered still.
    Please Reply as soon as possible.
    Than you.
    Andrea.
    null

    Andrea (guest) wrote:
    : After installing Oracle HeadStart R2.1.2 on a common driver and
    : then Server-Side as explained in the file inst_oi.htm I have
    : launched the program Start->Program->HeadStart Designer R
    2.1.2->
    : HeadStart Utilities Administration.
    : Then it appears to me the program Developer 2000 Forms Runtime
    : for Windows 95/NT ad a form asking me UserID, Password and
    : database.
    : I have inserted the combination that I usually use for Designer
    : and then I obtain the following error: FRM-41085 : ERROR
    : OBTAINING THE COUNTING OF ROWS OF THE GROUP at which I answer
    OK
    : and then the error FRM-40735 : THE TRIGGER PRE-FORM DOES NOT
    : MANAGE THE EXCEPTION ORA-04062.
    : Which could be my problem?
    : I have also tried a lot of time to reinstall the server side
    but
    : also if the combinations of password and connection in the
    fifth
    : form of the wizard are RIGHT(as when I installed the first
    time)
    : it gives me the error "User name/Password Repository Owner or
    : Connect String is not correct". How can I try to reinstall all?
    : The type of installation was "new installl" because I didn't
    : have a previous release of HeadStart.
    : Or the problem are due to the release of Designer/Developer as
    I
    : had written in the letter of 15 Sept 1999 at which nobody has
    : not answered still.
    : Please Reply as soon as possible.
    : Than you.
    : Andrea.
    Andrea,
    Please install Oracle Designer 2.1.2 first. You can reinstall by
    using other users or deleting the users that you have created for
    the first install. Please do not forget to also delete the
    hsu212_user first before you reinstall.
    Regards,
    Ton
    null

  • Headstart Utilities Failure w/Designer 6.0

    Hello:
    I've just tried to install Headstart 2.1.2 with the new patches
    for Designer 6/Developer 6 on Windows NT 4.0 SP 4. I've checked
    all of the logs (in my ORANT\HSD21 folder) and I don't see any
    errors in any of them.
    However, when I go to start the Headstart Utilities
    Administration and log in as the Headstart Utilities owner, I
    get the following:
    I get a number of "FRM-40733: PL/SQL built-in DBMS_ERROR_TEXT
    failed". This comes up 5 times in a row.
    Then I get "FRM-40735: PRE-FORM trigger raised unhandled
    exception ORA-03114". This comes up once, and the form exits.
    This last one seems to indicate that the logon has failed, but I
    can log on using SQLPlus 3.3 and SQLPlus 8.0 with no problems,
    using exactly the same ID/password.
    If it matters, I'm using Oracle 8.1.5.0.0, Developer 6.0
    downloaded from Technet with the dev60 patches and Designer 6.0
    with no additional patches. They all seem to be working OK
    (I've generated a test form w/o Headstart and it runs OK).
    I've also run the following as suggested in another of your
    posts:
    select object_name from user_objects where status='INVALID';
    which returns no rows.
    Help!!
    TIA
    Eric Raskin
    null

    Headstart Team (guest) wrote:
    : Jeff Esposito (guest) wrote:
    : : Headstart Team (guest) wrote:
    : : : Eric Raskin (guest) wrote:
    : : : : Headstart Team (guest) wrote:
    : : : : : Eric Raskin (guest) wrote:
    : : : : : : Hello:
    : : : : : : I've just tried to install Headstart 2.1.2 with the
    new
    : : : : patches
    : : : : : : for Designer 6/Developer 6 on Windows NT 4.0 SP 4.
    : I've
    : : : : : checked
    : : : : : : all of the logs (in my ORANT\HSD21 folder) and I
    don't
    : : see
    : : : : any
    : : : : : : errors in any of them.
    : : : : : : However, when I go to start the Headstart Utilities
    : : : : : : Administration and log in as the Headstart Utilities
    : : owner,
    : : : : I
    : : : : : : get the following:
    : : : : : : I get a number of "FRM-40733: PL/SQL built-in
    : : : : : DBMS_ERROR_TEXT
    : : : : : : failed". This comes up 5 times in a row.
    : : : : : : Then I get "FRM-40735: PRE-FORM trigger raised
    : : unhandled
    : : : : : : exception ORA-03114". This comes up once, and the
    form
    : : : : exits.
    : : : : : : This last one seems to indicate that the logon has
    : : failed,
    : : : : but
    : : : : : I
    : : : : : : can log on using SQLPlus 3.3 and SQLPlus 8.0 with no
    : : : : problems,
    : : : : : : using exactly the same ID/password.
    : : : : : : If it matters, I'm using Oracle 8.1.5.0.0, Developer
    : 6.0
    : : : : : : downloaded from Technet with the dev60 patches and
    : : Designer
    : : : : 6.0
    : : : : : : with no additional patches. They all seem to be
    : working
    : : OK
    : : : : : : (I've generated a test form w/o Headstart and it runs
    : : OK).
    : : : : : : I've also run the following as suggested in another
    of
    : : your
    : : : : : : posts:
    : : : : : : select object_name from user_objects where
    : : : : status='INVALID';
    : : : : : : which returns no rows.
    : : : : : : Help!!
    : : : : : : TIA
    : : : : : : Eric Raskin
    : : : : : Eric,
    : : : : : I'm sorry to say I have bad news for you. The error you
    : run
    : : : : into
    : : : : : is caused by the following bug in Forms 6.0, which only
    : : : : : reproduces with Oracle 8.1.5 on NT:
    : : : : : 966970: CONNECTION LOST WHEN INVOKING PACKAGED
    PROCEDURE
    : : WITH
    : : : : : PLSQL-TABLE AS ARG OFMO899
    : : : : : Only work around is to use 8.0.5, or 8.1.5 on a UNIX
    : : machine.
    : : : : You ain't kiddin' about the "bad news" part, are you?
    : : Just
    : : : : to be sure I understand, this is only on the development
    : : : : machines, right? I can still run 8.1.5 on NT for the
    : actual
    : : : : database?
    : : : : Eric
    : : : I wish I was kidding! This is a problem you might run into
    on
    : : : your production database as well. The moment you have a
    forms
    : 6
    : : : application that calls a server-side procedure which has a
    : : PL/SQL
    : : : table of records as parameter, the connection is lost.
    : : : Headstart-generated applications will all run into this, as
    : : : Headstart uses such a server-side procedure for message
    : : : handling.
    : : : We have raised this issue with Forms Development, and have
    : : asked
    : : : for a patch. (although it might turn out to be a server bug
    : : : instead of a forms bug...).
    : : This is very bad news, as I was looking to leverage
    : : headstart with 8.1.5/Designer/Developer 6.0 for rapid
    : development
    : : and deployment of an application to the web.
    : : I'm sure there are a few of us in this boat.
    : : Questions:
    : : 1) Does this problem exist for 8.1.5 in a Unix deployment?
    : : Specifically, can I be assured of reliable forms generation
    via
    : : headstart if my 8.1.5 database lives in Unix?
    : : 2) Assuming Forms Development agrees with you and is working
    on
    : a
    : : patch, may I offer to help test that patch?
    : : Jeff
    : Jeff,
    : This is only a problem with Oracle 8i on NT. Note that it is
    not
    : just a Headstart problem. If you generate a form with Designer,
    : and the block is based on a MAPI procedure, it won't run on
    8.1.5
    : on NT either, because the MAPI procedure has a PL/SQL table of
    : records as a parameter, just like the Headstart message
    handling
    : routine. Thanks for your offer, but given the wide impact of
    this
    : bug, Oracle will be able to create sufficient testcases
    : themselves.
    Hello,
    does the same problem exist on Oracle 8.0.5 on Windows NT and/or
    Digital Unix too?
    We are currently thinking about using Headstart and if the
    problem exists on 8.0.5 the workaround you provided might be a
    big problem for us ...
    thx in advance
    null

  • DBMS_ERROR_TEXT failure with Headstart Utilities Admin form

    I have installed the Headstart Oracle Designer for Designer/Developer 6.0, following instructions found in the patch for 6.0. Whenever I try to start the Headstart Utilities Administration form, I get an error stating that DBMS_ERROR_TEXT failed. Has anyone else had this problem?

    Janine,
    When I run the Utilities Administration against an Oracle 8.1.6.1.0 database on Sun Solaris, I don't have any problems.
    Can you run other Headstart generated applications on this database, like the Headstart Demo or the Foundation Application? In other words, is it only the Utilities Admin that gives the error?
    regards, Sandra

  • Changes to tables not being picked up by certain Headstart Utilities

    I modified an existing table in our repository by adding a new column to the table. This column has the same properties as another column in the table. The Headstart utility 'Maintain Default Events For Entities' had been run for all tables before the new column was added. As expected, all the columns in the table had UPDATE events created for them, except of course the new column.
    As none of the events associated with this table had been used, I ran the 'Cleanup Unused Event for Entities' utility for the table and then re-ran the 'Maintain Default Events For Entities' utility for the table, in order to create an UPDATE event on the new column. This however, was not the case as an UPDATE event was not created for the new column. It appears to have been completely ignored.
    I have checked for the obvious i.e. was the table change applied properly in the repository and had the database been properly re-generated from the server model and everything appears to be correct.
    I have noticed that certain Headstart utilities, 'Enforce CDM Ordering Standard for columns' and 'Set column display length' do pick up the new columns. 'Enforce CDM Ordering Standard For Attributes' however, is another utility that does not pick up the new column.
    Any solutions and explanations for the above would be much appreciated.
    Thank You,
    Aneesha.
    null

    Aneesha,
    In your formulation of the problem, you seem to sometimes be using the terms "table" and "column" when you actually mean "entity" and "attribute". This makes it a bit hard for me to reconstruct your steps. Did you create both a new attribute on the entity, and a new column on the table, and are the two linked together (i.e. if you go to the attribute, is the "Implemented by Columns" node filled correctly?
    Kind regards,
    Peter
    null

  • OBIEE: Schedule Segments with Saved Result Sets?

    Hi!
    I'd like to know how it is possible to solve this problem:
    Imagine that we have segments that were created with Segment Designer and configured with Saved Result Sets (SRS). Some of them are quicker to execute at night, so the goal is to schedule at night the execution of those sements and the respective saving of result sets. The next morning, the marketeer using Siebel Marketing, when designing and building the campaign, would only have to select the segment and then choose to use the contacts of the SRS of that segment, instead of running on-the-fly (online) the segment...
    Was may explanation clear? How is this possible?
    Thank you.
    Regards,
    Filipe Ganhão

    Update: looks like the wizard is really overwhelmed with big cubes (1.5k accounts, 20 dims @ approx 10 generations each) and just breaks.
    I haven't figured out the exact limit, but I'm able to migrate pack of about 8 dims at a time as long as I leave the accounts dim out and do that on itself.
    Cheers,
    C.

  • Problem Saving Gererating GIF Image

    Hello, we are having a problem in production environment when try to right mouse and select Print on an mii grid. Works just fine in all of our non-production environments. Checked the System Security pull downs and they all matched non-prod. Was not sure which one to compare, was not a ImageStorageServlet on pull down menu.
    After right mouse and select Print on grid, get:
    -Java Applet Window popup message - Problem Saving Gererating GIF Image
    -Then - blank browser page - .../XMII/ImageStorageServlet/View/null
    - Non-production servers works fine produces grid on browser page - XMII/ImageStorageServlet/View/2084280301
    NetWeaver Log:
    Location - com.sap.xmii.servlet.ImageStorageServlet
    Full Message Text
    ImageStorage - Error saving GIF file 
    Full Message Text
    ImageStorage - Error generating GIF output
    Any help would be appreciated.
    Thanks

    David,
    Have you put in a support ticket for this? I recommend doing so since its occurring in your production environment. You should also attach your log files as well.
    Regards,
    Kevin

  • Having a problem saving the graphics on a canvas.

    I'm having a problem saving graphics on a canvas. It draws on the canvas but when another window comes up the graphics disappear. I put in a method to take the graphics on the canvas and repaint it with the graphics. But this comes up blank. So I don't know why this is happening. It is probably the paint method but I don't know why. If anyone has any ideas could you please respond because I have had this problem for ages now and it's driving me mad and I have to get this finished or I'm going to be a lot of trouble. I'll show you the code for the class I am concerned with. It is long but most of it can be disregarded. The only parts which are relevent are the paint method and where the drawline e.t.c are called which is in the mouse release
    package com.project.CSSE4;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.ImageFilter;
    import java.awt.image.CropImageFilter;
    import java.awt.image.FilteredImageSource;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import javax.swing.*;
    import java.sql.*;
    public class CanvasOnly extends JPanel
           implements MouseListener, MouseMotionListener
       public static final int line = 1;
       public static final int freehand = 2;
       public static final int text = 3;
       public static final int mode_paint = 0;
       public static final int mode_xor = 1;
       public Color drawColor;
       public int drawThickness = 1;
       public int drawType = 0;
       public boolean fill = false;
       private boolean dragging = false;
       public int oldx = 0;
       public int oldy = 0;
       private int rectangleWidth;
       private int rectangleHeight;
       private tempLine draftLine;
       private tempText draftText;
       public Canvas pad;
       public static final Font defaultFont =
         new Font("Helvetica", Font.BOLD, 14);
       protected boolean floatingText = false;
       boolean showingPicture;
       protected Image offScreen;
       public JTextArea coor;
       public JButton writeIn;
       Connection connection;
       String codeLine;
       int x = 0;
       int y = 0;
       public CanvasOnly()
           try
                Class.forName("com.mysql.jdbc.Driver").newInstance();
           }catch( Exception e)
                 System.err.println("Unable to find and load driver");
                 System.exit(1);
            pad = new Canvas();
            pad.setBackground(Color.white);
            pad.setVisible(true);
            pad.setSize(400, 400);
           coor = new JTextArea(15, 15);
           writeIn = new JButton("load TExt");
           writeIn.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent event1)
                     try
                   Statement statement = connection.createStatement();
                   ResultSet rs = statement.executeQuery("SELECT * FROM submit WHERE file_name = 'cmd.java'");
                   rs.next();
                   String one1 = rs.getString("student_id");
                   //System.out.println("one1 :" + one1);
                   String two1 = rs.getString("file_name");
                   //System.out.println("two1 : " + two1);
                    InputStream textStream = rs.getAsciiStream("file");
                    BufferedReader textReader = new BufferedReader(
                                     new InputStreamReader(textStream));
                    codeLine = textReader.readLine();
                    x = 0;
                    y = -12;
                    while(codeLine != null)
                        y = y + 12;
                        //fileText.append( line + "\n");
                        //canvasPad.drawTheString(line, x, y);
                        drawText(Color.black, x, y, codeLine, mode_paint);
                        codeLine = textReader.readLine();
                     textReader.close();
                    pad.setSize(400, y);
                    Timestamp three1 = rs.getTimestamp("ts");
                    //System.out.println(three1);
                    textReader.close();
                    rs.close();
              }catch (SQLException e)
                System.err.println(e);
              catch(IOException ioX)
                System.err.println(ioX);
            //setSize(300,300);
            drawColor = Color.black;
            pad.addMouseListener(this);
         pad.addMouseMotionListener(this);
         offScreen = null;
       public Image getContents()
         // Returns the contents of the canvas as an Image.  Only returns
         // the portion which is actually showing on the screen
         // If the thing showing on the canvas is a picture, just send back
         // the picture
         if (showingPicture)
             return (offScreen);
         ImageFilter filter =
             new CropImageFilter(0, 0, getWidth(), getHeight());
         Image newImage =
             createImage(new FilteredImageSource(offScreen.getSource(),
                                  filter));
         return(newImage);
        public void setImage(Image theImage)
         // Fit it to the canvas
         offScreen = theImage;
         repaint();
         showingPicture = true;
        synchronized public void paint(Graphics g)
         int width = 0;
         int height = 0;
         //The images are stored on an off screen buffer.
            //offScreen is the image declared at top
         if (offScreen != null)
                  //intislise the widt and heigth depending on if showingpicture is true
              if (!showingPicture)
                       width = offScreen.getWidth(this);
                       height = offScreen.getHeight(this);
                   //width = getWidth(this);
                   //height = getHeight(this);  //offScreen
              else
                   //width = pad.getSize().width;
                   //height = getSize().height;
                   width = pad.getWidth();
                   //width = getSize().width;
                   height = pad.getHeight();
                   //height = getSize().height;
                    //Draws as much of the specified image as has already
                    //been scaled to fit inside the specified rectangle
                    //The "this" is An asynchronous update interface for receiving
                    //notifications about Image information as the Image is constructed
    //This is causing problems
              g.drawImage(offScreen, 0, 0, width, height, pad);
              g.dispose();
         //clear the canvas with this method
        synchronized public void clear()
         // The maximum size of the usable drawing canvas, for now, will be
         // 1024x768
         offScreen = createImage(1024, 768);
         //Creates an off-screen drawable image to be used for double buffering
         pad.setBackground(Color.white);
         //Set the showingPicture to false for paint method
         showingPicture = false;
         repaint();
         synchronized public void drawLine(Color color, int startx, int starty,
                              int endx, int endy, int thickness,
                              int mode)
         int dx, dy;
         Graphics g1 = pad.getGraphics();
         Graphics g2;
         //if image is not intialised to null
         //the getGraphics is used for freehand drawing
         //Image.getGraphics() is often used for double buffering by rendering
            //into an offscreen buffer.
         if (offScreen != null)
             g2 = offScreen.getGraphics();
         else
             g2 = g1;
            //mode is put into the method and XOR is final and equal to 1
         if (mode == this.mode_xor)
                  //calls the setXOR mode for g1 and g2
                  //Sets the paint mode of this graphics context to alternate
                    //between this graphics context's current color and the
                    //new specified color.
              g1.setXORMode(Color.white);//This will
              g2.setXORMode(Color.white);
         else
                  //Sets this graphics context's current color to the
                    //specified color
              g1.setColor(color);
              g2.setColor(color);
         if (endx > startx)
             dx = (endx - startx);
         else
             dx = (startx - endx);
         if (endy > starty)
             dy = (endy - starty);
         else
             dy = (starty - endy);
         if (dx >= dy)
              starty -= (thickness / 2);
              endy -= (thickness / 2);
         else
              startx -= (thickness / 2);
              endx -= (thickness / 2);
         for (int count = 0; count < thickness; count ++)
              g1.drawLine(startx, starty, endx, endy);
              g2.drawLine(startx, starty, endx, endy);
              if (dx >= dy)
                  { starty++; endy++; }
              else
                  { startx++; endx++; }
            //Disposes of this graphics context and releases any system
            //resources that it is using.
         g1.dispose();
         g2.dispose();
         //This method is not causing trouble
         synchronized public void drawText(Color color, int x, int y,
                String text, int mode)
         Graphics g1 = pad.getGraphics();
         Graphics g2;
         if (offScreen != null)
             g2 = offScreen.getGraphics();
         else
             g2 = g1;
         if (mode == this.mode_xor)
              g1.setXORMode(Color.white);
              g2.setXORMode(Color.white);
         else
              g1.setColor(color);
              g2.setColor(color);
         g1.setFont(new Font("Times Roman", Font.PLAIN, 10));
         g2.setFont(new Font("Times Roman", Font.PLAIN, 10));
         g1.drawString(text, x, y);
         g2.drawString(text, x, y);
         g1.dispose();
         g2.dispose();
          //connect to database
      public void connectToDB()
        try
           connection = DriverManager.getConnection(
           "jdbc:mysql://localhost/submissions?user=root&password=football");
                     //may have to load in a username and password
                                                     //code "?user=spider&password=spider"
        }catch(SQLException connectException)
           System.out.println("Unable to connect to db");
           System.exit(1);
      //use this method to instatiate connectToDB method
      public void init()
           connectToDB();
        protected void floatText(String text)
         draftText = new tempText(this.drawColor,
                            this.oldx,
                            this.oldy,
                                        text);
         this.floatingText = true;
        //nothing happens when the mouse is clicked
        public void mouseClicked(MouseEvent e)
        //When the mouse cursor enters the canvas make it the two
        //straigth lines type
        public void mouseEntered(MouseEvent e)
         pad.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
        //When mouse exits canvas set to default type
        public void mouseExited(MouseEvent E)
         pad.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        //used for creating the shapes and positioning thetext
        public void mousePressed(MouseEvent e)
             // Save the coordinates of the mouse being pressed
         oldx = e.getX();
         oldy = e.getY();
         // If we are doing lines, rectangles, or ovals, we will show
         // draft lines to suggest the final shape of the object
         //Draw type is a publc int which can be changed
         if (drawType == this.line)
            draftLine = new tempLine(drawColor, oldx, oldy, oldx,
                                 oldy, drawThickness);
            // Set the draw mode to XOR and draw it.
            drawLine(draftLine.color, draftLine.startx,
            draftLine.starty, draftLine.endx,
            draftLine.endy, drawThickness, this.mode_xor);
        //mouse listener for when the mouse button is released
        public void mouseReleased(MouseEvent e)
             if (drawType == this.line)
              // Erase the draft line
              drawLine(draftLine.color, draftLine.startx, draftLine.starty,
                    draftLine.endx, draftLine.endy, drawThickness,
                    this.mode_xor);
              // Add the real line to the canvas
              //When the imput changes to "mode_paint" it is drawen
              //on the canvas
              drawLine(drawColor, oldx, oldy, e.getX(), e.getY(),
                    drawThickness, this.mode_paint);
              dragging = false;
         else if (drawType == this.text)
              if (floatingText)
                   // The user wants to place the text (s)he created.
                   // Erase the old draft text
                   drawText(drawColor, draftText.x, draftText.y,
                                            draftText.text, this.mode_xor);
                       String str = Integer.toString(e.getX());
                       String str1  = Integer.toString(e.getY());
                       coor.append(str + " " + str1 + "\n");
                   // Set the new coordinates
                   draftText.x = e.getX();
                   draftText.y = e.getY();
                   // Draw the permanent text
                   drawText(drawColor, draftText.x, draftText.y,
                         draftText.text, this.mode_paint);
                   floatingText = false;
         public void mouseDragged(MouseEvent e)
            if (drawType == this.freehand)
              drawLine(drawColor, oldx, oldy, e.getX(), e.getY(),
                    drawThickness, this.mode_paint);
              oldx = e.getX();
              oldy = e.getY();
         else
             dragging = true;
         if (drawType == this.line)
            // Erase the old draft line
            drawLine(draftLine.color, draftLine.startx, draftLine.starty,
              draftLine.endx, draftLine.endy, drawThickness,
              this.mode_xor);
            // Draw the new draft line
            draftLine.endx = e.getX();
            draftLine.endy = e.getY();
            drawLine(draftLine.color, draftLine.startx, draftLine.starty,
              draftLine.endx, draftLine.endy, drawThickness,
              this.mode_xor);
         public void mouseMoved(MouseEvent e)
             if (floatingText)
              // When the user has entered some text to place on the
              // canvas, it remains sticky with the cursor until another
              // click is entered to place it.
              // Erase the old draft text
              drawText(drawColor, draftText.x, draftText.y,
                                draftText.text, this.mode_xor);
              // Set the new coordinates
              draftText.x = e.getX();
              draftText.y = e.getY();
              // Draw the new floating text
              drawText(drawColor, draftText.x, draftText.y,
                        draftText.text, this.mode_xor);
         //declare  a class for the line shown before the is as wanted
        class tempLine
         public Color color;
         public int startx;
         public int starty;
         public int endx;
         public int endy;
         public int thickness;
         public tempLine(Color mycolor, int mystartx, int mystarty,
                      int myendx, int myendy, int mythickness)
             color = mycolor;
             startx = mystartx;
             starty = mystarty;
             endx = myendx;
             endy = myendy;
             thickness = mythickness;
        class tempText
         public Color color;
         public int x;
         public int y;
         public String text;
         public tempText(Color mycolor, int myx, int myy, String mytext)
             color = mycolor;
             x = myx;
             y = myy;
             text = mytext;
    }

    http://www.java2s.com/ExampleCode/2D-Graphics/DemonstratingUseoftheImageIOLibrary.htm

  • I'm having a problem saving a pages document as another format, like a Word document or PDF file.  I've never had this problem in the past.  Please help me!  I need to have this fixed a.s.a.p.

    Hello everyone,
    I'm currently having a problem saving a Pages document as another format, such as a Word document or PDF file.  I've never had this problem before with Pages.  Please help me!  I need to have this completed a.s.a.p.
    Thanks,
    Amy

    To save as a PDF, you do that from Print
    To save as Wrod format, you export
    Allan

  • When bookmark with Firefox I get an error message that Google has a problem saving the bookmark. Whay are FF bookmarks being saved to Google?

    I used to be able to save bookmarks in Firefox. Now when I save a bookmark there is an error message that Google is having a problem saving the bookmark. Does this mean saving to Google or Firefox? When I look roe the saved bookmark it is Google.
    Also when I save the bookmark i do not get the option to save it to a folder-- I can only tag it

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • Problems importing class

    the code is fine. import java.awt.*; import java.awt.event.*; import java.io.*; import java.swing.*; import java.TicTacDlg; Error i get is: TTacToe.java:12: '.' expected import TicTacDlg; ^ 1 error TicTacDlg.java is in DIR is in '/root/java' along wi

  • Rename custom nodes in a JTree

    Hi all, Our problem is that we don't find a way to rename our custom objects that we show in our JTree. We have defined a complete Tree data structure which works fine already ... now we want to be able to rename the nodes in the Tree. Our JTree disp

  • When I use FaceTime I can't hear the other person unless I mute myself but they can hear me just fine.

    I can't hear my girlfriend when she talk on FaceTime unless I mute my own mic while she talks. She can still hear when I talk but I can't hear her.

  • How To Skip Report of Submit Program

    Hello All, I am submitting a Report program from a Program and should return to the calling program after processing. I have used  SUBMIT program WITH Parameters                                                 AND RETURN . with this syntax, report of

  • Using CIS inquires the UCM folder structure information is always unable to

    Hi all, I'm trying to get the information of a folder,but always unable to carry out,I think it's context has a problem,because "_createFolder()" interface is available. public static void main(String[] args) throws Exception {           try {