简体   繁体   English

2.0.9 和 2.1.0 之间的 Spring Boot eclipselink ddl 自动生成问题

[英]Spring Boot between 2.0.9 and 2.1.0 Issue with eclipselink ddl auto generate

Created new project with Spring boot 2.1.0 RELEASE and my pom.xml contains this使用 Spring boot 2.1.0 RELEASE创建了新项目,我的pom.xml包含这个

..
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
    <version>${spring.boot.version}</version>
</dependency>
<dependency>
    <groupId>org.eclipse.persistence</groupId>
    <artifactId>eclipselink</artifactId>
    <version>2.6.3</version>
</dependency>
<dependency>
    <groupId>javax.validation</groupId>
    <artifactId>validation-api</artifactId>
    <version>2.0.1.Final</version>
</dependency>
..

I am configuring it using LocalContainerEntityManagerFactoryBean and there is no application.properties file :我正在使用LocalContainerEntityManagerFactoryBean配置它并且没有application.properties文件:

@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
    LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
    em.setDataSource(dataSource());
    em.setPackagesToScan("com.xxxx.api.model");
    em.setPersistenceUnitName("xxxx-pu");
    Properties prop = new Properties();
    prop.putAll(getVendorProperties());

    em.setJpaVendorAdapter(vendorAdapter);
    em.setJpaProperties(prop);
    return em;
}

protected Map<String, String> getVendorProperties() {
    final Map<String, String> ret = new HashMap<>();
    ret.put(PersistenceUnitProperties.BATCH_WRITING, BatchWriting.JDBC);
    ret.put(PersistenceUnitProperties.WEAVING, "false");
    ret.put(PersistenceUnitProperties.LOGGING_LEVEL, "ALL");
    ret.put(PersistenceUnitProperties.DDL_GENERATION, PersistenceUnitProperties.DROP_AND_CREATE);
    return ret;
}

I have a very simple class Account.java in com.xxxx.api.model我在com.xxxx.api.model有一个非常简单的类Account.java

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="ACCOUNT")
public class Account{
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @XmlAttribute
    @Basic(optional = false)
    @Column(name = "ID", nullable = false)
    private Long id;

    private String username;

    private String password;

}

By using these configuration and classes I am not able to generate the ddl automatically .通过使用这些配置和类,我无法自动生成 ddl。

The output log looks like this :输出日志如下所示:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.0.RELEASE)

2019-12-27 01:47:19.447  INFO 31168 --- [           main] com.xxxx.api.ApiApplication          : Starting ApiApplication on server with PID 31168 (/home/user/NetBeansProjects/xxxx-api/target/classes started by user in /home/user/NetBeansProjects/xxxx-api)
2019-12-27 01:47:19.451  INFO 31168 --- [           main] com.xxxx.api.ApiApplication          : No active profile set, falling back to default profiles: default
2019-12-27 01:47:20.211  INFO 31168 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2019-12-27 01:47:20.233  INFO 31168 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 15ms. Found 0 repository interfaces.
2019-12-27 01:47:20.962  INFO 31168 --- [           main] com.xxxx.api.config.Environment      : Env: null
2019-12-27 01:47:20.962  INFO 31168 --- [           main] com.xxxx.api.config.Environment      : Level 4: 
2019-12-27 01:47:20.962  INFO 31168 --- [           main] com.xxxx.api.config.Environment      : Property : development
2019-12-27 01:47:20.965  INFO 31168 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'envConfig' of type [com.xxxx.api.config.Environment] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-12-27 01:47:21.028  INFO 31168 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'dataSource' of type [org.springframework.jdbc.datasource.DriverManagerDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-12-27 01:47:21.032  INFO 31168 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'JPAConfig' of type [com.xxxx.api.config.JPAConfig$$EnhancerBySpringCGLIB$$9bc8315d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-12-27 01:47:21.146  INFO 31168 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$7e9c54] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-12-27 01:47:21.712  INFO 31168 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2019-12-27 01:47:21.741  INFO 31168 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-12-27 01:47:21.741  INFO 31168 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/9.0.12
2019-12-27 01:47:21.751  INFO 31168 --- [           main] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2019-12-27 01:47:21.860  INFO 31168 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-12-27 01:47:21.861  INFO 31168 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2325 ms
2019-12-27 01:47:21.922  INFO 31168 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-12-27 01:47:21.923  INFO 31168 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-12-27 01:47:21.924  INFO 31168 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'formContentFilter' to: [/*]
2019-12-27 01:47:21.925  INFO 31168 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2019-12-27 01:47:21.925  INFO 31168 --- [           main] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2019-12-27 01:47:21.926  INFO 31168 --- [           main] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2019-12-27 01:47:23.821  INFO 31168 --- [           main] liquibase.executor.jvm.JdbcExecutor      : SELECT COUNT(*) FROM xxxx.DATABASECHANGELOGLOCK
2019-12-27 01:47:23.825  INFO 31168 --- [           main] liquibase.executor.jvm.JdbcExecutor      : SELECT COUNT(*) FROM xxxx.DATABASECHANGELOGLOCK
2019-12-27 01:47:23.829  INFO 31168 --- [           main] liquibase.executor.jvm.JdbcExecutor      : SELECT `LOCKED` FROM xxxx.DATABASECHANGELOGLOCK WHERE ID=1
2019-12-27 01:47:23.850  INFO 31168 --- [           main] l.lockservice.StandardLockService        : Successfully acquired change log lock
2019-12-27 01:47:25.618  INFO 31168 --- [           main] liquibase.executor.jvm.JdbcExecutor      : SELECT MD5SUM FROM xxxx.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2019-12-27 01:47:25.619  INFO 31168 --- [           main] liquibase.executor.jvm.JdbcExecutor      : SELECT COUNT(*) FROM xxxx.DATABASECHANGELOG
2019-12-27 01:47:25.620  INFO 31168 --- [           main] l.c.StandardChangeLogHistoryService      : Reading from xxxx.DATABASECHANGELOG
2019-12-27 01:47:25.621  INFO 31168 --- [           main] liquibase.executor.jvm.JdbcExecutor      : SELECT * FROM xxxx.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2019-12-27 01:47:25.627  INFO 31168 --- [           main] l.lockservice.StandardLockService        : Successfully released change log lock
[EL Fine]: server: 2019-12-27 01:47:25.981--Thread(Thread[main,5,main])--Configured server platform: org.eclipse.persistence.platform.server.NoServerPlatform
[EL Finest]: jpa: 2019-12-27 01:47:25.993--ServerSession(1340776217)--Thread(Thread[main,5,main])--Begin predeploying Persistence Unit xxxx-pu; session /file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu; state Initial; factoryCount 0
[EL Finest]: properties: 2019-12-27 01:47:25.994--ServerSession(1340776217)--Thread(Thread[main,5,main])--property=eclipselink.orm.throw.exceptions; default value=true
[EL Finest]: properties: 2019-12-27 01:47:25.995--ServerSession(1340776217)--Thread(Thread[main,5,main])--property=eclipselink.multitenant.tenants-share-emf; value=false
[EL Finest]: properties: 2019-12-27 01:47:25.995--ServerSession(1340776217)--Thread(Thread[main,5,main])--property=eclipselink.multitenant.tenants-share-cache; default value=false
[EL Finer]: metadata: 2019-12-27 01:47:26.01--Thread(Thread[main,5,main])--Searching for mapping file: [META-INF/orm.xml] at root URL: [file:/home/user/NetBeansProjects/xxxx-api/target/classes/].
[EL Finer]: metadata: 2019-12-27 01:47:26.014--Thread(Thread[main,5,main])--Searching for mapping file: [META-INF/eclipselink-orm.xml] at root URL: [file:/home/user/NetBeansProjects/xxxx-api/target/classes/].
[EL Config]: metadata: 2019-12-27 01:47:26.114--ServerSession(1340776217)--Thread(Thread[main,5,main])--The access type for the persistent class [class com.xxxx.api.model.Account] is set to [FIELD].
[EL Config]: metadata: 2019-12-27 01:47:26.136--ServerSession(1340776217)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.xxxx.api.model.Account] is being defaulted to: Account.
[EL Config]: metadata: 2019-12-27 01:47:26.154--ServerSession(1340776217)--Thread(Thread[main,5,main])--The column name for element [password] is being defaulted to: PASSWORD.
[EL Config]: metadata: 2019-12-27 01:47:26.156--ServerSession(1340776217)--Thread(Thread[main,5,main])--The column name for element [username] is being defaulted to: USERNAME.
[EL Finest]: jpa: 2019-12-27 01:47:26.168--ServerSession(1340776217)--Thread(Thread[main,5,main])--End predeploying Persistence Unit xxxx-pu; session /file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu; state Predeployed; factoryCount 1
[EL Finer]: metamodel: 2019-12-27 01:47:26.176--ServerSession(1340776217)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.xxxx.api.model.Account_] not found during initialization.
[EL Finer]: metamodel: 2019-12-27 01:47:26.177--ServerSession(1340776217)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.xxxx.api.model.BaseModel_] not found during initialization.
2019-12-27 01:47:26.177  INFO 31168 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'xxxx-pu'
2019-12-27 01:47:26.533  INFO 31168 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-12-27 01:47:27.020  INFO 31168 --- [           main] .s.s.UserDetailsServiceAutoConfiguration : 

Using generated security password: eaf18e76-a0bc-4afd-853a-2ee7138da3dc

2019-12-27 01:47:27.212  INFO 31168 --- [           main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@7ec5d3e1, org.springframework.security.web.context.SecurityContextPersistenceFilter@694dc99b, org.springframework.security.web.header.HeaderWriterFilter@518ed9b4, org.springframework.security.web.csrf.CsrfFilter@31c800a5, org.springframework.security.web.authentication.logout.LogoutFilter@590ab84, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@1f7853af, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@342a5b57, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@3b235623, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@153cf928, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@6d71f296, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@51a73873, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@3ddc5a75, org.springframework.security.web.session.SessionManagementFilter@20e73e41, org.springframework.security.web.access.ExceptionTranslationFilter@4a49ce3a, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@17d25e1d]
2019-12-27 01:47:27.428  INFO 31168 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2019-12-27 01:47:27.433  INFO 31168 --- [           main] com.xxxx.api.ApiApplication          : Started ApiApplication in 8.813 seconds (JVM running for 9.538)

If I changed my pom.xml's spring.boot.version to 2.0.9.RELEASE it works without any issue and generates the ACCOUNT table as well.如果我将 pom.xml 的spring.boot.version更改为2.0.9.RELEASE它可以正常工作并生成ACCOUNT表。

I found the issue.我发现了这个问题。 From Spring Boot 2.1.0.RELEASE the Eclipselink's Deployment of Persistence Unit will happen only after we hit any REST Controller endpoints.从 Spring Boot 2.1.0.RELEASE ,Eclipselink 的持久化单元部署只会在我们点击任何 REST 控制器端点后发生。 So I changed the code to initialize it after the application is ready.所以我在应用程序准备好后更改了代码以对其进行初始化。 It is kind of hacky way but works .这是一种hacky方式,但有效。

public class JPAConfig implements ApplicationContextAware { 

// ...

    private ApplicationContext context;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.context = applicationContext;
    }

    @EventListener(ApplicationReadyEvent.class)
    public void startup() {
        EntityManager bean = this.context.getBean(EntityManager.class);
        try {
            bean.clear();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
//...
}

After running this I get the logs like this :运行后,我得到这样的日志:

EL Finest]: jpa: 2019-12-27 17:49:05.083--ServerSession(1197389053)--Thread(Thread[main,5,main])--Begin deploying Persistence Unit xxxx-pu; session /file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu; state Predeployed; factoryCount 1
[EL Finer]: server: 2019-12-27 17:49:05.11--Thread(Thread[main,5,main])--Detected server platform: org.eclipse.persistence.platform.server.NoServerPlatform.
[EL Finer]: 2019-12-27 17:49:05.111--Thread(Thread[main,5,main])--initializing session manager
[EL Finer]: server: 2019-12-27 17:49:05.112--ServerSession(1197389053)--Thread(Thread[main,5,main])--Detected server platform: org.eclipse.persistence.platform.server.NoServerPlatform.
[EL Finest]: properties: 2019-12-27 17:49:05.113--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.logging.level; value=ALL
[EL Finest]: properties: 2019-12-27 17:49:05.113--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.logging.level; value=ALL
[EL Finest]: properties: 2019-12-27 17:49:05.116--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.cache.query-results; value=false
[EL Finest]: properties: 2019-12-27 17:49:05.117--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.cache.shared.default; value=false
[EL Finest]: properties: 2019-12-27 17:49:05.117--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.jdbc.batch-writing; value=JDBC
[EL Finest]: properties: 2019-12-27 17:49:05.118--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.session.customizer; value=com.xxxx.api.config.CamelCaseSessionCustomizer
[EL Info]: 2019-12-27 17:49:05.12--ServerSession(1197389053)--Thread(Thread[main,5,main])--EclipseLink, version: Eclipse Persistence Services - 2.6.3.v20160428-59c81c5
[EL Finest]: connection: 2019-12-27 17:49:05.164--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.Oracle12Platform, regular expression: (?is)oracle.*12.*
[EL Finest]: connection: 2019-12-27 17:49:05.164--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.Oracle11Platform, regular expression: (?is)oracle.*11.*
[EL Finest]: connection: 2019-12-27 17:49:05.164--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.Oracle10Platform, regular expression: (?is)oracle.*10.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.Oracle9Platform, regular expression: (?is)oracle.*9.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.OraclePlatform, regular expression: (?is)oracle.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.SQLAnywherePlatform, regular expression: SQL\ Anywhere.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.SybasePlatform, regular expression: (?i)(sybase.*)|(adaptive\ server\ enterprise.*)|(SQL\ Server.*)
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.SQLServerPlatform, regular expression: (?i)microsoft.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.JavaDBPlatform, regular expression: (?i).*derby.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.DB2ZPlatform, regular expression: (?i).*db2.*dsn.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.DB2MainframePlatform, regular expression: (?i).*db2.*qsq.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.DB2Platform, regular expression: (?i).*db2.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.PointBasePlatform, regular expression: (?is)pointbase.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.MySQLPlatform, regular expression: (?i)mysql.*
[EL Fine]: connection: 2019-12-27 17:49:05.167--Thread(Thread[main,5,main])--Detected database platform: org.eclipse.persistence.platform.database.MySQLPlatform
[EL Config]: connection: 2019-12-27 17:49:05.222--ServerSession(1197389053)--Connection(595285180)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
    platform=>MySQLPlatform
    user name=> ""
    connector=>JNDIConnector datasource name=>null
))
[EL Config]: connection: 2019-12-27 17:49:05.247--ServerSession(1197389053)--Connection(156850393)--Thread(Thread[main,5,main])--Connected: jdbc:mysql://localhost:3306/xxxx?nullNamePatternMatchesAll=true&useUnicode=true&character_set_server=utf8mb4&useLegacyDatetimeCode=false&useTimezone=true&serverTimezone=GMT
    User: root@localhost
    Database: MySQL  Version: 5.7.28-0ubuntu0.18.04.4
    Driver: MySQL Connector/J  Version: mysql-connector-java-8.0.17 (Revision: 16a712ddb3f826a1933ab42b0039f7fb9eebc6ec)
[EL Finest]: connection: 2019-12-27 17:49:05.248--ServerSession(1197389053)--Connection(1895707642)--Thread(Thread[main,5,main])--Connection acquired from connection pool [read].
[EL Finest]: connection: 2019-12-27 17:49:05.249--ServerSession(1197389053)--Connection(1895707642)--Thread(Thread[main,5,main])--Connection released to connection pool [read].
[EL Config]: connection: 2019-12-27 17:49:05.249--ServerSession(1197389053)--Connection(1039835620)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
    platform=>MySQLPlatform
    user name=> ""
    connector=>JNDIConnector datasource name=>null
))
[EL Config]: connection: 2019-12-27 17:49:05.27--ServerSession(1197389053)--Connection(1160393458)--Thread(Thread[main,5,main])--Connected: jdbc:mysql://localhost:3306/xxxx?nullNamePatternMatchesAll=true&useUnicode=true&character_set_server=utf8mb4&useLegacyDatetimeCode=false&useTimezone=true&serverTimezone=GMT
    User: root@localhost
    Database: MySQL  Version: 5.7.28-0ubuntu0.18.04.4
    Driver: MySQL Connector/J  Version: mysql-connector-java-8.0.17 (Revision: 16a712ddb3f826a1933ab42b0039f7fb9eebc6ec)
[EL Finest]: sequencing: 2019-12-27 17:49:05.292--ServerSession(1197389053)--Thread(Thread[main,5,main])--sequencing connected, state is Preallocation_Transaction_NoAccessor_State
[EL Finest]: sequencing: 2019-12-27 17:49:05.292--ServerSession(1197389053)--Thread(Thread[main,5,main])--sequence SEQUENCE: preallocation size 50
[EL Finest]: sequencing: 2019-12-27 17:49:05.293--ServerSession(1197389053)--Thread(Thread[main,5,main])--sequence SEQ_GEN: preallocation size 50
[EL Info]: connection: 2019-12-27 17:49:05.32--ServerSession(1197389053)--Thread(Thread[main,5,main])--/file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu login successful
[EL Finest]: query: 2019-12-27 17:49:05.385--ServerSession(1197389053)--Thread(Thread[main,5,main])--Execute query DataModifyQuery(sql="CREATE TABLE ACCOUNT (ID BIGINT NOT NULL, PASSWD VARCHAR(255), USR VARCHAR(255), PRIMARY KEY (ID))")
[EL Finest]: connection: 2019-12-27 17:49:05.385--ServerSession(1197389053)--Connection(6267871)--Thread(Thread[main,5,main])--Connection acquired from connection pool [read].
[EL Finest]: connection: 2019-12-27 17:49:05.385--ServerSession(1197389053)--Thread(Thread[main,5,main])--reconnecting to external connection pool
[EL Fine]: sql: 2019-12-27 17:49:05.402--ServerSession(1197389053)--Connection(991572261)--Thread(Thread[main,5,main])--CREATE TABLE ACCOUNT (ID BIGINT NOT NULL, PASSWD VARCHAR(255), USR VARCHAR(255), PRIMARY KEY (ID))
[EL Finest]: connection: 2019-12-27 17:49:05.891--ServerSession(1197389053)--Connection(6267871)--Thread(Thread[main,5,main])--Connection released to connection pool [read].
[EL Finest]: ddl: 2019-12-27 17:49:05.891--Thread(Thread[main,5,main])--The table (ACCOUNT) is created.
[EL Finest]: query: 2019-12-27 17:49:05.91--ServerSession(1197389053)--Thread(Thread[main,5,main])--Execute query DataReadQuery(sql="SELECT * FROM SEQUENCE WHERE SEQ_NAME = 'SEQ_GEN'")
[EL Finest]: connection: 2019-12-27 17:49:05.911--ServerSession(1197389053)--Connection(966446307)--Thread(Thread[main,5,main])--Connection acquired from connection pool [read].
[EL Finest]: connection: 2019-12-27 17:49:05.911--ServerSession(1197389053)--Thread(Thread[main,5,main])--reconnecting to external connection pool
[EL Fine]: sql: 2019-12-27 17:49:05.925--ServerSession(1197389053)--Connection(34004511)--Thread(Thread[main,5,main])--SELECT * FROM SEQUENCE WHERE SEQ_NAME = 'SEQ_GEN'
[EL Finest]: connection: 2019-12-27 17:49:05.928--ServerSession(1197389053)--Connection(966446307)--Thread(Thread[main,5,main])--Connection released to connection pool [read].
[EL Finer]: metamodel: 2019-12-27 17:49:05.929--ServerSession(1197389053)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.xxxx.api.model.Account_] not found during initialization.
[EL Finer]: metamodel: 2019-12-27 17:49:05.93--ServerSession(1197389053)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.xxxx.api.model.BaseModel_] not found during initialization.
[EL Finest]: jpa: 2019-12-27 17:49:05.93--ServerSession(1197389053)--Thread(Thread[main,5,main])--End deploying Persistence Unit xxxx-pu; session /file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu; state Deployed; factoryCount 1

I have tried this on 2.1.0.RELEASE and latest 2.2.2.RELEASE as well which works great.我已经在2.1.0.RELEASE和最新的2.2.2.RELEASE上尝试过这个,效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM