cactus+jetty+eclipse测试时的Connection refused问题

转载 2007年10月11日 20:13:00
http://www.manning-sandbox.com/thread.jspa?messageID=483

 
gastonw

Posts: 1
Registered: 1/3/04
Using the Eclipse plugin for Cactus
Posted: Jan 4, 2004 1:25 PM
  Click to reply to this thread Reply

Hi,

First let me say I am really enjoying JUnit in Action. It's been a great help to me in learning about JUnit and Cactus. I bought JUnit in Action mainly to learn about Cactus, and I've currently read the book, downloaded the source and done all the examples up to Chapter 9. So far so good.

Since I do most of my development and unit testing in Eclipse, I wanted to try running the examples from Chapter 9, using the Eclipse plugin, instead of Maven. Here are the steps I did:

1) From a clean workspace, imported the junitbook-servlets, junitbook-container (as a reference) and junitbook-repository projects from the JUnit in Action source into Eclipse.

2) Downloaded and installed the last nightly builds for the two Eclipse plug-ins, jakarta-cactus-eclipse-webapp-20030909.zip and jakarta-cactus-eclipse-runner-13-1.6dev-20030907.zip. These were the latest builds I could find.

3) I added all the jars to the junitbook-servlets project as described in the Cactus Eclipse Plugin configuration at http://jakarta.apache.org/cactus/integration/eclipse/index.html using the versions of the jars from the junitbook-repository project imported from the JUnit in Action source files.

Now for my question. What is the next step to run the Cactus Unit tests in Eclipse with Jetty?

I tried running the TestAdminServlet.java unit test by selecting it and selecting Run ->Run As ->Cactus Test from the menu, I get the following error: java.net.ConnectException: Connection refused: connect.

My guess is that this is because Jetty did not start before the Cactus unit test ran.

Do I need to configure the Cactus plugin somehow to tell it to automatically start Jetty for me before running the Cactus tests? Do I need to set up something in Cactus Preferences or in a cactus properties file? I went to the Prefences for Cactus and the checkbox for Jetty is checked.

(I was able to create a TestAllWithJetty.java class and run the Cactus tests for Chapter 9 that way, but I'd like to learn how to use the Eclipse plugin. I've also searched through the book and the index, and although the plugin is mentioned several places, I haven't found a example on how to use it.)

I think I'm overlooking something simple, and I hope all I need is a push in the right direction.

Thanks much,
Gaston

vmassol

Posts: 51
Registered: 12/7/03
Re: Using the Eclipse plugin for Cactus
Posted: Jan 8, 2004 5:09 AM   in response to: gastonw in response to: gastonw
  Click to reply to this thread Reply

Hi Gaston,

I'm really glad you like the book! :-)

WRT the Eclipse plugin for Cactus, you have to know that it is very experimental (it's one of the reason I didn't expand on it in the book). However I do believe it's working at least with Jetty. Let me try it and come back to you (i'll need a few days - say 3-4 days).

I'd also suggest we continue this discussion on the Cactus mailing list as it may be useful to others and they may also provide feedback about their own experience about using the Eclipse plugin.

Thanks
-Vincent

vmassol

Posts: 51
Registered: 12/7/03
Re: Using the Eclipse plugin for Cactus
Posted: Jan 11, 2004 7:33 AM   in response to: gastonw in response to: gastonw
  Click to reply to this thread Reply

Hi Gaston,

You appear to be doing everything right except one little item.

I believe the reason for the "java.net.ConnectException: Connection refused: connect" error is because you haven't provided a web.xml containing the Cactus redirectors. You need to right click on your project and then select "properties". Then go to the "Web applications" entry and set the path to your web.xml file (see http://jakarta.apache.org/cactus/integration/eclipse/webapp_plugin.html).

Unfortunately, the Eclipse plugin currently does not automatically add the Cactus redirector so you'll need to add them manually in this file, as explained on http://jakarta.apache.org/cactus/integration/howto_config.html#serverside

Thanks
-Vincent

eclipse远程调试时出现:Failed to connect to remote VM. Connection refused. Connection refused: connect

如图: 以下都是在网络中找的解决方案:解决方案1:服务是在root 账户下启动的,关掉服务杀掉进程,然后用普通用户登录重启服务!(对我无效,因为我的服务不可以用普通用户启动)解决方案2:在Eclip...
  • u011008029
  • u011008029
  • 2016年01月26日 13:46
  • 21147

SSH的详细安装步骤及登录提示:connection refused的解决办法

如果出现ssh: connect to host XX.XX.XX.XX port 22: Connection refused 请按如下步骤检查: 1、目标主机的ssh server端程...
  • jayxujia123
  • jayxujia123
  • 2014年06月24日 19:01
  • 572655

解决Eclipse调试真机时出现adb refused request: closed

最近用Eclipse调试我的红米的时候,总是出现adb refused request: closed,而且调试一直停在waiting for debugger不动了,在网上搜了一下,有的说用adb ...
  • study_live
  • study_live
  • 2015年01月04日 18:29
  • 801

Eclipse 连接Hadoop Connection refused 问题

今天帮别人装hadoop 伪分布 遇到了个问题解决了很久 记录一下。 环境:ubuntu VM虚拟机下安装的 hadoop 1.2.1 在使用hdfs的 java api 时,连接had...
  • sinat_30333853
  • sinat_30333853
  • 2016年12月07日 13:18
  • 1235

jmeter 分布式压力机(多网卡)----处理Connection refused

1,问题现象: 性能测试时,使用的服务器配置了双网卡,windows客户机配置了四网卡,坑爹的配置,内外网的隔离,导致在使用jmeter进行分布式测试的时候总是连接失败。 ...
  • liuyong_100
  • liuyong_100
  • 2015年06月01日 17:10
  • 2116

解决虚拟机ssh连接出错connection refused

在安装操作系统之后,使用ssh连接,发现直接报错connection refused。                 检查虚拟机的连接方式,在使用host only的方式的时候,必须接入...
  • kellyseeme
  • kellyseeme
  • 2015年07月14日 11:33
  • 4744

eclipse中的svn突然连不上服务器:connection refused by the server

解决eclipse中的svn连接不上服务器
  • yadicoco49
  • yadicoco49
  • 2017年08月31日 16:40
  • 527

eclipse远程调试Tomcat方法(测试成功并且说说遇到的坑)

PS:文中容易引起歧义的地方已经做了修改;另外,本人参照以下步骤操作,结果无法调试,后来发现是breakpoints的设置。。,如图是不跳过断点,如果点击了就是跳过断点。。 1、如果要调试远...
  • a19860903
  • a19860903
  • 2016年11月30日 09:05
  • 500

ssh登陆connection refused的解决办法

http://zhidao.baidu.com/share/17f3e1e6700c559b6036f6e49d82fd5c.html
  • caolaosanahnu
  • caolaosanahnu
  • 2014年06月14日 23:00
  • 3679

提交Hadoop作业失败,报错Connection refused

如下, [root@sparkmaster examples]# hadoop jar mywordcount.jar WordCount /root/input/ ./out01 InputPath...
  • qingyang0320
  • qingyang0320
  • 2016年01月12日 11:08
  • 2912
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:cactus+jetty+eclipse测试时的Connection refused问题
举报原因:
原因补充:

(最多只允许输入30个字)