Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Application Server » JBoss  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 郁闷,jboss连MySQL搞不定
daiwang





发贴: 60
积分: 1
于 2003-11-13 12:02 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
各位大哥(虽然好多人年纪比我小),我周围的人都在弄.net,就我一个在尝试j2ee,有些问题对于你们是小儿科,对于我就得郁闷几天,敬请各位帮忙带我上路。

我用xdoclet产生了以下两个文件:
ejb-jar.xml, jboss.xml. 部分内容如下:
<ejb-jar >
......
<enterprise-beans>
<entity >
<ejb-name>EnglishAuction</ejb-name>
<home>test.auction.interfaces.EnglishAuctionHome</home>
<remote>test.auction.interfaces.EnglishAuction</remote>
<local-home>test.auction.interfaces.EnglishAuctionLocalHome</local-home>
<local>test.auction.interfaces.EnglishAuctionLocal</local>

<ejb-class>test.auction.model.EnglishAuctionBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<primkey-field>id</primkey-field>

<ejb-local-ref >
<ejb-ref-name>item</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>test.auction.interfaces.ItemLocalHome</local-home>
<local>test.auction.interfaces.ItemLocal</local>
<ejb-link>Item</ejb-link>
</ejb-local-ref>

<resource-ref >
<res-ref-name>jdbc/auctionSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

</entity>
......
</ejb-jar>

<jboss>
<enterprise-beans>
<entity>
<ejb-name>EnglishAuction</ejb-name>
<jndi-name>ejb/test/EnglishAuction</jndi-name>
<local-jndi-name>EnglishAuctionLocal</local-jndi-name>
<resource-ref>
<res-ref-name>jdbc/auctionSource</res-ref-name>
<jndi-name>auctionSource</jndi-name>
</resource-ref>
</entity>
......
</enterprise-bean>
......
</jboss>

我在deploy目录下放了mysql-ds.xml文件,内容如下:
<datasources>
  <local-tx-datasource>
    <jndi-name>auctionSource</jndi-name>
    <connection-url>jdbc:mysql://202.121.218.82:3306/test</connection-url>
    <driver-class>org.gjt.mm.mysql.Driver</driver-class>
    <user-name>root</user-name>
    <password>admin</password>    
  </local-tx-datasource>
</datasources>

在lib目录下放了mysql-connector-java-3.0.9-stable-bin.jar

然后我调试程序,DataSource source =
(DataSource)initCtx.lookup("java:comp/env/jdbc/auctionSource");控制台显示信息如下:
auctionSource not bound
我查了一下, nameException的信息是:
could not dereference object.
所有的系统我都重启过,上面的信息我实在弄不懂。

我查了http://localhost:8080/jmx-console/index.jsp,看到以下条目:
jboss.jca
* name=DefaultDS,service=LocalTxCM
* name=DefaultDS,service=ManagedConnectionFactory
* name=DefaultDS,service=ManagedConnectionPool
* name=JBoss JDBC XATransaction ResourceAdapter,service=RARDeployment
* name=JBoss LocalTransaction JDBC Wrapper,service=RARDeployment
* name=JMS Adapter,service=RARDeployment
* name=JmsXA,service=ManagedConnectionFactory
* name=JmsXA,service=ManagedConnectionPool
* name=JmsXA,service=TxCM
* name=auctionSource,service=LocalTxCM
* name=auctionSource,service=ManagedConnectionFactory
* name=auctionSource,service=ManagedConnectionPool
* service=CachedConnectionManager
* service=ConnectionFactoryDeployer
* service=RARDeployer

我一头雾水。




如何用JTable设置表头多行

话题树型展开
人气 标题 作者 字数 发贴时间
13413 郁闷,jboss连MySQL搞不定 daiwang 3281 2003-11-13 12:02
11469 Re:郁闷,jboss连MySQL搞不定 daiwang 513 2003-11-14 11:56

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923