Catproc.sql gives ORA-02303: cannot drop or replace a type with type or tab

I am running catproc.sql and am seeing several of the following errors. Appreciate any insight into the problem. Thanks..
CREATE OR REPLACE TYPE ODCIObject AS object
ERROR at line 1:
ORA-02303: cannot drop or replace a type with type or table dependents
CREATE OR REPLACE TYPE ODCIObjectList AS VARRAY(32) of ODCIObject;
ERROR at line 1:
ORA-02303: cannot drop or replace a type with type or table dependents

I am in the process of doing a test upgrade of Oracle E-business 11.0.3 with Oracle 8.0.6 to Oracle E-business 11.5.10.2 with Oracle 9.2.0.
I am following the upgrade manual:
Oracle Applications – Upgrading Oracle Applications
Release 11i (11.5.10.2)
Part No. B19297-01
I have already upgraded the database from 8.0.6 to 9.2.0 using the Oracle database migration utility at the appropriate point in the instructions.
After upgrading the database to 9.2.0 as stated in this manual, one of the of the next Oracle Application pre-upgrade tasks is to execute a script called addb920_nt.sql which in turn executes catalog.sql and catproc.sql. I am seeing these errors when catproc.sql is executed.
I have logged an Oracle Support SR and am awaiting a response, but wanted to know if anyone had seen similar issues.
Thanks,
Alma

Similar Messages

  • ORA-02303: cannot drop or replace a type with type or table dependents

    Oracle 10.2.0.3 on solaris :
    I am trying to do a
    CREATE OR REPLACE TYPE WickType_StringArray AS TABLE OF VARCHAR2(256);
    I am getting the error :
    ORA-02303: cannot drop or replace a type with type or table dependents
    I then looked for the dependencies :
    select * from dba_dependencies where name = 'WICKTYPE_STRINGARRAY' and owner='HARPER';
    (Columns below with values are delimited by pipe | )
    OWNER|NAME|TYPE|REFERENCED_OWNER|REFERENCED_NAME|REFERENCED_TYPE|REFERENCED_LINK_NAME|DEPENDENCY_TYPE
    HARPER|WICKTYPE_STRINGARRAY|TYPE|SYS|STANDARD|PACKAGE||HARD     
    What is the best way for me to proceed to get my CREATE OR REPLACE statement working ?
    Thanks

    Well you could move to 11g but I'd suggest a less drastic measure for now. Save the data, drop the table, reload the table.
    But give serious consideration to Tom Kyte's advice about object tables: Don't use them. Instead use relational tables and object views.

  • Java.sql.SQLSyntaxErrorException: ORA-02014: cannot select FOR UPDATE from

    Experts,
    I am getting "java.sql.SQLSyntaxErrorException: ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc" exception and it leads to one or more setter methods of the VO. I checked the respective attribute in the VO to see if it refers to any LOV with sql having Distinct or group by clause, but it is a normal attribute.
    Any idea how do i resolve this error ?
    Error Stack::
    java.sql.SQLSyntaxErrorException: ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:924)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1261)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1419)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:135)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:869)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:553)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8259)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5964)
         at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:3756)
         at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:3635)
         at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:3203)
         at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:1971)
         at oracle.jbo.server.AttributeDefImpl.resolveSet(AttributeDefImpl.java:3412)
         at oracle.jbo.server.EntityImpl.setAttrInvokeAccessor(EntityImpl.java:1952)
         at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:1879)
         at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:2327)
         at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:2131)
         at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:1427)
         at com.awRostamani.leadWeb.model.uiView.PartyVORowImpl.setNationality(PartyVORowImpl.java:2103)
         at com.awRostamani.leadWeb.model.uiView.PartyVORowImpl$AttributesEnum$19.put(PartyVORowImpl.java:207)
         at com.awRostamani.leadWeb.model.uiView.PartyVORowImpl.setAttrInvokeAccessor(PartyVORowImpl.java:4204)
         at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:1063)
         at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:1003)
         at oracle.jbo.server.ViewRowImpl.setAttributeValues(ViewRowImpl.java:1677)
         at oracle.adf.model.binding.DCDataControl.setAttributesInRow(DCDataControl.java:2427)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.setAttributeValuesInRow(JUCtrlValueBinding.java:967)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.setTargetAttrsFromLovRow(JUCtrlListBinding.java:2778)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.updateTargetFromSelectedValue(JUCtrlListBinding.java:2906)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.setAttributeFromValueList(JUCtrlListBinding.java:2851)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.setSelectedIndex(JUCtrlListBinding.java:1745)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.setInputValueInRow(JUCtrlListBinding.java:3499)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.setInputValue(JUCtrlValueBinding.java:2804)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.setInputValue(JUCtrlValueBinding.java:2767)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.setInputValue(FacesCtrlListBinding.java:226)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.put(JUCtrlValueBinding.java:2424)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.put(JUCtrlListBinding.java:3395)
         at javax.el.MapELResolver.setValue(MapELResolver.java:229)
         at com.sun.faces.el.DemuxCompositeELResolver._setValue(DemuxCompositeELResolver.java:252)
         at com.sun.faces.el.DemuxCompositeELResolver.setValue(DemuxCompositeELResolver.java:278)
         at com.sun.el.parser.AstValue.setValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.setValue(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.updateModel(UIXEditableValue.java:289)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.processUpdates(UIXEditableValue.java:252)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$UpdateModelValuesCallback.invokeContextCallback(LifecycleImpl.java:1320)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1410)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnNamingContainerComponent(UIXComponentBase.java:1380)
         at oracle.adf.view.rich.component.fragment.UIXRegion.invokeOnComponent(UIXRegion.java:555)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.invokeOnComponent(ContextSwitchingComponent.java:194)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at oracle.adf.view.rich.component.fragment.UIXInclude.invokeOnComponent(UIXInclude.java:147)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at oracle.adf.view.rich.component.rich.RichDocument.invokeOnComponent(RichDocument.java:168)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:678)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.awRostamani.leadWeb.ui.filter.SecurityCheckFilter.doFilter(SecurityCheckFilter.java:80)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    thnks

    When trying to commit from business tester, then also the following error is coming
    Jdev 11.1.1.5 - locking mode is optimistic.
    OracleSQLBuilderImpl.doEntitySelect failed...
    java.sql.SQLSyntaxErrorException: ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:924)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1261)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1419)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:869)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:553)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8259)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5964)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6484)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6665)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3286)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3089)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2093)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2374)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1608)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1416)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2149)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
         at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
         at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:111)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    [348] JUErrorHandlerDlg.reportException(oracle.jbo.DMLException)
    [349] DBG: afterActionPerformed :javax_swing_JToolBara1_175
    Edited by: in the line of fire on Jul 12, 2011 2:54 PM

  • SQL Error: ORA-04092: cannot COMMIT in a trigger

    Trying to drop the table inside the trigger but i'm unable to do it.
    SQL Error: ORA-04092: cannot COMMIT in a trigger
    I need to drop the table based on the some condition say condition is the archive table with more than millions of records which is of no use so i plan to drop the table.
    I will be inserting the the unwanted table to mytable ,mytable which is having the trigger will fire to drop the table.
    I need this to be done on automatic basis so i have chosen trigger.
    is there anyway of automatic other than trigger in this case.

    933663 wrote:
    Trying to drop the table inside the trigger but i'm unable to do it.
    SQL Error: ORA-04092: cannot COMMIT in a trigger
    I need to drop the table based on the some condition say condition is the archive table with more than millions of records which is of no use so i plan to drop the table.
    I will be inserting the the unwanted table to mytable ,mytable which is having the trigger will fire to drop the table.
    I need this to be done on automatic basis so i have chosen trigger.
    is there anyway of automatic other than trigger in this case.You can't COMMIT inside a trigger. Oracle issue an auto COMMIT before and after the execution of DDL. So you can't use DDL in trigger. You may get suggestion to use AUTONOMOUS_TRANSACTION to perform COMMIT within tirgger. But dont do that. Its wrong idea.
    I will suggest you look back into your requirement and see what exactly you want. You could schedule a job that runs on a daily basis that will pick up the object details from your table and drop them accordingly.

  • ORA-01940: cannot drop a connected user... No entries in v$session.

    Hi DBAs,
    Its on Linux Ubuntu... I want to drop a user. Getting error as below. When I check for connected sessions, I find no entries in v$session. Any other alternative? Please help!!!
    EGOVDBA@qadb> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    EGOVDBA@qadb> drop user egov_integrated cascade;
    drop user egov_integrated cascade
    ERROR at line 1:
    ORA-01940: cannot drop a user that is currently connected
    EGOVDBA@qadb> select username, osuser, machine, terminal, sid, serial# from v$session where username='EGOV_INTEGRATED';
    no rows selected
    EGOVDBA@qadb> drop user egov_integrated cascade;
    drop user egov_integrated cascade
    ERROR at line 1:
    ORA-01940: cannot drop a user that is currently connected

    oracle@hp2:~$ ps -ef | grep oracle
    oracle 7011 1 0 Mar31 ? 00:03:18 /orclins/u01/app/oracle/bin/tnslsnr LISTENER -inherit
    oracle 7166 1 0 Mar31 ? 00:00:08 ora_pmon_qadb
    oracle 7168 1 0 Mar31 ? 00:00:00 ora_psp0_qadb
    oracle 7170 1 0 Mar31 ? 00:00:16 ora_mman_qadb
    oracle 7172 1 0 Mar31 ? 00:01:32 ora_dbw0_qadb
    oracle 7174 1 0 Mar31 ? 00:01:47 ora_lgwr_qadb
    oracle 7176 1 0 Mar31 ? 00:00:08 ora_ckpt_qadb
    oracle 7178 1 0 Mar31 ? 00:00:42 ora_smon_qadb
    oracle 7180 1 0 Mar31 ? 00:00:00 ora_reco_qadb
    oracle 7182 1 0 Mar31 ? 00:00:09 ora_cjq0_qadb
    oracle 7184 1 0 Mar31 ? 00:00:06 ora_mmon_qadb
    oracle 7186 1 0 Mar31 ? 00:00:13 ora_mmnl_qadb
    oracle 7188 1 0 Mar31 ? 00:00:00 ora_d000_qadb
    oracle 7190 1 0 Mar31 ? 00:00:00 ora_s000_qadb
    oracle 7275 1 0 Mar31 ? 00:00:00 ora_qmnc_qadb
    oracle 7277 1 0 Mar31 ? 00:00:00 ora_q000_qadb
    oracle 7280 1 0 Mar31 ? 00:00:00 ora_q001_qadb
    oracle 7765 1 0 Mar31 ? 00:00:01 oracleqadb (LOCAL=NO)
    oracle 7767 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 7769 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 7771 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 7773 1 0 Mar31 ? 00:00:01 oracleqadb (LOCAL=NO)
    oracle 17325 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17327 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17329 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17331 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17333 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17337 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17339 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17341 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17343 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17345 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20219 1 15 Mar31 ? 02:07:49 oracleqadb (LOCAL=NO)
    oracle 20221 1 16 Mar31 ? 02:11:16 oracleqadb (LOCAL=NO)
    oracle 20227 1 15 Mar31 ? 02:00:44 oracleqadb (LOCAL=NO)
    oracle 20229 1 13 Mar31 ? 01:46:38 oracleqadb (LOCAL=NO)
    oracle 20376 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20378 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20380 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20382 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20384 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 21336 1 0 00:00 ? 00:04:15 ora_j000_qadb
    oracle 24611 1 0 07:50 ? 00:00:00 oracleqadb (LOCAL=NO)
    root 25225 6477 0 08:37 ? 00:00:00 sshd: oracle [priv]
    oracle 25227 25225 0 08:37 ? 00:00:00 sshd: oracle@pts/0
    oracle 25228 25227 0 08:37 pts/0 00:00:00 -bash
    oracle 25273 1 0 08:41 ? 00:00:02 ora_j001_qadb
    oracle 26011 1 0 09:27 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 26012 25228 0 09:27 pts/0 00:00:00 ps -ef
    oracle 26013 25228 0 09:27 pts/0 00:00:00 grep oracle
    oracle@hp2:~$

  • ORA-12983: cannot drop all columns in a table

    Hi,
    I am creating a table with two columns.
    I have modified a column as unused using ALTER statement.
    After that i have tried to drop the another column by using ALTER statement.
    But it throws an error ORA-12983: cannot drop all columns in a table.
    is it not possible to achieve this via ALTER statement?
    thanks

    is there any other way to find the name of the columns which have been marked as unused?Don't think so, and you would not be able to do much about. You won't be able to reference it, you won't be able to un-unuse it, and you would even be able to add a new column having same name.
    Why are you using SET UNUSED in the first place?
    Regards
    Peter
    Quoting myself:
    You won't be able to reference itMaybe not good enough:
    SQL> select column_name, data_type, segment_column_id
      from user_tab_cols
    where table_name = 'T';
    COLUMN_NAME                    DATA_TYPE   SEGMENT_COLUMN_ID
    SYS_C00001_11051618:28:14$     NUMBER                      1
    B                              NUMBER                      2
    SYS_C00003_11051618:28:14$     NUMBER                      3
    3 rows selected.
    select "SYS_C00003_11051618:28:14$" from t
    Error at line 1
    ORA-00904: "SYS_C00003_11051618:28:14$": invalid identifier
    SQL> alter table t drop column "SYS_C00001_11051618:28:14$";
    Table altered.
    SQL> select column_name, data_type, segment_column_id
      from user_tab_cols
    where table_name = 'T';
    COLUMN_NAME                    DATA_TYPE   SEGMENT_COLUMN_ID
    B                              NUMBER                      
    1 row selected.
    Note: Both columns "disappeared"  Thanks MichaelS
    Edited by: Peter on May 16, 2011 9:29 AM

  • Java.sql.SQLException: ORA-01157: cannot identify/lock data file 7 - see DB

    I am deploying my application components on Oracle RAC database, when i install my app component i will run a script which creates a user and tablespace on bot rac-nodes(node1 and node2)
    as database is clustered, the user are created on 2 nodes and tablespace is stored in a shared location for two rac nodes
    i am able to successfully run my script on rac-node1 and and installed my component and when i started installing the app component on node2 getting error
    java.sql.SQLException: ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
    ORA-01110: data file 7: '/db/db/db/ora10g/10.2.0/admin/dbadmin_01.dbf'
    ORA-06512: at "ADMIN.XL_SP_DBCHECK", line 48
    ORA-06512: at line 1
    "dbadmin_01.dbf is the custom tablespace which created by me"
    i a mgetting error while installing the app component on rac-node2

    You should not create database files outside of the ASM.
    I'm not sure you can move the datafile, I would export the data from the tablespace (if there is data you need there), delete the tablespace and recreate it in the ASM, then import the data back.
    If you want to move the datafile, you can try using RMAN (from node1).
    First connect to the database with sqlplus and execute:
    alter tablespace <tbs_name> offline;Then start RMAN: rman target /
    BACKUP AS COPY DATAFILE '<file>' FORMAT '+<ASM_DG>';Then in sqlplus, execute:
    alter tablespace <tbs_name> online;I'm not sure it will work, and I hope I got the commands right because I can't check it right now.
    Good luck
    Liron Amitzi
    Senior DBA consultant
    [www.dbsnaps.com]
    [www.orbiumsoftware.com]

  • Java.sql.SQLException: ORA-01157: cannot identify/lock data file : PLz Help

    My datafiles are in ASM file system, however the only one file ACIPEN_DATA is the one, which is not in ASM file system, and this the file which is in concern.
    We are getting the following exception in the lxkratgas1.lex1.lexmark.com when connecting to ACIPEN_DATA.
    This exception is coming up sometimes and the sometimes the file is getting processed successfully
    Caused by: java.sql.SQLException: ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
    ORA-01110: data file 9: '/oracle/SE/product/10.2.0/db_1/dbs/ACIPEN_DATA'
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1169)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:278)
    at atg.adapter.gsa.SQLStatement.executeUpdate(SQLStatement.java:725)
    at atg.adapter.gsa.Table.insert(Table.java:1378)
    at atg.adapter.gsa.GSAItemDescriptor.addItem(GSAItemDescriptor.java:6272)
    ... 61 more
    ====================================================================
    We have checked the datafile, it is absolutely online.
    Can some expert jump in and resolve this issue Please.

    01157, 00000, "cannot identify/lock data file %s - see DBWR trace file"
    // *Cause:  The background process was either unable to find one of the data
    //         files or failed to lock it because the file was already in use.
    //         The database will prohibit access to this file but other files will
    //         be unaffected. However the first instance to open the database will
    //         need to access all online data files. Accompanying error from the
    //         operating system describes why the file could not be identified.
    // *Action: Have operating system make file available to database. Then either
    //         open the database or do ALTER SYSTEM CHECK DATAFILES.is this a RAC database?

  • Java.sql.SQLException: ORA-24813: cannot send or receive an unsupported LOB

    Hello everyone:
    Our JSP application with a whole bunch of classes talks to an Oracle database using JDBC. The Oracle DB was 9i, but we upgraded to 10g. When this happened, we get the following error during processing a call that brings out a clob out of the DB.
    java.sql.SQLException: ORA-24813: cannot send or receive an unsupported LOB
    I googled the error message to find out that it is caused by the difference in versions of the Oracle.
    Thus, here is an interesting point. When the app had 10g on his side and the database being 9i, everything worked fine. But, now that they are both of 10g, it does not work.
    Does anyone have any idea what's causing this error?
    Thank you in advance for your help.
    Sincerely,
    Yosep

    Just to add in some more background to this problem...
    The app machine has Oracle 10g under c://oracle/product/10.2. Since this is only copy of Oracle, this lead me to believe that 10g is what the app is using to connect to the DB through its JDBC classes.
    Another interesting point is that the app is JSP/java solution via Tomcat. So, perhaps Tomcat provides its own JDBC kind of libraries?
    Any help or comments would be greatly appreciated.
    Yosep

  • Java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."DESCRIPTION"."TYPE")

    insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('','','',41)
    java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."DESCRIPTION"."TYPE")
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:112)
    at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:474)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1125)
    at com.event.struts.InsertDetails.doPost(InsertDetails.java:78)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source
    and i my
    Action class is
    public class InsertDetails extends HttpServlet{
    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException, IOException {
    // TODO Auto-generated method stub
    Connection conn = null;
    try{
    List list = (List) req.getSession().getAttribute("listbean");
    InputBean ib = (InputBean) list.get(0);
    InputBean ib1 = (InputBean) list.get(1);
    InputBean ib2 = (InputBean) list.get(2);
    InputBean ib3 = (InputBean) list.get(3);
    InputBean ib4 = (InputBean) list.get(4);
    InputBean ib5 = (InputBean) list.get(5);
    InputBean ib6 = (InputBean) list.get(6);
    InputBean ib7 = (InputBean) list.get(7);
    conn = ConnectionUtils.getConnection();
    Statement stmt = conn.createStatement();
    String sql1 = "select seq.nextval from DUAL";
    ResultSet rs1 = stmt.executeQuery(sql1);
    rs1.next();
    int event_id = rs1.getInt(1);
    //Advanced and general info
    String sql2 = "insert into EVENT_INFO (EVENT_ID,EVENT_NAME,SHORT_NAME,EVENT_START_DATE,EVENT_END_DATE,EVENT_START_TIME,EVENT_END_TIME,event_LOCATION,ADDRESS1,ADDRESS2,CITY,STATE,ZIP_CODE,COUNTRY,event_COMMENT,EVENT_OVERVIEW,EXTRA1,EXTRA2,MEMBERSHIP_OPTION,EXTRA3,EXTRA4,EXTRA5,KID,TEEN,ADULT,SENIOR,SENILE,EVENT_TYPE1,EVENT_TYPE2,DETAILED_DESCRIPTION,IS_DETAILED_DESCRIPTION_HTML,ADDITIONAL_URL,BYPASS_INFORMATION_PAGE,CANCELLATION_POLICY,ADDTIONAL_INFO) values("+event_id+",'"+ib.getName()+"','"+ib.getShortname()+"','"+ib.getStartdate()+
    "','"+ib.getEnddate()+"','"+ib.getStarttime()+"','"+ib.getEndtime()+"','"+ib.getLocation()+"','"+ib.getAddress1()+"','"+ib.getAddress2()+"','"+
    ib.getCity()+"','"+ib.getState()+"','"+ib.getZip()+"','"+ib.getCountry()+"','"+ib.getComment()+"','"+ib.getTextarea()+"','"+ib.getExtra1()+"','"+
    ib.getExtra2()+"','"+ib.getExtra3()+"','"+ib.getExtra4()+"','"+ib.getExtra5()+"','"+ib.getExtra6()+"','"+ib.getExtra7()+"','"+ib.getExtra8()+"','"+
    ib.getExtra9()+"','"+ib.getExtra10()+"','"+ib.getExtra11()+"','"+ib.getExtra12()+"','"+ib.getExtra13()+"','"+ib1.getTextarea()+"','"+ib1.getExtra1()+"','"+
    ib1.getName()+"','"+ib1.getExtra2()+"','"+ib2.getCancellation_policy()+"','"+ib2.getTextarea()+"')";
    stmt.executeQuery(sql2);
    //Description
    List list1 = (List) ib2.getList();
    DescriptionBean db = (DescriptionBean) list1.get(0);
    DescriptionBean db1 = (DescriptionBean) list1.get(1);
    DescriptionBean db2 = (DescriptionBean) list1.get(2);
    DescriptionBean db3 = (DescriptionBean) list1.get(3);
    DescriptionBean db4 = (DescriptionBean) list1.get(4);
    DescriptionBean db5 = (DescriptionBean) list1.get(5);
    DescriptionBean db6 = (DescriptionBean) list1.get(6);
    if(db.getDescription()!=" "){
    String s1 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db.getDescription()+"','"+db.getTextarea()+"','"+db.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s1);
    if(db1.getDescription()!=" "){
    String s2 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db1.getDescription()+"','"+db1.getTextarea()+"','"+db1.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s2);
    if(db2.getDescription()!=" "){
    String s3 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db2.getDescription()+"','"+db2.getTextarea()+"','"+db2.getHtmlbutton()+"',"+event_id+")";
    System.out.println(s3);
    stmt.executeQuery(s3);
    if(db3.getDescription()!=" "){
    String s4 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db3.getDescription()+"','"+db3.getTextarea()+"','"+db3.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s4);
    if(db4.getDescription()!=" "){
    String s5 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db4.getDescription()+"','"+db4.getTextarea()+"','"+db4.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s5);
    if(db5.getDescription()!=" "){
    String s6 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db5.getDescription()+"','"+db5.getTextarea()+"','"+db5.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s6);
    if(db6.getDescription()!=" "){
    String s7 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db6.getDescription()+"','"+db6.getTextarea()+"','"+db6.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s7);
    //Activity
    String sql3 = "insert into ACTIVITY (ACTIVITY_NAME,ACTIVITY_START_DATE,ACTIVITY_END_DATE,ACTIVITY_START_TIME,ACTIVITY_END_TIME,TYPE,CAPACITY,EVENT_ID) values('"+ib3.getName()+"','"+ib3.getStartdate()+"','"+
    ib3.getEnddate()+"','"+ib3.getStarttime()+"','"+ib.getEndtime()+"','"+ib3.getExtra1()+"',"+event_id+")";
    stmt.executeQuery(sql3);
    i put condition for null .But if i dont fill the fields,even then the executeQuery is executing without checking the condition.
    wht is the problem
    what i want to change in my code.

    1. Use code tags when you post code.
    2. Use prepared statements.
    3. If you have a field that requires a non-null entry then you must provide a non-null value. And for Oracle that means non-empty as well.

  • Java.sql.SQLException:ORA-01407: cannot update ("WAVESET", "TASK", "XML")

    Hi,
    We are currently facing the above mentioned error while trying to install Sun IdM 7.1 in WebSphere 6.0. The same ear works fine in all my other environments (all are WebSphere 5). This is what we did
    1. Took a copy of the ear thats works.
    2. Extract.
    3. Modified the serverrepository.xml by using the lh command. Use the newly generated xml file in the extracted folder (WEB-INF), Pack it to a new EAR
    4. Configure the datasource that will be used to communicate with the Index repository.
    5. Deploy.
    Deployment completes successfully. However, when we try to run a task, or import file using IdM admin console, we get this error 'java.sql.SQLException:ORA-01407: cannot update ("WAVESET", "TASK", "XML") to NULL'. we even checked the user permissions on this db schema. they all look good.
    We also checked if we are using the right iiop port number in lh command.
    We arent sure what could be the issue. I am not able to simulate this issue in other environment, as they all turn out to be successful.
    any pointers?
    thanks.

    I still think it's a jdbc error.what is your DB platform?
    is you ServerRepository.xml configured with a jndi data source (and that's why you use iiop)? If so then try to create a new connection through a direct DB URL like:
    lh setRepo -tDBTYPE -uURL -Uusername -Ppassword -n -oServerRepository.xml
    and then try to re-run your update command. if it fails again then please post the complete error message.. hope this helps

  • Getting error SQL Error : ORA-14551: cannot perform a DML operation inside a query

    Hi gurus ,
    Your help is greatly appreciated ..
    I am doing some changes in the fucntion for an existing package .Introducing the new below check , am updating one of the tables based on a if condition ..
           IF  numALLOWED_COUNT >= numLAST_COUNT_ADDED+1  THEN
                     blnGDS_Allowed :=True;
                      varSTMT := 'UPDATE PROD.TMS_PROCESS_COUNTER ';
                      varSTMT := varSTMT ||' SET last_count_added = last_count_added+1';
                      varSTMT := varSTMT ||' WHERE process_name = ''DAILY_GDS_COUNT''';
                      varSTMT := varSTMT ||' AND COUNTER_IND = ''750FD130''';
                     PROC_LOG('Update Tms_Process_counter varSTMT --' || varSTMT);
                     IF INSERT_BATCH(99,varSTMT) > 0 THEN
                        NULL;
                     END IF;
    Function for insert_batch :
    UNCTION INSERT_BATCH(numTABLE_ID IN NUMBER, varSQL_STATEMENT IN VARCHAR2) RETURN NUMBER IS
    varINSERT_BATCH_STMT  VARCHAR2(32767)     := NULL;
    varADD_REC_TYPE       BATCH_TABLES.ADD_REC_TYPE%TYPE;
    BEGIN
        PROC_LOG( 'INSIDE INSERT_BATCH IRC : ' || varSQL_STATEMENT );  --IRC 9/20 UC
        INSERT INTO BATCH_STATEMENT(QUEUE_ID,TABLE_ID,STATEMENT,QUEUE_SEQUENCE_ID)
        VALUES (numQUEUE_ID,numTABLE_ID,varSQL_STATEMENT,1);
    RETURN 1;
    EXCEPTION WHEN OTHERS THEN
        PROC_LOG('Failed in INSERT_BATCH');
        PROC_LOG('SQL Error : ' || SUBSTR(SQLERRM,1,1000));
        RETURN -1;
    END INSERT_BATCH;
    desc PROD.BATCH_STATEMENT
      QUEUE_ID           NUMBER(15)                 NOT NULL
      TABLE_ID           NUMBER(2)                  NOT NULL
      STATEMENT          VARCHAR2(4000 BYTE)        NOT NULL
      QUEUE_SEQUENCE_ID  NUMBER(5)                  NOT NULL
    Some how when its calling the insert_batch , its giving me the error in the logs as below:
    04:01:41 - Update Tms_Process_counter varSTMT --UPDATE PROD.TMS_PROCESS_COUNTER  SET last_count_added = last_count_added+1 WHERE process_name = 'DAILY_GDS_COUNT' AND COUNTER_IND = '750FD130'
    04:01:41 - INSIDE INSERT_BATCH IRC : UPDATE PROD.TMS_PROCESS_COUNTER  SET last_count_added = last_count_added+1 WHERE process_name = 'DAILY_GDS_COUNT' AND COUNTER_IND = '750FD130'
    04:01:41 - Failed in INSERT_BATCH
    04:01:41 - SQL Error : ORA-14551: cannot perform a DML operation inside a query

    Some how when its calling the insert_batch , its giving me the error in the logs as below:
    04:01:41 - SQL Error : ORA-14551: cannot perform a DML operation inside a query
    Yes - and the exception is telling you EXACTLY what the problem is. You have a query
    IF INSERT_BATCH(99,varSTMT) > 0 THEN
    And you are performing a DML operation inside that query:
    INSERT INTO BATCH_STATEMENT(QUEUE_ID,TABLE_ID,STATEMENT,QUEUE_SEQUENCE_ID)
        VALUES (numQUEUE_ID,numTABLE_ID,varSQL_STATEMENT,1);
    Like the exception says: you can't do that.
    You need to call the function using PL/SQL and capture the return value into a variable. Then test that variable:
    myVar := INSERT_BATCH(99,varSTMT);
    if myVar > 0 THEN

  • Help with circumvention of ORA-01472: cannot use connect by on view with ..

    Hi,
    Any help resolving the following would be v. helpful.
    The Aim
    Produce a hierarchical report of all users and the privileges they have via the various roles they are granted.
    The SQL
    select lpad(' ', level*2,' ')|| granted_role from (select grantee, granted_role
    from dba_role_privs
    union
    select role, granted_role
    from role_role_privs
    union
    select role, privilege
    from role_sys_privs
    union
    select 'All users', username
    from dba_users)
    start with grantee='All users'
    connect by prior granted_role = grantee;
    The error
    ORA-0147: cannot use connect by on view with DISTINCT, GROUP BY, etc.
    The database
    Oracle 8.1.7.4 (Yes I know ....)
    The Solution
    [Thanks in advance]

    What if you create a table first
    create table role_grants as
        select granted_role, grantee
           from (select grantee, granted_role
                   from dba_role_privs
                 union
                 select role, granted_role
                   from role_role_privs
                 union
                 select role, privilege
                   from role_sys_privs
                 union
                 select 'All users', username
                  from dba_users)
    Then run the hierarchical report
    select lpad(' ', level*2,' ')|| granted_role
       from role_grants
       start with grantee='All users'
       connect by prior granted_role = grantee

  • Problem in updating fa_additions SQL Error: ORA-01779: cannot modify a column which maps to a non key-preserved table

    Hi,
    After using sql loader to import informations in the table fa_mass_additions and after the functionnal uses a treatment to imputate this assets, it asks me to do an update on the table fa_additions to change the value of attribute1 but i get an error
    Error report:
    ORA-01779: cannot modify a column which maps to a non key-preserved table
    ORA-06512: at line 11
    01779. 00000 -  "cannot modify a column which maps to a non key-preserved table"
    *Cause:    An attempt was made to insert or update columns of a join view which
               map to a non-key-preserved table.
    *Action:   Modify the underlying base tables directly.
    please how can i do this update?

    Hi,
    The "fa_additions" is a view, not a table.
    You should update the base table "fa_additions_b".
    Regards,
    Bashar

  • ORA-03264: cannot drop offline datafile of locally managed tablespace

    Hi list
    A datafile was acidentally created on filesystem in one node of two nodes RAC.
    After that the filesystem on which the datafile was created was out of space because of automatic control file backup and sysadmin move this datafile to another device. And before this action RMAN backup stopped work.
    Now we replace the datafile to the original location, but it stay offline and recover status, and we cant bring them online because the customer dont have necessary archive logs to recover this datafile. RMAN backup is now working. But now we need to create a DataGuard on a third server and want to drop this datafile.
    This datafile dont have any data segment and stay in most critical tablespace of the customer application which have more datafiles. This datafile in question isnt the first datafile of the tablespace.
    SQL> select file#, status from v$datafile where name='/oracle/product/db/ars/dbs/arsystem.old';
    FILE# STATUS
    21 RECOVER
    SQL> select file#, status from v$datafile_header where name='/oracle/product/db/ars/dbs/arsystem.old';
    FILE# STATUS
    21 OFFLINE
    How can I drop this datafile?
    Thanks
    Cristiano

    Review this metalink note, what to do:
    How to 'DROP' a Datafile from a Tablespace
    Doc ID:111316.1
    If you cannot recover the datafile, you have to export the 'rest' of the tablespace (after statement 'alter database datafile '/oracle/product/db/ars/dbs/arsystem.old' offline drop;' was successfully issued). Afterwards drop the tablespace,recreate it and import the data).
    Werner

Maybe you are looking for