我一直在开发一个继承的代码库,它是一个 Java Web 应用程序,就在今天它停止了编译。我收到错误,它无法找到代码中声明的某些类。
我的代码库是这样设置的:我有主包,然后,由于某种原因,在它的内部和同一级别,我有一个 .jar 包含一个补充包 com.oreilly准确地说是.servlet。我的主代码库中有一些导入 com.oreilly.servlet.MultipartRequest 的文件,直到今天他们都没有问题找到它们。
此后,我擦除了本地版本并检查了我知道上次对 java 文件进行任何更改时编译的最后修订版本,这使我相信我的问题是 jdeveloper。
我收到的错误是 com.oreilly.servlet 包不存在,随后它找不到类 MultipartRequest。
我还将 jar 文件(顺便说一下,它包含在 jdev 的库和类路径部分中)分解为包结构,但无济于事。
任何帮助将不胜感激。
I have been working on an inherited code base that is a Java web app and just today it stopped compiling. I am getting errors that it can't find some classes that are declared in the code.
My code base is set up like this: I've got the main package and then, for some reason, both inside it and at the same level of it, I've got a .jar that holds a supplemental package, com.oreilly.servlet to be exact. I have some files in my main code base that import com.oreilly.servlet.MultipartRequest and utill today they had no problem finding them.
I have since wiped my local version and checked out the last revision which I know compiled last timed I made any changes to the java files, leading me to believe my issue is jdeveloper.
The errors I am getting are that package com.oreilly.servlet doesn't exist and subsequently that it cannot find class MultipartRequest.
I have also broken out the jar file (which by the way is included int he Libraries and Classpath section of jdev) into a package structure to no avail.
Any help would be much appreciated.
发布评论
评论(1)
对我来说听起来像是一个更新和重构的机会。几年前我偶然发现了 com.oreilly 软件包,此后就再也没有见过它。我说从代码中删除它并升级到更标准的 javax.servlet 类(通常在 servlet-api.jar 或与您的 Web 应用程序服务器捆绑在一起的类似名称的东西中找到)。
Sounds like an opportunity to update and refactor to me. I stumbled across the com.oreilly package years ago, haven't seen it since. I say remove it from the code and upgrade to the more standard javax.servlet classes (usually found in a servlet-api.jar or something similarly named bundled with your web app server).