5

We are trying to deploy a web service (a .war file) onto an Oracle WebLogic 12.2.1.0.0 Server.

The .war contains some third party .jars, for example log4j-api-2.12.0.jar, that are multiple release .jars (per JEP 238, having Multi-Release: true in MANIFEST.MF).

As such, it includes some Java 9 compiled classes in the META-INF/versions/9 directory. WebLogic 12.2 uses Java 8 only (confirmed version as Java 1.8.0_92 via WebLogic Admin Console).

As I understand it, Java 8 servers are supposed to not see / ignore any classes under the META-INF/versions directory, but this does not seem to be happening. It appears as though Oracle WLS is just scanning the whole .war.

As a result, when we try to deploy the .war, we get errors like this one:

BEA-160248 Unable to parse class file:... (then a long path name into the META-INF/versions/9 directory)

Is there something special we need to do to make this work? I'll accept anything along the lines of:

  • Configure WLS somehow to ignore the META-INF/versions/9 classes
  • Configure Maven to somehow build the .war without the META-INF/versions/9 classes that are present in the third-party .jars.

I'm not interested in answers involving manually deleting anything from the .war every time it is built. Also, I'm not sure I can downgrade to earlier versions of the 3rd party .jars at this point. Log4j2, probably could... but there are others.

Thanks!

Matthew McPeak
  • 17,705
  • 2
  • 27
  • 59

3 Answers3

1

JEP 238 is from Java 9 and WebLogic Server does not run with Java 9.

Emmanuel Collin
  • 2,556
  • 2
  • 10
  • 17
  • 1
    Multi-release jars are intentionally backwards compatible. – Thorbjørn Ravn Andersen Sep 11 '19 at 13:12
  • 2
    This is not an answer I can accept without more details. From my reading of JEP 238, the `META-INF/versions/*` directory paths are supposed to be invisible in a Java 8 environment. So, it is _supposed_ to work, as far as I can tell. But I think WebLogic is just scanning the whole .jar instead of reading only the directories that are supposed to have classes. So, I don't think it's a Java version problem. I think it's a WebLogic behavior or (hopefully) configuration problem. – Matthew McPeak Sep 11 '19 at 13:19
1

After looking into it further, the

BEA-160248 Unable to parse class file...

messages were a red herring. After solving other, unrelated problems, the application does deploy and work as needed, in spite of these error messages appearing in the log.

Matthew McPeak
  • 17,705
  • 2
  • 27
  • 59
  • 1
    still would be nice to find a way to not display those messages in the logs – Massimo May 18 '21 at 10:15
  • What was the actual problem? – Lucas Hendren Apr 29 '22 at 23:59
  • One of the developers on my team was having trouble deploying the application and reported the BEA-160248 error as the suspected cause. When I later got involved, I found the developer's problems were something unrelated and that the BEA-160248 was not causing any problems. – Matthew McPeak Apr 30 '22 at 01:10
1

I would like to add that according to Doc ID 2629550.1:

This message is harmless and can be ignored.

wovano
  • 4,543
  • 5
  • 22
  • 49
  • Welcome to SO, Yannis. Although this information may be useful, the document you mention is not accessible without account. It might be helpful if you can summarize the relevant information here (for the people who want to know *why* they can ignore the message). – wovano Oct 01 '21 at 11:31