Question

This problem seems to be quite common, but so far I have not found one single, useful solution.

I created a project using the net.liftweb blank archetype, version 2.2-M1, with maven 2. I just added one dependency, for H2 database, then also added some models and a DBVendor, like in the basic archetype. But I only ever get an exception like java.lang.NoClassDefFoundError: org/apache/log4j/LogManager.

Now, the logger is not vital for the entire program, bit when it comes to later problems with the mapper, I think I need the logs for debugging. I did a complete mvn clean and also deleted my .m2 folder, but the problem persists.

Alternatively, whenever that error does not appear, I get another one, about a class missing aend thus the logger resorting to NOP. I got as far as to believe there's something wrong with my pom.xml, but I have now tried several variants with the log4j deps, all leading to no improvement.

I really hope you can help me here, Lift has been so far a series of undocumented error to me, way beyond the point where a little learning fun has morphed into a personal challenge.

Was it helpful?

Solution

Solved. I put the solution here so others will find it:

Nowhere in the wiki it says that Log.infoF is deprecrated and will result in this error. The solution is quite simple, just replace it with Schemifier.infoF _, the line must look like this:

Schemifier.schemify(true, Schemifier.infoF _, User)

This works all right.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top