jbuild2006+jBoss+sql2005為什麼在運行時出錯 ( 积分: 100 )

S

shipinjing

Unregistered / Unconfirmed
GUEST, unregistred user!
各位大俠:
我的數據庫SQL Server2005和JBOSS 4.0.0不在同一服務器中,JBuild2006中可以建立EJB,並且可以連到數據庫,但在寫完一個EJB test Client後運行時出錯:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:86)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:652)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:628)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:526)
at org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect_aroundBody0(HttpClientConnectionHelper.java:142)
at org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect_aroundBody1$advice(HttpClientConnectionHelper.java:306)
at org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect(HttpClientConnectionHelper.java)
at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callRunTest(DefaultHttpClient.java:162)
at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:80)
at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
...(Click for full stack trace)...
我知道這個錯誤應該是url的錯誤,但不知道怎麼去修改?
我想了好幾天了,各位幫幫忙把
 
S

shipinjing

Unregistered / Unconfirmed
GUEST, unregistred user!
我發現每次運行時stock的port都會改變,是否可以將port固定,在哪裡設定??
 
S

shipinjing

Unregistered / Unconfirmed
GUEST, unregistred user!
我已經知道在什麼地方來設定了,
但現在的問題又來了我知道一定是配置的問題
jbosscmp-jdbc文件
<jbosscmp-jdbc>
<defaults>
<datasource>DataSource</datasource>
<datasource-mapping>MS SQLSERVER2005</datasource-mapping>
</defaults>
<enterprise-beans>
.
.
.
standardjaws.xml文件
<!-- $Id: standardjaws.xml,v 1.30 2002/06/27 19:26:28 dsundstrom Exp $ -->
<jaws>
<datasource>java:/MSSQLDS</datasource>
<type-mapping>MS SQLSERVER2005</type-mapping>
<debug>false</debug>
<default-entity>
<create-table>true</create-table>
<remove-table>false</remove-table>
<tuned-updates>true</tuned-updates>
<read-only>false</read-only>
<time-out>300</time-out>
<row-locking>false</row-locking>
<read-ahead>false</read-ahead>
</default-entity>
standardjbosscmp-jdbc.xml文件
<!-- $Id: standardjbosscmp-jdbc.xml,v 1.84 2004/09/15 15:48:58 loubyansky Exp $ -->
<jbosscmp-jdbc>
<defaults>
<datasource>java:/MSSQLDS</datasource>
<!-- optional since 4.0 <datasource-mapping>MS SQLSERVER2005</datasource-mapping> -->
<create-table>true</create-table>
<remove-table>false</remove-table>
<read-only>false</read-only>
<read-time-out>300000</read-time-out>
<row-locking>false</row-locking>
<pk-constraint>true</pk-constraint>
<fk-constraint>false</fk-constraint>
<preferred-relation-mapping>foreign-key</preferred-relation-mapping>
<read-ahead>
<strategy>on-load</strategy>
<page-size>1000</page-size>
<eager-load-group>*</eager-load-group>
</read-ahead>
<list-cache-max>1000</list-cache-max>
<clean-read-ahead-on-load>false</clean-read-ahead-on-load>
錯誤
Depends On Me: MBeanException: org.jboss.deployment.DeploymentException: Error:
can't find data source: MSSQLDS;
- nested throwable: (javax.naming.NameNotFound
Exception: MSSQLDS not bound)
Cause: org.jboss.deployment.DeploymentException: Error: can't find data source:
MSSQLDS;
- nested throwable: (javax.naming.NameNotFoundException: MSSQLDS not bo
und)
我現在真的是找不出原因了,請大家幫幫忙
 
J

jjg000

Unregistered / Unconfirmed
GUEST, unregistred user!
如果你想花最少的钱学习流行的计算机技术,本人低价提供
计算机专业高清晰 视 频 教 程,所有教程由业内名家讲解,物超所值,
所有光盘4元/张,特快专递全国三天内到货.
联系方式:手 机:1 3 5 76145612(手机联系佳) Q Q:108410943
E-mail:ncncldjjg@126.com
1、Oracle9iOCP(Oracle认证专家DBA)视频教程(23CD)
2、SQL语言、数据挖掘、SQLServer2000视频教程(6CD)
3、计算机网络原理视频教程(4CD)
4、计算机实用组网技术视频教程(3CD)
5、MCSE(微软认证系统工程师)认证视频教程(11CD)
6、windows2003即学即会视频教程(6CD)
7、J2EE Web程序开发定向班/Java就业班视频教程
(java基础jsp核心技术UML设计)(13CD)
8、J2EE基础高级案例分析视频教程(9CD)
9、马士兵J2SE入门与精通(含坦克大战、BBS实例)视频教程(6CD)
10、java语言深入详解视频教程(12CD)
11、java技术从入门到精通视频教程(21CD)
12、javascript全接触视频教程(13CD)
13、各类网站源程序(9CD)
14、unix原理视频教程(3CD)
15、Linux软件开发工程师(C语言)视频教程(4CD)
16、Linux配置、管理、优化实战工程师视频教程(8CD)
17、Linux内核编程视频教程(11CD)
18、C语言详解视频教程(2CD)
19、VC++6.0(MFC)开发技术术详解视频教程(6CD)
20、ASP.NET中文视频教程(3CD)
21、洪恩C#入门多媒体教程(1CD)
22、XML技术视频教程(2CD)
23、操作系统视频教程(3CD)
24、网络技术基础视频教程(2CD)
25、数据结构视频教程(5CD)
26、清华大学计算机专业多媒体教程(数据结构、汇编、编译原理等)(13CD)
27、大学数学[离散数学线性代数概率与数理统计微积分]视频教程(22CD)
28、LearnKey Asp.Net (老外用英语讲课)(13CD)
29、LearnKey Asp.Net Webservice(老外用英语讲课)(5CD)
30、AppDev Asp.Net2.0 UsingC# (老外用英语讲课)(1CD)
31、APPDev .Net Framework(老外用英语讲课)(2CD)
32、林清安pro/e2001(野火版)视频教程(18CD)
33、深圳大学3D设计视频教程(4CD)
34、3DMAX建模视频教程(老外用英语讲课)(6CD)
35、3DMAX纹理与贴图材质灯光视频教程(老外用英语讲课)(5CD)
36、3DMAX格式500个常用模型库(4CD)
37、lightscape基础入门视频教程(2CD)
38、聚光制造(lightscape3.2入门与精通视频教程)(4CD)
39、coreldraw12中文版入门与精通swf格式视频教程(2CD)
 
Top Bottom