Trigger is not updateing the :new value in the table

Hi,
I've greated a row trigger that will trigger on insert statements.
The last thing the trigger will do is to update the :NEW.role_id value in the inserted row, see the trigger bellow.
The trigger was mutation so I had to add the 'PRAGMA AUTONOMOUS_TRANSACTION;' to avoid the mutation error.
When performing test with controlled insert statements the trigger is working without problems, but when I my J2EE application is inserting rows to the table the role_id value is nog updated, see the trigger below and the :NEW.role_id := nRole_id; part. The role_id for the new row is empty. What can be the problem?
CREATE OR REPLACE TRIGGER MSP_36.M2_USER_ALERT_INSERT_TRG_SCA
BEFORE INSERT
ON MSP_36.M2_USER_ALERT
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
ex_not_valid_role_name EXCEPTION;
/* Variables */
nAlertTypeId M2_USER_ALERT.alert_type%TYPE;
isLogical      boolean;
validRole     boolean;
nRole_id      M2_ROLE.role_id%TYPE;
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
     BEGIN
          SELECT distinct at.alert_type INTO nAlertTypeId
          FROM M2_USER_ALERT ua, M2_ALERT_TYPE at,M2_ALERT_TYPE_PROPERTIES atp
          WHERE ua.alert_type = at.alert_type
          AND at.alert_type = atp.ALERT_TYPE_ID
          AND ua.alert_type = :NEW.alert_type
          AND upper(atp.property_name) = 'LOGICAL'
          AND upper(atp.property_value) = 'TRUE';
          isLogical := true;
     EXCEPTION
               WHEN no_data_found THEN
               isLogical := false;
               NULL;     
     END;     
IF (isLogical = true) THEN
BEGIN
          SELECT distinct ro.role_id INTO nRole_id
          FROM M2_ROLE ro, M2_USER_ALERT
          WHERE ro.name = :NEW.name;
     EXCEPTION
               WHEN no_data_found THEN
                    validRole :=false;
                    RAISE_APPLICATION_ERROR(-20001,'LOGICAL UserAlert: Role with id'|| nRole_id || ' does not exist.');     
                    NULL;
     END;
     validRole := true;
     IF (isLogical = true AND validRole = true AND :NEW.status = 1) THEN
     INSERT INTO M2_USER_ROLE (user_id,role_id)
     VALUES (:NEW.user_id,nRole_id);
     :NEW.role_id := nRole_id;
END IF;
END IF;
commit;
END;
Many thanks,
Michael

I only get a empty column that include now data. The first insert is working correct so I know that the role_id is valid and working. Can there be problem with commit or my AUTONOMOUS_TRANSACTION running this from JDBC ?
EXAMPLE data from
M2_USER_ROLE
===================
USER_ID = ROLE_ID =
===================
20 = 10040 =
1259756 = 10040 =
===================
Example partly data from
M2_USER_ALERT
=========================================================
USERALERT_ID = USER_ID = ALERT_TYPE = NAME = ROLE_ID =
=========================================================
3725 = 1259756 = 10288 = MG_Test = =
=========================================================
When inserted from the application the role_id is empty and I've taken the same SQL from the library cache and run it with same BIND variables and then it's working.
Michael

Similar Messages

  • J2i5 is not updating the table j_2iaccbal

    Hi all
      Whan i am running j2i5 for updating the Part2 opening Balance, it is not updating the Table j_2iaccbal.
      ie the closing balance is not carryforwarded to the next day as openign balance due to this i am getting negetive balace.
      is this any problem with j2i5 program .
      Please help me to sort out this problm

    Hi,
    Please put opening balance for following register in J_2IACCBAL
    RG23AAT1
    RG23ABED
    RG23AECS
    RG23ANCCD
    RG23ASED
    Also please ensure that dont extract the register prior to date of the record inserted in the table.else opening balance will be vanieshed.
    Regards,
    KC Choudhury

  • Trigger does not update the results?!?!? Am i wrong?

    Hi all. I have small problem with oracle forms 10g and VBean that is inside a oracle form.
    My bean communicate with the form with set and get property methods like this:
    protected static final ID a = ID.registerProperty("a");
    public Object getProperty(ID property) {
              if (property == a) {
    String string= returnRandomString();
                   return string;
              } else
                   return super.getProperty(property);
    and i have a button in the form, that on the trigger when-button-pressed is executing the following pl/sql
    randomString:= Get_Custom_Property('PERSONAL_DATA_FORM_BLOCK.SIGN_FORM_BEAN_AREA', 1, 'getSignedDataAsBase64');
    When I press the button it returns me some string, but when i press it for second time it returns me the same string as the first time(the method returnRandomString() always returns different strings). So The info is not refreshed. Am i wrong somewhere or this is the correct behavior. As it is trigger it must be triggered every time i press the button, right?
    Finally is there any way to call a method placed in my class (that is extending VBean) from pl/sql trigger and how?

    the property should be read every time.
    protected static final ID a = ID.registerProperty("*a*");
    randomString:= Get_Custom_Property('PERSONAL_DATA_FORM_BLOCK.SIGN_FORM_BEAN_AREA', 1, '*getSignedDataAsBase64*');i guess its just because you posted examplecode that the property-names do not match ?!?
    To check if your method is called in the bean you could try a System.out.println(randomString); in the java bean and look into the concole of Jinitiator/Sun Plugin?
    just to make sure: Sure that returnrandomstring() returns something different for each call?

  • Response payload is not updating the SAP tables in Sync Interface

    Dear Experts,
    We are doing the ECC to SFDC sync interface by using the ABAP Proxy to Webservice ICO scenario (SOAP to SOAP).
    The response payload from SFA has having the SOAP envelope, to remove this I have used the Java mapping with this we resolve the normal graphical mapping issue and ECC is able to get the response at MONI level.
    But the response payload is not updating the ECC SE11 tables at the proxy level.
    I have attached ECC synchronous proxy testing results with response payloads. With this original response payload the proxy is not updating the tables.
    Please help me out.
    Regards
    RK

    Hi RK,
    Set run-time parameter( LOGGING_SYNC) to 1 in Integration Engine (SXMB_ADM --> Integration Engine Configuration -> Edit configuration ) . LOGGING_SYNC may have set to 0 in IE. If LOGGING_SYNC is set to 0 , IE will not save or write the messages .
    Note: If PI system is Java only stack , please perform above step in ECC.
    Thanks
    Hari.

  • Not Updating the Values in the JComboBox and JTable

    Hi Friends
    In my program i hava Two JComboBox and One JTable. I Update the ComboBox with different field on A Table. and then Display a list of record in the JTable.
    It is Displaying the Values in the Begining But when i try to Select the Next Item in the ComboBox it is not Updating the Records Eeither to JComboBox or JTable.
    MY CODE is this
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.DefaultComboBoxModel.*;
    import javax.swing.table.*;
    import java.sql.*;
    import java.util.*;
    public class SearchBook extends JDialog implements ActionListener
         private JComboBox comboCategory,comboAuthor;
         private JSplitPane splitpane;
         private JTable table;
         private JToolBar toolBar;
         private JButton btnclose, btncancel;
         private JPanel panel1,panel2,panel3,panel4;
         private JLabel lblCategory,lblAuthor;
         private Container c;
         //DefaultTableModel model;
         Statement st;
         ResultSet rs;
         Vector v = new Vector();
         public SearchBook (Connection con)
              // Property for JDialog
              setTitle("Search Books");
              setLocation(40,110);
              setModal(true);
              setSize(750,450);
              // Creating ToolBar Button
              btnclose = new JButton(new ImageIcon("Images/export.gif"));
              btnclose.addActionListener(this);
              // Creating Tool Bar
              toolBar = new JToolBar();
              toolBar.add(btnclose);
              try
                   st=con.createStatement();
                   rs =st.executeQuery("SELECT BCat from Books Group By Books.BCat");
                   while(rs.next())
                        v.add(rs.getString(1));
              catch(SQLException ex)
                   System.out.println("Error");
              panel1= new JPanel();
              panel1.setLayout(new GridBagLayout());
              GridBagConstraints c = new GridBagConstraints();
              c.fill = GridBagConstraints.HORIZONTAL;
              lblCategory = new JLabel("Category:");
              lblCategory.setHorizontalAlignment (JTextField.CENTER);
              c.gridx=2;
              c.gridy=2;
              panel1.add(lblCategory,c);
              comboCategory = new JComboBox(v);
              comboCategory.addActionListener(this);
              c.ipadx=20;
              c.gridx=3;
              c.gridwidth=1;
              c.gridy=2;
              panel1.add(comboCategory,c);
              lblAuthor = new JLabel("Author/Publisher:");
              c.gridwidth=2;
              c.gridx=1;
              c.gridy=4;
              panel1.add(lblAuthor,c);
              lblAuthor.setHorizontalAlignment (JTextField.LEFT);
              comboAuthor = new JComboBox();
              comboAuthor.addActionListener(this);
              c.insets= new Insets(20,0,0,0);
              c.ipadx=20;
              c.gridx=3;
              c.gridy=4;
              panel1.add(comboAuthor,c);
              comboAuthor.setBounds (125, 165, 175, 25);
              table = new JTable();
              JScrollPane scrollpane = new JScrollPane(table);
              //panel2 = new JPanel();
              //panel2.add(scrollpane);
              splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panel1,scrollpane);
              splitpane.setDividerSize(15);
              splitpane.setDividerLocation(190);
              getContentPane().add(toolBar,BorderLayout.NORTH);
              getContentPane().add(splitpane);
         public void actionPerformed(ActionEvent ae)
              Object obj= ae.getSource();
              if(obj==comboCategory)
                   String selecteditem = (String)comboCategory.getSelectedItem();
                   displayAuthor(selecteditem);
                   System.out.println("Selected Item"+selecteditem);
              else if(obj==btnclose)
                   setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
              else if(obj==comboAuthor)
                   String selecteditem1 = (String)comboAuthor.getSelectedItem();
                   displayavailablity(selecteditem1);
                   //System.out.println("Selected Item"+selecteditem1);
                   System.out.println("Selected Author"+selecteditem1);
         private void displayAuthor(String selecteditem)
              try
              {     Vector data = new Vector();
                   rs= st.executeQuery("SELECT BAuthorandPublisher FROM Books where BCat='" + selecteditem + "' Group By Books.BAuthorandPublisher");
                   System.out.println("Executing");
                   while(rs.next())
                        data.add(rs.getString(1));
                   //((DefaultComboBoxModel)comboAuthor.getModel()).setVectorData(data);
                   comboAuthor.setModel(new DefaultComboBoxModel(data));
              catch(SQLException ex)
                   System.out.println("ERROR");
         private void displayavailablity(String selecteditem1)
                   try
                        Vector columnNames = new Vector();
                        Vector data1 = new Vector();
                        rs= st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");     
                        ResultSetMetaData md= rs.getMetaData();
                        int columns =md.getColumnCount();
                        String booktblheading[]={"Book ID","Book NAME","BOOK AUTHOR/PUBLISHER","REFRENCE","CATEGORY"};
                        for(int i=1; i<= booktblheading.length;i++)
                             columnNames.addElement(booktblheading[i-1]);
                        while(rs.next())
                             Vector row = new Vector(columns);
                             for(int i=1;i<=columns;i++)
                                  row.addElement(rs.getObject(i));
                             data1.addElement(row);
                             //System.out.println("data is:"+data);
                        ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                        //DefaultTableModel model = new DefaultTableModel(data1,columnNames);
                        //table.setModel(model);
                        rs.close();
                        st.close();
                   catch(SQLException ex)
    }Please check my code and give me some Better Solution
    Thank you

    You already have a posting on this topic:
    http://forum.java.sun.com/thread.jspa?threadID=5143235

  • Batch Split in OBD & billed for the entire Quantity .RG1  register does not update the excise values

    Hi All,
    I am new here . We have batch split in Delivery and 601 happens for the individual batches and billing we bill for the entire quantity . Hence the RG1 does not update the excise values for the batches and it is showing as zero (upon extraction in J2I6). Upon research through the program the latest note which i presume is patched
    The latest note is N158234 which does not show in the program but seems have been patched considering we are using the Latest version of SAP .
    As you see above in the billing we have billed for the whole quantity but RG1 does not update for the since the batches are zero .
    My programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split .
    Now i have checked few other projects in my company and they all seems to be following the program . So i am wondering whether my process or some customization is missing .
    Sales order (no batch determination)  , in delivery the batches are picked through wm to and batch split happens in the delivery . Then billling for the whole quantity . We have automatic excise invoice creation enabled so no J1IIN .
    Can somebody help me .
    Thank you

    My programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split
    Which field (H & J) they were referring in VBFA ?
    i have checked few other projects in my company and they all seems to be following the program
    How about the other projects' values in VBFA where your techinical team is guessing some issue.  Have you compared this?
    Since you have already the note 158234 implemented in your system, ideally, you should not face any issue.
    G. Lakshmipathi

  • New tabs are not updating the names of the sites they have loaded. When I open a new tab and load a site, the tab simply stays named "New Tab". When I open a link in a new window, it shows "Connecting..." even while its fully loaded.

    New tabs are not updating the names of the sites they have loaded. When I open a new tab and load a site, the tab simply stays named "New Tab". When I open a link in a new window, it shows "Connecting..." even while its fully loaded.

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions 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.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

  • HT1923 I could not update the new version of itunes.  I uninstalled the previous version, but I cannot get the new version to update on my windows 7 i5 pc..any solutions?  thanks

    I could not update the new version of itunes 11.1.4.
    It told me to uninstall the old version, but I cannot install the new version.
    Any help?/ solutions?
    Thank you

    Hello jasopz,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Issues installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/ht1926
    Best of luck,
    Mario

  • Standar cost and product cost collector not updating the new price

    Hi,
    Created Standard cost estimate for one FG product and runned the product cost collector. Based on that consumption delivery everthing is made. Later on the work center and activity type changed in routing. Now i am trying to run the standard cost with new activity price (due to work center change) for the current period, system is showing only the previous rate(previous period) and it is not updating the new price becuase of already we have created the product cost collector.
    Can any one give the suggestion for how to update the new price in standard cost as well as new price updation in product cost collector.
    govind.

    Hi
    1. If the original cost estimate was run in the current month - Then you cant re-release cost estimate unless you reverse it from CKR1
    If the cost estimate was of previous months - then you can definetely release it again
    2. In cost collector, you need to manually cost it again using the Preliminary costing feature... Your cost coll will then show 2 cost estimates i.e. One from Original date to current date-1, and 2nd from Current date to 31.12.9999
    br, Ajay M

  • HT4484 i used to have an app store and lost it and i created a new one and i can not update the iphoto app because it was updated with the old account, is there a solution for this problem?

    i used to have an app store and lost it and i created a new one and i can not update the iphoto app on my macbook pro because it was updated with the old account, is there a solution for this problem?

    Content and Apple IDs -
    Content is forever tied to the Apple ID that bought it. Apple does not transfer content from one Apple ID to another. Apple does not merge Apple IDs. You will never be able to access your content bought with one Apple ID with a new Apple ID.

  • HT1338 Final Cut Pro will not update after new os and compressor will not run until the update is done. System shows no updates available

    Final Cut Pro will not update after new os and compressor will not run until the update is done. System shows no updates available

    Sorry for being unclear.
    When I am using the update in the App Store App, there will be a list of various applications that have updates to be installed (Final Cut Pro will be in this list).  I will already be logged in with the Apple ID I use for everything (my dev account).  I will be able to update all of the other various applications needing updating except for my Final Cut Pro.  When I click the update button next to the FCP update, it will give me an error saying  "This download is not available for this apple ID either because it was bought by a different user or the item was refunded or cancelled"
    I have not had any applications refunded or cancelled and this has only happened since my update to Yosemite.  FCP was working fine until the upgrade.  Is there anything that can be done to fix this?

  • DYNP_VALUES_UPDATE not Updating the Field on my Dynpro

    Hi.
    I want to create a dynpro where two fields are. Field 1 allows the user to enter a customer number, field two shall come up with a number that is calculated somehow. The calculation can last up to 20 seconds, so I dont want to make the user waite for this number.. .he shall be able to work with the rest of the dynpro.
    Therefore I called the function that does the calcuiation like that:
    MODULE user_command_0100 INPUT.
      DATA: lv_guid_16 TYPE guid_16.
      IF kna1-kunnr IS NOT INITIAL AND kna1-kunnr <> gv_kunnr
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_16 = lv_guid_16.
        gv_taskid = lv_guid_16+8(8).
        CALL FUNCTION 'YDETERMINE_DEPOTDISTANCE' 
          STARTING NEW TASK gv_taskid
          PERFORMING receive_depent ON END OF TASK
          EXPORTING
            i_kunnr = kna1-kunnr.
      ENDIF.
    ENDMODULE. 
    The next piece of code shall get the returning value if the function wants to return its results.
    FORM receive_depent USING i_task TYPE clike.
      TABLES: d020s.
      DATA: dyname LIKE d020s-prog,
            dynumb LIKE d020s-dnum.
      DATA: BEGIN OF dynpfields OCCURS 1.
              INCLUDE STRUCTURE dynpread.
      DATA: END OF dynpfields.
      IF i_task = gv_taskid.
        RECEIVE RESULTS FROM FUNCTION 'YDETERMINE_DEPOTDISTANCE'
        IMPORTING
          e_depent         = kna1-yydepent
          e_accuracy       = gv_accuracy.
        MOVE 'KNA1-YYDEPENT' TO dynpfields-fieldname.
        MOVE kna1-yydepent TO dynpfields-fieldvalue.
        APPEND dynpfields.
        dyname = sy-cprog.
        dynumb = '0100'.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = dyname
            dynumb               = dynumb
          TABLES
            dynpfields           = dynpfields
          EXCEPTIONS
            invalid_abapworkarea = 01
            invalid_dynprofield  = 02
            invalid_dynproname   = 03
            invalid_dynpronummer = 04
            invalid_request      = 05
            no_fielddescription  = 06
            undefind_error       = 07.
        ASSERT sy-subrc = 0.
      ENDIF.
    Problem is: The DYNP_VALUES_UPDATE does not update the field on my dynpro at all. If I hit enter another time, then the field is provided by the value as another PBO will be processed. What is my mistake here?
    Regards
    Manfred
    Edited by: Rob Burbank on Oct 29, 2010 12:07 PM

    Hi Manfred,
    Replace all the DYNP_VALUES_UPDATE-related content by the following statement:
    SET USER-COMMAND 'xxx'.
    While DYNP_VALUES_UPDATE does update the fields, a roundtrip is not triggered so the content of the fields will not be refreshed. The SET USER-COMMAND does that.
    Hope this helps you!
    Cheers, Roel

  • Automatic Row Processing (DML) process is not updating the record

    Hi all,
    I have an application which was working fine last week and tested and backuped to new application. This Monday, one of the form in that application is not updating the data all of a sudden. I debug that by having page 0 variable and assign the value from the column variable to page 0 variable. Whatever value I changed to the column variable was getting updated to page 0 variable. But it is not updated in the database. So, I changed the success message of the "Automatic Row Processing (DML) process" and I can see the success message on the page, but the column value does not get updated. But when I go back and checked my backup application, that page is working fine. For now, I copy that from the backup application, but I would like to know why this is happening?
    Thanks
    SHY

    Hi Scott,
    Thank you very much for your response. Because of the database complexity, I can't create/import the application on the apex.oracle.com. I am just wondering why this is happening. One of my coworker said same thing happened to her in one of her project and it gets resolved once she restart the server. I am not able to restart the server to check and see if this resolved as the application is on the client server. Do we need to clean up any log file? Thanks.
    SHY

  • The workflow could not update the item, possibly because one or more columns for the item require a different type of information. Outcome: Unknown Error

    Received this error (The workflow could not update the item, possibly because one or more columns for the item require a different type of information.) recently on a workflow that was
    working fine and no changes were made to the workflow.
    I have tried a few suggestions, i.e. adding a pause before any ‘Update’ action (which didn’t help because the workflow past this action without incident); checked the data type being written
    to the fields (the correct data types are being written); and we even checked the list schema to ensure the list names and the internal names are aligned (they
    are), but we still cannot figure out why the workflow is still throwing this error.
    We located the area within the workflow step where it is failing and we inserted a logging action to determine if the workflow would execute the logging action but it did not, but wrote the same error message.
    The workflow is a Reusable Approval workflow designed in SharePoint Designer 2010 and attached to a content type. 
    The form associated with the list was modified in InfoPath 2010. 
    Approvers would provide their approval in the InfoPath form which is then read by the workflow.
    Side note - items created after the workflow throws this Unknown Error some seem to be working fine. 
    We have deleted the item in question and re-added it with no effect. 
    Based on what we were able to determine there don’t seem to be any consistency with how this issue is behaving.
    Any suggestions on how to further investigate this issue in order to find the root cause would be greatly appreciated?
    Cheers

    Hi,
    I understand that the reusable workflow doesn’t work properly now. Have you tried to remove the Update list item action to see whether the workflow can run without issue?
    If the workflow runs perfectly when the Update list item action is removed, then you need to check whether there are errors in the update action. Check whether the values have been changed.
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • ITunes could not update the carrier settings on your iPhone

    When I try to download and install the new carrier settings file, I get the message "iTunes could not update the carrier settings on your iPhone. You do not have enough access privileges for this operation." (I got a similar message when I tried to download and install the OS update.)
    I've been able to work around the problem by creating a different user and installing from there. But I'd like to be able to find and correct the cause of the error message instead of using a workaround. It seems like there's a file or folder somewhere that has somehow become read-only. Does anyone know where iTunes downloads the carrier settings and OS update files?

    Jim VanLeeuwen wrote:
    You will find them in separate folders within your user account Library/iTunes folder.
    That was it. Somehow the owner of ~/Library/iTunes got changed to root.
    Jim VanLeeuwen wrote:
    Have you tried using Disk Utility to Repair Permissions?
    Right after I posted the message I thought that the age-old placebo of repairing permissions might actually fix my problem. Because of your quick reply I found the ownership problem before repairing permissions. So here was the perfect chance for a test. Repair Permissions ran successfully but the owner of ~/Library/iTunes was still root. Repair Permissions fails the test.
    I manually changed the owner to steve and was able to download and install the carrier settings.
    Thanks!

Maybe you are looking for

  • IC WebClient - Business Partners

    Hi all, Once an account is created in 'Identify Account' and confirmed and the Business Partners link is click it takes us to ;Accounts' page. Does anyone know which view/page this is? Can we pre-populate input fields on a certain view/page based on

  • I need a method to target specific columns in an IP query embedded in a WAD

    I have an IP enabled WAD with multiple embedded queries.  I need a method to target specific columns of specific queries so as to enable text wrapping.  Does anyone have a technique that has worked for them that they can share? Sheldon

  • Relocation error - how do I cure it?

    Hi, a binary from the KDE4 project built with Sun Studio 12 (same with SS12U1, and SSE) on OSOL2009.06 fails to execute properly. When run as LC_ALL=C LD_DEBUG=libs /opt/kde-4.2/bin/plasmoidviewer tasks this is produced: 02759: 1: 02759: 1: ld.so.1:

  • [SOLVED] how to set rootdelay

    Hi! Like in subject, I'd like to know how should I do this, and additional question is why i can't set it to 0. When I append "rootdelay=1" system waits 1 sec. But when I append zero it waits 5 sec. Is there any way to set it to 0, or maybe it should

  • Mac will stay stuck when woken up

    Hi, when I wake up my Mac G5, the screen will wake up, but the time and date is stuck at the time it went to sleep and nothing else happens or reacts. I can wake it up by using the (wireless) mouse or keyboard, turning on the printer or trying to syn