延迟加载对eclipselink中的ManyToOne不起作用

时间:2013-10-03 18:28:50

标签: java jpa eclipselink lazy-loading many-to-one

我需要静态编织实体并将它们打包在jar中,并希望在单独的程序中使用它们。我尝试加载很多对一个关系作为延迟加载像地址的人。我的课程看起来像

人:

@Id 
    @Column(name="personid")
    private Long personId;
    private String firstName;
    private String lastName;
    private String email;    

    @OneToMany(cascade = CascadeType.ALL,mappedBy="person",targetEntity=Address.class,fetch=FetchType.LAZY)      
    private List addressArray=new ArrayList<>();   
    public Person() {

    }  

和地址:

@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="personId")
    private Person person;

对于延迟加载,我尝试使用maven静态编织:

<plugins>
        <artifactId>maven-antrun-plugin</artifactId>
     <executions>
       <execution>
         <phase>process-classes</phase>
         <configuration>
           <tasks>
             <java classname="org.eclipse.persistence.tools.weaving.jpa.StaticWeave"
                   classpathref="maven.runtime.classpath" fork="true">
               <arg line="-loglevel FINE -persistenceinfo src target/classes target/classes"/>
             </java>
           </tasks>
         </configuration>
         <goals>
           <goal>run</goal>
         </goals>
       </execution>
     </executions>
      </plugin>

        </plugins>

还在我的persistence.xml中添加了<property name="eclipselink.weaving" value="static"/>

在单独的程序中添加jar后,我的静态编织类文件显示以下方法:

enter image description here

访问地址时请检查单独程序的日志:

[EL Finest]: jpa: 2013-09-26 18:07:40.453--ServerSession(8941730)--Thread(Thread[main,5,main])--Begin predeploying Persistence Unit TestDB; session file:/C:/Users/achyut_anr/achyut_anr/CheckWeaving/bin/_TestDB; state Initial; factoryCount 0
[EL Finest]: properties: 2013-09-26 18:07:40.475--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.orm.throw.exceptions; default value=true
[EL Finest]: properties: 2013-09-26 18:07:40.475--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.weaving.changetracking; default value=true
[EL Finest]: properties: 2013-09-26 18:07:40.476--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.weaving.lazy; default value=true
[EL Finest]: properties: 2013-09-26 18:07:40.476--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.weaving.eager; default value=false
[EL Finest]: properties: 2013-09-26 18:07:40.476--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.weaving.fetchgroups; default value=true
[EL Finest]: properties: 2013-09-26 18:07:40.476--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.weaving.internal; default value=true
[EL Finest]: properties: 2013-09-26 18:07:40.476--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.weaving.rest; default value=true
[EL Finest]: properties: 2013-09-26 18:07:40.477--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.multitenant.tenants-share-emf; default value=true
[EL Finest]: properties: 2013-09-26 18:07:40.478--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.multitenant.tenants-share-cache; default value=false
[EL Finer]: metadata: 2013-09-26 18:07:40.496--ServerSession(8941730)--Thread(Thread[main,5,main])--Searching for default mapping file in file:/C:/Users/achyut_anr/achyut_anr/CheckWeaving/bin/ (There is no English translation for this message.)
[EL Finer]: metadata: 2013-09-26 18:07:40.5--ServerSession(8941730)--Thread(Thread[main,5,main])--Searching for default mapping file in file:/C:/Users/achyut_anr/achyut_anr/CheckWeaving/bin/ (There is no English translation for this message.)
[EL Config]: metadata: 2013-09-26 18:07:40.681--ServerSession(8941730)--Thread(Thread[main,5,main])--The access type for the persistent class [class com.altametrics.persistence.services.Address] is set to [FIELD].
[EL Config]: metadata: 2013-09-26 18:07:40.723--ServerSession(8941730)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [field person] is being defaulted to: class com.altametrics.persistence.services.Person.
[EL Config]: metadata: 2013-09-26 18:07:40.725--ServerSession(8941730)--Thread(Thread[main,5,main])--The access type for the persistent class [class com.altametrics.persistence.services.Person] is set to [FIELD].
[EL Config]: metadata: 2013-09-26 18:07:40.733--ServerSession(8941730)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.altametrics.persistence.services.Address] is being defaulted to: Address.
[EL Config]: metadata: 2013-09-26 18:07:40.735--ServerSession(8941730)--Thread(Thread[main,5,main])--The table name for entity [class com.altametrics.persistence.services.Address] is being defaulted to: ADDRESS.
[EL Config]: metadata: 2013-09-26 18:07:40.759--ServerSession(8941730)--Thread(Thread[main,5,main])--The column name for element [id] is being defaulted to: ID.
[EL Config]: metadata: 2013-09-26 18:07:40.761--ServerSession(8941730)--Thread(Thread[main,5,main])--The column name for element [addressLine2] is being defaulted to: ADDRESSLINE2.
[EL Config]: metadata: 2013-09-26 18:07:40.762--ServerSession(8941730)--Thread(Thread[main,5,main])--The column name for element [addressLine1] is being defaulted to: ADDRESSLINE1.
[EL Config]: metadata: 2013-09-26 18:07:40.762--ServerSession(8941730)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.altametrics.persistence.services.Person] is being defaulted to: Person.
[EL Config]: metadata: 2013-09-26 18:07:40.762--ServerSession(8941730)--Thread(Thread[main,5,main])--The table name for entity [class com.altametrics.persistence.services.Person] is being defaulted to: PERSON.
[EL Config]: metadata: 2013-09-26 18:07:40.763--ServerSession(8941730)--Thread(Thread[main,5,main])--The column name for element [id] is being defaulted to: ID.
[EL Config]: metadata: 2013-09-26 18:07:40.763--ServerSession(8941730)--Thread(Thread[main,5,main])--The column name for element [lastName] is being defaulted to: LASTNAME.
[EL Config]: metadata: 2013-09-26 18:07:40.763--ServerSession(8941730)--Thread(Thread[main,5,main])--The column name for element [email] is being defaulted to: EMAIL.
[EL Config]: metadata: 2013-09-26 18:07:40.764--ServerSession(8941730)--Thread(Thread[main,5,main])--The column name for element [firstName] is being defaulted to: FIRSTNAME.
[EL Config]: metadata: 2013-09-26 18:07:40.785--ServerSession(8941730)--Thread(Thread[main,5,main])--The primary key column name for the mapping element [field person] is being defaulted to: ID.
[EL Finer]: weaver: 2013-09-26 18:07:40.805--ServerSession(8941730)--Thread(Thread[main,5,main])--Class [com.altametrics.persistence.services.Address] registered to be processed by weaver.
[EL Finer]: weaver: 2013-09-26 18:07:40.807--ServerSession(8941730)--Thread(Thread[main,5,main])--Class [com.altametrics.persistence.services.Person] registered to be processed by weaver.
[EL Finest]: jpa: 2013-09-26 18:07:40.809--ServerSession(8941730)--Thread(Thread[main,5,main])--End predeploying Persistence Unit TestDB; session file:/C:/Users/achyut_anr/achyut_anr/CheckWeaving/bin/_TestDB; state Predeployed; factoryCount 0
[EL Finer]: weaver: 2013-09-26 18:07:40.81--Thread(Thread[main,5,main])--JavaSECMPInitializer - transformer is null.
[EL Finest]: jpa: 2013-09-26 18:07:40.81--ServerSession(8941730)--Thread(Thread[main,5,main])--Begin predeploying Persistence Unit TestDB; session file:/C:/Users/achyut_anr/achyut_anr/CheckWeaving/bin/_TestDB; state Predeployed; factoryCount 0
[EL Finest]: jpa: 2013-09-26 18:07:40.81--ServerSession(8941730)--Thread(Thread[main,5,main])--End predeploying Persistence Unit TestDB; session file:/C:/Users/achyut_anr/achyut_anr/CheckWeaving/bin/_TestDB; state Predeployed; factoryCount 1
[EL Finest]: jpa: 2013-09-26 18:07:40.815--ServerSession(8941730)--Thread(Thread[main,5,main])--Begin deploying Persistence Unit TestDB; session file:/C:/Users/achyut_anr/achyut_anr/CheckWeaving/bin/_TestDB; state Predeployed; factoryCount 1
[EL Finer]: 2013-09-26 18:07:40.829--ServerSession(8941730)--Thread(Thread[main,5,main])--Could not initialize Validation Factory. Encountered following exception: java.lang.NoClassDefFoundError: javax/validation/Validation
[EL Finest]: properties: 2013-09-26 18:07:40.831--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.logging.level; value=FINEST; translated value=FINEST
[EL Finest]: properties: 2013-09-26 18:07:40.832--ServerSession(8941730)--Thread(Thread[main,5,main])--property=eclipselink.logging.level; value=FINEST; translated value=FINEST
[EL Finest]: properties: 2013-09-26 18:07:40.837--ServerSession(8941730)--Thread(Thread[main,5,main])--property=javax.persistence.jdbc.user; value=root
[EL Finest]: properties: 2013-09-26 18:07:40.837--ServerSession(8941730)--Thread(Thread[main,5,main])--property=javax.persistence.jdbc.password; value=xxxxxx
[EL Finest]: properties: 2013-09-26 18:07:41.502--ServerSession(8941730)--Thread(Thread[main,5,main])--property=javax.persistence.jdbc.driver; value=com.mysql.jdbc.Driver
[EL Finest]: properties: 2013-09-26 18:07:41.502--ServerSession(8941730)--Thread(Thread[main,5,main])--property=javax.persistence.jdbc.url; value=jdbc:mysql://localhost:3306/sample
[EL Info]: 2013-09-26 18:07:41.506--ServerSession(8941730)--Thread(Thread[main,5,main])--EclipseLink, version: Eclipse Persistence Services - 2.5.0.v20130507-3faac2b
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.757--Thread(Thread[main,5,main])--(?i)oracle.*12 (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.757--Thread(Thread[main,5,main])--(?i)oracle.*11 (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.757--Thread(Thread[main,5,main])--(?i)oracle.*10 (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.758--Thread(Thread[main,5,main])--(?i)oracle.*9 (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.758--Thread(Thread[main,5,main])--(?i)oracle.* (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.758--Thread(Thread[main,5,main])--SQL\ Anywhere.* (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.758--Thread(Thread[main,5,main])--(?i)(sybase.*)|(adaptive\ server\ enterprise.*)|(SQL\ Server.*) (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.759--Thread(Thread[main,5,main])--(?i)microsoft.* (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.759--Thread(Thread[main,5,main])--(?i).*derby.* (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.759--Thread(Thread[main,5,main])--(?i).*db2.* (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.759--Thread(Thread[main,5,main])--(?i)pointbase.* (There is no English translation for this message.)
[EL Finest]: dbPlatformHelper_regExprDbPlatform: 2013-09-26 18:07:41.759--Thread(Thread[main,5,main])--(?i)mysql.* (There is no English translation for this message.)
[EL Fine]: connection: 2013-09-26 18:07:41.76--Thread(Thread[main,5,main])--Detected database platform: org.eclipse.persistence.platform.database.MySQLPlatform
[EL Config]: connection: 2013-09-26 18:07:41.771--ServerSession(8941730)--Connection(7521179)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
    platform=>MySQLPlatform
    user name=> "root"
    datasource URL=> "jdbc:mysql://localhost:3306/sample"
))
[EL Config]: connection: 2013-09-26 18:07:41.783--ServerSession(8941730)--Connection(27722152)--Thread(Thread[main,5,main])--Connected: jdbc:mysql://localhost:3306/sample
    User: root@localhost
    Database: MySQL  Version: 5.1.39-community
    Driver: MySQL-AB JDBC Driver  Version: mysql-connector-java-5.1.18 ( Revision: tonci.grgin@oracle.com-20110930151701-jfj14ddfq48ifkfq )
[EL Finest]: connection: 2013-09-26 18:07:41.783--ServerSession(8941730)--Connection(27722152)--Thread(Thread[main,5,main])--Connection acquired from connection pool [default].
[EL Finest]: connection: 2013-09-26 18:07:41.783--ServerSession(8941730)--Connection(27722152)--Thread(Thread[main,5,main])--Connection released to connection pool [default].
[EL Info]: connection: 2013-09-26 18:07:41.828--ServerSession(8941730)--Thread(Thread[main,5,main])--file:/C:/Users/achyut_anr/achyut_anr/CheckWeaving/bin/_TestDB login successful
[EL Finer]: metamodel: 2013-09-26 18:07:41.841--ServerSession(8941730)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.altametrics.persistence.services.Person_] not found during initialization.
[EL Finer]: metamodel: 2013-09-26 18:07:41.842--ServerSession(8941730)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.altametrics.persistence.services.Address_] not found during initialization.
[EL Finest]: jpa: 2013-09-26 18:07:41.842--ServerSession(8941730)--Thread(Thread[main,5,main])--End deploying Persistence Unit TestDB; session file:/C:/Users/achyut_anr/achyut_anr/CheckWeaving/bin/_TestDB; state Deployed; factoryCount 1
[EL Finer]: connection: 2013-09-26 18:07:41.863--ServerSession(8941730)--Thread(Thread[main,5,main])--client acquired: 3812334
[EL Finer]: transaction: 2013-09-26 18:07:41.872--ClientSession(3812334)--Thread(Thread[main,5,main])--acquire unit of work: 25692210
[EL Finest]: query: 2013-09-26 18:07:41.887--UnitOfWork(25692210)--Thread(Thread[main,5,main])--Execute query ReadObjectQuery(name="readAddress" referenceClass=Address sql="SELECT ID, ADDRESSLINE1, ADDRESSLINE2, personid FROM ADDRESS WHERE (ID = ?)")
[EL Finest]: connection: 2013-09-26 18:07:41.889--ServerSession(8941730)--Connection(27722152)--Thread(Thread[main,5,main])--Connection acquired from connection pool [default].
[EL Fine]: sql: 2013-09-26 18:07:41.889--ServerSession(8941730)--Connection(27722152)--Thread(Thread[main,5,main])--SELECT ID, ADDRESSLINE1, ADDRESSLINE2, personid FROM ADDRESS WHERE (ID = ?)
    bind => [1]
[EL Finest]: connection: 2013-09-26 18:07:41.913--ServerSession(8941730)--Connection(27722152)--Thread(Thread[main,5,main])--Connection released to connection pool [default].
[EL Finest]: query: 2013-09-26 18:07:41.917--ServerSession(8941730)--Thread(Thread[main,5,main])--Execute query ReadObjectQuery(name="person" referenceClass=Person )
[EL Finest]: connection: 2013-09-26 18:07:41.917--ServerSession(8941730)--Connection(27722152)--Thread(Thread[main,5,main])--Connection acquired from connection pool [default].
[EL Fine]: sql: 2013-09-26 18:07:41.918--ServerSession(8941730)--Connection(27722152)--Thread(Thread[main,5,main])--SELECT ID, EMAIL, FIRSTNAME, LASTNAME FROM PERSON WHERE (ID = ?)
    bind => [1]
[EL Finest]: connection: 2013-09-26 18:07:41.919--ServerSession(8941730)--Connection(27722152)--Thread(Thread[main,5,main])--Connection released to connection pool [default].
[EL Finest]: transaction: 2013-09-26 18:07:41.922--UnitOfWork(25692210)--Thread(Thread[main,5,main])--Register the existing object  personId=1

我的持久性单元看起来像:

 <persistence-unit name="TestDB">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <class>com.altametrics.persistence.services.Person</class>      
        <class>com.altametrics.persistence.services.Address</class>
         <exclude-unlisted-classes>false</exclude-unlisted-classes>
        <properties>          

            <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/sample"/>
            <property name="javax.persistence.jdbc.password" value="admin"/>
            <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
            <property name="javax.persistence.jdbc.user" value="root"/> 
            <property name="eclipselink.weaving" value="static"/>         
            <!--  <property name="eclipselink.ddl-generation" value="drop-and-create-tables" /> -->
          <property name="eclipselink.logging.level" value="FINEST"/> 

        </properties>
    </persistence-unit>

删除字段后的Stacktrace:

Call: SELECT ID, EMAIL, FIRSTNAME, LASTNAME FROM Person WHERE (ID = ?)
    bind => [1]
Query: ReadObjectQuery(name="person" referenceClass=Person1 )
    at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:679)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
    at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1995)
    at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)
    at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
    at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
    at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:714)
    at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2777)
    at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2730)
    at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:526)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1155)
    at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1114)
    at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:429)
    at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:3207)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1797)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1779)
    at org.eclipse.persistence.internal.indirection.NoIndirectionPolicy.valueFromQuery(NoIndirectionPolicy.java:326)
    at org.eclipse.persistence.mappings.ForeignReferenceMapping.valueFromRowInternal(ForeignReferenceMapping.java:2234)
    at org.eclipse.persistence.mappings.OneToOneMapping.valueFromRowInternal(OneToOneMapping.java:1790)
    at org.eclipse.persistence.mappings.ForeignReferenceMapping.valueFromRow(ForeignReferenceMapping.java:2120)
    at org.eclipse.persistence.mappings.ForeignReferenceMapping.readFromRowIntoObject(ForeignReferenceMapping.java:1455)
    at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:455)
    at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:862)
    at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java:777)
    at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:730)
    at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:629)
    at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:587)
    at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:571)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:782)
    at org.eclipse.persistence.queries.ReadObjectQuery.registerResultInUnitOfWork(ReadObjectQuery.java:861)
    at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:532)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1155)
    at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1114)
    at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:429)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1202)
    at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2894)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1797)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1779)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1730)
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.executeQuery(EntityManagerImpl.java:883)
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.findInternal(EntityManagerImpl.java:826)
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:719)
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:588)
    at com.alta.test.Main2.main(Main2.java:25)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'EMAIL' in 'field list'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

为什么上面的日志会在Iam懒惰的情况下访问person对象?请帮忙。

0 个答案:

没有答案