geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject Re: Issues facing when connecting with Oracle10g
Date Sat, 14 Mar 2009 15:23:44 GMT
java.sql.SQLException: ORA-00054: resource busy and acquire with NOWAIT
specified
is usually caused by while one thread has added a lock on the table ( such
as a sql like "select .. for update"  or "alter table ..." are called), and
another thread wants to do update action on the same table lines. And oracle
could add a no wait option, which means if the sql fails to add the lock to
the target, it does not wait.

2009/3/14 David Jencks <david_jencks@yahoo.com>

> I'm not an oracle expert...
> On Mar 13, 2009, at 3:30 AM, Hearty wrote:
>
>
>> The code is responsible for creating the tables.
>>
>
> Is that code succeeding now?  Can you see the tables from something other
> than your app?
>
>>
>> Other things I need to bring to your notice is regarding the following
>> issues
>>
>> Issue 1
>> 18:20:31,046 WARN  [GeronimoConnectionEventListener]
>> connectionErrorOccurred
>> called with null
>> java.sql.SQLException: ORA-00054: resource busy and acquire with NOWAIT
>> specified
>>
>> I have never faced such an issue when I deployed with apache tomcat
>>
>
> I'd guess some transaction is being left open or you are having a
> concurrency/locking problem.  It this is not the result of an error maybe
> turning off NOWAIT would help?
>
>>
>>
>> Issue 2
>>
>
> I thought there was a way to get the underlying "native" connection out of
> the tranql connection handle but I'm not seeing it right now.  Do you know
> what the code is trying to do that is causing this error?
>
> thanks
> david jencks
>
>
>>
>> Mar 12, 2009 6:20:33 PM
>> com.telelogic.focalpoint.bus.report.ReportManagerImpl
>> setDefaultReportImage
>> SEVERE: Error when uploading default report image
>> org.springframework.dao.InvalidDataAccessApiUsageException:
>> OracleLobCreator
>> needs to work on [oracl
>> e.jdbc.OracleConnection], not on
>> [org.tranql.connector.jdbc.ConnectionHandle]: specify a correspondi
>> ng NativeJdbcExtractor; nested exception is java.lang.ClassCastException:
>> org.tranql.connector.jdbc.
>> ConnectionHandle
>> Caused by: java.lang.ClassCastException:
>> org.tranql.connector.jdbc.ConnectionHandle
>>       at oracle.sql.BLOB.createTemporary(BLOB.java:531)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>       at java.lang.reflect.Method.invoke(Unknown Source)
>>       at
>>
>> org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.prepareLob(OracleL
>> obHandler.java:393)
>>       at
>>
>> org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLo
>> bHandler.java:340)
>>       at
>>
>> org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setBlobAsBytes(Ora
>> cleLobHandler.java:220)
>>       at
>>
>> org.springframework.jdbc.core.support.SqlLobValue.setTypeValue(SqlLobValue.java:175)
>>       at
>>
>> org.springframework.jdbc.core.StatementCreatorUtils.setParameterValue(StatementCreatorUti
>> ls.java:128)
>>       at
>>
>> org.springframework.jdbc.core.StatementCreatorUtils.setParameterValue(StatementCreatorUti
>> ls.java:76)
>>       at
>>
>> org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImp
>> l.setValues(PreparedStatementCreatorFactory.java:271)
>>       at
>>
>> org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImp
>> l.createPreparedStatement(PreparedStatementCreatorFactory.java:247)
>>       at
>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:524)
>>       at
>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:736)
>>       at
>> org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:759)
>>       at
>> org.springframework.jdbc.object.SqlUpdate.update(SqlUpdate.java:163)
>>       at
>>
>> com.telelogic.focalpoint.dao.jdbc.ReportDaoJdbc.uplodadReportImage(ReportDaoJdbc.java:109
>> )
>>       at
>>
>> com.telelogic.focalpoint.bus.report.ReportManagerImpl.uploadReportImage(ReportManagerImpl
>> .java:274)
>>       at
>>
>> com.telelogic.focalpoint.bus.report.ReportManagerImpl.setDefaultReportImage(ReportManager
>> Impl.java:301)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>       at java.lang.reflect.Method.invoke(Unknown Source)
>>       at
>>
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281
>> )
>>       at
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMe
>> thodInvocation.java:187)
>>       at
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
>> cation.java:154)
>>       at
>>
>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInte
>> rceptor.java:107)
>>       at
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
>> cation.java:176)
>>       at
>>
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
>>       at $Proxy60.setDefaultReportImage(Unknown Source)
>>       at
>> com.telelogic.focalpoint.dom.server.ServerImpl.init(ServerImpl.java:165)
>>       at
>>
>> com.telelogic.focalpoint.dom.server.ServerImpl.afterPropertiesSet(ServerImpl.java:112)
>>       at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMe
>> thods(AbstractAutowireCapableBeanFactory.java:1118)
>>       at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBe
>> an(AbstractAutowireCapableBeanFactory.java:1085)
>>       at
>>
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(A
>> bstractAutowireCapableBeanFactory.java:429)
>>       at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFac
>> tory.java:250)
>>       at
>>
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(Defau
>> ltSingletonBeanRegistry.java:141)
>>       at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory
>> .java:247)
>>       at
>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory
>> .java:161)
>>       at
>>
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingle
>> tons(DefaultListableBeanFactory.java:273)
>>       at
>>
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicatio
>> nContext.java:346)
>>       at
>>
>> org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(
>> AbstractRefreshableWebApplicationContext.java:156)
>>       at
>>
>> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.j
>> ava:246)
>>       at
>>
>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.jav
>> a:184)
>>       at
>>
>> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderLis
>> tener.java:49)
>>       at
>>
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3839)
>>       at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4332)
>>       at
>>
>> org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.jav
>> a:63)
>>       at
>>
>> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStand
>> ardContext.java:398)
>>       at
>>
>> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve
>> .java:47)
>>       at
>>
>> org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:251
>> )
>>       at
>>
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>>       at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>>       at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
>>       at
>>
>> org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:364)
>>       at
>>
>> org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:512)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:998)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.
>> java:268)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:541)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:1
>> 11)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120)
>>       at
>>
>> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMon
>> itor.java:176)
>>       at
>>
>> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.j
>> ava:44)
>>       at
>>
>> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunnin
>> gEvent(BasicLifecycleMonitor.java:254)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.
>> java:294)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.ja
>> va:124)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
>>       at
>>
>> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
>>       at
>>
>> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(Configuratio
>> nUtil.java:456)
>>       at
>>
>> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationMan
>> ager.java:188)
>>       at
>>
>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleCon
>> figurationManager.java:562)
>>       at
>>
>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleCon
>> figurationManager.java:543)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>       at java.lang.reflect.Method.invoke(Unknown Source)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.
>> java:34)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>>       at
>>
>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
>>       at
>> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>>       at
>>
>> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>>       at
>>
>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.
>> java:96)
>>       at
>>
>> org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$b90e4867
>> .startConfiguration(<generated>)
>>       at
>>
>> org.apache.geronimo.deployment.plugin.local.RedeployCommand.redeploySameConfiguration(Red
>> eployCommand.java:229)
>>       at
>>
>> org.apache.geronimo.deployment.plugin.local.RedeployCommand.run(RedeployCommand.java:101)
>>
>>       at java.lang.Thread.run(Unknown Source)
>>
>>
>>
>> djencks wrote:
>>
>>>
>>> This looks ok to me.  I think maybe we didn't ship the tranql oracle
>>> wrappers with geronimo until a later geronimo release: I think they
>>> are in 2.1.3.
>>>
>>> The values in your geronimo plan override the defaults in ra.xml, but
>>> don't change the contents of ra.xml.
>>>
>>> If you are still having problems with this you might try changing to
>>> <no-transaction/> and see what happens.  Obviously you won't want to
>>> use this in production but if it works it may help figure out what is
>>> wrong.
>>>
>>> Does your code start by creating tables and the problem you are seeing
>>> is that when you try to use them they have not been created?  Or are
>>> the tables created by some other process like running a script on the
>>> db by hand?
>>>
>>> thanks
>>> david jencks
>>>
>>> On Mar 13, 2009, at 12:09 AM, Hearty wrote:
>>>
>>>
>>>> I am not using any oracle specific wrapper for the db pool.
>>>> I have used admin console for configuring the db pool. Since admin
>>>> console
>>>> does not provide a way
>>>> to set the property for autocommit, I have modified ra.xml manually.
>>>>
>>>> I have tried one more option by deploying the dbpool using deploy
>>>> command
>>>> deploy
>>>> %GERONIMO_HOME%\repository\org\tranql\tranql-connector-ra\1.4\tranql-
>>>> connector-ra-1.4.rar
>>>> ..\fpconfig\oracle10g-deployment-plan.xml
>>>>
>>>> oracle10g-deployment-plan is as follows
>>>>
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <connector
>>>>        xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
>>>>        <dep:environment
>>>>                xmlns:dep="
>>>> http://geronimo.apache.org/xml/ns/deployment-1.2">
>>>>                <dep:moduleId>
>>>>                        <dep:groupId>console.dbpool</dep:groupId>
>>>>                        <dep:artifactId>fpdbpool</dep:artifactId>
>>>>                        <dep:version>1.0</dep:version>
>>>>                        <dep:type>rar</dep:type>
>>>>                </dep:moduleId>
>>>>                <dep:dependencies>
>>>>                        <dep:dependency>
>>>>
>>>>  <dep:groupId>com.telelogic.focalpoint.lib</dep:groupId>
>>>>                                <dep:artifactId>ojdbc14</dep:artifactId>
>>>>                                <dep:version>10.2.0.1.0</dep:version>
>>>>                                <dep:type>jar</dep:type>
>>>>                        </dep:dependency>
>>>>                </dep:dependencies>
>>>>        </dep:environment>
>>>>        <resourceadapter>
>>>>                <outbound-resourceadapter>
>>>>                        <connection-definition>
>>>>                                <connectionfactory-interface>
>>>>                                        javax.sql.DataSource
>>>>                                </connectionfactory-interface>
>>>>                                <connectiondefinition-instance>
>>>>                                        <name>fpdbpool</name>
>>>>                                        <config-property-setting
>>>> name="Password">
>>>>                                                focalpoint
>>>>                                        </config-property-setting>
>>>>                                        <config-property-setting
>>>> name="Driver">
>>>>
>>>>  oracle.jdbc.driver.OracleDriver
>>>>                                        </config-property-setting>
>>>>                                        <config-property-setting
>>>> name="UserName">
>>>>                                                mobile
>>>>                                        </config-property-setting>
>>>>                                        <config-property-setting
>>>> name="ConnectionURL">
>>>>
>>>>  jdbc:oracle:thin:@192.168.133.96:1521:orcl
>>>>                                        </config-property-setting>
>>>>                                        <config-property-setting
>>>> name="CommitBeforeAutocommit">true</config-property-setting>
>>>>
>>>>                                        <connectionmanager>
>>>>                                                <local-transaction />
>>>>                                                <single-pool>
>>>>
>>>>  <max-size>10</max-size>
>>>>
>>>>  <min-size>10</min-size>
>>>>
>>>>  <blocking-timeout-milliseconds>
>>>>                                                                60000
>>>>
>>>>  </blocking-timeout-milliseconds>
>>>>
>>>>  <idle-timeout-minutes>
>>>>                                                                10
>>>>
>>>>  </idle-timeout-minutes>
>>>>                                                        <match-one />
>>>>                                                </single-pool>
>>>>                                        </connectionmanager>
>>>>                                </connectiondefinition-instance>
>>>>                        </connection-definition>
>>>>                </outbound-resourceadapter>
>>>>        </resourceadapter>
>>>> </connector>
>>>>
>>>>
>>>> But I've observed even I've specified "CommitBeforeAutocommit" as
>>>> true,
>>>> ra.xml contains the value of "CommitBeforeAutocommit" as false. I am
>>>> using
>>>> "Oracle Thin" as the Database Type.
>>>>
>>>> I am not using any specific tranql wrapper for oracle. I am using
>>>> tranql-connector-ra-1.4.rar which I found with
>>>> repository\org\tranql\tranql-connector-ra\1.4
>>>>
>>>> Please let me know if I am doing some thing wrong. Is there
>>>> documentation
>>>> (with sample code) for creating tranql oracle specific wrapper for
>>>> the db
>>>> pool.
>>>>
>>>> Can I rely on the admin console alone for deploying the database
>>>> pool for
>>>> oracle 10g?
>>>>
>>>>
>>>> djencks wrote:
>>>>
>>>>>
>>>>> Its difficult to do more than guess without more information on what
>>>>> you have deployed.
>>>>>
>>>>> You should be using one of the tranql oracle specific wrappers for
>>>>> your db pool.  This should take care of the commit-before-autocommit
>>>>> problem caused by oracle jdbc spec non-compliance.  If you aren't
>>>>> using an oracle specific wrapper you do need to set the commit before
>>>>> autocommit property to true, but you should do it in your pool
>>>>> deployment plan, not by modifying the ra.xml.
>>>>>
>>>>> At a minimum I think we'd need to know which tranql wrapper you are
>>>>> using and to see the deployment plan for it.
>>>>>
>>>>> thanks
>>>>> david jencks
>>>>>
>>>>> On Mar 12, 2009, at 6:19 AM, Hearty wrote:
>>>>>
>>>>>
>>>>>> When I have configured database pool with oracle10g and running
>>>>>> against the
>>>>>> apache geronimo v2.1, I am getting some unusual errors where as when
>>>>>> I've
>>>>>> tried with tomcat5.5 it is working smoothly.
>>>>>> Oracle driver I've used is ojdbc14-10.2.0.1.0.jar.
>>>>>>
>>>>>> The following is the error message I am getting. Also I am uploading
>>>>>> the
>>>>>> error log since the error log is a big file
>>>>>> http://www.nabble.com/file/p22476155/errorLog.txt errorLog.txt
>>>>>> I have modified ra.xml with the following entry
>>>>>> <config-property>
>>>>>>                 <description>
>>>>>>                     Flag indicating whether the Driver requires a
>>>>>> commit
>>>>>> to be performed
>>>>>>                     before enabling auto-commit on a Connection.
>>>>>> This
>>>>>> should be set to false for
>>>>>>                     compliant drivers to avoid an extraneous
>>>>>> commit to
>>>>>> the database.
>>>>>>                 </description>
>>>>>>
>>>>>> <config-property-name>CommitBeforeAutocommit</config-property-name>
>>>>>>
>>>>>> <config-property-type>java.lang.Boolean</config-property-type>
>>>>>>                 <config-property-value>true</config-property-
>>>>>> value>
>>>>>>             </config-property>
>>>>>> The default value was false
>>>>>>
>>>>>> I am struggling with this issue for more than one week.
>>>>>>
>>>>>> Any help is highly appreciated. I am very new to apache geronimo.
>>>>>> Please let
>>>>>> me know if I've missed out any entries.
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>>
>>>>>> http://www.nabble.com/Issues-facing-when-connecting-with-Oracle10g-tp22476155s134p22476155.html
>>>>>> Sent from the Apache Geronimo - Users mailing list archive at
>>>>>> Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> View this message in context:
>>>>
>>>> http://www.nabble.com/Issues-facing-when-connecting-with-Oracle10g-tp22476155s134p22491260.html
>>>> Sent from the Apache Geronimo - Users mailing list archive at
>>>> Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>> --
>> View this message in context:
>> http://www.nabble.com/Issues-facing-when-connecting-with-Oracle10g-tp22476155s134p22493784.html
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
>


-- 
Ivan

Mime
View raw message