Ошибка создания бина с именем entityManagerFactory, определенным в ресурсе пути к классу, с использованием весенней загрузки jpa - PullRequest
0 голосов
/ 02 сентября 2018

Я новичок в weblogic и весенней загрузке и создал пример проекта, который вызывает хранимую процедуру с помощью весенней загрузки jpa. когда я развертываю этот проект на weblogic, то сталкиваюсь с ошибкой ниже,

2018-09-02 13:02:17.614  INFO 2508 --- [ (self-tuning)'] hu.gyabraham.wlspringboot.Application    : Started Application in 10.372 seconds (JVM running for 136.471)
                    2018-09-02 13:02:18.356  INFO 2508 --- [ (self-tuning)'] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [byte[]] overrides previous : org.hibernate.type.BinaryType@43102599
                    2018-09-02 13:02:18.356  INFO 2508 --- [ (self-tuning)'] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [byte[]] overrides previous : org.hibernate.type.BinaryType@43102599
                    2018-09-02 13:02:18.357  INFO 2508 --- [ (self-tuning)'] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [[B] overrides previous : org.hibernate.type.BinaryType@43102599
                    2018-09-02 13:02:18.357  INFO 2508 --- [ (self-tuning)'] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [[B] overrides previous : org.hibernate.type.BinaryType@43102599
                    2018-09-02 13:02:18.358  INFO 2508 --- [ (self-tuning)'] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [Byte[]] overrides previous : org.hibernate.type.WrapperBinaryType@2c8b1b8b
                    2018-09-02 13:02:18.358  INFO 2508 --- [ (self-tuning)'] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [Byte[]] overrides previous : org.hibernate.type.WrapperBinaryType@2c8b1b8b
                    2018-09-02 13:02:18.358  INFO 2508 --- [ (self-tuning)'] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [[Ljava.lang.Byte;] overrides previous : org.hibernate.type.WrapperBinaryType@2c8b1b8b
                    2018-09-02 13:02:18.358  INFO 2508 --- [ (self-tuning)'] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [[Ljava.lang.Byte;] overrides previous : org.hibernate.type.WrapperBinaryType@2c8b1b8b
                    2018-09-02 13:24:11.363  WARN 2508 --- [ (self-tuning)'] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 1427, SQLState: 21000
                    2018-09-02 13:24:11.365  WARN 2508 --- [ (self-tuning)'] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 1427, SQLState: 21000
                    2018-09-02 13:24:11.366 ERROR 2508 --- [ (self-tuning)'] o.h.engine.jdbc.spi.SqlExceptionHelper   : ORA-01427: single-row subquery returns more than one row

                    2018-09-02 13:24:11.366 ERROR 2508 --- [ (self-tuning)'] o.h.engine.jdbc.spi.SqlExceptionHelper   : ORA-01427: single-row subquery returns more than one row

                    2018-09-02 13:24:11.379  WARN 2508 --- [ (self-tuning)'] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.DataException: Error accessing tables metadata
                    2018-09-02 13:24:11.380  WARN 2508 --- [ (self-tuning)'] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.DataException: Error accessing tables metadata
                    2018-09-02 13:24:11.429  INFO 2508 --- [ (self-tuning)'] ConditionEvaluationReportLoggingListener : 

                    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
                    2018-09-02 13:24:11.456 ERROR 2508 --- [ (self-tuning)'] o.s.boot.SpringApplication               : Application run failed

                    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.DataException: Error accessing tables metadata
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1706)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
                        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
                        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
                        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
                        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
                        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089)
                        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:859)
                        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
                        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
                        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
                        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
                        at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
                        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:155)
                        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:135)
                        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:87)
                        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
                        at weblogic.servlet.internal.WebAppServletContext.initContainerInitializer(WebAppServletContext.java:1425)
                        at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1364)
                        at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1345)
                        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1917)
                        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3101)
                        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1843)
                        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:884)
                        at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
                        at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
                        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
                        at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)
                        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
                        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
                        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
                        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
                        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:78)
                        at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:52)
                        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:752)
                        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
                        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:262)
                        at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:52)
                        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
                        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:90)
                        at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:274)
                        at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:507)
                        at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:53)
                        at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:202)
                        at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:52)
                        at weblogic.management.deploy.internal.ConfiguredDeployments$2.doItem(ConfiguredDeployments.java:741)
                        at weblogic.management.deploy.internal.parallel.BucketInvoker$2.run(BucketInvoker.java:95)
                        at weblogic.work.ContextWrap.run(ContextWrap.java:46)
                        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:670)
                        at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
                        at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
                        at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
                        at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
                        at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644)
                        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:415)
                        at weblogic.work.ExecuteThread.run(ExecuteThread.java:355)
                    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.DataException: Error accessing tables metadata
                        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:402)
                        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:377)
                        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1765)
                        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1702)
                        ... 56 common frames omitted
                    Caused by: org.hibernate.exception.DataException: Error accessing tables metadata
                        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:118)
                        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
                        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
                        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
                        at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.convertSQLException(InformationExtractorJdbcDatabaseMetaDataImpl.java:98)
                        at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.populateTablesWithColumns(InformationExtractorJdbcDatabaseMetaDataImpl.java:383)
                        at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getTables(InformationExtractorJdbcDatabaseMetaDataImpl.java:337)
                        at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.getTablesInformation(DatabaseInformationImpl.java:120)
                        at org.hibernate.tool.schema.internal.GroupedSchemaMigratorImpl.performTablesMigration(GroupedSchemaMigratorImpl.java:65)
                        at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:207)
                        at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:114)
                        at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:183)
                        at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
                        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:312)
                        at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
                        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:892)
                        at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:57)
                        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365)
                        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:390)
                        ... 60 common frames omitted
                    Caused by: java.sql.SQLException: ORA-01427: single-row subquery returns more than one row

                        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:495)
                        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:447)
                        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1055)
                        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:624)
                        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:253)
                        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:613)
                        at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:214)
                        at oracle.jdbc.driver.T4CStatement.fetch(T4CStatement.java:1004)
                        at oracle.jdbc.driver.OracleStatement.fetchMoreRows(OracleStatement.java:3458)
                        at oracle.jdbc.driver.InsensitiveScrollableResultSet.fetchMoreRows(InsensitiveScrollableResultSet.java:737)
                        at oracle.jdbc.driver.InsensitiveScrollableResultSet.absoluteInternal(InsensitiveScrollableResultSet.java:693)
                        at oracle.jdbc.driver.InsensitiveScrollableResultSet.next(InsensitiveScrollableResultSet.java:407)
                        at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_ForwardOnlyResultSet.next(Unknown Source)
                        at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.populateTablesWithColumns(InformationExtractorJdbcDatabaseMetaDataImpl.java:359)
                        ... 73 common frames omitted
                    Caused by: oracle.jdbc.OracleDatabaseException: ORA-01427: single-row subquery returns more than one row

                        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:499)
                        ... 86 common frames omitted

                    <2 Sep, 2018 1:24:11,514 PM IST> <Warning> <HTTP> <BEA-101162> <User defined listener org.jboss.weld.servlet.WeldInitialListener failed: java.lang.NullPointerException.
                    java.lang.NullPointerException
                        at org.jboss.weld.servlet.WeldInitialListener.contextDestroyed(WeldInitialListener.java:119)
                        at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:706)
                        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
                        at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
                        at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
                        Truncated. see log file for complete stacktrace
                    > 
                    <2 Sep, 2018 1:24:11,585 PM IST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application "rest-test-example".
                    weblogic.application.ModuleException: Error : 1427, Position : 117, Sql = declare
                      in_owner varchar2(128) := null;
                      in_name varchar2(128) := null;
                      in_column varchar2(128) := null;
                      xyzzy SYS_REFCURSOR;
                    begin
                      in_owner := :1 ;
                      in_name := :2 ;
                      in_column := :3 ;
                    open xyzzy for
                    SELECT NULL AS table_cat,
                           t.owner AS table_schem,
                           t.table_name AS table_name,
                           t.column_name AS column_name,
                    DECODE(  (SELECT a.typecode 
                         FROM ALL_TYPES A 
                         WHERE a.type_name = t.data_type), 
                      'OBJECT', 2002, 
                      'COLLECTION', 2003, 
                      DECODE(substr(t.data_type, 1, 9), 
                        'TIMESTAMP', 
                          DECODE(substr(t.data_type, 10, 1), 
                            '(', 
                              DECODE(substr(t.data_type, 19, 5), 
                                'LOCAL', -102, 'TIME ', -101, 93), 
                            DECODE(substr(t.data_type, 16, 5), 
                              'LOCAL', -102, 'TIME ', -101, 93)), 
                        'INTERVAL ', 
                          DECODE(substr(t.data_type, 10, 3), 
                           'DAY', -104, 'YEA', -103), 
                        DECODE(t.data_type, 
                          'BINARY_DOUBLE', 101, 
                          'BINARY_FLOAT', 100, 
                          'BFILE', -13, 
                          'BLOB', 2004, 
                          'CHAR', 1, 
                          'CLOB', 2005, 
                          'COLLECTION', 2003, 
                          'DATE', 93, 
                          'FLOAT', 6, 
                          'LONG', -1, 
                          'LONG RAW', -4, 
                          'NCHAR', -15, 
                          'NCLOB', 2011, 
                          'NUMBER', 2, 
                          'NVARCHAR', -9, 
                          'NVARCHAR2', -9, 
                          'OBJECT', 2002, 
                          'OPAQUE/XMLTYPE', 2009, 
                          'RAW', -3, 
                          'REF', 2006, 
                          'ROWID', -8, 
                          'SQLXML', 2009, 
                          'UROWID', -8, 
                          'VARCHAR2', 12, 
                          'VARRAY', 2003, 
                          'XMLTYPE', 2009, 
                          1111)))
                     AS data_type,
                           t.data_type AS type_name,
                           DECODE (t.data_precision,                null, DECODE(t.data_type,                        'NUMBER', DECODE(t.data_scale,                                    null, 38                                   , 38),        DECODE (t.data_type,                'CHAR', t.char_length,                'VARCHAR', t.char_length,                'VARCHAR2', t.char_length,                'NVARCHAR2', t.char_length,                'NCHAR', t.char_length,                'NUMBER', 0,                t.data_length)                           ),         t.data_precision)
                                  AS column_size,
                           0 AS buffer_length,
                           DECODE (t.data_type,                'NUMBER', 

Я пытаюсь вызвать процедуру, используя пружинную загрузку jpa, но сталкиваюсь с этой проблемой, где говорится: java.sql.SQLException: ORA-01427: подзапрос из одной строки возвращает более одного кода строки здесь , Пожалуйста, предоставьте вашу поддержку для решения этой проблемы.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...