Guillem Vicens
Guillem Vicens

Reputation: 3996

Which java class issues warning on catalina.out

I' am currently debugging why a legacy Maven web application compiled in Java 1.8 that we deploy on a Tomcat 8.5 is sending all the time following message:

Warning: Could not get charToByteConverterClass!

Curiously enough, when launching it on my local Tomcat instance, I see the warning in the console, but not in the catalina.out file.

My guess so far is that this is caused by some dependency, as we have no such warning inside our code.

The problem is that we have very old dependencies and also lot of them, so before getting into trying to upgrade them I would like to know if there is any way to:

Things I have tried so far:

Upvotes: 2

Views: 4395

Answers (2)

user2154643
user2154643

Reputation: 101

If anyone encounters this problem. xalan 2.7 did not eliminate the message. Adding the following stub class to your build will silence the error message:

package sun.io;

public class CharToByteConverter {
    public static CharToByteConverter getConverter(String encoding) {
        return new CharToByteConverter();
    }
}

Upvotes: 1

Ori Marko
Ori Marko

Reputation: 58822

You need to upgrade xalan due to a fixed issue since 2.7 release:

issue is now resolved as being fixed in the Xalan-J 2.7 release. As the issue reporter please confirm the code no longer has this problem so that we can close this issue down.

Actually the code that had the problem is totally gone, haha! Through XALANJ-2087 the dependancy on CharToByteConverter was removed plus a number of bugs were fixed due to an incorrect algorithm.

Upvotes: 3

Related Questions