oracle UCP ONS服务器在helidon服务器启动期间超时

fcg9iug3  于 2023-10-16  发布在  Oracle
关注(0)|答案(1)|浏览(119)

在Helidon-MP上,我试图启用UCP连接,但我们看到了服务器超时问题。pom.xml具有“helidon-integrations-cdi-integration-ucp”依赖项

<dependency>
            <groupId>io.helidon.integrations.cdi</groupId>
            <artifactId>helidon-integrations-cdi-datasource-ucp</artifactId>
        </dependency>

microprofile-config.properties有以下属性
oracle.ucp.jdbc.PoolDataSource.ds1.connectionFactoryClassName=oracle.jdbc.pool.OracleDataSource oracle.ucp.jdbc.PoolDataSource.ds1.URL=jdbc:oracle:thin:@walletName oracle.ucp.jdbc.PoolDataSource.ds1.user=db_user oracle.ucp.jdbc.PoolDataSource.ds1.password=passwordxyz oracle.net.tns_admin=wallet文件位置

在服务器启动时,我看到以下错误,但API与ucp连接工作正常。

2023.08.24.15:22:55 | WARN | oracle.ucp | :::failed to start ONS: Server time out
2023.08.24.15:22:55 | WARN | oracle.ucp | :::failed to start ONS with the following exception: [oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:379), oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:347), oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:361), oracle.ucp.common.ONSDriver.start(ONSDriver.java:113), oracle.ucp.common.Topology.onsDriver(Topology.java:531), oracle.ucp.common.CoreConnectionImpl.<init>(CoreConnectionImpl.java:110), oracle.ucp.common.CoreConnectionImpl.create(CoreConnectionImpl.java:76), oracle.ucp.common.Service.create(Service.java:890), oracle.ucp.common.Service.create(Service.java:617), oracle.ucp.common.Topology.create(Topology.java:164), oracle.ucp.common.Core.growBorrowed(Core.java:1254), oracle.ucp.common.UniversalConnectionPoolImpl.helpGrowBorrowed(UniversalConnectionPoolImpl.java:407), oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnectionWithoutCountingRequests(UniversalConnectionPoolImpl.java:350), oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnectionAndValidateHelper(UniversalConnectionPoolImpl.java:206), oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnectionAndValidate(UniversalConnectionPoolImpl.java:166), oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnection(UniversalConnectionPoolImpl.java:139), oracle.ucp.jdbc.JDBCConnectionPool.borrowConnection(JDBCConnectionPool.java:185), oracle.ucp.jdbc.oracle.OracleJDBCConnectionPool.borrowConnection(OracleJDBCConnectionPool.java:611), oracle.ucp.jdbc.oracle.OracleConnectionConnectionPool.borrowConnection(OracleConnectionConnectionPool.java:119), oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:1856), oracle.ucp.jdbc.PoolDataSourceImpl.access$300(PoolDataSourceImpl.java:223), oracle.ucp.jdbc.PoolDataSourceImpl$3.build(PoolDataSourceImpl.java:3999), oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:1801), oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:1756), oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:1742), java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method), java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62), java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.base/java.lang.reflect.Method.invoke(Method.java:566), org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38), org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106), oracle.ucp.UniversalConnectionPoolAdapter$CommonDataSource$DataSource$ObjectFactory$PoolDataSource$Referenceable$Serializable$Wrapper$$Proxy$_$$_WeldClientProxy.getConnection(Unknown Source), io.helidon.integrations.jta.jdbc.JtaDataSource.getConnection(JtaDataSource.java:571), io.helidon.integrations.jta.jdbc.JtaDataSource.getConnection(JtaDataSource.java:392), org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122), org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:181), org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68), org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35), org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101), org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:272), org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246), org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:223), org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:175), org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:295), org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:252), org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:223), org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:173), org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127), org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1460), org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1494), org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141), org.hibernate.jpa.HibernatePersistenceProvider$Proxy$_$$_WeldClientProxy.createContainerEntityManagerFactory(Unknown Source), io.helidon.integrations.cdi.jpa.EntityManagerFactories.createContainerManagedEntityManagerFactory(EntityManagerFactories.java:189), io.helidon.integrations.cdi.jpa.JpaExtension.lambda$addContainerManagedEntityManagerFactoryBeans$1(JpaExtension.java:1104), org.jboss.weld.bootstrap.events.configurator.BeanConfiguratorImpl$CreateCallback.create(BeanConfiguratorImpl.java:372), org.jboss.weld.bootstrap.events.configurator.BeanConfiguratorImpl$CreateCallback.access$700(BeanConfiguratorImpl.java:339), org.jboss.weld.util.Observers.notify(Observers.java:166), org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285), org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273), org.jboss.weld.event.EventImpl.fire(EventImpl.java:96), io.helidon.microprofile.cdi.HelidonContainerImpl.doStart(HelidonContainerImpl.java:341), io.helidon.common.context.Contexts.runInContext(Contexts.java:137), io.helidon.microprofile.cdi.HelidonContainerImpl.start(HelidonContainerImpl.java:251), io.helidon.microprofile.server.ServerImpl.start(ServerIm`your text`pl.java:76), com.oracle.retail.rsc.ipo.Application.init(Application.java:56), com.oracle.retail.rsc.ipo.Application.main(Application.java:44)]
j13ufse2

j13ufse21#

删除了pom.xml中的simplefan.jar和ons.jar依赖

<dependency>
        <groupId>io.helidon.integrations.cdi</groupId>
        <artifactId>helidon-integrations-cdi-datasource-ucp</artifactId>
            <exclusions>
              <exclusion>
                <groupId>com.oracle.database.ha</groupId>
                <artifactId>ons</artifactId>
              </exclusion>
              <exclusion>
                <groupId>com.oracle.database.ha</groupId>
                <artifactId>simplefan</artifactId>
              </exclusion>
            </exclusions>
    </dependency>

相关问题