Cannot resolve ORA-00955 error.

I have a script which I run to drop and create preferences, set attributes and drop and create a context index. When dropping and creating preferences and setting the attributes everything works fine and I get the standard messages.
My problem is I get the
ORA-00955 name is already used by an existing object
even after seeing the messages "index dropped" and index created.
I have checked the ctx_user_index_errors view and the timestamps are from when I approximately ran my script so it seems the index worked.
I have tried prefacing the index name with the schema name both when dropping and creating the index and I have even tried to use the keyword "force" when trying to drop the index, yet I still get the ORA-00955 error.
A snippet from my code is below:
PROMPT 23 DROP oracle text context index
DROP INDEX schema1.my_index;
PROMPT 24 CREATE the oracle text context with the above preferences and attributes
CREATE INDEX schema1.my_index ON docs(doc_contents)
INDEXTYPE IS ctxsys.context
PARAMETERS('DATASTORE docs_data_store
FILTER CTXSYS.INSO_FILTER
FORMAT COLUMN oracle_text_format_column
LEXER docs_lexer
STOPLIST CTXSYS.DEFAULT_STOPLIST
SECTION GROUP docs_group
SYNC(ON COMMIT)' )
/

I think my problem was I really had a semi colon and a a foward slash at the end of the file, hence there was attempt to create the index twice, once for when the command was ended with a semicolon and once with the foward slash. I just removed the slash and everything worked fine.

Similar Messages

  • How to resolve ORA-00001 Error in SQL Insert?

    Hi all, I need your appreciated help.
    I make a plsql procedure that is inserting a row according cursor value, I'm having oracle error ORA-00001: unique constraint (constraint_name) violated.
    You may see this message if a duplicate entry exists at a different level: in RDBMS MySQL I have the syntax IGNORE to resolve this duplication error... and in Oracle ?
    Thanks for your time and hints.
    Miguelito

    user6317803 wrote:
    How to resolve ORA-00001 Error in SQL Insert?ORA-00001 means table has unique/primary key/index and you are trying to insert a row with key value that already exists in the table. I'll assume table COUNTRIES has primary key on COUNTRY_ID. Then change SQL to:
    SQL = "INSERT INTO COUNTRIES(COUNTRY_ID,COUNTRY_NAME,REGION_ID) SELECT 'BZ','BLZ',3 FROM DUAL WHERE NOT EXISTS(SELECT 1 FROM COUNTRIES WHERE COUNTRY_ID = 'BZ')"There is a good chance table COUNTRIES also has unique key/index on COUNTRY_NAME. If so use:
    SQL = "INSERT INTO COUNTRIES(COUNTRY_ID,COUNTRY_NAME,REGION_ID) SELECT 'BZ','BLZ',3 FROM DUAL WHERE NOT EXISTS(SELECT 1 FROM COUNTRIES WHERE COUNTRY_ID = 'BZ' OR COUNTRY_NAME = 'BLZ')"SY.

  • Rerunning script (DML and DDL) without ora-00001 and ora-00955 errors

    What is the best way to write a DML and DDL script so that it can be run multiple times without these ORA errors:
    ORA-00955: name is already used by an existing object
    ORA-00001: unique constraint (JILL.SYS_C00160247) violated
    I have just joined a product development company using SQL Server as there primary database. They have just completed a port to Oracle.
    Their product release upgrades (given to clients) include sql scripts with database changes (structure and data). They require that the client be able to rerun the scripts more than once with no errors. In SQL Server, the accomplish it this way.
    For DDL:
    if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MyTab]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    Begin
         CREATE TABLE [dbo].[MyTab] (
              [ID]int IDENTITY(1,1),
              [InvID] uniqueidentifier not null
    For DML:
    IF NOT EXISTS (SELECT 1 FROM [dbo].[mytab] WHERE [Name] = 'Smith' and [ID] = 3)
    BEGIN
    INSERT INTO [dbo].[mytab]
    ([ID] ,[Name]
    VALUES (3,'Smith')
    END
    I am tasked with duplicating this logic on the Oracle side. The only way I can think of so far is using plsql and checking for existence before every insert and create statement. The other options I thought of cannot be used in this case
    - "whenever sqlerror continue" - gives the same response for all errors. True errors should stop the code, so this is too risky.
    - "log errors into ... reject limit unlimited" on the insert - I thought this was my best solution until I found out that it doesn't support lobs.
    Do you know of any more elegant (and more efficient) solution other than plsql cursors to check for existence before running each insert/create?
    Any suggestions would be greatly appreciated.

    select table_name from user_tables will give you the table exist or not.
    all_tables/dba_tables
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10755/statviews_1190.htm#i1592091

  • Visual Studio 2012 cannot resolve symbol or Errors control is not a member of class

    Visual Studio 2012 Web Site Project (Note not a Web application, so there are not Designer.vb files) > Site works perfectly fine and using IIS and attaching to IIS to debug code.
    However, if I try to build the site inside of Visual Studio I am getting lots of Errors ‘pnlName’ is not a member of ‘Page_Name’ In the code behind I am getting errors ‘Cannot resolve symbol ‘pnlName’
    .ascx Page
    <li style="margin-right:0;" id="pnlName" runat="server"><a href="/cart" title="Checkout" class="global-checkout">Checkout</a></li>
    .ascx.vb page
    Me.pnlName.Attributes.Remove("style")
    I have cleaned, rebuild and nothing gets rid of these errors, but again the site works as designed, but I would like to launch and debug inside of Visual Studio.
    Moojjoo MCP, MCTS
    MCP Virtual Business Card
    http://moojjoo.blogspot.com

    Cor,
    What I am stating is this is a solution using the Web Site Project instead of a
    Web Application Project.
    Web Site projects do not require Designer.vb files, Web Application Projects add Designer.vb files in the solution.   
    Background: I have been hired to support a very successful e-commerce site that was built by a 3rd party vendor (I had no input on the contract or specification, because I would have went with
    MVC).  The site works 100% correctly, however from my 2003 - 2015 experience with Visual Studio and Web Development being in Web Forms and MVC I have always built ASP.NET Solutions using the Web Application Project Templates, which compiles the code down
    to .dlls.  
    A Web Site project does not compile the code, but simply uses the .vb files and they have to be migrated to the server with the .aspx files. http://msdn.microsoft.com/en-us/library/dd547590%28v=vs.110%29.aspx
    Currently the only way I can debug this Solution is to attach to the w3wp.exe process running locally on my work station. 
    The Solution is comprised of two Web Sites, which I cannot get it to compile because of the following errors -
     'webServerControlName' is not a member of '(Protected Code Behind Class Name)'  I am reaching out to the MSDN community to see if anyone has experienced this issue with
    Web Site Projects.
    I hope that clears up the Project Type question.
    Moojjoo MCP, MCTS
    MCP Virtual Business Card
    http://moojjoo.blogspot.com

  • ORA-00955 Errors during R3load for WEB AS Abap 6.40 installation

    Dear Gurus,
    I am encountering a problem during the R3load phase of the WEB AS ABAP 6.40 DB instance installation; I have patched the Oracle Database using the 9.2.0.7 patch set beforehand and resumed the SAPINST. There after errors occur during the DB load phase, below are the logs for reference (there are multiple occurences of 'ORA-00955: name is already used by an existing object' in existing logs)
    /sapmnt/P21/exe/R3load: START OF LOG: 20080627032739
    /sapmnt/P21/exe/R3load: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#4 $ SAP
    /sapmnt/P21/exe/R3load: version R6.40/V1.4 [UNICODE]
    /sapmnt/P21/exe/R3load -ctf I /sapcd/NetweaverSR1_Export/EXP3/DATA/SAPDODS.STR /tmp/sapinst_instdir/NW04SR1/WEBAS_ABAP_ORA_UC
    /DB/DDLORA.TPL /tmp/sapinst_instdir/NW04SR1/WEBAS_ABAP_ORA_UC/DB/SAPDODS.TSK ORA -l /tmp/sapinst_instdir/NW04SR1/WEBAS_ABAP_O
    RA_UC/DB/SAPDODS.log
    /sapmnt/P21/exe/R3load: job completed
    /sapmnt/P21/exe/R3load: END OF LOG: 20080627032739
    /sapmnt/P21/exe/R3load: START OF LOG: 20080627032814
    /sapmnt/P21/exe/R3load: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#4 $ SAP
    /sapmnt/P21/exe/R3load: version R6.40/V1.4 [UNICODE]
    /sapmnt/P21/exe/R3load -dbcodepage 4102 -i /tmp/sapinst_instdir/NW04SR1/WEBAS_ABAP_ORA_UC/DB/SAPDODS.cmd -l /tmp/sapinst_inst
    dir/NW04SR1/WEBAS_ABAP_ORA_UC/DB/SAPDODS.log -stop_on_error
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): UTF8
    (rscpsumg) Please look also into "/tmp/sapinst_instdir/NW04SR1/WEBAS_ABAP_ORA_UC/DB/SAPDODS001.xml".
    (DB) ERROR: DDL statement failed
    (CREATE TABLE "RSDMODSTAB" ( "CHARACT" VARCHAR2(3) DEFAULT ' ' NOT NULL , "ATTRIBUTE" VARCHAR2(3) DEFAULT ' ' NOT NULL  ) TA
    BLESPACE PSAPP21 STORAGE (INITIAL 16384 NEXT 0000040960K MINEXTENTS 0000000001 MAXEXTENTS 2147483645 PCTINCREASE 0 ) )
    DbSlExecute: rc = 102
      (SQL error 955)
      error message returned by DbSl:
    ORA-00955: name is already used by an existing object
    (DB) INFO: disconnected from DB
    /sapmnt/P21/exe/R3load: job finished with 1 error(s)
    /sapmnt/P21/exe/R3load: END OF LOG: 20080627032815
    /sapmnt/P21/exe/R3load: START OF LOG: 20080627035407
    /sapmnt/P21/exe/R3load: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#4 $ SAP
    /sapmnt/P21/exe/R3load: version R6.40/V1.4 [UNICODE]
    /sapmnt/P21/exe/R3load -dbcodepage 4102 -i /tmp/sapinst_instdir/NW04SR1/WEBAS_ABAP_ORA_UC/DB/SAPDODS.cmd -l /tmp/sapinst_inst
    dir/NW04SR1/WEBAS_ABAP_ORA_UC/DB/SAPDODS.log -stop_on_error

    Hello,
    Strange error, check if you didn't run out of space. If this is new installation, nor upgrade or migration, I would suggest to you drop the table and re-run export once more.
    Otherwise you can open message to SAP as you can expect that this will happen also for other tables. Looks table or tables exist at Oracle but sapinst don't have info about it
    Peter

  • Cannot connect: ORA-12505 error (listener does not know SID..)

    I have an Oracle 10g installation insde a VM with private IP (192.168.109.128) and I'm trying to access it from the host operating system with aqua data studio, but get ORA-12505 error (listener does not currently know of SID...). The identical error occurs if I try to cennect from within the VM itself.
    "tnsping dbdemo" prints:
    ==================
    Used parameter files:
    C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = VMDSINW2K3S)(PORT = 1521)) (CONNECT_DATA =
    (SERVER = DEDICATED) (SERVICE_NAME = dbdemo.datadsin)))
    OK (10 msec)
    and lsnrctl status:
    =============
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
    Start Date 12-MAR-2007 15:22:55
    Uptime 0 days 0 hr. 5 min. 14 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oracle\product\10.2.0\db_1\network\admin\listener.ora
    Listener Log File C:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=VMDSINW2K3S)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    and the listener.log:
    ===============
    12-MAR-2007 15:29:21 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=dbdemo.datadsin)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.10)(PORT=1325)) * establish * dbdemo.datadsin * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    12-MAR-2007 15:29:21 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=dbdemo.datadsin)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.10)(PORT=1327)) * establish * dbdemo.datadsin * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    12-MAR-2007 15:29:21 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=dbdemo.datadsin)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.10)(PORT=1328)) * establish * dbdemo.datadsin * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    12-MAR-2007 15:29:45 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=dbdemo.datadsin)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.10)(PORT=1331)) * establish * dbdemo.datadsin * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    12-MAR-2007 15:29:51 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=dbdemo.datadsin)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.10)(PORT=1335)) * establish * dbdemo.datadsin * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    12-MAR-2007 15:29:51 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=dbdemo.datadsin)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.10)(PORT=1336)) * establish * dbdemo.datadsin * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    12-MAR-2007 15:29:51 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=dbdemo.datadsin)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.10)(PORT=1338)) * establish * dbdemo.datadsin * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    12-MAR-2007 15:29:51 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=dbdemo.datadsin)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.10)(PORT=1339)) * establish * dbdemo.datadsin * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    my sqlnet.ora is:
    ============
    # sqlnet.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.
    # This file is actually generated by netca. But if customers choose to
    # install "Software Only", this file wont exist and without the native
    # authentication, they will not be able to connect to the database on NT.
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    12514, 00000, "TNS:listener does not currently know of service requested in connect descriptor"
    // *Cause:  The listener received a request to establish a connection to a
    // database or other service. The connect descriptor received by the listener
    // specified a service name for a service (usually a database service)
    // that either has not yet dynamically registered with the listener or has
    // not been statically configured for the listener.  This may be a temporary
    // condition such as after the listener has started, but before the database
    // instance has registered with the listener.
    // *Action:
    //  - Wait a moment and try to connect a second time.
    //  - Check which services are currently known by the listener by executing:
    //    lsnrctl services <listener name>
    //  - Check that the SERVICE_NAME parameter in the connect descriptor of the
    //    net service name used specifies a service known by the listener.
    //  - If an easy connect naming connect identifier was used, check that
    //    the service name specified is a service known by the listener.
    //  - Check for an event in the listener.log file.

  • Error compiling EJB.jar  + cannot resolve symbol+while deploying

    I am getting following
    Error compiling EJB.jar , cannot resolve symbol ,Syntax error in source, am getting around 17 errors while deploying EAR generated using Jdev905 into standalone oc4jContainers(10g).
    Can anyone please help me out where is the problem.
    Regards,
    Anup

    cannot resolve symbol ,Syntax error in source
    indicates some jar file is not in the Classpath. Is j2ee.jar in the Classpath?

  • ORA-20000 error when executing background jobs in BI System

    Hello Experts,
    We newly installed NW2004s System. Few BI related background jobs are showing Error no: 4 or Error no: 3 in SM50. Also few BI related background jobs are giving error "ORA-20000 occurred when executing SQL statement (parse error offset=0)". Please let me know what does Error 4 or 3 mean in SM50 and how to resolve Ora-20000 error?
    Thanks

    This may be to do with insufficient authorization for the user (for creating statistics for example). Check OSS note 963760.

  • ORA-00604: error occured at recursive SQL level 1 ORA-12705: Cannot access

    Oracle Database 10g Express Edition Release 10.2.0.1.0 on
    OS Linux Debian 3.1_r4_stable
    SQL> select userenv('LANGUAGE') from dual;
    USERENV('LANGUAGE')
    RUSSIAN_RUSSIA.AL32UTF8
    Client OS MS Vista Ultimate EN , region=RUSSIAN.RUSSIA
    Oracle Developer suite 10
    SQL-Developer
    Version 1.1.0.23.
    NLS_LANG=RUSSIAN_RUSSIA.CL8MSWIN1251
    Oracle Developer suite 10 is working properly but when
    i am attempting a connection between Oracle 10g XE and SQL-Developer.
    Need some help to resolve this error message....
    ORA-00604: error occured at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid enviroment specified

    Hi,
    You have to set NLS_LANG before connect to Oracle Database.
    $export NLS_LANG=.AL32UTF8

  • Difficulty in resolving ORA-06502: PL/SQL: numeric or value error:

    Hi
    I am having great difficulty to resolve the following error - ORA-06502: PL/SQL: numeric or value error: character string buffer too small . In my Oracle Package, I have a Function that returns a varchar(255).
    My Function is basically as follows:
    FUNCTION GetUserDept (DeptNum IN NUMBER) RETURN VARCHAR2
    IS
    deptname varchar(255);
    BEGIN
    SELECT name INTO deptname
    FROM depts
    where id = DeptNum;
    RETURN deptname
    END;
    The SQL is running correctly and returns one result, which is what I want. However, when I call the function in my .NET C# code, this is when I am seeing the error message.
    In my code, I said that the commandtype is a stored procedure, passed the parameters, and add it to to the parameters, with the return type and direction put first and executed as a scalar. The code executes, and then fails at the ExecuteScalar line, and it is at this point on my exception handler that I see the error message ORA-6502.
    This really odd, because I have two other functions that return numbers, and I have executed them in the same way, and theses works!
    I have checked my function and can't see what is wrong, and I have tried changing the return type from varchar2 to NVarchar on the return type, but this made no difference.
    This problem has really dogged me for hours and I cannot see how to resolve it.
    Can someone, please help me?

    user633278 wrote:
    This really odd, because I have two other functions that return numbers, and I have executed them in the same way, and theses works!It is that very reason that your code fails. You need to declare the return variable as a string.
    SQL?create or replace
    FUNCTION GetUserDept (DeptNum IN NUMBER) RETURN VARCHAR2
    IS
    deptname varchar(255);
    BEGIN
      RETURN 'hello world';
    END;
      2    3    4    5    6    7    8    9   10 
    Function created.
    SQL?
    SQL?
    declare
      x number;
    begin
      x := GetUserDept(100);
    end;
    SQL?  2    3    4    5    6  declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at line 4
    SQL?
    SQL?
    declare
      x varchar2(255);
    begin
      x := GetUserDept(100);
    end;
    SQL?  2    3    4    5    6 
    PL/SQL procedure successfully completed.

  • Cannot create a constraint beacuse of ORA-00955

    Hi !
    I was trying to create a constraint on a table after dropping it just in case:
    ALTER TABLE NEQResultByChunk
    DROP CONSTRAINT pk_neqresultbychunk
    OUTPUT: >> ERROR at line 2:
    ORA-02443: Cannot drop constraint - nonexistent constraint
    ALTER TABLE NEQResultByChunk
    ADD (
    CONSTRAINT pk_neqresultbychunk PRIMARY KEY
    (woName, sdtName, neqrIndex, sotName, soName)
    USING INDEX TABLESPACE &&idxtspace
    OUTPUT: >> ALTER TABLE NEQResultByChunk
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    There has to be somethink hang somewhere since using a different name works for the constraint works ok. I could not find this constraint in user_constraints table.
    Any idea on where to look for it ?
    I already brought dow the DB.
    Thanks,
    Mike

    Why should i delete the index manually?
    In most cases, the index will be remove when i delete the corresponding constraint.

  • ORA-00604 error occured at recursive level1,ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,ORA-06512

    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad

    26bffcad-f9a2-4dcf-afa0-e1e33d0281bf wrote:
    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad
    ORA-20123 is a localized/customized error code & message; therefore any solution depends upon what is unique inside your DB now.
    I suspect that some sort of TRIGGER exists, which throws posted error, but this is just idle speculation on my part.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Getting error message Cannot Resolve Symbol when trying to compile a class

    Hello All -
    I am getting an error message cannot resolve symbol while trying to compile a java class that calls another java class in the same package. The called class compiles fine, but the calling class generates
    the following error message:
    D:\Apache Tomcat 4.0\webapps\examples\WEB-INF\classes\cal>javac
    ConnectionPool.java
    ConnectionPool.java:158: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    private void addConnection(PooledConnection value) {
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    The code is listed as follows for PooledConnection.java (it compiles fine)
    package cal;
    import java.sql.*;
    public class PooledConnection {
    // Real JDBC Connection
    private Connection connection = null;
    // boolean flag used to determine if connection is in use
    private boolean inuse = false;
    // Constructor that takes the passed in JDBC Connection
    // and stores it in the connection attribute.
    public PooledConnection(Connection value) {
    if ( value != null ) {
    connection = value;
    // Returns a reference to the JDBC Connection
    public Connection getConnection() {
    // get the JDBC Connection
    return connection;
    // Set the status of the PooledConnection.
    public void setInUse(boolean value) {
    inuse = value;
    // Returns the current status of the PooledConnection.
    public boolean inUse() {
    return inuse;
    // Close the real JDBC Connection
    public void close() {
    try {
    connection.close();
    catch (SQLException sqle) {
    System.err.println(sqle.getMessage());
    Now the code for ConnectionPool.java class that gives the cannot
    resolve symbol error
    package cal;
    import java.sql.*;
    import java.util.*;
    public class ConnectionPool {
    // JDBC Driver Name
    private String driver = null;
    // URL of database
    private String url = null;
    // Initial number of connections.
    private int size = 0;
    // Username
    private String username = new String("");
    // Password
    private String password = new String("");
    // Vector of JDBC Connections
    private Vector pool = null;
    public ConnectionPool() {
    // Set the value of the JDBC Driver
    public void setDriver(String value) {
    if ( value != null ) {
    driver = value;
    // Get the value of the JDBC Driver
    public String getDriver() {
    return driver;
    // Set the URL Pointing to the Datasource
    public void setURL(String value ) {
    if ( value != null ) {
    url = value;
    // Get the URL Pointing to the Datasource
    public String getURL() {
    return url;
    // Set the initial number of connections
    public void setSize(int value) {
    if ( value > 1 ) {
    size = value;
    // Get the initial number of connections
    public int getSize() {
    return size;
    // Set the username
    public void setUsername(String value) {
    if ( value != null ) {
    username = value;
    // Get the username
    public String getUserName() {
    return username;
    // Set the password
    public void setPassword(String value) {
    if ( value != null ) {
    password = value;
    // Get the password
    public String getPassword() {
    return password;
    // Creates and returns a connection
    private Connection createConnection() throws Exception {
    Connection con = null;
    // Create a Connection
    con = DriverManager.getConnection(url,
    username, password);
    return con;
    // Initialize the pool
    public synchronized void initializePool() throws Exception {
    // Check our initial values
    if ( driver == null ) {
    throw new Exception("No Driver Name Specified!");
    if ( url == null ) {
    throw new Exception("No URL Specified!");
    if ( size < 1 ) {
    throw new Exception("Pool size is less than 1!");
    // Create the Connections
    try {
    // Load the Driver class file
    Class.forName(driver);
    // Create Connections based on the size member
    for ( int x = 0; x < size; x++ ) {
    Connection con = createConnection();
    if ( con != null ) {
    // Create a PooledConnection to encapsulate the
    // real JDBC Connection
    PooledConnection pcon = new PooledConnection(con);
    // Add the Connection to the pool.
    addConnection(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // Adds the PooledConnection to the pool
    private void addConnection(PooledConnection value) {
    // If the pool is null, create a new vector
    // with the initial size of "size"
    if ( pool == null ) {
    pool = new Vector(size);
    // Add the PooledConnection Object to the vector
    pool.addElement(value);
    public synchronized void releaseConnection(Connection con) {
    // find the PooledConnection Object
    for ( int x = 0; x < pool.size(); x++ ) {
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // Check for correct Connection
    if ( pcon.getConnection() == con ) {
    System.err.println("Releasing Connection " + x);
    // Set its inuse attribute to false, which
    // releases it for use
    pcon.setInUse(false);
    break;
    // Find an available connection
    public synchronized Connection getConnection()
    throws Exception {
    PooledConnection pcon = null;
    // find a connection not in use
    for ( int x = 0; x < pool.size(); x++ ) {
    pcon = (PooledConnection)pool.elementAt(x);
    // Check to see if the Connection is in use
    if ( pcon.inUse() == false ) {
    // Mark it as in use
    pcon.setInUse(true);
    // return the JDBC Connection stored in the
    // PooledConnection object
    return pcon.getConnection();
    // Could not find a free connection,
    // create and add a new one
    try {
    // Create a new JDBC Connection
    Connection con = createConnection();
    // Create a new PooledConnection, passing it the JDBC
    // Connection
    pcon = new PooledConnection(con);
    // Mark the connection as in use
    pcon.setInUse(true);
    // Add the new PooledConnection object to the pool
    pool.addElement(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // return the new Connection
    return pcon.getConnection();
    // When shutting down the pool, you need to first empty it.
    public synchronized void emptyPool() {
    // Iterate over the entire pool closing the
    // JDBC Connections.
    for ( int x = 0; x < pool.size(); x++ ) {
    System.err.println("Closing JDBC Connection " + x);
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // If the PooledConnection is not in use, close it
    if ( pcon.inUse() == false ) {
    pcon.close();
    else {
    // If it is still in use, sleep for 30 seconds and
    // force close.
    try {
    java.lang.Thread.sleep(30000);
    pcon.close();
    catch (InterruptedException ie) {
    System.err.println(ie.getMessage());
    I am using Sun JDK Version 1.3.0_02" and Apache/Tomcat 4.0. Both the calling and the called class are in the same directory.
    Any help would be greatly appreciated.
    tnx..
    addi

    Is ConnectionPool in this "cal" package as well as PooledConnection? From the directory you are compiling from it appears that it is. If it is, then you are compiling it incorrectly. To compile ConnectionPool (and PooledConnection similarly), you must change the current directory to the one that contains cal and type
    javac cal/ConnectionPool.

  • ORA-01033 Error cannot be traced in the alert log or v$views

    Hello There,
    I'm hoping you can shed some light on what seems a rather odd occurrence on our Production Oracle Instance.
    Before i elaborate on the nature of the problem, I must confess that i am not an Oracle DBA and have been compelled to post this query since i have no joy from the in house DBA community on the origins of this error.
    We've had an ORA-01033 error being issued by our ETL installation (deployed on a Linux machine) a couple of days ago whence trying to extract some data from the Oracle instance (during overnight DataWarehouse loads) which has consequently aborted the loads necessitating a cleanup.
    This event has already occurred twice before, the first time being a month ago when the event was captured in the v$instance (using the Startup time column where the timestamp corroborates to the first time we experienced this issue and also ackowledged by the DBA team) and also in the V$Dataguard_status.
    Since then, This error has been generated twice although there seems to be no evidence of this in either the Oracle alert log(as confirmed by DBA team) or in any of the v$views (as pointed out by Tom in an earlier post) such as DBA_LOGSTDBY_HISTORY, v$logstdby_state, $logstdby_stats, dba_logstdby_log, dba_logstdby_events,v$dataguard_status, v$dataguard_stats, v$dataguard_config,v$database,v$database_incarnation, v$managed_standby, v$standby_log, v$instance. I searched these views since i suspected a latency issue during a failover which could be the reason for the
    ORA-01033 but found nothing.
    The DBA team have pretty much disowned this issue since they claim to not have any actual evidence of this from the logs and this is the crux of the matter here.
    The Problem i have as the downstream "recepient" of this error is to prove to the DBA team that this is indeed a genuine issue with the Oracle instance affecting it's availability and concomittantly affecting the DW loads.
    FYI, The Oracle instance is in Failover mode, so it's swiftly back online after bombing out for a few seconds.
    Also, I don't have access to the Alert log as it's a Production environment and employs restricted access policy to the server.
    Having said that, Is there anything else besides the obvious ORA errors that should be looked for in the Alert log?
    Where else can ORA-01033 errors be traced/traced in the Dictionary besides the Alert Log?
    Thoughts??
    Regards

    Thank You John for that query, but i'm on V10.2 and this view is relevant for 11g and beyond i believe.
    Perhaps there is an equivalent for V10g?
    I am also a bit bemused by the comment earlier about no trace being left behind if the DBA's performed a manual restart, surely it doesn't matter how the DB is restarted, the event is captured in the dictionary?
    In the meantime, I've got a copy of the Alert log and have found redo log issues (DBWR/LGWR) very close to the time (a min after ORA-01033) of the shutdown event.
    ALTER SYSTEM ARCHIVE LOG
    Thread 1 cannot allocate new log, sequence 117732
    Checkpoint not complete
    I've looked into this a fair bit and this error apparently causes Oracle to suspend all processing on the database until the log switch is made.
    Is this the causal link for my issue?
    Does " suspend all processing on the database " actually translate into an actual ORA-01033 error (or some form of) when the ETL application is trying to connect to and extract data from the Oracle database at that time?
    Edited by: shareeman on 16-Oct-2012 03:50

  • Class error - cannot resolve symbol "MyDocumentListener"

    Hello,
    this is a groaner I'm sure, but I don't see the problem.
    Newbie-itis probably ...
    I'm not concerned with what the class does, but it would be nice for the silly thing to compile!
    What the heck am I missing for "MyDocumentListener" ?
    C:\divelog>javac -classpath C:\ CenterPanel.java
    CenterPanel.java:53: cannot resolve symbol
    symbol : class MyDocumentListener
    location: class divelog.CenterPanel
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    ^
    CenterPanel.java:53: cannot resolve symbol
    symbol : class MyDocumentListener
    location: class divelog.CenterPanel
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    ^
    2 errors
    package divelog;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.lang.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    import javax.swing.text.*;
    public class CenterPanel extends JPanel implements ActionListener
    { // Opens class
    static private final String newline = "\n";
    private JTextArea comments;
    private JScrollPane scrollpane;
    private JButton saveButton, openButton;
    private JLabel whiteshark;
    private Box box;
    private BufferedReader br ;
    private String str;
    private JTextArea instruct;
    private File defaultDirectory = new File("C://divelog");
    private File fileDirectory = null;
    private File currentFile= null;
    public CenterPanel()
    { // open constructor CenterPanel
    setBackground(Color.white);
    comments = new JTextArea("Enter comments, such as " +
    "location, water conditions, sea life you observed," +
    " and problems you may have encountered.", 15, 10);
    comments.setLineWrap(true);
    comments.setWrapStyleWord(true);
    comments.setEditable(true);
    comments.setFont(new Font("Times-Roman", Font.PLAIN, 14));
    // add a document listener for changes to the text,
    // query before opening a new file to decide if we need to save changes.
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    comments.getDocument().addDocumentListener(myDocumentListener); // create the reference for the class
    // ------ Document listener class -----------
    class MyDocumentListener implements DocumentListener {
    public void insertUpdate(DocumentEvent e) {
    Calculate(e);
    public void removeUpdate(DocumentEvent e) {
    Calculate(e);
    public void changedUpdate(DocumentEvent e) {
    private void Calculate(DocumentEvent e) {
    // do something here
    scrollpane = new JScrollPane(comments);
    scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    saveButton = new JButton("Save Comments", new ImageIcon("images/Save16.gif"));
    saveButton.addActionListener( this );
    saveButton.setToolTipText("Click this button to save the current file.");
    openButton = new JButton("Open File...", new ImageIcon("images/Open16.gif"));
    openButton.addActionListener( this );
    openButton.setToolTipText("Click this button to open a file.");
    whiteshark = new JLabel("", new ImageIcon("images/gwhite.gif"), JLabel.CENTER);
    Box boxH;
    boxH = Box.createHorizontalBox();
    boxH.add(openButton);
    boxH.add(Box.createHorizontalStrut(15));
    boxH.add(saveButton);
    box = Box.createVerticalBox();
    box.add(scrollpane);
    box.add(Box.createVerticalStrut(10));
    box.add(boxH);
    box.add(Box.createVerticalStrut(15));
    box.add(whiteshark);
    add(box);
    } // closes constructor CenterPanel
    public void actionPerformed( ActionEvent evt )
    { // open method actionPerformed
    JFileChooser jfc = new JFileChooser();
    // these do not work !!
    // -- set the file types to view --
    // ExtensionFileFilter filter = new ExtensionFileFilter();
    // FileFilter filter = new FileFilter();
    //filter.addExtension("java");
    //filter.addExtension("txt");
    //filter.setDescription("Text & Java Files");
    //jfc.setFileFilter(filter);
         //Add a custom file filter and disable the default "Accept All" file filter.
    jfc.addChoosableFileFilter(new JTFilter());
    jfc.setAcceptAllFileFilterUsed(false);
    // -- open the default directory --
    // public void setCurrentDirectory(File dir)
    // jfc.setCurrentDirectory(new File("C://divelog"));
    jfc.setCurrentDirectory(defaultDirectory);
    jfc.setSize(400, 300);
    jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    Container parent = saveButton.getParent();
    //========================= Test Button Actions ================================
    //========================= Open Button ================================
    if (evt.getSource() == openButton)
    int choice = jfc.showOpenDialog(CenterPanel.this);
    File file = jfc.getSelectedFile();
    /* a: */
    if (file != null && choice == JFileChooser.APPROVE_OPTION)
    String filename = jfc.getSelectedFile().getAbsolutePath();
    // -- compare the currentFile to the file chosen, alert of loosing any changes to currentFile --
    // If (currentFile != filename)
    // -- get the current directory name -------
    // public File getCurrentDirectory( );
    File f=new File(System.getProperty("user.dir"));
    fileDirectory = jfc.getCurrentDirectory();
    // -- remember the last directory used --
    if (defaultDirectory != fileDirectory)
    {defaultDirectory = fileDirectory;}
    try
    { //opens try         
    comments.getLineCount( );
    // -- clear the old data before importing the new file --
    comments.selectAll();
    comments.replaceSelection("");
    // -- get the new data ---
    br = new BufferedReader (new FileReader(file));
    while ((str = br.readLine()) != null)
    {//opens while
    comments.append(str);
    } //closes while
    } // close try
    catch (IOException ioe)
    { // open catch
    comments.append(newline +"Open command not successful:" + ioe + newline);
    } // close catch
    // ---- display the values of the directory variables -----------------------
    comments.append(
    newline + "The f directory variable contains: " + f +
    newline + "The fileDirectory variable contains: " + fileDirectory +
    newline + "The defaultDirectory variable contains: " + defaultDirectory );
    else
    comments.append("Open command cancelled by user." + newline);
    } //close if statement /* a: */
    //========================= Save Button ================================
    } else if (evt.getSource() == saveButton)
    int choice = jfc.showSaveDialog(CenterPanel.this);
    if (choice == JFileChooser.APPROVE_OPTION)
    File fileName = jfc.getSelectedFile();
    // -- get the current directory name -------
    // public File getCurrentDirectory( );
    File f=new File(System.getProperty("user.dir"));
    fileDirectory = jfc.getCurrentDirectory();
    // -- remember the last directory used --
    if (defaultDirectory != fileDirectory)
    {defaultDirectory = fileDirectory;}
    //check for existing files. Warn users & ask if they want to overwrite
    for(int i = 0; i < fileName.length(); i ++) {
    File tmp = null;
    tmp = (fileName);
    if (tmp.exists()) // display pop-up alert
    //public static int showConfirmDialog( Component parentComponent,
    // Object message,
    // String title,
    // int optionType,
    // int messageType,
    // Icon icon);
    int confirm = JOptionPane.showConfirmDialog(null,
    fileName + " already exists on " + fileDirectory
    + "\n \nContinue?", // msg
    "Warning! Overwrite File!", // title
    JOptionPane.OK_CANCEL_OPTION, // buttons displayed
                        // JOptionPane.ERROR_MESSAGE
                        // JOptionPane.INFORMATION_MESSAGE
                        // JOptionPane.PLAIN_MESSAGE
                        // JOptionPane.QUESTION_MESSAGE
    JOptionPane.WARNING_MESSAGE,
    null);
    if (confirm != JOptionPane.YES_OPTION)
    { //user cancels the file overwrite.
    try {
    jfc.cancelSelection();
    break;
    catch(Exception e) {}
    // ----- Save the file if everything is OK ----------------------------
    try
    { // opens try
    BufferedWriter bw = new BufferedWriter(new FileWriter(fileName));
    bw.write(comments.getText());
    bw.flush();
    bw.close();
    comments.append( newline + newline + "Saving: " + fileName.getName() + "." + newline);
    break;
    } // closes try
    catch (IOException ioe)
    { // open catch
    comments.append(newline +"Save command unsuccessful:" + ioe + newline);
    } // close catch
    } // if exists
    } //close for loop
    else
    comments.append("Save command cancelled by user." + newline);
    } // end-if save button
    } // close method actionPerformed
    } //close constructor CenterPanel
    } // Closes class CenterPanel

    There is no way to be able to see MyDocumentListener class in the way you wrote. The reason is because MyDocumentListener class inside the constructor itself. MyDocumentListener class is an inner class, not suppose to be inside a constructor or a method. What you need to do is simple thing, just move it from inside the constructor and place it between two methods.
    that's all folks
    Qusay

Maybe you are looking for

  • How to add event handler for outlook build in control through programmatically

    Hi,<o:p></o:p>      There is requirement in my plug in where i need to intercept outlook native attach file method.If user attach more than specified exchange limit , i need to perform some operatoin. I found  that there is way to add "Onaction" meth

  • Array data type in SQL server

    Hi there, I have stored procedure which does have array data type. recently we have migrated oracle to SQL server but this array datatype doesn't support in SQL server. How can we rewrite this stored procedure to make it work exactly same as Oracle S

  • [URGENT]Error in OWSM gateway.

    Hi Mathias , Oracle SOA suite version: 10.1.3.1.0 I started the OWSM with the quick start tutorial. Instead of using the time service I used another service deployed. When I started I had created a gateway which I then deleted. Then I created a new g

  • EPS File not vector??

    Hey all, Working with a company that has about 10 Logos for product lines in EPS format.. When I open them in illustrator they are not vector. Anything on my end that I could be messing up that would cause this? I did not create these logos so I am u

  • Query regarding portability of MS Project

    We are looking to purchase MS project 2013 standard for business purpose. We require a single user license and are planning to have the software purchased online through Microsoft website. However, before we purchase we wanted to confirm whether it i