我尝试将我在Wildly / Hibernate上运行良好的java ee应用程序部署到GlassFish / EclipseLink,并且我收到了这样的错误:
Problem compiling [DELETE FROM ProviderService ps WHERE :work_station MEMBER OF ps.workStations AND ps.workStations.size = 1].
[81, 101] The state field path 'ps.workStations.size' cannot be resolved to a valid type.
81, 101] The state field path 'ps.workStations.size' cannot be resolved to a valid type.
是否有可能用冬眠来运行玻璃鱼?如果是这样,我怎么能在build.gradle中配置这样的东西。
我正在使用build.gradle条件选择Wildfly远程/ Wildfly嵌入式测试用Arquillian(工作正常),现在添加Glassfish远程/ Glassfish嵌入但在这里我无法编译有这样的错误如上。我也收到这样的东西:
ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.
java.lang.IllegalArgumentException: ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.
at org.jboss.arquillian.protocol.servlet.ServletUtil.determineBaseURI
答案 0 :(得分:2)
JPQL无效。 JPQL由JPA规范定义,并且为了便携性,您必须坚持正确的语法。在这种情况下,有一个功能" SIZE
"。应该是
DELETE FROM ProviderService ps WHERE :work_station MEMBER OF ps.workStations AND SIZE(ps.workStations) = 1