xpetstore 安装部署一问

05-01-17 天下为公
问题:

2005-01-14 17:21:38,598 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.OrderfindByCustomer] EJB-QL: SELECT OBJECT(o) FROM Order AS o WHERE o.customer.userId = ?1

2005-01-14 17:21:38,728 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "Order" at line 1, column 23.

Was expecting one of:

"IN" ...

<ABSTRACT_SCHEMA> ...

环境:jboss-4.0.1RC2

xpetstore :xpetstore-3.1.3.zip

数据库Oracle

另一个有意思的是不用ejb的版本提供了数据库创建schemasql.

而ejb版本没有提供,只有初始化sql

直接执行又会出错的。

修改后发现数据库没有问题了

运行 出现上面的哪个错误。

另外在网站上

http://xpetstore.sourceforge.net/images/ejb-domain.png

描述 customer与order关系为多对一

而代码里xdoclet生成则为one-one

<ejb-relation >
         <ejb-relation-name>order-customer</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>order-belongs_to-customer</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Order</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>customer</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>customer-has-orders</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Customer</ejb-name>
            </relationship-role-source>
         </ejb-relationship-role>

      </ejb-relation>

<p>

以这种关系考察

SELECT OBJECT(o) FROM Order AS o WHERE o.customer.userId = ?1

又看不出什么问题。

希望高人指点一二

天下为公
2005-01-17 14:44
2005-01-14 17:21:38,728 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "Order" at line 1, column 23.

Was expecting one of:

"IN" ...

<ABSTRACT_SCHEMA> ...

天下为公
2005-01-18 12:46
没有人安装过吗》?

猜你喜欢