与复合持久性单元一起使用时,Eclipselink会生成错误的MySql LIMIT查询

时间:2016-05-10 15:10:25

标签: mysql jpa eclipselink

我正在使用query.setFirstResult(startPosition);query.setMaxResults(range);。让我们说起始位置是10,范围是5.在生成的查询中,我得到LIMIT 10,15。不应该是10,5?

以下是我的数据访问类中的代码。

@PersistenceContext
private EntityManager em;

@Override
public List<TableTwo> getTableTwoList(Integer start, Integer range) {
    LOG.info("-> getTableTwoList start={}, range={}", start, range);
    List<TableTwo> result;
    try {
        String queryStr = "SELECT t FROM " + TableTwo.class.getName() + " t ";
        LOG.info(queryStr);
        Query query = em.createQuery(queryStr);
        if (start != null) {
            query.setFirstResult(start);
        }
        if (range != null) {
            query.setMaxResults(range);
        }
        result = query.getResultList();
        LOG.info("<- getTableTwoList returning {} objects", result.size());
        return result;
    } catch (IllegalArgumentException ex) {
        LOG.error("Got IllegalArgumentException ", ex);
        throw new RuntimeException("The criteria passed is incorrect", ex);
    } catch (Exception e) {
        LOG.error("Got other Exception: {}", e);
        throw new RuntimeException("Generic Exception occured", e);
    }
}

我也在使用复合持久性单元。 persistence.xml文件如下所示。

复合persistence.xml

<?xml version="1.0" encoding="UTF-8"?>

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
             version="1.0">
    <persistence-unit name="CompositePU" transaction-type="RESOURCE_LOCAL">
        <provider>
            org.eclipse.persistence.jpa.PersistenceProvider
        </provider>
        <jar-file>../lib/modOne-1.0.0.jar</jar-file>
        <jar-file>../lib/modTwo-1.0.0.jar</jar-file>        
        <properties>
            <property name="eclipselink.composite-unit" value="true" />         
        </properties>
    </persistence-unit>
</persistence>

第一个成员persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
    xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence  http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <persistence-unit name="PUONE" transaction-type="RESOURCE_LOCAL">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <class>com.test.poc.compositepu.entity.TableOne</class>
        <properties>
            <property name="javax.persistence.validation.group.pre-persist"     value="" />
            <property name="javax.persistence.validation.group.pre-update"  value="none" />
            <property name="eclipselink.cache.shared.default" value="false" />
            <property name="eclipselink.ddl-generation" value="none" />
            <property name="eclipselink.logging.level" value="INFO" />
            <property name="eclipselink.logging.parameters" value="true" />
            <property name="eclipselink.persistence-context.flush-mode" value="COMMIT" />
            <property name="eclipselink.persistence-context.close-on-commit" value="true" />
            <property name="eclipselink.target-database" value="MySQL" />
            <property name="eclipselink.weaving" value="false" />
        </properties>
    </persistence-unit>
</persistence>

第二个成员persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="PUTWO" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>com.test.poc.compositepu.entity.TableTwo</class>
    <properties>
      <property name="javax.persistence.validation.group.pre-persist" value=""/>
      <property name="javax.persistence.validation.group.pre-update" value="none"/>
      <property name="eclipselink.cache.shared.default" value="false"/>
      <property name="eclipselink.ddl-generation" value="none"/>
      <property name="eclipselink.logging.level" value="INFO"/>
      <property name="eclipselink.logging.parameters" value="true"/>
      <property name="eclipselink.persistence-context.flush-mode" value="COMMIT"/>
      <property name="eclipselink.persistence-context.close-on-commit" value="true"/>
      <property name="eclipselink.target-database" value="MySQL"/>
      <property name="eclipselink.weaving" value="false"/>
    </properties>
  </persistence-unit>
</persistence>

另外,我正在定义实体管理器工厂bean,如下所示

@Bean
protected EntityManagerFactory entityManagerFactory() throws PersistenceException {
    LOG.info("-> entityManagerFactory");
    Map<String, String> props1 = new HashMap<>();
    props1.put(JAVAX_PERSISTENCE_JDBC_USER, DB_USERNAME);
    props1.put(JAVAX_PERSISTENCE_JDBC_PASSWORD, DB_PASSWORD);
    props1.put(JAVAX_PERSISTENCE_JDBC_DRIVER, JDBC_DRIVER);
    props1.put(JAVAX_PERSISTENCE_JDBC_URL, DB_HOST + DB_ONE + DB_PARAMS);
    Map<String, String> props2 = new HashMap<>();
    props2.put(JAVAX_PERSISTENCE_JDBC_USER, DB_USERNAME);
    props2.put(JAVAX_PERSISTENCE_JDBC_PASSWORD, DB_PASSWORD);
    props2.put(JAVAX_PERSISTENCE_JDBC_DRIVER, JDBC_DRIVER);
    props2.put(JAVAX_PERSISTENCE_JDBC_URL, DB_HOST + DB_TWO + DB_PARAMS);

    Map<String, Map<String, String>> memberProps = new HashMap<>();
    memberProps.put(PU_ONE, props1);
    memberProps.put(PU_TWO, props2);
    Map props = new HashMap();
    props.put(ECLIPSELINK_COMPOSITE_UNIT_PROPERTIES, memberProps);

    EntityManagerFactory emf = Persistence.createEntityManagerFactory(COMPOSITE_PU, props);

    LOG.info("<- entityManagerFactory emf.getProperties={}", emf.getProperties());
    return emf;
}

我错过了什么?

更新: 该错误在一个小项目中重现并在Github上发布。 https://github.com/thomasabraham/CompositePU

娱乐中的Eclipselink日志如下所示

[EL Finest]: properties: 2016-05-18 10:30:35.842--SessionBroker(1837692147)--Thread(Thread[localhost-startStop-1,5,main])--property=eclipselink.logging.parameters; value=true
[EL Finest]: jpa: 2016-05-18 10:30:35.862--SessionBroker(1837692147)--Thread(Thread[localhost-startStop-1,5,main])--Begin predeploying Persistence Unit CompositePU; session file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/classes/_CompositePU; state Initial; factoryCount 0
[EL Finest]: properties: 2016-05-18 10:30:35.864--SessionBroker(1837692147)--Thread(Thread[localhost-startStop-1,5,main])--property=eclipselink.orm.throw.exceptions; default value=true
[EL Finest]: jpa: 2016-05-18 10:30:35.891--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--Begin predeploying Persistence Unit PUTWO; session PUTWO; state Initial; factoryCount 0
[EL Finest]: properties: 2016-05-18 10:30:35.892--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--property=eclipselink.multitenant.tenants-share-emf; default value=true
[EL Finest]: properties: 2016-05-18 10:30:35.894--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--property=eclipselink.multitenant.tenants-share-cache; default value=false
[EL Finer]: metadata: 2016-05-18 10:30:35.907--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--Searching for default mapping file in file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/lib/modTwo-1.0.0.jar (There is no English translation for this message.)
[EL Finer]: metadata: 2016-05-18 10:30:35.911--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--Searching for default mapping file in file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/lib/modTwo-1.0.0.jar (There is no English translation for this message.)
[EL Config]: metadata: 2016-05-18 10:30:36.098--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--The access type for the persistent class[class com.test.poc.compositepu.entity.TableTwo] is set to [FIELD]. [EL Config]: metadata: 2016-05-18 10:30:36.136--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--The alias name for the entity class [class com.test.poc.compositepu.entity.TableTwo] is being defaulted to: TableTwo. [EL Finest]: jpa: 2016-05-18 10:30:36.18--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--End predeploying Persistence Unit PUTWO; session PUTWO; state HalfPredeployedCompositeMember COMPOSITE_MEMBER_MIDDLE; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.181--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--Begin predeploying Persistence Unit PUONE; session PUONE; state Initial; factoryCount 0
[EL Finest]: properties: 2016-05-18 10:30:36.183--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--property=eclipselink.multitenant.tenants-share-emf; default value=true
[EL Finest]: properties: 2016-05-18 10:30:36.184--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--property=eclipselink.multitenant.tenants-share-cache; default value=false
[EL Finer]: metadata: 2016-05-18 10:30:36.189--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--Searching for default mapping file in file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/lib/modOne-1.0.0.jar (There is no English translation for this message.)
[EL Finer]: metadata: 2016-05-18 10:30:36.191--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--Searching for default mapping file in file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/lib/modOne-1.0.0.jar (There is no English translation for this message.)
[EL Config]: metadata: 2016-05-18 10:30:36.196--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--The access type for the persistent class[class com.test.poc.compositepu.entity.TableOne] is set to [FIELD].
[EL Config]: metadata: 2016-05-18 10:30:36.202--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--The alias name for the entity class [class com.test.poc.compositepu.entity.TableOne] is being defaulted to: TableOne.
[EL Finest]: jpa: 2016-05-18 10:30:36.206--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--End predeploying Persistence Unit PUONE; session PUONE; state HalfPredeployedCompositeMember COMPOSITE_MEMBER_MIDDLE; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.207--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--Begin predeploying Persistence Unit PUONE; session PUONE; state HalfPredeployedCompositeMember COMPOSITE_MEMBER_MIDDLE; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.213--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--End predeploying Persistence Unit PUONE; session PUONE; state HalfPredeployedCompositeMember COMPOSITE_MEMBER_FINAL; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.214--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--Begin predeploying Persistence Unit PUTWO; session PUTWO; state HalfPredeployedCompositeMember COMPOSITE_MEMBER_MIDDLE; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.216--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--End predeploying Persistence Unit PUTWO; session PUTWO; state HalfPredeployedCompositeMember COMPOSITE_MEMBER_FINAL; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.218--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--Begin predeploying Persistence Unit PUONE; session PUONE; state HalfPredeployedCompositeMember COMPOSITE_MEMBER_FINAL; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.224--ServerSession(755784696)--Thread(Thread[localhost-startStop-1,5,main])--End predeploying Persistence Unit PUONE; session PUONE; state Predeployed; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.226--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--Begin predeploying Persistence Unit PUTWO; session PUTWO; state HalfPredeployedCompositeMember COMPOSITE_MEMBER_FINAL; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.228--ServerSession(961795169)--Thread(Thread[localhost-startStop-1,5,main])--End predeploying Persistence Unit PUTWO; session PUTWO; state Predeployed; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.232--SessionBroker(1837692147)--Thread(Thread[localhost-startStop-1,5,main])--End predeploying Persistence Unit CompositePU; session file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/classes/_CompositePU; state Predeployed; factoryCount 0
[EL Finer]: weaver: 2016-05-18 10:30:36.237--Thread(Thread[localhost-startStop-1,5,main])--JavaSECMPInitializer - transformer is null.
[EL Finest]: jpa: 2016-05-18 10:30:36.237--SessionBroker(1837692147)--Thread(Thread[localhost-startStop-1,5,main])--Begin predeploying Persistence Unit CompositePU; session file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/classes/_CompositePU; state Predeployed; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:30:36.239--SessionBroker(1837692147)--Thread(Thread[localhost-startStop-1,5,main])--End predeploying Persistence Unit CompositePU; session file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/classes/_CompositePU; state Predeployed; factoryCount 1
May 18, 2016 10:30:36 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-9080"]
May 18, 2016 10:30:36 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 18, 2016 10:30:36 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6766 ms
[EL Finest]: jpa: 2016-05-18 10:38:45.762--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--Begin deploying Persistence Unit CompositePU;session file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/classes/_CompositePU; state Predeployed; factoryCount 1
[EL Finest]: jpa: 2016-05-18 10:38:45.764--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--Begin deploying Persistence Unit PUONE; session PUONE; state Predeployed; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:38:45.78--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--End deploying Persistence Unit PUONE; session PUONE; state HalfDeployed; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:38:45.781--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--Begin deploying Persistence Unit PUTWO; session PUTWO; state Predeployed; factoryCount 0
[EL Finest]: jpa: 2016-05-18 10:38:45.782--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--End deploying Persistence Unit PUTWO; sessionPUTWO; state HalfDeployed; factoryCount 0
[EL Finest]: properties: 2016-05-18 10:38:45.785--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=eclipselink.logging.level; value=FINEST
[EL Finest]: properties: 2016-05-18 10:38:45.786--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=eclipselink.logging.parameters; value=true
[EL Finest]: properties: 2016-05-18 10:38:45.786--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=eclipselink.logging.level; value=FINEST
[EL Finest]: properties: 2016-05-18 10:38:45.788--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=eclipselink.logging.parameters; value=true
[EL Finest]: properties: 2016-05-18 10:38:45.791--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--Begin updateSession on composite memberPersistence Unit PUONE; state HalfDeployed
[EL Finest]: properties: 2016-05-18 10:38:45.793--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=eclipselink.target-database; value=MySQL; translated value=org.eclipse.persistence.platform.database.MySQLPlatform
[EL Finest]: properties: 2016-05-18 10:38:45.803--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=javax.persistence.jdbc.user; value=root
[EL Finest]: properties: 2016-05-18 10:38:45.805--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=javax.persistence.jdbc.password; value=xxxxxx
[EL Finest]: properties: 2016-05-18 10:38:46.312--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=javax.persistence.jdbc.driver;value=com.mysql.jdbc.Driver
[EL Finest]: properties: 2016-05-18 10:38:46.313--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=javax.persistence.jdbc.url; value=jdbc:mysql://localhost:3306/dbone?useUnicode=yes&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&connectionCollation=utf8_general_ci& characterSetResults=utf8
[EL Finest]: properties: 2016-05-18 10:38:46.318--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=eclipselink.cache.shared.default; value=false; translated value=false
[EL Finest]: properties: 2016-05-18 10:38:46.322--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--End updateSession on composite member Persistence Unit PUONE; state HalfDeployed
[EL Finest]: properties: 2016-05-18 10:38:46.323--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--Begin updateSession on composite memberPersistence Unit PUTWO; state HalfDeployed
[EL Finest]: properties: 2016-05-18 10:38:46.324--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=eclipselink.target-database; value=MySQL; translated value=org.eclipse.persistence.platform.database.MySQLPlatform
[EL Finest]: properties: 2016-05-18 10:38:46.328--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=javax.persistence.jdbc.user; value=root
[EL Finest]: properties: 2016-05-18 10:38:46.331--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=javax.persistence.jdbc.password; value=xxxxxx
[EL Finest]: properties: 2016-05-18 10:38:46.337--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=javax.persistence.jdbc.driver;value=com.mysql.jdbc.Driver
[EL Finest]: properties: 2016-05-18 10:38:46.339--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=javax.persistence.jdbc.url; value=jdbc:mysql://localhost:3306/dbtwo?useUnicode=yes&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&connectionCollation=utf8_general_ci& characterSetResults=utf8
[EL Finest]: properties: 2016-05-18 10:38:46.341--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--property=eclipselink.cache.shared.default; value=false; translated value=false
[EL Finest]: properties: 2016-05-18 10:38:46.342--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--End updateSession on composite member Persistence Unit PUTWO; state HalfDeployed
[EL Info]: 2016-05-18 10:38:46.35--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--EclipseLink, version: Eclipse Persistence Services -2.5.1.v20130824-981335c
[EL Config]: connection: 2016-05-18 10:38:46.363--ServerSession(961795169)--Connection(717057583)--Thread(Thread[http-bio-9080-exec-3,5,main])--connecting(DatabaseLogin(
        platform=>MySQLPlatform
        user name=> "root"
        datasource URL=> "jdbc:mysql://localhost:3306/dbtwo?useUnicode=yes&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&connectionCollation=utf8_general_ci& characterSetResults=utf8"
))
[EL Config]: connection: 2016-05-18 10:38:46.759--ServerSession(961795169)--Connection(1184531536)--Thread(Thread[http-bio-9080-exec-3,5,main])--Connected: jdbc:mysql://localhost:3306/dbtwo?useUnicode=yes&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&connectionCollation=utf8_general_ci& characterSetResults=utf8
        User: root@localhost
        Database: MySQL  Version: 5.6.13
        Driver: MySQL Connector Java  Version: mysql-connector-java-5.1.26 ( Revision: ${bzr.revision-id} )
[EL Finest]: connection: 2016-05-18 10:38:46.761--ServerSession(961795169)--Connection(1184531536)--Thread(Thread[http-bio-9080-exec-3,5,main])--Connection acquired from connection pool [default].
[EL Finest]: connection: 2016-05-18 10:38:46.762--ServerSession(961795169)--Connection(1184531536)--Thread(Thread[http-bio-9080-exec-3,5,main])--Connection released to connection pool [default].
[EL Info]: connection: 2016-05-18 10:38:46.766--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--PUTWO login successful
[EL Config]: connection: 2016-05-18 10:38:46.781--ServerSession(755784696)--Connection(976223442)--Thread(Thread[http-bio-9080-exec-3,5,main])--connecting(DatabaseLogin(
        platform=>MySQLPlatform
        user name=> "root"
        datasource URL=> "jdbc:mysql://localhost:3306/dbone?useUnicode=yes&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&connectionCollation=utf8_general_ci& characterSetResults=utf8"
))
[EL Config]: connection: 2016-05-18 10:38:46.808--ServerSession(755784696)--Connection(1695019061)--Thread(Thread[http-bio-9080-exec-3,5,main])--Connected: jdbc:mysql://localhost:3306/dbone?useUnicode=yes&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&connectionCollation=utf8_general_ci& characterSetResults=utf8
        User: root@localhost
        Database: MySQL  Version: 5.6.13
        Driver: MySQL Connector Java  Version: mysql-connector-java-5.1.26 ( Revision: ${bzr.revision-id} )
[EL Finest]: connection: 2016-05-18 10:38:46.81--ServerSession(755784696)--Connection(1695019061)--Thread(Thread[http-bio-9080-exec-3,5,main])--Connection acquired from connection pool [default].
[EL Finest]: connection: 2016-05-18 10:38:46.811--ServerSession(755784696)--Connection(1695019061)--Thread(Thread[http-bio-9080-exec-3,5,main])--Connection released to connection pool [default].
[EL Info]: connection: 2016-05-18 10:38:46.814--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--PUONE login successful
[EL Finest]: sequencing: 2016-05-18 10:38:46.844--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--sequencing connected, state is NoPreallocation_State
[EL Finest]: sequencing: 2016-05-18 10:38:46.846--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--sequence SEQ_GEN_IDENTITY: preallocation size 1
[EL Finest]: sequencing: 2016-05-18 10:38:46.848--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--sequencing connected, state is NoPreallocation_State
[EL Finest]: sequencing: 2016-05-18 10:38:46.849--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--sequence SEQ_GEN_IDENTITY: preallocation size 1
[EL Info]: connection: 2016-05-18 10:38:46.909--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/classes/_CompositePU login successful
[EL Finer]: metamodel: 2016-05-18 10:38:46.932--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--Canonical Metamodel class [com.test.poc.compositepu.entity.TableTwo_] not found during initialization.
[EL Finer]: metamodel: 2016-05-18 10:38:46.935--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--Canonical Metamodel class [com.test.poc.compositepu.entity.TableOne_] not found during initialization.
[EL Finest]: jpa: 2016-05-18 10:38:46.936--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--End deploying Persistence Unit CompositePU; session file:/D:/Software/apache-tomcat-7.0.53/webapps/modThree-1.0.0/WEB-INF/classes/_CompositePU; state Deployed; factoryCount 1
[EL Finer]: connection: 2016-05-18 10:38:46.968--SessionBroker(1837692147)--Thread(Thread[http-bio-9080-exec-3,5,main])--acquire client session broker
[EL Finer]: connection: 2016-05-18 10:38:46.974--ServerSession(961795169)--Thread(Thread[http-bio-9080-exec-3,5,main])--client acquired: 1744273806
[EL Finer]: connection: 2016-05-18 10:38:46.974--ServerSession(755784696)--Thread(Thread[http-bio-9080-exec-3,5,main])--client acquired: 2081015995
[EL Finer]: transaction: 2016-05-18 10:38:47.0--SessionBroker(585782081)--Thread(Thread[http-bio-9080-exec-3,5,main])--acquire unit of work: 1312157705
[EL Finer]: transaction: 2016-05-18 10:38:47.268--UnitOfWork(1312157705)--Thread(Thread[http-bio-9080-exec-3,5,main])--begin unit of work flush
[EL Finer]: transaction: 2016-05-18 10:38:47.268--UnitOfWork(1312157705)--Thread(Thread[http-bio-9080-exec-3,5,main])--end unit of work flush
[EL Finest]: query: 2016-05-18 10:38:47.269--UnitOfWork(1312157705)--Thread(Thread[http-bio-9080-exec-3,5,main])--Execute query ReportQuery(referenceClass=TableOne sql="SELECT Id, Name FROM TableOne")
[EL Finest]: connection: 2016-05-18 10:38:47.276--ServerSession(755784696)--Connection(1695019061)--Thread(Thread[http-bio-9080-exec-3,5,main])--Connection acquired from connection pool [default].
[EL Fine]: sql: 2016-05-18 10:38:47.277--ServerSession(755784696)--Connection(1695019061)--Thread(Thread[http-bio-9080-exec-3,5,main])--SELECT Id AS a1, Name AS a2 FROM TableOne LIMIT ?, ?
            bind => [5, 15]
[EL Finest]: connection: 2016-05-18 10:38:47.296--ServerSession(755784696)--Connection(1695019061)--Thread(Thread[http-bio-9080-exec-3,5,main])--Connection released to connection pool [default].
[EL Finer]: transaction: 2016-05-18 10:38:47.304--UnitOfWork(1312157705)--Thread(Thread[http-bio-9080-exec-3,5,main])--begin unit of work commit
[EL Finer]: transaction: 2016-05-18 10:38:47.307--UnitOfWork(1312157705)--Thread(Thread[http-bio-9080-exec-3,5,main])--end unit of work commit
[EL Finer]: transaction: 2016-05-18 10:38:47.308--UnitOfWork(1312157705)--Thread(Thread[http-bio-9080-exec-3,5,main])--resume unit of work
[EL Finer]: transaction: 2016-05-18 10:38:47.309--UnitOfWork(1312157705)--Thread(Thread[http-bio-9080-exec-3,5,main])--release unit of work
[EL Finer]: connection: 2016-05-18 10:38:47.311--SessionBroker(585782081)--Thread(Thread[http-bio-9080-exec-3,5,main])--releasing client session broker
[EL Finer]: connection: 2016-05-18 10:38:47.314--ClientSession(1744273806)--Thread(Thread[http-bio-9080-exec-3,5,main])--client released
[EL Finer]: connection: 2016-05-18 10:38:47.317--ClientSession(2081015995)--Thread(Thread[http-bio-9080-exec-3,5,main])--client released

0 个答案:

没有答案