Tomcat9 Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

今天因为同事要求,希望安装一个Tomcat9给他,结果发现一个问题:

首先我登录的是tomcat官网,选择source包下载,wget http://apache.fayea.com/tomcat/tomcat-9/v9.0.0.M26/src/apache-tomcat-9.0.0.M26-src.tar.gz

tar -xf  apache-tomcat-9.0.0.M26-src.tar.gz

mv  apache-tomcat-9.0.0.M26-src /mnt/tomcat

cd /mnt/tomcat/bin

执行./startup.sh

结果显示,启动正常

Using CATALINA_BASE: /mnt/tomcat
Using CATALINA_HOME: /mnt/tomcat
Using CATALINA_TMPDIR: /mnt/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.8.0_77
Using CLASSPATH: /mnt/tomcat/bin/bootstrap.jar:/mnt/tomcat/bin/tomcat-juli.jar
Tomcat started.

但是用netstat -lntp|grep 8080会发现tomcat根本没有启动,查看 /mnt/tomcat/logs/catalina.out,报错:

Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

我觉得非常奇怪,首先检查/mnt/tomcat/bin/bootstrap.jar确实不存在,然后 用find / -name bootstrap.jar在本地也找不到。那到底哪里导致的呢?

 

后面看了网上的帖子的才知道,原来tomcat官网中的source包是不完整的,logs文件夹跟bootstrap.jar一些重要的文件都没有的。正确的tomcat应该下载它的bin包

特意把它写下来,省得大家浪费时间去检查日志什么的!

 

转载于:https://www.cnblogs.com/to-be-rich/p/7448340.html

Tomcat9不讲码德之Could not find or load main class org.apache.catalina.startup.Bootstrap 今天我们来讲讲Tomcat9不讲码德,提供的包不完整,玩偷袭的故事。 1、登录tomcat官网,选择source包下载,wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/src/apache-tomcat-9.0.35-src.tar.gz 2、解压丢到指定目录 : tar -zxvfapache-tomcat-9.0.35-src.tar.gz mvapache-tomcat-9.0.35-src/usr/local/... 阅读详情

相关推荐

“Could not find or load main class”是什么意思?

在Java开发中,新手常遇到程序运行时抛出 “Could not find or load main class” 错误。这个错误表明Java虚拟机(JVM)无法找到或加载指定的主类,导致程序无法启动。理解该错误的含义、成因及解决方法,对Java开发者至关重要。

qq_29715355的博客 2510

Tomcat8 Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

Tomcat8 Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

记录一些工作日常和学习 1268

2026年Eclipse Java开发实战:老系统维护与国产化适配指南

Eclipse作为企业级Java开发的重要IDE,其在OSGi插件化架构、WTP Web工具平台及国产中间件适配方面的不可替代性,在金融、ERP等关键行业持续凸显。本文从Java IDE选型的本质逻辑出发,解析Eclipse在遗留系统调试、Tomcat生命周期绑定、Servlet容器嵌入机制等底层原理层面的技术优势;强调其在CWE-676白名单认证、PDE插件开发、RCP定制化场景中的工程价值;覆盖银行清算系统、Spring MVC老项目、国产化信创环境等典型应用;最终聚焦于Eclipse 4.30在JDK

weixin_33847182的博客 307

Tomcat8.5.73 Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

原来tomcat官网中的source包是不完整的,logs文件夹跟bootstrap.jar一些重要的文件都没有的。正确的tomcat应该下载它的bin包。首先我登录的是tomcat官网,选择source包下载,wget。特意把它写下来,省得大家浪费时间去检查日志什么的!执行./startup.sh。

2104

Java NoClassDefFoundError 根本原因与 TongWeb 排查指南

NoClassDefFoundError 是 Java 运行时类加载失败的典型错误,本质并非类文件缺失(那是 ClassNotFoundException),而是 JVM 在执行类静态初始化(static block 或 static final 字段初始化)时抛出未捕获异常,导致类状态变为‘初始化失败’。其技术价值在于暴露了隐式依赖、类加载器隔离、JDK 版本兼容性等深层工程问题。常见于 Spring 应用启动、定时任务、国产中间件(如 TongWeb)等场景,尤其在静态块中调用未就绪的 Spring B

weixin_30823001的博客 384

Eclipse JEE版文件名解析与JVM启动配置指南

Eclipse IDE 是面向Java开发者的主流集成开发环境,其发行版命名体系隐含平台、功能、版本、架构等关键信息。理解如 'eclipse-jee-2023-09-R-win32-x86-64' 这类文件名,本质是掌握Jakarta EE开发环境的兼容性契约;而JVM启动参数(如 -Xmx、-XX:+UseParallelGC、-vm)则直接决定IDE在Windows下的稳定性与性能表现。这些配置不仅影响Tomcat集成、Maven构建和中文支持,更关系到企业级Web项目能否顺利启动与调试。本文聚焦Ec

weixin_30236595的博客 478

Eclipse安装配置全指南:JDK、Tomcat与常见报错详解

集成开发环境(IDE)是开发者完成代码编写、编译、调试与提交的核心工具,而Java开发中,IDE的选型与配置直接影响学习效率。Eclipse作为一款免费开源、插件生态成熟的IDE,长期是高校教学和入门者的首选。其本质是一个基于Java的运行框架,因此正确的JDK安装与环境变量配置是稳定运行的前提。在项目工程化实践中,版本兼容、编码统一、服务器集成与依赖管理是关键环节。本文从基础概念出发,详细拆解Eclipse下载、JDK匹配、首次启动配置、Tomcat集成、Git与Maven接入等全流程,并针对启动闪退、中

weixin_30835649的博客 396

最新版linux apache-tomcat-9.0.37.tar.gz

最新版linux apache-tomcat-9.0.37.tar.gz

Could not find or load main class org.apache.catalina.startup.Bootstrap

Could not find or load main class org.apache.catalina.startup.Bootstrap 基本情况是: 启动tomcat不成功 查看tomcat文件夹下logs目录的catalina.out文件有报错信息 Could not find or load main class org.apache.ca...

weixin_34269583的博客 1208

HDI盲埋孔设计规范:高速PCB信号完整性落地指南

盲埋孔是高密度互连(HDI)PCB实现高速信号完整性的关键技术,其本质是通过控制过孔stub长度、优化回流路径和提升布线密度,解决GHz级信号在传统通孔结构下出现的谐振、串扰与EMI超标问题。其设计核心在于叠层物理约束、电气参数建模与工艺能力协同,涉及stub长度计算、反焊盘尺寸推导、孔壁粗糙度Rz控制等关键指标。广泛应用于DDR4、PCIe Gen4、USB3.2等高速接口的PCB设计中,尤其在车载ADAS、5G基站及FPGA载板等对SI/PI要求严苛的场景中成为刚性门槛。

weixin_34416754的博客 445

K230开发板实战:YOLOv8n模型部署全流程(附常见报错解决方案)

本文详细介绍了在K230开发板上部署YOLOv8n模型的完整流程,包括模型选型、配置文件优化和运行时调优。特别针对常见的'生成部署文件异常'等问题提供了实用解决方案,帮助开发者高效完成嵌入式AI模型的部署与优化。

g8f9d0s1a2的博客 1058

eclipse的tomcat启动,错误: 找不到或无法加载主类 org.apache.catalina.startup.Bootstrap

Could not find or load main class org.apache.catalina.startup.Bootstrap Go to Servers Tab > Double Click on your Server > Open Launch Configuration > Classpath(tab) > Click on User Entries > Add External Jars > Add Boorstrap.jar and tomca

zhansan的博客 2589

【Mac+CLion+STM32+JLink】从零到一:在macOS上构建高效STM32开发与调试工作流

本文详细介绍了在macOS上使用CLion、STM32CubeMX和JLink搭建高效STM32开发与调试工作流的完整指南。从环境准备、CLion深度配置到STM32CubeMX工程实战,再到JLink烧录避坑和串口调试技巧,帮助开发者快速掌握Mac平台下的嵌入式开发全流程。

weixin_28278377的博客 259

Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

现象:官网下载tomcat source包后,启动报错,等一系列缺包造成服务无法启动。

任我行的博客 688

激光条纹中心提取——Steger

激光条纹中心提取-Steger 好久没有记录了,记录一下今天学习的内容,据说Steger在激光条纹中心提取上神一般的存在。文章和代码都分享给大家了哈,其中有四个文件,3个C++,一个python,python一个抠图文件,3个c++包含背景图+原图, 单张图提取, 多张图提取。 分享代码 #include <opencv2\core.hpp> #include <opencv2\highgui.hpp> #include <opencv2\imgproc.hpp> #i

CharmsLUO的博客 5397

基于Simulink环境,提供一个关于如何对EMI抑制的DC-DC变换器进行仿真建模的示例

EMI定义:电磁干扰是指任何能中断、阻碍、降低或限制电气设备有效性能的电磁能量。重要性合规性:确保产品符合国际和地方的EMC标准。可靠性:减少因外部或内部EMI导致的系统故障风险。挑战滤波设计:合理设计输入输出滤波器以抑制传导EMI。布局与接地:良好的PCB设计对于减少辐射EMI至关重要。屏蔽:使用金属屏蔽来保护敏感电路不受外界干扰。首先明确要模拟的任务内容。设计一个能够在高频操作下有效抑制EMI的DC-DC变换器。根据工作频率和谐振元件值确定合适的滤波器参数。

xiaoheshang_123的博客 154

linux 启动tomcat报错Error: Could not find or load main class org.apache.catalina.startup.Bootstrap等

原因是下载的src目录下的解压包,下载bin里面的就可以了 错误的: 正确的: 顺便地址贴出来:http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.0.49/bin/apache-tomcat-8.0.49.tar.gz

程序员 3168

CVPR 2023 中的半监督学习: FixMatch 的升级版 UniMatch

我们首先回顾下发表在 NeurIPS 2020 上的 FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence,FixMatch 是一种更轻量的半监督分类方法。如下图所示,FixMatch 首先使用模型(带标签数据训练后的)对弱增强的未标记图像进行预测,生成伪标签。对于给定的图像,只有在模型产生高置信度的预测时,伪标签才会被保留。然后,在输入同一图像的强增强版本时,训练模型预测伪标签。

NJU phd 在读。 2659

idea错误: 找不到或无法加载主类 org.apache.catalina.startup.Bootstrap,已解决

jdk:1.7环境变量配置没有任何问题C盘爆红,我将“”移动到了D盘根目录下,再回来运行Tomcat就报错。

2403_88908515的博客 1657

零基础DSP实战TMS320F28035:第九节,ADC比较器&EPWM

ADC比较器框图如下所示:-电压-----------------------------输出-电压A>电压B------------------ 1-电压A

sinat_30943509的博客 2541

【赛题解析&命令脚本配置】2023年全国职业院校技能大赛GZ073网络系统管理赛项赛题第9套模块A:网络构建 & (三)无线网络配置+(四)出口网络配置-命令配置

【赛题解析&命令脚本配置】2023年全国职业院校技能大赛GZ073网络系统管理赛项赛题第9套模块A:网络构建 & (三)无线网络配置+(四)出口网络配置-命令配置

君逍遥o 1027

找不到或无法加载主类 org.apache.catalina.startup.Bootstrap

在用eclipse的情况下出现这种情况,你可以查看下window下的preferences,/server/runtime   可以看一下你的Tomcat的安装目录,找到你的安装目录后,看一下Tomcat/bin下是否缺少一个 bootstrap.jar  的文件 一般情况下都是缺少这个文件,你可以重新下载一个就好了,问题解决。 我用的tomcat是7.0.40的,如果需要,我的

EenKine的博客 1万+

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

tomcat日志报错Could not find or load main class org.apache.catalina.startup.Bootstrap

在官网下载apache-tomcat-7.0.22.tar.gz包:(1)当从下“Source Code Distributions”载包时,会遇到在bin目录下找不到bootstarp.jar的问题,“startup.sh”后显示 [root@ncut apache-tomcat-7.0.22]# bin/startup.sh Using CATALINA_BASE:   /home/nc

一只爱听歌的松鼠的博客 4188

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web appli

  今天在测试服部署tomcat的时候,catalina日志老是报以下警告: WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [acm] appears to have started a thread named [DubboSharedHandler-thread-1] but has failed to stop it. This i

༺࿈无关痛痒࿈༻的博客 2万+

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 1.js 模拟a标签打开新网页
下一篇: 分布式事务处理方案
weixin_30485799
博客等级 码龄11年 141粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值