当前位置:网站首页>记录一次小jsp的bug
记录一次小jsp的bug
2022-06-21 23:12:00 【Fairy要carry】
学Java有蛮长一段时间了,jsp很久没弄了,这次写作业弄了一下还出了点小bug记录一下(主要心情不错不然不会记录哈哈哈)
第一个:
因为我们这个是maven项目,但是数据库要求用Oracle,这边主窗口测试了一下没有问题,但是一运行就会报错说驱动失败
因为我们本地仓库是没有Oracle依赖的,所以我们导包

我们这边导包有两种方式:
1. Project Producture中的libaries导入jar包
2.在WEB-INF下建立lib目录导入 jar包然后右键as xxx来着
这时候又出现了一个问题Maven项目,第一种导包会出现点问题,具体原因未深入探知,debug发现还是连接那里出问题说明这个在Maven项目中这种方式不行,还是第二种稳妥些;
如果想要解决第一种的问题:
需要maven编译一下
<resources>
<resource>
<directory>lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</resources> <compilerArguments>
<!-- 打包本地jar包 -->
<extdirs>${project.basedir}/lib</extdirs>
</compilerArguments> 、
第二个,出现了找不到并且无法加载主类
当时懵了,我找到JDBC的主程序不运行代码,还是报错,rebuild还是不行;
后面经过我的思考得到,因为我们的项目已经构成了,然后我是因为构建完毕后,复制了其他地方的代码;

经过rebuild我查看字节码发现是有些文件没有的;
此时我们需要将project structure中Modules中的配置全部删掉,然后重新配置,再rebuild一下发现全部都有了,就没有问题了
IDEA出现Module ** must not contain source root **. The root already belongs to module **这类错误的解决方法也类似如上解法,这种大部分都是因为module问题

边栏推荐
- 数据工程系列精讲(第三讲): Data-centric AI 之特征工程
- AttributeError: ‘WebDriver‘ object has no attribute ‘w3c‘
- [wechat applet] obtain the current geographic latitude and IP address
- 【yarn】Name contains illegal characters
- [golang] cannot convert expression of type 'interface{}' to type 'string' (solution)
- Detailed explanation of IDA static reverse analysis tool
- Overview of embedded system and embedded design software
- [wechat applet] 40029 invalid code solution set
- Npdp| how to do well in product life cycle management?
- 【next】nextjs打包后出现passHref is missing
猜你喜欢
![[安洵杯 2019]吹着贝斯扫二维码](/img/38/7bfa5e9b97658acfe24d3aab795bce.png)
[安洵杯 2019]吹着贝斯扫二维码
![Infant name [adjacency matrix and DFS of connected components]](/img/60/83da6ce2fd2336fe1c4aead3260b77.png)
Infant name [adjacency matrix and DFS of connected components]

Win10 uses the user's initial password and fails to connect to the win server

Katalon recoder common commands

You have a chance, here is a stage

JVM makes wheels

WMS warehouse management system source code

The tangled truth about NFT and copyright

滴滴工程效能平台建设之路

Document.readyState 如何使用和侦听
随机推荐
[GXYCTF2019]SXMgdGhpcyBiYXNlPw==
珂朵莉树 范围查询 chtholly tree Old driver tree
【愚公系列】2022年06月 通用职责分配原则(九)-受保护变量原则
[PHP] MVCs concept (easy to understand)
AttributeError: ‘WebDriver‘ object has no attribute ‘w3c‘
You have a chance, here is a stage
[next] the component definition is missing display name in the next JS package
Query of the range of the cotolly tree chtolly tree old driver tree
[wechat applet] some pitfalls and precautions of wechat applet using the form
note
干技术的,追求啥?
HMS Core机器学习服务身份证识别功能,实现信息高效录入
关于 NFT 和版权的纠结真相
Brief idea and simple case of JVM tuning - space allocation guarantee mechanism in the old age
Katalon框架测试web(十八)框架frame操作
[pwn basics]pwntools learning
Katalon recoder common commands
【微信小程序】40029 invalid code解决办法集合
[sword finger offer] 43 Number of occurrences of 1 in integers 1 to n
[node] node uses MySQL connection pool