使用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
相关问答
更多-
onCreate未被调用(onCreate not called)[2023-05-25]
发生在我身上的是我重写了错误的onCreate方法。 当我真的需要重写protected void onCreate(@Nullable Bundle savedInstanceState)时,我重写了public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) protected void onCreate(@Nullable Bundle savedInstanceState) 。 也许这可能有助于某 ... -
关闭onCreate的活动(Closing an activity on onCreate)[2024-01-19]
尝试使用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操作系统术语中的关系作为“最小化”窗口按钮,后退按钮就像 ...
-
Android Studio活动 - 使用onCreate(),onResume()等(Android Studio activity - using onCreate(), onResume() etc)[2024-03-17]
活动生命周期 阅读此图表。 使用范围内的方法,我通常在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 ...
-
在onCreate Android之后(After onCreate Android)[2023-06-09]
@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 ...
-
片段活动和onCreate(Fragmentactivity and onCreate)[2022-03-13]
你从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 ...