maven error cannot find symbol method encodeBase64String

when I'm trying to do mvn install in eclipse, I'm getting below error:

ERROR] /C:/myproj/package/MyClass.java:[43,49] cannot find symbol
  symbol:   method encodeBase64String(byte[])

I even kepted below dependency, BUT still showing that error.

<dependency>
    <groupId>commons-codec</groupId>
    <artifactId>commons-codec</artifactId>
    <version>20041127.091804</version>
</dependency>

Please suggest me what could be wrong and what I've to do?

PROBLEM RESOLVED:

Just changed version to 1.4 and it got worked!

Answers


Did you do import on the class Base64 or import static? Your usage suggests you did the former. If that be the case, then you need to use Base64.encodeBase64String instead of just calling encodeBase64String


Need Your Help

Is possible to do proxy authentication using SQL Server JDBC driver?

java sql-server jdbc

Oracle JDBC driver provides option to do proxy authentication for multi-tier architecture design. Are there any similar/equivalent option available with SQL Server JDBC driver?

mysql indexing date vs datetime on large audit table

mysql sql percona

I have an audit table that is currently running at around 25M rows on innodb and growing about 1M rows a month.