首页 \ 问答 \ 使用eclipse wtp将web项目发布到tomcat之后缺少类(missing classes after publish web project into tomcat using eclipse wtp)

使用eclipse wtp将web项目发布到tomcat之后缺少类(missing classes after publish web project into tomcat using eclipse wtp)

我在工作区中有几个动态Web项目,每个都包含类并引用其他实用程序项目(简单Java项目)和第三方JAR。

这些应用程序(动态web项目)使用eclipse WTP(Helios 3.6)部署在tomcat v6.0.6上,

当我更新我的工作空间并从SVN存储库提取新的类/资源/罐子时,我重新发布我的应用程序在tomcat应用程序中,然后重新启动它。

偶尔,当tomcat启动我的一个应用程序时,它会抛出ClassNotFoundException异常,或者抱怨其他缺失的资源。 有时我发现部署的资源(例如spring beans xml)不是最新的,并且其中包含“旧”内容。

我使用的常见反巫毒黑魔法治疗:*停止/启动tomcat *清理(当右键单击服务器配置时)*清洁tomcat工作目录*从tomcat删除所有应用程序,清理,重新启动tomcat,添加所有应用程序

我需要多次运行这个'程序'直到问题解决。

你们也受苦吗? 这是一个已知的错误 ? 任何建议如何解决它? 是用jar而不是实用工程来解决/减少这个问题?

我会考虑使用Embedded Jetty,我只是想避免在'生产'环境中运行Jetty的专有脚本。

- Yonatan


I have several dynamic web projects in my workspace, each contains classes and refers to other utility projects (simple Java Projects), and to 3rd party jars.

These apps (dynamic web projects) are deployed on tomcat v6.0.6 using eclipse WTP (Helios 3.6)

When I update my workspace and new classes/resources/jars are extracted from the SVN repository, I re-publish my apps in tomcat apps, and restart it.

Occasionally, when tomcat starts one of my apps, it throws ClassNotFoundException, or complains about other missing resource. Sometimes I see that the a deployed resource (spring beans xml for example) is not up to date, and has 'old' content in it.

The common anti-voodoo-black-magic treatment I use: * stop / start tomcat * clean (when right click on the server configuration) * clean tomcat work directory * remove all apps from tomcat, clean, restart tomcat, add all apps

I need to run this 'procedure' several time until problem is solved.

Do you guys suffer from it as well ? Is this a known bug ? Any suggestions how to tackle it ? is using jars instead of utility projects will solve/reduce this problems?

I would consider using Embedded Jetty instead, I just want to avoid from proprietary scripts for running Jetty on a 'production' environment.

-- Yonatan


原文:https://stackoverflow.com/questions/4336069
更新时间:2022-12-27 06:12

最满意答案

尝试使用finish()方法关闭活动。


Try using the finish() method to close the Activity.

相关问答

更多
  • 发生在我身上的是我重写了错误的onCreate方法。 当我真的需要重写protected void onCreate(@Nullable Bundle savedInstanceState)时,我重写了public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) protected void onCreate(@Nullable Bundle savedInstanceState) 。 也许这可能有助于某 ...
  • 尝试使用finish()方法关闭活动。 Try using the finish() method to close the Activity.
  • 你拼错onCreate() as onCreat() @Override protected void onCreate(Bundle savedInstanceState1){ super.onCreate(savedInstanceState1); setContentView(R.layout.activity_first); Log.d("NewActivity", "onCreat"); } 添加e 。 考虑使用@Override注 ...
  • 我不能想到在构造函数中做任何事情的任何好的理由。 您从不直接构建活动,因此您无法使用它来传递参数。 一般来说,只要在onCreate中做事情。 I can't think of any good reason to do anything in the constructor. You never construct an activity directly, so you can't use it to pass in parameters. Generally, just do things in on ...
  • 当我尝试再次打开它时,它从活动B开始。这是预期的吗? 是的,这是预期的行为。 当您按下主页按钮(而不是“后退按钮”)时,默认情况下会将整个任务发送到后台,当重新启动它时(从最近的任务屏幕或主屏幕上的应用程序图标),它默认返回具有相同堆栈状态的前景。 如果您的应用程序在后台保留内存时被系统杀死,则同样的行为也适用。 操作系统会将每个活动的状态存储在堆栈中,并在需要重新创建时将其恢复(参见本文 ) 您可以将与Activity相关的主页按钮视为Windows操作系统术语中的关系作为“最小化”窗口按钮,后退按钮就像 ...
  • 活动生命周期 阅读此图表。 使用范围内的方法,我通常在onCreate()中完成所有静态设置(视图等),然后在需要时使用生命周期的其他方法。 OnPause会在你传递到前台的活动之前,并且当你重新开始这个活动时,onResume会被激活。 Activity Life Cycle Read this chart. Use the methods within the range that you are, I usually do all my static setups (views e.t.c) in o ...
  • 如果您在按下时需要,则需要显示上一个屏幕,然后您不必在代码中执行此操作。 Android Runtime在内部维护堆栈,并在您按下时显示最后显示的活动 。 无需通过onBackPressed()处理它 但是,如果您需要onBackPressed()默认操作之外的其他操作, 那么您应该使用onBackPressed() 。 否则,让Android处理它。 因此,在您的应用程序中,如果Activity 1调用Activity 2 ,并且用户按下,则默认操作将再次显示Activity 1 。 不要覆盖onBack ...
  • @SuppressLint("UseValueOf") final Handler handler = new Handler(); handler.post(new Runnable() { @Override public void run() { // change your text here if (condition) { i++ ...
  • 您在管理活动生命周期的过程中遇到的麻烦似乎更多。 如果您发布Activity的onCreate()方法的代码,我们可能会更好地了解您要完成的任务并相应地建议解决方案。 Your trouble seems to be more with how you are managing the lifecycle of the activity. If you post your Activity's onCreate() method's code, we might be able to see better ...
  • 你从FragmentActivity扩展了一个类,所以你的A类首先是一个FragmentActivity应该被startActivity调用,如果你不这样做,那么你的子类的onCreate将永远不会被调用 You extend A class from FragmentActivity so your A class which is a FragmentActivity first should be called someway by startActivity,if you didn't do tha ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。