为什么 Java 给我一个 IllegalArgumentException?

发布于 2024-07-15 19:15:59 字数 738 浏览 3 评论 0原文

我正在使用 dwr 和 spring,并且收到此错误:

java.lang.IllegalArgumentException: Javascript name * is used by 2 classes

我在 Google 上找不到任何有用的信息,你知道为什么我收到此错误吗?

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"

       http://www.directwebremoting.org/schema/spring-dwr
       http://www.directwebremoting.org/schema/spring-dwr-3.0.xsd">

<dwr:configuration />
<dwr:controller id="dwrController" debug="true" />

    <bean id="ping" class="com.mycompany.Ping">
        <dwr:remote javascript="rpcPing">
            <dwr:include method="ping" />
        </dwr:remote>
    </bean>
</beans>

I'm using dwr and spring and I get this error:

java.lang.IllegalArgumentException: Javascript name * is used by 2 classes

I found nothing helpful on Google, do you know why I'm getting this error?

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"

       http://www.directwebremoting.org/schema/spring-dwr
       http://www.directwebremoting.org/schema/spring-dwr-3.0.xsd">

<dwr:configuration />
<dwr:controller id="dwrController" debug="true" />

    <bean id="ping" class="com.mycompany.Ping">
        <dwr:remote javascript="rpcPing">
            <dwr:include method="ping" />
        </dwr:remote>
    </bean>
</beans>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝眼睛不忧郁 2024-07-22 19:15:59

成立。
因为DWR的jar版本与DWR的schema版本不匹配

Found.
Because the version of the DWR's jar did not match the version of DWR's schema

海未深 2024-07-22 19:15:59

就我而言,原因是 dwr.xml 中的相关片段出现了两次。

<create creator="new" javascript="Tab">
  <param name="class" value="org.openxava.web.dwr.Tab"/>
</create>
...
<create creator="new" javascript="Tab">
  <param name="class" value="org.openxava.web.dwr.Tab"/>
</create>

In my case the reason was that the relevant snippets in dwr.xml were there twice.

<create creator="new" javascript="Tab">
  <param name="class" value="org.openxava.web.dwr.Tab"/>
</create>
...
<create creator="new" javascript="Tab">
  <param name="class" value="org.openxava.web.dwr.Tab"/>
</create>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文