为这一天问候,
我正在使用SQLServer2017对jdk 1.8.0_121执行以下jboss 7.1.0查询。
select from UserDO user where user.userStatusCd <> 'ACTIVE'我的观察是,当我们使用<>运算符时,会出现一个错误。如果我们使用"not in ('ACTIVE')“,那么它将成功运行。关于<>是可以的,但是对于>= (大于或等于)或者一些特殊字符,比如“\”(管道),应该使用什么。我可以使用之间的关键字,但是如何处理特殊字符呢?我收到跟随错误,请您建议为什么会发生,解决方案是什么,或时间是什么,解决办法是什么。
[ERROR] java.nio.file.InvalidPathException: Illegal char <<> at index 0: <>.class
[ERROR] at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
[ERROR] at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
[ERROR] find by example failed
org.hibernate.QueryException: Incorrect query syntax [select from com.c2lbiz.symbiosys.systemcommon.dataobjects.security.UserDO user where user.userStatusCd <> 'ACTIVE']
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:232)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:185) 有一件事我不明白,为什么它让java.nio.file.InvalidPathException?在通配符服务器上成功地执行了这个查询,但是在eap-7服务器上,它给出了错误。
下面是执行hql的java代码:
{
query = session.createQuery(baseIO.getQuery());
List<Object[]> results = query.list();
baseIO.setList(results);
}除此之外,在我的日志中没有日期和时间。你也能建议一下吗?
提前感谢您,请随时询问您是否需要。
发布于 2018-07-30 15:17:07
您可能希望使用JBoss7.1.1,并将以下选项设置为TRUE,ALLOW_UNESCAPED_CHARACTERS_IN_URL
./bin/standalone.sh -Dorg.wildfly.undertow.ALLOW_UNESCAPED_CHARACTERS_IN_URL=true
JBoss7.1.0不提供此解决方案,因此您可能不想在那里浪费时间,理想情况下,Jboss从6.4.18+(RFC1738)修补程序中更改了该修补程序,但在7.1.0中却以某种方式错过了。
欲了解更多信息,请访问Jboss,https://issues.jboss.org/browse/JBEAP-13710
https://stackoverflow.com/questions/50981139
复制相似问题