jbiulder6.0例子编译错误???(在线等待,下午一定结账)

rjcludy 2002-01-16 12:49:34
安装了weblogic sp2 6.1 、jbiulder6.0 和 BAS4.5
已按要求在welogic 中建了data source ESiteSource

但编译(或运行)例子esite(在samples\Ejb\Ejb20\ESite)时出错,错误信息:

"esite.ejbgrpx": D:\borland\JBuilder6\jdk1.3.1\bin\javaw -classpath "D:\borland\JBuilder6\samples\Ejb\Ejb20\ESite\classes;D:\bea\wlserver6.1\lib\weblogic_sp.jar;D:\bea\wlserver6.1\lib\weblogic.jar;D:\borland\JBuilder6\lib\beans\dxejb.jar;D:\borland\JBuilder6\lib\dx.jar;D:\borland\JBuilder6\lib\beandt.jar;D:\borland\JBuilder6\lib\internetbeans.jar;D:\borland\JBuilder6\lib\dbswing.jar;D:\borland\JBuilder6\lib\jbcl.jar;D:\borland\JBuilder6\lib\jdsserver.jar;D:\borland\JBuilder6\samples\Ejb\Ejb20\ESite\jndi;D:\borland\JBuilder6\lib\jbuilder.jar;D:\borland\JBuilder6\lib\help.jar;D:\borland\JBuilder6\lib\gnuregexp.jar;D:\borland\JBuilder6\jdk1.3.1\demo\jfc\Java2D\Java2Demo.jar;D:\borland\JBuilder6\jdk1.3.1\jre\lib\i18n.jar;D:\borland\JBuilder6\jdk1.3.1\jre\lib\jaws.jar;D:\borland\JBuilder6\jdk1.3.1\jre\lib\rt.jar;D:\borland\JBuilder6\jdk1.3.1\jre\lib\sunrsasign.jar;D:\borland\JBuilder6\jdk1.3.1\lib\dt.jar;D:\borland\JBuilder6\jdk1.3.1\lib\htmlconverter.jar;D:\borland\JBuilder6\jdk1.3.1\lib\tools.jar;D:\borland\JBuilder6\jdk1.3.1\lib\tools.jar;D:\borland\JBuilder6\lib\activation.jar;D:\borland\JBuilder6\lib\beandt.jar;D:\borland\JBuilder6\lib\borlandxml.jar;D:\borland\JBuilder6\lib\castor-xml.jar;D:\borland\JBuilder6\lib\castor.jar;D:\borland\JBuilder6\lib\cx.jar;D:\borland\JBuilder6\lib\dbswing.jar;D:\borland\JBuilder6\lib\dbswingdt.jar;D:\borland\JBuilder6\lib\dbtools.jar;D:\borland\JBuilder6\lib\dt.jar;D:\borland\JBuilder6\lib\dx.jar;D:\borland\JBuilder6\lib\gnuregexp.jar;D:\borland\JBuilder6\lib\help.jar;D:\borland\JBuilder6\lib\iastools.jar;D:\borland\JBuilder6\lib\ias_common.jar;D:\borland\JBuilder6\lib\internetbeans.jar;D:\borland\JBuilder6\lib\jakarta-regexp-1.1.jar;D:\borland\JBuilder6\lib\javaws.jar;D:\borland\JBuilder6\lib\jbcl.jar;D:\borland\JBuilder6\lib\jbuilder.jar;D:\borland\JBuilder6\lib\jdbcx.jar;D:\borland\JBuilder6\lib\jdom.jar;D:\borland\JBuilder6\lib\jds.jar;D:\borland\JBuilder6\lib\jdsremote.jar;D:\borland\JBuilder6\lib\jdsserver.jar;D:\borland\JBuilder6\lib\junit.jar;D:\borland\JBuilder6\lib\mail.jar;D:\borland\JBuilder6\lib\sqltools.jar;D:\borland\JBuilder6\lib\unittest.jar;D:\borland\JBuilder6\lib\webserverglue.jar;D:\borland\JBuilder6\lib\xalan.jar;D:\borland\JBuilder6\lib\xerces.jar;D:\borland\JBuilder6\lib\xml4j.jar;D:\borland\JBuilder6\lib\xmlbeans.jar;D:\borland\JBuilder6\lib\xmldbms.jar;D:\borland\JBuilder6\lib\bes\agentclient.jar;D:\borland\JBuilder6\lib\bes\asrt.jar;D:\borland\JBuilder6\lib\bes\client.jar;D:\borland\JBuilder6\lib\bes\guicore.jar;D:\borland\JBuilder6\lib\bes\jaas.jar;D:\borland\JBuilder6\lib\bes\jcert.jar;D:\borland\JBuilder6\lib\bes\jnet.jar;D:\borland\JBuilder6\lib\bes\jsse.jar;D:\borland\JBuilder6\lib\bes\lm.jar;D:\borland\JBuilder6\lib\bes\vbdev.jar;D:\borland\JBuilder6\lib\bes\vbejb.jar;D:\borland\JBuilder6\lib\bes\vbjdev.jar;D:\borland\JBuilder6\lib\bes\vbjorb.jar;D:\borland\JBuilder6\lib\bes\vbsec.jar;D:\borland\JBuilder6\lib\bes\xmlrt.jar" weblogic.ejbc -keepgenerated -compiler D:/borland/JBuilder6/bin/bcjW D:/borland/JBuilder6/samples/Ejb/Ejb20/ESite/esite.jar.jar D:/borland/JBuilder6/samples/Ejb/Ejb20/ESite/esite.jar

"esite.ejbgrpx": Spaces in the temporary directory path may cause WebLogic EJBC utility to produce fatal compile errors.
"esite.ejbgrpx": <2002-1-16 下午12时01分24秒> <Warning> <EJB> <EJB Deployment: Cart has a class com.borland.samples.esite.ejb20.CartBean which is in the classpath. This class should only be located in the ejb-jar file.>
............
............
...全文
174 21 打赏 收藏 转发到动态 举报
写回复
用AI写文章
21 条回复
切换为时间正序
请发表友善的回复…
发表回复
z_yheart 2002-01-16
  • 打赏
  • 举报
回复
目录路径中不要有空格!
rjcludy 2002-01-16
  • 打赏
  • 举报
回复
算了,结账,谢谢大家
rjcludy 2002-01-16
  • 打赏
  • 举报
回复
可我设置的classpath与jbiulder时没有关系的
(是rose中使用的)
Hikaru 2002-01-16
  • 打赏
  • 举报
回复
恩~那就奇怪了~
我认为还是你的classpath不对,你再仔细看看吧~
rjcludy 2002-01-16
  • 打赏
  • 举报
回复

点击菜单中的箭头(绿色的),下拉选择server这样jbiulder会内嵌运行服务器的
Hikaru 2002-01-16
  • 打赏
  • 举报
回复
那你是怎么运行的?
rjcludy 2002-01-16
  • 打赏
  • 举报
回复
这是borland的例子esite的说明:
Project Notes Project: ESite for EJB 2.0 Weblogic Author: JBuilder Group Company: Borland.com Description: A simple shopping cart example using 2.0 EJB's, JSP's, servlets, and DataExpress To run Weblogic 6.1 must be installed and setup for JBuilder in order to build this sample. If you have not done so, install Weblogic (recommended Weblogic 6.1 SP1). Then in JBuilder, select Tools | Enterprise Setup..., then the Application Server tab, then Weblogic 6.x. Set the values of the WebLogic installation directory, BEA home directory and administrative password. If you have already setup Weblogic 6.1, edit project properties and the runtime configuration for 'Server' and change VM parameters as per the configuration of your application server. Create a WebLogic data source named ESiteSource. You will need to check your WebLogic documentation on how to create a data source. You will need the following settings The database URL should be of the following format: jdbc:borland:dslocal:/jbuilder6/samples/Ejb/db/esite.jds, ensuring that you have the correct path to esite.jds. The driver will be com.borland.datastore.jdbc.DataStoreDriver. This JDataStore is not password protected, but you must still specify a user; any user will do, e.g., user=Frank;password= Weblogic does not handle archive names which are less than 3 characters in length. To workaround this problem, copy the data express library, jbuilder6/lib/dx.jar to jbuilder6/lib/dataexpress.jar. In JBuilder, select Tools | Configure Libraries..., highlight the Data Express library definition, remove the entry jbuilder6/lib/dx.jar and add the entry jbuilder6/lib/dataexpress.jar. Launch the application server by clicking on the little down-arrow on the toolbar next to the green arrow. In the drop down select Server. The server should start successfully with the application deployed. Click on the link below to launch the web application : http://localhost:7001/bookstore/welcome.jsp Note : If the server name or port number that you use are different, please modify the URL to launch the web application. If you wish, you can also run the Java Client. Repeat the same process as above, except select Java Client Using a QueryProvider By default, this program uses an EntityBeanProvider for all DataSets. If you wish, you can instead use a QueryProvider for the Inventory DataSet. A QueryProvider can be useful for retrieving large amounts of data from a database without having to create an entity bean for every row of data. The Inventory DataSet will still use an EntityBeanResolver, so that updates are still done using the security, transaction, etc. features of EJB. To use a QueryProvider Modify ServerDataModuleBean.java, changing the line private boolean useInventoryQueryProvider = false; to private boolean useInventoryQueryProvider = true;

里面根本没有所要把ejb发布到weblogic中阿???

(我在jbiulder5.0和ias4.5中,jbiulder5带的例子都不要自己去发布)

这是为什么???
谢谢
Hikaru 2002-01-16
  • 打赏
  • 举报
回复
ejb-jar不能直接运行,要在weblogic下发布成功了,才能通过页面访问ejb.
rjcludy 2002-01-16
  • 打赏
  • 举报
回复
to hikaru
我也看到jar.jar这个东东,可我不清楚在那儿更改它

难道borland给的例子本来就不能运行???
Hikaru 2002-01-16
  • 打赏
  • 举报
回复
你的出错信息最后一行是这样的,
weblogic.ejbc -keepgenerated -compiler D:/borland/JBuilder6/bin/bcjW D:/borland/JBuilder6/samples/Ejb/Ejb20/ESite/esite.jar.jar D:/borland/JBuilder6/samples/Ejb/Ejb20/ESite/esite.jar
看出问题了么?(esite.jar.jar ??要求这样的么?)
rjcludy 2002-01-16
  • 打赏
  • 举报
回复
可我没有去修改例子中的任何代码或属性
(仅仅按例子的说明esite.html修改了一点)
我在文件esite.jar中找到这一句:
Name: com/borland/samples/esite/ejb20/CartBean.class

难道要把它删掉???
(我目的仅仅想运行起来例子)
谢谢 hikaru 能不能再给我说说?
谢谢
Hikaru 2002-01-16
  • 打赏
  • 举报
回复
但从你一开始给的错误信息里面,不是有:
D:\borland\JBuilder6\jdk1.3.1\bin\javaw -classpath "D:\borland\JBuilder6\samples\Ejb\Ejb20\ESite\classes;…………
从错误信息来看,是说你重复定位了两次这个bean-class,你只能指定包含它的ejb-jar,
你可以通过查找文件的方法,看看是不是有不在jar里面的CartBean.class。
rjcludy 2002-01-16
  • 打赏
  • 举报
回复
to Hikaru(小新)

我没有包含com.borland.samples.esite.ejb20阿

C:\>set classpath
CLASSPATH=D:\Program Files\Rational\ProcessWorkbench;D:\Program Files\Rational\c
ommon\java\swingall.jar;D:\Program Files\Rational\common\java\javahelp\jh.jar;D:
\Program Files\Rational\RUPBuilder;D:\Program Files\Rational\common\java\swingal
l.jar;D:\Program Files\Rational\common\java\javahelp\jh.jar;
Hikaru 2002-01-16
  • 打赏
  • 举报
回复
你把com.borland.samples.esite.ejb20从classpath里面去掉试试,好像是因为你把bean的class也加到classpath里了,而classpath指定的jar里面已经有了这个class了。
rjcludy 2002-01-16
  • 打赏
  • 举报
回复
to z_yheart(年轻的心)
怎么打包到ejb-jar???
z_yheart 2002-01-16
  • 打赏
  • 举报
回复
根据出错提示,是应该把CartBean 打包到ejb-jar中
rjcludy 2002-01-16
  • 打赏
  • 举报
回复
所有空格都去掉但还出现错误如下:
"esite.ejbgrpx": <2002-1-16 下午01时09分17秒> <Warning> <EJB> <EJB Deployment: Cart has a class com.borland.samples.esite.ejb20.CartBean which is in the classpath. This class should only be located in the ejb-jar file.>

to Hikaru(小新)
"CartBean必须打在jar里面 "这个该如何处理(能不能具体点)谢谢!!!!
rjcludy 2002-01-16
  • 打赏
  • 举报
回复
先谢谢大家

to hikaru
难道例子还要我们给他再处理??

z_yheart 2002-01-16
  • 打赏
  • 举报
回复
是的
Hikaru 2002-01-16
  • 打赏
  • 举报
回复
还有你的CartBean必须打在jar里面
加载更多回复(1)

62,615

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧