EclipseLink提供全面的开源Java持久性解决方案。 EclipseLink专注于标准(JPA,JAXB,SDO),它们具有针对跨数据源,格式和容器的企业软件开发人员的高级功能,性能和可伸缩性。
我有一个几年前写的关于一个班级的程序,它运行良好。最近,我更新了很多东西-Java,Eclipse,Tomcat等,因为我已经有一段时间没有编程了。我...
我有一个表,其ID值为1000 null 1000 En 1000 Fr 1000 Es 1001 En 1001 Fr 1001 Es选择查询的输出应如下。 (由于1000仅具有空值,因此...
[NullPointerException,当在使用EclipseLink的构造函数表达式中使用NULL时]]
[在相当简单的JPQL查询中,我使用NULL获得了NPE,请参见下面的堆栈跟踪:15:25:46,724错误[net.bbstats.framework.cdi.BaseCdiBean](默认任务1)CompetitionProvider.loadEntities()抛出了。 ..
我创建了一个具有如下结果集映射的命名查询:@NamedNativeQueries({@NamedNativeQuery(name =“ Q_INSTRUMENTS”,query =“ SELECT i.ID,i.TICKER,i.ISIN,i.SEDOL, i.NAME,i ....
JSF throws类不具有DynamicEntity的属性
我想将DynamicEntity用作提供我的xhtml表单属性的托管bean。当我将上述内容用作我的xhtml页面的支持bean时,出现以下异常:类'com.invoice ....
如何在春季启动Async TransactionalEventListener
我想在TransactionPhase.AFTER_COMPLETION之后做一些事情,但是在异步模式下。问题是在当前实施中它以同步模式运行,我如何使其异步? @TransactionalEventListener(...
我有一个问题,例如:@MappedSuperclass @AdditionalCriteria(“ this.state = com.sample.state.enum.RecordState.OK”)公共抽象类State {private ...
在Eclipse Dali中安装/更新EclipseLink
我当前正在将Eclipse Dali与EclipseLink 2.5.2结合使用。现在,我想更改为EclipseLink 2.7.5版本,但是我无法找到如何为新的EclipseLink版本设置Dali。 JPA ...
PersistenceUnitUtil的getIdentifier方法不适用于复合键
当尝试使用PersistenceUnitUtil的getIdentifier方法检索身份时,出现以下错误。我做错了什么吗?本地异常堆栈:异常[EclipseLink-0](...
我正在使用JPA 2.0的EclipseLink实现,该实现允许悲观锁定。我知道如何锁定实体,但是如何释放锁定?起初我以为这一切都是照顾好...
我们在JavaEE7应用程序中将Eclipselink-2.6与wildfly-8服务器一起使用。我们有三个JPA实体A,B和C。B和C扩展了A。为了将对象“ myObjectId” A的类型更改为B,我们...
我有一个带有一些外键的数据库,这些外键没有配置为ON DELETE CASCADE;如果可能,我想避免更改此设置。同样,我们的JPA关系也未配置cascade = ...
我在MySQL中创建了一个存储过程,并使用JPA EclipseLink从Java应用程序中对其进行了调用。调用该过程后,它内部就有一个“ sleep(sec)”方法,然后它执行某些操作...
Spring Boot在2.0.9和2.1.0之间,使用eclipselink ddl自动生成问题
使用Spring boot 2.1.0 RELEASE创建的新项目,我的pom.xml包含此内容。 [ 我发现了问题。从Spring Boot 2.1.0.RELEASE开始,只有在我们击中任何REST Controller端点之后,Eclipselink的持久性单元才会部署。因此,在应用程序准备就绪后,我更改了代码以对其进行初始化。这是一种怪诞的方式,但是可行。 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(); } } //... } 运行此命令后,我得到这样的日志: 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 我也在2.1.0.RELEASE和最新的2.2.2.RELEASE上都尝试过,效果很好。
我如何在JPA对象上使用Java Stream API? [重复]
个人;稍后我要过滤结果List ist = personal.stream()。map(p-> p.getPnr())。collect(Collectors.toList(...
我在PostgreSQL视图上有@JoinTables,但是我发现阻止EclipseLink在对基础表进行插入时尝试从它们中插入/删除的唯一方法是定义INSTEAD ...
EclipseLink / JPA是否具有用于修改生成的SQL的插件框架?
背景:一件事总是把ORM用户弄得一团糟,在SQL中,null的区别非常大,因为99%的编程语言,主要是null == null在几乎所有地方都是正确的,但null == null是...
我们正在将EclipseLink与Oracle一起使用。我有一个性能问题。在哪种情况下,我们更愿意在Oracle方面进行过滤,在哪种情况下,我们应在...