Problems with a Java Trigger

Hello Everyone
I need to create a TRIGGER, and i want to use Java.
this is my java class:
import ...
public class manager {
public static void triggerOnDeleteUser(int u_id){
long dat=(long)System.currentTimeMillis();
try{
#sql{ DELETE FROM apn a WHERE (0 = (SELECT COUNT(*) FROM apn_auth aa WHERE (aa.a_id = a.a_id AND u_id <> :u_id))) };
#sql{ DELETE FROM charging_info c WHERE (0 = (SELECT COUNT(*) FROM users u WHERE (u.charging_set = c.c_id AND u.u_id <> :u_id))) };
#sql{ INSERT INTO test VALUES(:dat) };
#sql{ COMMIT };
}catch(Exception E){E.printStackTrace(); }
this is wrapper procedure:
CREATE OR REPLACE PROCEDURE TR1
(p1 IN NUMBER) AS LANGUAGE JAVA NAME 'manager.triggerOnDeleteUser(int)';
and this is TRIGGER:
CREATE OR REPLACE TRIGGER OnDeleteUser
BEFORE DELETE ON USERS
FOR EACH ROW
CALL TR1(:old.U_ID)
U_ID is a NUMBER column.
When I DELETE on USERS table, trigger doesn't work properly, but if I try this:
SQL> EXEC TR1(3)
STORED PROCEDURE works!!!
I try to change trigger in this way:
CREATE OR REPLACE TRIGGER OnDeleteUser
BEFORE DELETE ON USERS
FOR EACH ROW
DBMS_OUTPUT.PUT_LINE (:old.U_ID + 1)
and it works properly!! (I user +1 to try if was really a NUMBER)...
Maybe I forget some permissions....? Any idea?
Thanks in advance
Dario

thanks, but i solved my problem.
I was triying to access a table during its modification (SELECT from USERS)
I change TRIGGER DECLARATION in this way:
CREATE OR REPLACE TRIGGER OnDeleteUser
BEFORE DELETE ON USERS
FOR EACH ROW
DECLARE
     PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
     TR1(:old.U_ID);
     COMMIT;
END;
/

Similar Messages

  • Solution Manager systems RAM requirements - problems with the Java Engine

    Hello,
    I am about to install SAP Solution Manager 7 on a WIndows 2003 Server x64 but I need to know what the RAM requirements are? I have been having problems with the Java Engine starting and it seems to time out, I have heard that this is a very RAM hungry process and it might be why?
    Many thanks for your help in advance,
    Omar

    Hello Omar,
    To size SAP Solution Manager 7.0 EHP1 we recommend to use the SAP Solution Manager Quicksizer Tool at:
    http://service.sap.com/sizing-solman
    Here you find information on how to use the tool, how to collect input data for E2E Scenario Sizing, on SAP E2E RCA Sizing, Introscope Tuning, Wily Enterprise Manager Cluster Setup for E2E RCA Scenario and BI Aggregation Strategy in E2E Scenario.
    Please find more information about installing Solution Manager in:
    http://service.sap.com/instguides -> SAP Solution Manager
    I hope this information helps.
    Thanks,
    Mark

  • JCoIDoc IDocLibrary 3.0.2 Problems with IDocServerExample.java

    Hello, I´m facing a problem with IDocServerExample.java. I created a new project in eclipse, added the package com.sap.conn.idoc.examples and the class IDocServerExample.java. I configured the files "MYSERVER.jcoServer" and "BCE.jcoDestination" and started the application. Then I get the following error messages: *********************************************************************************************************************************************************
    com.sap.conn.jco.JCoException: (102) RFC_ERROR_COMMUNICATION: Unable to get repository at com.sap.conn.jco.rt.DefaultServer.update(DefaultServer.java:136) at com.sap.conn.jco.rt.DefaultServer.(DefaultServer.java:105) at com.sap.conn.idoc.jco.DefaultJCoIDocServer.(DefaultJCoIDocServer.java:35) at com.sap.conn.idoc.jco.DefaultJCoIDocServerFactory.createServer(DefaultJCoIDocServerFactory.java:17) at com.sap.conn.idoc.jco.DefaultJCoIDocServerFactory.createServer(DefaultJCoIDocServerFactory.java:13) at com.sap.conn.jco.rt.DefaultServerManager.getServer(DefaultServerManager.java:108) at com.sap.conn.jco.rt.StandaloneServerFactory.getServerInstance(StandaloneServerFactory.java:170) at com.sap.conn.idoc.jco.JCoIDoc.getServer(JCoIDoc.java:78) at com.sap.conn.idoc.examples.IDocServerExample.main(IDocServerExample.java:18) Caused by: com.sap.conn.jco.JCoException: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connection parameters: TYPE=B DEST=JCOSERVER01 MSHOST=arm115tx GROUP=PUBLIC R3NAME=T01 PCS=1 LOCATION CPIC (TCP/IP) on local host rz1462 with Unicode ERROR service '?' unknown TIME Tue Jul 07 09:09:40 200 RELEASE 711 COMPONENT NI (network interface) VERSION 39 RC -3 DETAIL NiErrSet COUNTER 2 at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:615) at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1280) at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:661) at com.sap.conn.jco.rt.PoolingFactory.init(PoolingFactory.java:103) at com.sap.conn.jco.rt.ConnectionManager.createFactory(ConnectionManager.java:171) at com.sap.conn.jco.rt.DefaultConnectionManager.createFactory(DefaultConnectionManager.java:44) at com.sap.conn.jco.rt.ConnectionManager.getFactory(ConnectionManager.java:160) at com.sap.conn.jco.rt.RfcDestination.initialize(RfcDestination.java:789) at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:817) at com.sap.conn.jco.rt.RepositoryManager.getRepository(RepositoryManager.java:32) at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:891) at com.sap.conn.jco.rt.DefaultServer.update(DefaultServer.java:132) ... 8 more Caused by: RfcException: [null] message: Connect to message server host failed Connection parameters: TYPE=B DEST=JCOSERVER01 MSHOST=arm115tx GROUP=PUBLIC R3NAME=T01 PCS=1 LOCATION CPIC (TCP/IP) on local host rz1462 with Unicode ERROR service '?' unknown TIME Tue Jul 07 09:09:40 200 RELEASE 711 COMPONENT NI (network interface) VERSION 39 RC -3 DETAIL NiErrSet COUNTER 2 Return code: RFC_FAILURE(1) error group: 102 key: RFC_ERROR_COMMUNICATION at com.sap.conn.rfc.engine.RfcIoControl.error_end(RfcIoControl.java:255) at com.sap.conn.rfc.engine.RfcIoControl.ab_rfcopen(RfcIoControl.java:94) at com.sap.conn.rfc.api.RfcApi.RfcOpen(RfcApi.java:83) at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1273) ... 18 more
    Does anyone know what I´m doing wrong? With thanks, Veit

    Im having the same issue here.  Has anyone found a solution to this?

  • Performance problems with new Java Tiger style recommendations

    Performance problems with jdk 1.5 on Linux plattform
    (not tested on Windows, might be the same)
    using the new style recommendations.
    I need fast Vector loops for high speed mathematical calculations, some
    hints about the fastest way to program that loop would be also great!
    After refactoring using the new features from java 1.5 (as recommended from
    SUN) I lost performance significantly:
    using a vector:
    public Vector<unit> units;
    The new code (recommended from SUN for Java Tiger for redesign):
    for (unit u: units) u.accumulate();
    runs more than 30% slower than the old code:
    for (int i = 0; i < units.size(); i++) units.elementAt(i).accumulate();
    I expected the opposite.
    Is there any information available that helps?
    The following additional information I got from Mr. Shankar Unni:
    I got some fairly anomalous results comparing ArrayList and Vector: for the
    1.5-style loops, ArrayList was faster then Vector, but for a loop with get()
    calls, Vector was faster. Vector was even faster than that using
    elementAt(), which was a surprise:
    For a million summing iterations over a 100-element array:
    vector elementAt loop took 3446 ms.
    vector get loop took 3796 ms.
    vector iterator loop took 5469 ms.
    arraylist get loop took 4136 ms.
    arraylist iterator loop took 4668 ms.

    If your topic doesn't change, please stay in your original post.

  • Problems with a java bean in Weblogic 5.1

    Hello,
              I am having a problem deploying a java bean in Weblogic 5.1:
              I have been given a .class and a .jar file for a java bean (not an EJB). I
              placed the .class file into e:\temp\WEB-INF\classes and added the following
              line to my weblogic.properties file:
              weblogic.httpd.webApp.testApp=e:/temp/
              I have also updated the web.xml file in the WEB-INF directory as follows:
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
              Application 1.2//EN"
              "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <servlet>
              <servlet-name>EdIface</servlet-name>
              <jsp-file>test.jsp</jsp-file>
              </servlet>
              <servlet-mapping>
              <servlet-name>EdIface</servlet-name>
              <url-pattern>EdIface</url-pattern>
              </servlet-mapping>
              </web-app>
              When I try to access my http:\\server:port\testApp\test I get an "Error
              500 - internal server error".
              Has anyone had experice with deploying a java bean with jsut the .class and
              .jar file? Where should I put the .jar file?
              I appreciate any advice!
              

    Bump

  • A problem with my Java Scrabble game

    Hello
    I am making a Java Scrabble game for a school assignment and I have a problem with the following:
    The number of players is input by the user (2 to 4) and i need to create a number of arrays based on the number of players. These arrays must have 7 playing pieces at all times until the "bag" of pieces has less pieces than those required to replace the ones a certain player just used (in wich case the bag would give that player all of it's remaining pieces and, from this point on, the player arrays would not necessarily need to have 7 pieces).
    this is my procedure to take a piece from the bag:
         public Piece takePiece()
              if (this.pieceCounter > 0) {
                   Arrays.sort(this.pieces, 0, this.pieceCounter);
                   int i = this.generator.nextInt(this.pieceCounter);
                   Piece p = this.pieces;
                   this.pieceCounter--;
                   this.pieces[i] = this.pieces[this.pieceCounter];
                   return p;
              else
                   return null;
    this is my Piece class:
    public class Piece implements Comparable {
         private int scorePiece;
         private char letterPiece;
         public Piece(char letterPiece, int scorePiece)
              this.scorePiece = scorePiece;
              this.letterPiece = letterPiece;
         public int scorePiece()
              return scorePiece;
         public String letterPiece()
              return letterPiece();
         public String toString()
              return letterPiece+ " " + scorePiece;
         public int compareTo(Object a)
              Piece piece= (Piece) a;
              return (int) letterPiece - (int) piece.letterPiece;
    }Thanks in advance for your help

    Ok, if i create a Players class and do this in Main class:
         if(nPlayers >= 2 && nPlayers <= 4)
              Players arrayPlayers[];
              arrayPlayers= new Players [nPlayers ];
              for(int i=0 ; i < nPlayers ; i++)
                       arrayPlayers[i] = new Players ();
              }My Players Class should contain something like this:
             // Array of 7 that contains Pieces...
         Piece[] pieces= new Piece[7];how can i get pieces from takePiece(); (Class Bag) and put them in the pieces arrays until takePiece(); returns null?

  • Problems with VA Java Visual Composition

    Hi!
    I have some problems with reopening (even simple) visually in VA Java created
    beans (JFrame, JDialog). IDE behaves somehow unpredictable. Sometimes it reopened it into the
    visual composition editor, anothe time the reoppening fails with following log message:
    Java exception during layout of bean(<unnamed>): java.lang.NullPointerException
    Java exception during layout of bean(JFrameContentPane): java.lang.NullPointerException
    An exception occurred in a system program.
    Terminating TimeSlotGUI (VCE) (System) (25/07/01 10:05:07)
    Can anybody help?
    Ivan

    Which Version do you use? This VAJ 3.5 was quite bugy and you had to use patches. Now there is an Update 3.5.2 which fixes most of the bugs ( although there are new ones). When I work with the VCE ( avoid this normally) I get problems if I rename Beans which were generated with th VCE. then your stuff is lost. Sometimes you can recover if you delete the generated[i] initialize() method and then open the VCE.
    Nevertheless, VAJ 3.5.3 works quite good, great debugging tools.

  • Problem with when validate trigger

    Hi All,
    I am using oracle forms 10g.
    I have developed a custom form In that i have two block Header block and Detail block.In the header block some fields like Po number, po amount , supplier name, supplier site etc. And in the detail block i have po line details.
    I have written a validation trigger under supplier name and supplier site, IF block.supplier_name is null then
    message('enter supplier name') same under every field.
    Now when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output. But the problem is When validate trigger fires when i press tab in PO Amount fields, Once i press ok it going to details block and querying.
    Can any one explain me what i have done wrong. The validation trigger is firing and giving message.
    Regards
    Srikkanth

    Srikkanth.M wrote:
    Hi All,
    I am using oracle forms 10g.
    I have developed a custom form In that i have two block Header block and Detail block.In the header block some fields like Po number, po amount , supplier name, supplier site etc. And in the detail block i have po line details.
    I have written a validation trigger under supplier name and supplier site, IF block.supplier_name is null then
    message('enter supplier name') same under every field.
    Now when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output. But the problem is When validate trigger fires when i press tab in PO Amount fields, Once i press ok it going to details block and querying.Hey, Srikkanth
    Once you said
    when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output.again you said
    But the problem is When validate trigger fires when i press tab in PO Amount fieldsSo, i'm not getting you..
    Can you clear it any more ? or any other way..

  • HT5559 I  can't connecting  to chat  please can you help me,i think my problem with da java

    I  can't connecting  to chat  please can you help me,i think my problem with da java

    Have you read thread (From More like this on the right)
    https://discussions.apple.com/message/18837278#18837278

  • Problem with Sun Java Creator JDBC driver .....

    Hi:
    I am new to Java Studio Creator. I am using Oracle Enterprise Edition 8.0.5.0 database to get data from. Through Servers Navigator->Data Sources, I define a new datasource using default JSC JDBC driver for Oracle. However, when I try to test the connection I get the following error.
    [sunm][Oracle JDBC Driver] Internal Error: Net8 Protocol Error
    Can someone tell me what is going on here? By the way I also have Netbeans 4.0 IDE which works fine with the same database.
    -Victor bagga

    I was using the following database URL.
    jdbc:sun:oracle://autoserv.cqtel.com:1521;SID=autosvdb
    The SID is valid because I can use other JDBC drivers such as Oracle's thin driver which uses the Database URL
    jdbc:oracle:thin:@autoserv.cqtel.com:1521:autosvdb
    and it works. However, I can not use the Oracle thin JDBC driver with Sun Java Creator as it seems to be incompatible. Using this driver I can successfully define a datasource and veiw all the data and make all kind of queries through the Server Navigator window but when I try to drop a database table on to a Data Table in my project, nothing happens. If I try to Edit the query on the rowset, the GUI window does not show any Column names and display names.
    By the way, I also have an Oracle 9.x database which works just fine with Java Ctreator Studio. I really like Java Creator as I find it very productive but not being able to make it work with Oracle 8.0.5.0 takes the fun out of it.

  • PROBLEM WITH A DATABASE TRIGGER

    WHEN A USER ENTERS A STATUS CODE BETWEEN 70 AND 86 ON THE PAB_SUSP TABLE, THE COMPLETION DATE FIELD ON THE PAB_SUSP TABLE GETS UPDATED WITH THE SYSTEM DATE WHICH IS FINE. THE
    COMPLETION DATE FIELD ON THE EREC_SUSP TABLE FOR THE SAME CORRESPONDING RECORD SHOULD ALSO GET UPDATED WITH THE SAME SYSTEM DATE. SOMETIMES THE COMPLETION DATE FIELD ON THE EREC_SUSP TABLE GETS UPDATED CORRECTLY WITH THE SAME SYSTEM DATE. OTHER TIMES IT DOES NOT. WHAT IS THE PROBLEM?
    I AM ENCLOSING THE CODE IN THE DATABASE TRIGGER. NOTE ALSO THAT THE SUSP_DT FIELD ALSO GETS UPDATED.
    DECLARE
    cursor get_user is SELECT user_id, FROM oracle_user
    WHERE username = USER;
    user_number NUMBER(10,0);
    num_recs NUMBER(10,0);
    num_rec_recs2 NUMBER(10,0);
    seq number(10,0);
    ssn VARCHAR2(9);
    nm VARCHAR2(27);
    dob DATE;
    pg VARCHAR2(2);
    rank VARCHAR2(2);
    act_cd VARCHAR2(3);
    clk NUMBER(10,0);
    recv_dt DATE;
    susp_dt DATE;
    cmpl_dt DATE;
    ocll VARCHAR2(7);
    tagd VARCHAR2(7);
    chg_ind VARCHAR@(1);
    BEGIN
    open get_user;
    fetch get_user into user_number;
    close get_user;
    IF (:new.lcl_pab_susp_stat_cd <> :old.lcl_pab_susp_stat_cd AND
    :new.lcl_pab_susp_stat_cd >= '70' AND
    :new.lcl_pab_susp_stat_cd <= '86') THEN
    cmpl_dt := sysdate;
    END IF;
    IF :new.lcl_susp_dt <> :old.lcl_susp_dt THEN
    chg_ind := 'Y';
    susp_dt := :new.lcl_susp_dt;
    else
    susp_dt := :old.lcl_susp_dt;
    END IF;
    seq := :new.pab_susp_seq;
    ssn := :new.ind_ssn;
    nm := :new.ind_nm;
    dob := :new.ind_dob;
    pg := :new.ind_pg_cd;
    rank := :new.mil_rank_cd;
    act_cd := :new.lcl_act_cd;
    clk := :new.lcl_act_clk_no;
    recv_dt := :new.lcl_recv_dt;
    ocll := :new.ocll_id;
    tagd := :new.tagd_id;
    SELECT COUNT(*) INTO num_recs2
    FROM EREC_SUSP
    WHERE SUSP_SEQ = :old.susp_seq;
    IF num_recs2 > 0 THEN
    UPDATE erec_susp
    SET pab_susp_seq = seq,
    ind_ssn = ssn,
    ind_nm = nm,
    ind_dob = dob,
    ind_pg_cd = pg,
    mil_rank_cd = rank,
    erec_ofc_act_cd = act_cd,
    erec_of_clk_no = clk,
    lcl_cmpl_dt = cmpl_dt,
    lcl_recv_dt = recv_dt,
    lcl_susp_dt = susp_dt,
    ocll_id = ocll,
    tagd_id = tagd,
    lcl_chg_ind = chg_ind,
    rec_tx_dt = SYSDATE,
    rec_tx_user_no = user_number
    where susp_seq = new.susp_seq;
    END IF;
    END;

    S. Wolicki, Oracle wrote:
    No, you cannot!!! NLS_CHARACTERSET is not a session parameter in Oracle.
    Assuming IBM MessageBroker connects through OCI, setting the NLS_LANG variable in its environment to .EE8ISO8859P2 could help. You should also review MessageBroker's documentation, especially any configuration parameters for Oracle, to see if the character set is not configurable there. There is nothing to be done on the Oracle side.
    By the way, can you name any particular characters that do not show up correctly and tell me what you see in place of them?
    -- SergiuszHi Sergiusz,
    I replace back and forth the accented characters, but for large queries, it takes a very long time:
    REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
    REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(c,'ő','&#x0151'),
    'Ő','&#x0150'),'ű','&#x0171'),'Ű','&#x0170'),'é','&#x00E9'),'É','&#x00C9'),'á','&#x00E1;'),'Á','&#x00C1'),
    'ú','&#x00FA'),'Ú','&#x00DA'),'ö','&#x00F6'),'Ö','&#x00D6'),'ü','&#x00FC'),
    'Ü','&#x00DC'),'ó','&#x00F3'),'Ó','&#x00C3'),'í','&#x00ED'),'Í','&#x00CD');
    (The semicolons let down for display.)I thought that I would change the nls_lang on the client side in a Java node but it is not sure that will work.
    Thank you for your answer.
    Sada
    Edited by: 1002028 on 2013.04.24. 13:48
    Edited by: 1002028 on 2013.04.24. 13:49

  • Problem with Cut.java sample

    I am attempting to use code from the Cut.java sample to cut multiple
    regions from the same source audio file to separate destination files.
    I am calling the doIt() method from my coding, passing MediaLocators to
    the input and output files (both .wav) , and arrays with a single
    element (time in ns as a long) for the start and end, and false for
    frame mode. The first time I call it, it works fine. However, on
    subsequent calls, despite the output messages suggesting it has worked
    successfully, the output files are full of white noise. I have tried:
    using a new instance of Cut each time
    adding code to close the processor and disconnect the datasink
    disabling JMF buffering
    all to no effect. Any suggestions would be greatly appreciated.
    cheers
    Matthew Wilson.

    I have kind of the same problem too.
    I copy-paste the "cutting sections from an input" example from http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Cut.java but can't get it to work.
    The error I'm getting back is:
    - Create processor for: file:/c:/song.mp3
    - Configure the processor for: file:/c:/song.mp3
      Transcode:
         from: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
         to: LINEAR, 44100.0 Hz, 16-bit, Stereo, BigEndian, Signed
    - Realize the processor for: file:/c:/song.mp3
    Failed to build a graph for the given custom options.
    Failed to realize: com.sun.media.ProcessEngine@19360e2
      Cannot build a flow graph with the customized options:
        Unable to transcode format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
          to: LINEAR, 44100.0 Hz, 16-bit, Stereo, BigEndian, Signed
          outputting to: RAW
    Error: Unable to realize com.sun.media.ProcessEngine@19360e2
    Failed to realize the processor.
    Failed to cut the inputsince I'm using eclipse as IDE, I made some "minor" changes on Cut.java to test it on eclipse
    public static void main(String [] args) {
        args = new String[7];
        args[0] = "-o";
        args[1] = "file:/c:/tmp.mov"; //outputfile
        args[2] = "file:/c:/peli.mov"; //inputfile
        args[3] = "-s";
        args[4] = "5000";
        args[5] = "-e";
        args[6] = "25000";
        //no more changes...Does any one have an idea what do I'm doing wrong? I'll appreciate ur help.

  • Big Problem with Instead Of Trigger

    I have following problem: I created my own user-table where I want to store some
    attributes like user-foto etc... This table I join with the HTMLDB
    wwv_flow_fnd_user (I gave myself the select grant on it) in a view
    On the view I created an INSTEAD-OF-Trigger for DELETE-Operations where I delete
    only my user-table. But when I execute it it gives me an
    ORA-01031: insufficient privileges
    I can not understand it.
    <pre>
    ===========================================================
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Sep 27 05:28:13 2005
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> DROP TABLE my_users
    2 ;
    Table dropped.
    SQL> CREATE TABLE my_users AS
    2 SELECT user_id
    3 FROM flows_020000.wwv_flow_fnd_user
    4 ;
    Table created.
    SQL> ALTER TABLE my_users ADD my_attr VARCHAR2(10);
    Table altered.
    SQL> ALTER TABLE my_users ADD CONSTRAINT pk_my_users PRIMARY KEY( user_id );
    Table altered.
    SQL> CREATE OR REPLACE VIEW v_my_users
    2 AS
    3 SELECT u2.user_id,
    4 u.user_name,
    5 u.first_name,
    6 u.last_name,
    7 u2.my_attr
    8 FROM flows_020000.wwv_flow_fnd_user u,
    9 my_users u2
    10 WHERE u2.user_id = u.user_id
    11 ;
    View created.
    SQL> CREATE OR REPLACE TRIGGER trg_del_v_my_users
    2 INSTEAD OF DELETE ON v_my_users
    3 FOR EACH ROW
    4 BEGIN
    5 DELETE my_users
    6 WHERE user_id = :OLD.user_id
    7 ;
    8 END;
    9 /
    Trigger created.
    SQL> DELETE v_my_users WHERE 1=2
    2 ;
    DELETE v_my_users WHERE 1=2
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ===========================================================
    </pre>
    And: If there is no PK on table my_users I got not error!
    Can anybody explain it?
    And: How can I include my listings in the forum with courier font?

    Is the primary key in this table referencing any table(s) in other schema? How should this work?
    Look at the script above:
    ALTER TABLE my_users ADD CONSTRAINT pk_my_users PRIMARY KEY( user_id );
    Bye,
    Rumburak

  • Having problems with a Java Telnet Client

    I'm trying to write a Telnet Client(for a mud). I've searched the forum but can't seem to find the answer to my problem. The mud sends the ANSI color codes, is there anyway to get java to interpret this, or will I have to make a parser and do all the work by hand?

    Try looking up RFC854 & RFC855. A Google Search will give several references. Other Searches include "Interpret As Command", and "Telnet IAC Options".
    The keys to telnet communications:
    1. Unless it is explicitly a command, it is data.
    2. All Commands start with the Interpret As Command (IAC) character, decimal 255 or hexidecimal ff.
    3. IAC DO/DONT/WILL/WONT Negotiations for a Telnet Option occurs before IAC SB/SE Subnegotiations. DON'T/WON'T is the default Telnet Network Virtual Terminal (NVT) setting for all options.
    4. All Negotiations complete before you get to the data phase.
    5. Be ready for Negotiations, at the start and during the middle of the Telnet Session....
    Here is an example of decoding Telnet
    The remote host may start with the following, shown in decimal:
    255, 253, 3, 255, 253, 24, etc...
    Viewed as UTF text, this appears to be some "y" characters with special accents above them.
    Cheat Sheet:
    255 == Interpret As Command (IAC)
    254 == DON'T, as is "I DON'T support xyz...."
    253 == DO, as in "I DO support xyz..."
    252 == WON'T, as in "You WON'T support abc..."
    251 == WILL, as in "You WILL support abc..."
    250 == SuBnegotiations Start (SB)
    240 == Subnegotiations End (SE)
    The above has 2 commands:
    - 255, 253, 3 == IAC DO Suppress Go Ahead
    - 255, 253, 24 == IAC DO Terminal Type
    Appropriate Responses could be:
    - 255, 251, 3, 255, 251, 24, etc....
    OR
    - 255, 252, 3, 255,252, 24, etc...
    OR
    - 255, 251, 3, 255, 252, 24, etc...
    OR
    - 255,252, 3, 255, 251,24, etc...
    Once you get the remotes questions answered, you can move on to the real work of passing data.
    Cheers,
    Joel.

  • Problem with creating JAVA Source. please help

    Dear all
    how are you.
    In fact I have made a simple java class that return a string which represents the screen size . for example 800/600 or 1024/768 or others
    but I face error ORA-29541 class string.string could not be resolved
    This what i made
    first i created my JAVA Source
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "ScreenProperty" AS
    import java.lang.Object;
    import java.awt.*;
    public class ScreenProperty
    int w;
    int h;
    public static String getScreenSize()
    w = Toolkit.getDefaultToolkit().getScreenSize().width;
    h = Toolkit.getDefaultToolkit().getScreenSize().height;
    return w+"/"+h;
    SQL>Operation 160 succeeded.
    this means the the java source created successfuly
    and I'm sure that my java code is correct
    then i created a fuction to call this java source as fellow
    SQL> create or replace function f_get_screen_size
    return varchar2
    as language java
    name 'ScreenProperty.getScreenSize() return java.lang.String';
    Function created.
    the I Issued this sql statement to return the result that should be varchar2 that represent the sceen size(1024/768)
    SQL> select f_get_screen_size from dual;
    ORA-29541 class string.string could not be resolved.
    I do not know what is the reason for this error
    and when i searched the documentation for this error i found
    ORA-29541 class string.string could not be resolved
    Cause: An attempt was made to execute a method in a Java class that had not been previously and cannot now be compiled or resolved successfully.
    Action: Adjust the call or make the class resolvable
    I need to know what is the problem.
    And is there another way to load this class other than making JAVA SOURCE
    please help

    before drawing hands of clock you could fill a circle/oval with certain color, then you'd have that kind of circle that has been filled as backgound.
    you may change those dots to be small lines for 12, 3, 6 and 6 o'clock and then have small dots represent 1, 2, 4, 5, 7, 8, 10 and 11 o'clock
    anyhow, you should study that code and see how you can modify it whitout breaking it but having it look different.
    better yet would be trying to understand how it works, what any line there means and then recreate your own... this way you would learn more....
    and if there are some methods or anything you don't understand, then look them up from API documentation
    good luck.

Maybe you are looking for

  • Can't reinstall/uninstall Spotify on Windows 7 64-bit

    Because of the problem reported in this topic http://community.spotify.com/t5/Desktop-Windows/Freeze-when-changing-tracks/m-p/4285 I'm trying to uninstall and reinstall Spotify. First problem: uninstalling through Control Panel, Programs and Features

  • Warning messages for purchage order date?

    Hi Friends,   I am ABAP developer, and I am developing one webservice to create value contract from dotnet front end, So user can enter inputs from that front end and he will get SAP generated value contract id.    Here I did validations for all the

  • ClearScan - buggy OCR - arbitrary spaces in words

    I've got 400 pages from a document, scanned @ 600 dpi color.With Acrobat 9 I converted them to 1 PDF, internally all pages stored as JPG2000, high quality. File size ~ 350 MB. If I do OCR on this file (Acrobat 9 or 10) without ClearScan, everything i

  • Job titles: training/elearning design vs graphic design/communications design

    Hello everyone, I realize this is not a typical 'Captivate' quiestion, and I've posed it to some networking groups on LinkedIn, etc., but I wanted to ask it to this niche community as well: I started out 3 years ago as a Training Documentation Specia

  • Bookmarks not recorded

    When I open a book using Adobe Digital Editions and if I want to access the bookmarks I have created during the previous session it fails.When I click on the bookmark button the name of the previous bookmarks are displayed duriing less than one secon