有人用过xmlBean吗。我用xmlBean里面的selectPath()或execQuery()方法
抛如下异常
java.lang.UnsupportedOperationException: This operation requires xqrl.jar at org.apache.xmlbeans.impl.store.XqrlDelegate.invoke(XqrlDelegate.java:70)
但xqrl.jar我已经导入了阿。从weblogic里面找到的。
他的结构是com/bea/....难道这个包不是吗。
如果各位有着个包发我一个呗。mail:[email protected]

解决方案 »

  1.   

    What version of XMLBeans are you using?In v1 there is very little support for xpath, i.e. only very simple =
    xpath expressions will work.=20
    While in v2 there is support for full XPath 1.0, you'll need xbeans.jar, =
    xbean_xpath.jar and jaxen.jar on your classpath, if you use the CVS =
    doing an 'ant deploy' will automatically download the needed jars.
      

  2.   

    Unfortunately the xpath situation in xmlbeans v1 is kind of wacky.  In =
    the bea version of xmlbeans the xmlbeans engine took a whack at =
    resolving the xpath, if it was simple it would succeed, if it was too =
    complex it passed it on to a bea proprietary xquery engine.  When moving =
    xmlbeans over to apache the xquery bits did not come over so xmlbeans v1 =
    is left with attempting to resolve simple xqueries and if it cannot =
    resolve it then you get this exception.So only 'simple xpaths' are supported in V1.  Eric Vasilik could =
    describe what constitutes simple but I think it is basically simple =
    xpaths without brackets.xmlbeans v2 has incorporated jaxen's xpath engine as the fallback so =
    will be much better than v1 in this regard - but xmlbeans v2 is still a =
    ways off.It would be good to see the jaxen work applied to v1 however I don't =
    think that is currently planned. =20
      

  3.   

    http://forums.bea.com/bea/thread.jspa?messageID=200609557&tstart=0
      

  4.   

    没用过
    只能帮你顶up
    upupupup^_^
      

  5.   

    我怎么用2.0 生成jar的时候总是出错呢。请问各位是怎么弄得阿。
          "build.xml": file:E:/Program/xmlbeans-2.0.0/samples/MixedContent/build.xml:82: java.lang.ExceptionInInitializerError at line 82
            <xmlbean schema="schemas"
                destfile="build/lib/schemas.jar"
                srcgendir="build/src"
                classpathref="xmlbeans.path"
                debug="on"
                />-〉〉〉〉〉〉〉〉〉〉〉82 line
      

  6.   

    怎么指定jar的包的结构。我生成的都是noNamespace包。
      

  7.   

    呵呵,检查一下你的schema文件
      

  8.   

    WebLogic 8.1以上才支持xqrl.jar的此运用.
      

  9.   

    2.0生成jar时出现的错误。
    BUILD FAILED: F:\Project\Eclipse\xbean\build.xml:82: Error running javac.exe compiler兄弟们帮忙。
      

  10.   

    刚才那个问题解决了。是因为jdk设置错误拉。javac命令不好用引起的。
    谢谢各位。
    xbean_xpath.jar and jaxen.jar 这两个jar谁有能发我一份马。
    我的mail:[email protected]
      

  11.   

    xmlbean2.0都需要哪些jar阿。
    上面几个jar我都倒入了。依然除这个异常。
    java.lang.RuntimeException: No query engine found at org.apache.xmlbeans.impl.newstore2.Query.getCompiledQuery(Query.java:97) at org.apache.xmlbeans.impl.newstore2.Query.getCompiledQuery(Query.java:53) at org.apache.xmlbeans.impl.newstore2.Query.objectExecQuery(Query.java:43) at org.apache.xmlbeans.impl.newstore2.Xobj.exec_query(Xobj.java:2300) at org.apache.xmlbeans.impl.values.XmlObjectBase.execQuery(XmlObjectBase.java:476) at org.apache.xmlbeans.impl.values.XmlObjectBase.execQuery(XmlObjectBase.java:458) at com.liming.cvs.impl.xml.CvsXmlOperator.findFolderById(CvsXmlOperator.java:36) at com.liming.cvs.test.CvsXmlOperatorTest.testFind(CvsXmlOperatorTest.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at com.borland.jbuilder.unittest.JBTestRunner.run(JBTestRunner.java:210) at com.borland.jbuilder.unittest.JBTestRunner.initiateTest(JBTestRunner.java:252) at com.borland.jbuilder.unittest.JBTestRunner.main(JBTestRunner.java:558)
      

  12.   

    你看看你的jar中有没有这个class:org.apache.xmlbeans.impl.newstore2.XqrlImpl
    如果没有这个class将会报你所描述的错误
      

  13.   

    No query engine found???我觉得还要需要jar文件,或则启动什么engine ?
      

  14.   

    的确没有哪个类。那各类是在那个jar里面啊。我看xbean.jar里面有newstore2
    我用的是xbean2.0的jar,
    哪里有你说的那类阿。
      

  15.   

    Saxon jar (8.1.1) 与 xbean_xpath.jar都已经放到lib目录了么
    你的错误可能是使用了老版本原因,去这里下载最新版
    http://xmlbeans.apache.org/sourceAndBinaries/index.html#XMLBeans+Source
      

  16.   

    to: laughsmile(海边的星空) 
    我用的jar 有
    jaxen.jar,
    jsr173_api.jar,
    saxon8.jar(version 8.4),
    xbean.jar(2.0),
    xbean_xpath-2.0.0-beta1.jar
    xqrl.jar
    这样可以吗。
    能不能把你的用的jar发我一份阿。
    [email protected]
      

  17.   

    你去http://apache.justdn.org/xmlbeans/下载最新版。
    然后看看还有这个问题没有