Write it in the front.
Today to help site colleagues to locate the problem, the situation is that the project colleagues using the Eastcom (TongWeb 7.0) deployment of the company's projects, the following error caused service startup failure.
Simple troubleshooting found: war package WEB-INF/lib/-api-2.contains this interface, should not report this error ah.
Caused by: : javax/persistence/spi/PersistenceProvider
at .defineClass1(Native Method) ~[?:1.8.0_371]
at (:756) ~[?:1.8.0_371]
at (:142) ~[?:1.8.0_371]
at (:473) ~[?:1.8.0_371]
at $100(:74) ~[?:1.8.0_371]
at $(:369) ~[?:1.8.0_371]
at $(:363) ~[?:1.8.0_371]
at (Native Method) ~[?:1.8.0_371]
at (:362) ~[?:1.8.0_371]
at (:418) ~[?:1.8.0_371]
at .loadClass0(:46) ~[:?]
at $000(:11) ~[:?]
at $(:40) ~[:?]
at (:63) ~[:?]
at (:37) ~[:?]
at (:405) ~[?:1.8.0_371]
at .loadClass0(:46) ~[:?]
at $000(:11) ~[:?]
at $(:40) ~[:?]
at (:63) ~[:?]
at (:37) ~[:?]
at (:351) ~[?:1.8.0_371]
at (:133) ~[:?]
at (:351) ~[?:1.8.0_371]
at .forName0(Native Method) ~[?:1.8.0_371]
at (:348) ~[?:1.8.0_371]
at (:1286) ~[:?]
...Omit useless information
Caused by: :
at (:387) ~[?:1.8.0_371]
at (:418) ~[?:1.8.0_371]
at .loadClass0(:46) ~[:?]
at $000(:11) ~[:?]
at $(:40) ~[:?]
at (:63) ~[:?]
at (:37) ~[:?]
at (:351) ~[?:1.8.0_371]
at .defineClass1(Native Method) ~[?:1.8.0_371]
at (:756) ~[?:1.8.0_371]
at (:142) ~[?:1.8.0_371]
at (:473) ~[?:1.8.0_371]
at $100(:74) ~[?:1.8.0_371]
at $(:369) ~[?:1.8.0_371]
at $(:363) ~[?:1.8.0_371]
at (Native Method) ~[?:1.8.0_371]
at (:362) ~[?:1.8.0_371]
at (:418) ~[?:1.8.0_371]
at .loadClass0(:46) ~[:?]
at $000(:11) ~[:?]
at $(:40) ~[:?]
at (:63) ~[:?]
at (:37) ~[:?]
at (:405) ~[?:1.8.0_371]
...Omit useless information
cure
Let's start with the solution:
- If your application contains -api-2., just delete Orientcom/lib/.
- If your application doesn't contain that package, just download -api-2. and put it in the Oriental/lib directory.
Causes of the problem
-api is the JavaEE persistence API interface definition package , from 2007 released to the Maven central repository , Maven coordinates have changed many times , each time the compatibility of the change is also difficult to say .
- :persistence-api The oldest version of :persistence-api 2007, version 1.0~1.0.2 is the most commonly used version.
- :-api 2017 Migration Maven coordinates, only version 2.2 has been released, which is the most popular version at the moment.
- :-api Migrating Maven coordinates in 2018, releasing versions 2., 3., 3., 3., 3. and 3.2.0 is the latest version as of May 21, 2024 release as of this posting.
Oriental 7.0 comes with the earliest version (doesn't identify whether it's 1.0 or 1.0.2), only 2.2 and above haveThis class.
ultimate
Letter to create the environment of less information, if this article is helpful to you, please do not begrudge praise comment, your support is my writing encouragement!