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

jetty快速入门与嵌入使用 jetty快速入门与嵌入使用,简单、易懂,轻松学习! 立即下载
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
Transformer实战(1)——词嵌入技术详解 词嵌入的核心思想是,通过将词语表示为稠密的向量,使得计算机可以更有效地处理和理解文本中的语义关系。在本节中,我们学习了单词分布式表示的概念及其实现,包括静态嵌入和动态嵌入,实现了 Word2Vec 和 GloVe 模型,并介绍了如何使用 Gensim API 探索嵌入空间。 阅读详情

相关推荐

【深度学习面试八股文】-- 1-5

1.样本不平衡的处理方法 ①欠采样 - 随机删除观测数量足够多的类,使得两个类别间的相对比例是显著的。虽然这种方法使用起来非常简单,但很有可能被我们删除了的数据包含着预测类的重要信息。 ②过采样 - 对于不平衡的类别,我们使用拷贝现有样本的方法随机增加观测数量。理想情况下这种方法给了我们足够的样本数,但过采样可能导致过拟合训练数据。 ③合成采样( SMOTE )-该技术要求我们用合成方法得到不平衡类别的观测,该技术与现有的使用最近邻分类方法很类似。问题在于当一个类别的观测数量极度稀少时该怎...

m0_37940804的博客 9940

Jetty 架构——Connector 组件

如果大家觉得文章有错误内容,欢迎留言或者私信讨论~

qq_43654226的博客 1439

Ansys Zemax导入CAD文件避坑指南:STL/STEP/IGES格式选择与性能优化

本文深度解析了在Ansys Zemax中导入CAD文件的核心要点与性能优化策略。针对STL、STEP、IGES等主流格式,详细对比了其几何表示、精度与适用场景差异,并提供了基于模型特征的格式选择决策树。文章重点分享了体元、弦公差等高级参数的调优技巧,以及处理复杂装配体和避免精度陷阱的实战指南,旨在帮助光学工程师提升仿真效率与结果可靠性。

weixin_29202687的博客 437

关于jetty连接关闭问题

传统socket模式都是一个connection一个线程,NIO可以通过事件机制再触发新线程,使得线程和请求可以分离,这样, Jetty就是利用NIO这个机制,保持住请求request对象,释放原来支持该请求的线程,让线程返回线...

coekaa826620的博客 468

STM32G0——USB虚拟串口

STM32G0用cubeMX配置实现USB虚拟串口

阿昌 2321

512分辨率万能遮罩模型实战指南:从下载到高精度应用

本文提供了512分辨率万能遮罩模型的完整实战指南。该模型经过超过540万次迭代,专门优化了对头发、手、眼睛等复杂区域的识别。文章详细介绍了从可靠渠道下载、环境部署、使用DF_ICE工具批量应用遮罩,到利用XSeg Editor进行高精度精修的全流程,旨在帮助用户显著提升AI换脸合成视频的质量与效率。

y2z3a4b5c的博客 1165

深入Jetty源码之Connection

概述 当Jetty中的Connector收到一个客户端的连接时(ServerSocket或ServerSocketChannel的accept()方法返回),Connector会首先创建一个ConnectedEndPoint用于和连接的底层(Socket、Channel)打交道(读写数据),在创建的ConnectedEndPoint时会同时使用该EndP...

weixin_34384915的博客 327

华为擎云W515 PGUV-WBY0安装银河麒麟V10全流程解析

本文详细解析了华为擎云W515 PGUV-WBY0安装银河麒麟V10系统的全流程,包括准备工作、镜像下载与校验、启动盘制作、BIOS设置、安装过程关键选择、系统初始化及常见问题排查。特别针对ARM架构设备提供了实用技巧,帮助用户顺利完成国产化系统的部署与优化。

weixin_28725949的博客 701

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

如图: 以下都是在网络中找的解决方案:解决方案1:服务是在root 账户下启动的,关掉服务杀掉进程,然后用普通用户登录重启服务!(对我无效,因为我的服务不可以用普通用户启动)解决方案2:在Eclipse中找到Run-Debug Configurations-Remote Java Application下找到相应工程在connect的tag下设置port为8000(表示在我这里无效)如果还不能用的

安善良民弱女子的博客 9万+

用 XCO_CP_XLSX 在 ABAP 中写 Excel:从写入访问到样式控制的完整指南

本文介绍了在 ABAP 环境中使用 XCO_CP_XLSX 模块导出 Excel 报表的完整实践方案。文章从获取写入访问权限开始,详细讲解了基于 row_stream 的批量数据写入和基于 cursor 的精细控制两种方法,并提供了创建新文档、添加工作表、设置样式等关键操作示例。通过分层抽象的工作簿-工作表-单元格模型,开发者可以灵活应对企业应用中常见的报表导出需求,特别是在 SAP BTP 和 S/4HANA Cloud 环境下实现高效可靠的 Excel 文件生成与处理。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 164

C语言实现惯性导航初始对准全部核心代码

惯性导航初始对准包括间接粗对准和卡尔曼滤波精对准,其中。为基于卡尔曼滤波的精对准,其中。

十八与她的博客 2284

storm运行过程中UI页面出现Connection refused错误

org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection refused at org.apache.thrift7.transport.TSocket.open(TSocket.java:183) at org.apache.thrift7.transport.TFramed

Rong_89的专栏 8515

基于Matlab的无迹卡尔曼滤波惯性导航与DVL组合导航

航天航空领域中的惯性导航是一种基于惯性测量单元(Inertial Measurement Unit,IMU)的导航方法,可以提供航向、速度和位置等信息。深度/速度测量器(Doppler Velocity Log,DVL)是一种常用的传感器,可用于测量水下航行器的速度。通过将DVL与无迹卡尔曼滤波相结合,可以实现高精度的组合导航。本文介绍了基于Matlab的无迹卡尔曼滤波(UKF)惯性导航与DVL组合导航的方法。以上是一种简化的示例代码,您可以根据实际应用需求进行相应的修改和优化。

DevSavantX的博客 420

Connection refused connect

Tomcat服务器无法关闭,一直消耗主机内存,到底怎么办?且进来看看

SlothSid的博客 1万+

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Failed to connect to remote VM. Connection refused 解决方案

在运行jetty进行远程调试时,出现这个错误:Failed to connect to remote VM. Connection refused 解决方案: 1. 首先利用Jetty启动应用服务 2. 启用远程调试 如果没有启动应用服务,直接进行远程调试则出现Failed to connect to remote VM. Connection refused错误。 另外在运...

来杯咖啡,随便聊聊。 1272

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

remote connection refused

remote connection refusedremote对程序员来说是定位问题的一件利器,本地启动remote连接远程服务器的时候遇到过下面的问题: 可能是下面几种原因导致的: - 服务器未配置端口 - remote配置的端口错误 - 端口被其他人占用

森林里的一天 939

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

Connection refused: connect问题解决方案集合

1)端口号被占用:杀死占用端口号(一般为8080)的进程,释放端口;彻底关闭 Tomcat 服务器,或者重新启动项目。 2)使用以下命令检查服务器中允许的最大进程数: ulimit -u。如果将此值设置为较低值,例如1024,则使用以下值将其增加到131072或无限制:ulimit -u 131072 或者 ulimit -u无限制 。 3)客户端和服务器,它们中的任何一个或两个都不在网络中。它们可能没有连接到LAN或互联网或任何其他网络,在这种情况下,Java将会抛出客户端的“ java.net.Conn

qq_34823218的博客 25万+

ConnectionRefused报错总结

主机连接拒绝通常有以下几种情况:1.     主机名称的问题,机器因为某种原因,hostname发生了变更。2.     免密通信失效  由master  ssh到其他主机监测是否能够连接3.     确认目标ip是否有效,该机器配置了真实的地址4.     检验你要访问的地址端口是否开启并可访问  使用telnet命令检测5.     试试换其他的机器访问你要访问的地址。6.     检查机器的...

wx740851326的博客 3万+

Linux下停Tomcat服务器,出现Connection refused错误解决办法

<br />错误内容如下 :<br />2010-9-19 16:09:58 org.apache.catalina.startup.Catalina stopServer<br /> 严重: Catalina.stop: <br /> java.net.ConnectException: Connection refused<br />怎么出现的就不用说了吧 :为了避免一些人不知道还是说一下,呵呵。首先进入linux下tomcat的bin目录,执行"./catalina.sh stop

wangzhi_821的专栏 3万+

Jetty9源码剖析 - Connection组件 - HttpConnection

转载自ph0ly:http://www.ph0ly.com 一、概念 Connection是一条逻辑连接,主要完成Http请求的解析以及通知后续处理。在Jetty中,它需要配合EndPoint来完成任务,EndPoint在IO事件发生时回调Connection的回调函数,从而触发Connection的数据处理。对于HTTP/1.x的版本,使用HttpConnection来处理,而对于HTTP/...

qq_41084324的博客 633

java.net.ConnectException: Call From localhost/127.0.0.1 to localhost:8020 failed on connection

执行《Hadoop权威指南》范例3-2时报错 执行命令 export HADOOP_CLASSPATH=ch03-hdfs.jar hadoop FileSystemCat hdfs://localhost/user/liuzc/quangle.txt错误信息Exception in thread "main" java.net.ConnectException: Call From local

tszxlzc的专栏 1万+
上一篇: JUnit Recipes
下一篇: spring web mvc资料
yethyeth
博客等级 码龄21年 140粉丝 265原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值