JBoss好像不支持 “>=”或“<=” 运算符,
我以前碰到是改成 > 完事。

解决方案 »

  1.   

    我查看了它的代码,程序里是支持“>=”或“<=” 运算符的。免费的东东是不错,但是资料就是少。
      

  2.   

    非常同意楼上的说法。。
    我现在也在用Jboss进行项目开发,可以手头没有任何可用的资料!!!
    建议大家共同讨论这个问题,如有资源共享!!!
    Jboss4.0即将发布!!
      

  3.   

    我现在做的是把程序移植到JBOSS上。但这个东东,TNND,不同版本的源代码改变很大。有时想修改JBOSS的源代码,但一到新的版本,它源代码又改变了,现实该功能的类又放到其它地方去了。唉,天下没有免费的午餐啊
      

  4.   

    TO:gcq(gcq),怎样加()?
    1.<ejb-ql>select object(o) from RpItemAttr o where o.rpTypeCode = ?1 and o.rpItemAttrCode (&gt;=) ?2 and o.rpItemAttrCode (&lt;=) ?3</ejb-ql>2.<ejb-ql>select object(o) from RpItemAttr o where o.rpTypeCode = ?1 and o.rpItemAttrCode (&gt;)= ?2 and o.rpItemAttrCode (&lt;)= ?3</ejb-ql>3.<ejb-ql>select object(o) from RpItemAttr o where o.rpTypeCode = ?1 and o.rpItemAttrCode (&gt;= ?2) and o.rpItemAttrCode (&lt;= ?3)</ejb-ql>4.<ejb-ql>select object(o) from RpItemAttr o where o.rpTypeCode = ?1 and o.rpItemAttrCode (&gt;= ?)2 and o.rpItemAttrCode (&lt;= ?)3</ejb-ql>5..<ejb-ql>select object(o) from RpItemAttr o where o.rpTypeCode = ?1 and (o.rpItemAttrCode &gt;= ?2 and o.rpItemAttrCode &lt;= ?3)</ejb-ql>以上都还出错。应该怎做?
      

  5.   

    <ejb-ql>select object(o) from RpItemAttr o where o.rpTypeCode = ?1 and (o.rpItemAttrCode &gt;= ?2) and (o.rpItemAttrCode &lt;= ?3)</ejb-ql>
    这一种你试试,我也想知道答案~
      

  6.   

    <ejb-ql>select object(o) from RpItemAttr o where o.rpTypeCode = ?1 and (o.rpItemAttrCode &gt;= ?2) and (o.rpItemAttrCode &lt;= ?3)</ejb-ql>
    这样也不行。还是出错。你以前用()这样的写法成功么?
      

  7.   

    出现的是新的错误信息,错误如下:
     Depends On Me: org.jboss.deployment.DeploymentException: Error compiling EJB-QL
     statement 'select object(o) from RpItemAttr o where o.rpTypeCode = ?1 and (o.rp
    ItemAttrCode >= ?2) and (o.rpItemAttrCode <= ?3)'; - nested throwable: (org.jbos
    s.ejb.plugins.cmp.ejbql.ParseException: Encountered "o.rpItemAttrCode >=" at lin
    e 1, column 67.
    Was expecting one of:
        "ABS" ...
        "LENGTH" ...
        "LOCATE" ...
        "SQRT" ...
        "(" ...
        "+" ...
        "-" ...
        <INTEGER_LITERAL> ...
        <FLOATING_POINT_LITERAL> ...
        <NUMERIC_VALUED_PARAMETER> ...
        <NUMERIC_VALUED_PATH> ...
        "NOT" ...
        <COLLECTION_VALUED_PATH> ...
        <STRING_VALUED_PATH> "=" ...
        <STRING_VALUED_PATH> "<>" ...
        <BOOLEAN_VALUED_PATH> ...
        <DATETIME_VALUED_PATH> ...
        <ENTITY_VALUED_PATH> ...
        <IDENTIFICATION_VARIABLE> ...
        )]
      

  8.   

    where (...>=?1) and (...<=?1) and (...)