Search code examples
javaoracle-databaseweblogic11goracle-rest-data-services

ORDS not able to write to db


The application is using Weblogic, ORDS(Oracle REST Data Service). I see this error while trying to write to the db. Has anyone experienced it?

These exceptions come for any insert/update queries done in the code but not for select queries.

Read operation is working fine but writes are failing. It looks like ORDS is missing write permissions.

Aug 24, 2023 7:23:10 PM oracle.dbtools.injector.impl.InjectorLog finest
FINEST: No provider found for:  requires java.sql.Connection with constraint: (provides @Named(ords) java.sql.Connection)
oracle.dbtools.injector.impl.MissingDependencyException: No provider found for:  requires java.sql.Connection with constraint: (provides @Named(ords) java.sql.Connection)
    at oracle.dbtools.injector.impl.MissingDependencyException.noProvider(MissingDependencyException.java:75)
    at oracle.dbtools.injector.impl.MissingDependencyException.noProvider(MissingDependencyException.java:62)
    at oracle.dbtools.injector.impl.DependencyInjectionException.instantationError(DependencyInjectionException.java:107)
    at oracle.dbtools.injector.impl.ServiceFactory.instantiate(ServiceFactory.java:122)
    at oracle.dbtools.injector.impl.ServiceFactory$ResolvedDependenciesFactory.newInstance(ServiceFactory.java:366)
    at oracle.dbtools.injector.impl.ServiceFactory$ResolvedSingletons.newInstance(ServiceFactory.java:393)
    at oracle.dbtools.injector.impl.SingletonsBase.get(SingletonsBase.java:35)
    at oracle.dbtools.injector.impl.ServiceFactory.resolveDependencies(ServiceFactory.java:244)
    at oracle.dbtools.injector.impl.ServiceFactory.instantiate(ServiceFactory.java:97)
    at oracle.dbtools.injector.impl.ServiceFactory$InstanceFactory.newInstance(ServiceFactory.java:348)
    at oracle.dbtools.injector.impl.Singletons.newInstance(Singletons.java:121)
    at oracle.dbtools.injector.impl.SingletonsBase.get(SingletonsBase.java:35)
    at oracle.dbtools.injector.impl.ServiceFactory.newInstance(ServiceFactory.java:55)
    at oracle.dbtools.injector.impl.InjectorImpl.select(InjectorImpl.java:180)
    at oracle.dbtools.injector.impl.InjectorImpl$SelfServices.select(InjectorImpl.java:451)
    at oracle.dbtools.auth.Authenticators.authenticate(Authenticators.java:44)
    at oracle.dbtools.http.auth.AuthenticationFilter.authenticate(AuthenticationFilter.java:73)
    at oracle.dbtools.http.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:64)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.url.mapping.RequestMapperImpl.doFilter(RequestMapperImpl.java:158)
    at oracle.dbtools.url.mapping.URLMappingBase.doFilter(URLMappingBase.java:89)
    at oracle.dbtools.url.mapping.db.DatabaseTenantMapping.dispatchSelf(DatabaseTenantMapping.java:212)
    at oracle.dbtools.url.mapping.db.DatabaseTenantMappingBase.doFilter(DatabaseTenantMappingBase.java:51)
    at oracle.dbtools.url.mapping.tenant.TenantMappingDispatcher.dispatch(TenantMappingDispatcher.java:59)
    at oracle.dbtools.url.mapping.db.DatabaseTenantMappingBase.dispatchChild(DatabaseTenantMappingBase.java:152)
    at oracle.dbtools.url.mapping.db.DatabaseTenantMappingBase.doFilter(DatabaseTenantMappingBase.java:49)
    at oracle.dbtools.jdbc.pools.local.DefaultLocalTenantMapping.doFilter(DefaultLocalTenantMapping.java:100)
    at oracle.dbtools.url.mapping.tenant.TenantMappingDispatcher.dispatch(TenantMappingDispatcher.java:59)
    at oracle.dbtools.url.mapping.tenant.TenantMappingFilter.doFilter(TenantMappingFilter.java:84)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.http.forwarding.ForwardingFailedFilter.doFilter(ForwardingFailedFilter.java:41)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.http.auth.external.ExternalSessionFilter.doFilter(ExternalSessionFilter.java:59)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.apex.support.auth.ApexSessionQueryRewriteFilter.doFilter(ApexSessionQueryRewriteFilter.java:58)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.http.cors.CORSResponseFilter.doFilter(CORSResponseFilter.java:90)
    at oracle.dbtools.http.filters.HttpResponseFilter.doFilter(HttpResponseFilter.java:45)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.http.filters.AbsoluteLocationFilter.doFilter(AbsoluteLocationFilter.java:65)
    at oracle.dbtools.http.filters.HttpResponseFilter.doFilter(HttpResponseFilter.java:45)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.http.auth.external.ExternalAccessValidationFilter.doFilter(ExternalAccessValidationFilter.java:59)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:87)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.http.secure.ForceHttpsFilter.doFilter(ForceHttpsFilter.java:74)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.http.auth.ForceAuthFilter.doFilter(ForceAuthFilter.java:44)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
    at oracle.dbtools.http.filters.Filters.filter(Filters.java:67)
    at oracle.dbtools.http.entrypoint.EntryPoint.service(EntryPoint.java:70)
    at oracle.dbtools.http.entrypoint.EntryPointServlet.service(EntryPointServlet.java:130)
    at oracle.dbtools.entrypoint.WebApplicationRequestEntryPoint.service(WebApplicationRequestEntryPoint.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:295)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:353)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:82)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:82)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2329)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2307)
    at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1798)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1752)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)
Caused by: oracle.dbtools.plugin.api.types.TypeDependencyNotAvailableException: The type: class oracle.dbtools.oauth.OAuthProviderImpl could not be instantiated due to missing dependency: (provides @Named(ords) java.sql.Connection) java.sql.Connection
    at oracle.dbtools.plugin.api.types.TypeDependencyNotAvailableException.from(TypeDependencyNotAvailableException.java:49)
    at oracle.dbtools.plugin.api.types.TypeDependencies.newInstance(TypeDependencies.java:142)
    at oracle.dbtools.plugin.api.types.TypeReflections$ReflectiveInstantiator.load(TypeReflections.java:530)
    at oracle.dbtools.injector.impl.ServiceFactory.instantiate(ServiceFactory.java:119)
    ... 88 more

Any help on this is appreciated.


Solution

  • There were few database triggers which were executed while saving the records. One of these trigger had an issue. I had to fix and compile the trigger. After that save started working fine.