Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong dependency on Log4j in MyBatis 3.2 #1

Closed
emacarron opened this issue Feb 23, 2013 · 2 comments
Closed

Wrong dependency on Log4j in MyBatis 3.2 #1

emacarron opened this issue Feb 23, 2013 · 2 comments
Assignees
Labels
Milestone

Comments

@emacarron
Copy link
Member

MyBatis 3.2 does not startup without log4j in the classpath.

Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Priority
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:176)
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:87)
at org.apache.ibatis.io.Resources.classForName(Resources.java:254)
at org.apache.ibatis.type.TypeAliasRegistry.registerAlias(TypeAliasRegistry.java:153)
at org.apache.ibatis.session.Configuration.(Configuration.java:173)

@paulkrause88
Copy link
Contributor

Is there a workaround? This makes 3.2.0 unusable for me.

@paulkrause88
Copy link
Contributor

Not a general workaround, but in my case I was able to get it working by adding the following dependencies to my pom.xml.

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
            <version>1.7.2</version>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>2.2.2</version>
        </dependency>

FrantaM pushed a commit to FrantaM/mybatis-3 that referenced this issue Aug 15, 2014
hazendaz referenced this issue in hazendaz/mybatis-3 Sep 14, 2014
Add missing overrides
Add curly brackets
Do not use trailing comments
Remove unused imports
Do not instantiate object then immediately return, just return it.
Add constructor to prevent synthetic access
emacarron pushed a commit that referenced this issue Jan 23, 2015
emacarron pushed a commit that referenced this issue Jan 30, 2015
emacarron pushed a commit that referenced this issue Mar 16, 2015
danglotb pushed a commit to danglotb/mybatis-3 that referenced this issue May 17, 2018
kazuki43zoo pushed a commit that referenced this issue Jun 17, 2018
harawata pushed a commit that referenced this issue Oct 1, 2018
harawata pushed a commit that referenced this issue Jul 2, 2019
Creating dynamic SQL using annotations and <script>
kazuki43zoo pushed a commit that referenced this issue Sep 20, 2019
kazuki43zoo pushed a commit that referenced this issue Oct 24, 2019
harawata pushed a commit that referenced this issue Jan 5, 2020
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
Creating dynamic SQL using annotations and <script>
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants