facebook

[Closed] log4j BUG in MyEclipse: Piority vs. Level

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #259036 Reply

    rteodosio
    Member

    I am using the latest MyEclipse 5. I am getting errors when executing some of the basic functions.

    After many head banging, the problem here is the version of log4j is not compatible:

    java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)

    In log4j version in the MyEclipse 5 uses Piority object instead of Level. I found an article talking about this incompatiblity:

    http://mail-archives.apache.org/mod_mbox/logging-log4j-dev/200512.mbox/%3C438F0EEB.7000104@ptc.com%3E

    Can you MyEclipse guys fix this simple problem?

    -Ron

    #259119 Reply

    Riyad Kalla
    Member

    Ron,
    We are not away of any compatability problems, please go to MyEclipse > Installation Summary > Installation Details and paste all your system information here for me. Then please explain, in detail, which actions you were performing and what problems you had as well as any log entries (<workspace dir>\.metadata\.log) that may have been created while performing those actions.

    And lastly, checking your JRE/lib/ext directory in your JRE install that you are using to Run MYEclipse to make sure that you don’t have any custom libraries there, as they will override everything else on the system.

    #259159 Reply

    rteodosio
    Member

    Hi Riyad,

    I have tried both latest version of MyEclipse and I have tried to revert back to older jdk version. I am still getting the same problem. So strange when I used the MyEclispe 4.1 GA, it work at the first time when I did the Hibernate Reverse Engineering, but when I tried the second time, then i got the same problem again.

    Here is MyEclipse 5 settings:

    *** Date: Mon Sep 25 09:57:15 EDT 2006

    *** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.4.2_06

    *** MyEclipse details:
    MyEclipse Enterprise Workbench

    Version: 5.0 GA
    Build id: 20060805-5.0-GA

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 5.0.1 GA
    Build id: 20060810-5.0.1-GA

    Eclipse Graphical Editing Framework

    Version: 3.2.0.v20060626
    Build id: 20060627-0816

    Eclipse Platform

    Version: 3.2.0.v20060609m-AgOexn6hlEUsvBO
    Build id: M20060629-1905

    Eclipse RCP

    Version: 3.2.0.v20060609m-SVDNgVrNoh-MeGG
    Build id: M20060629-1905

    Eclipse Java Development Tools

    Version: 3.2.0.v20060609m-F7snq1fxia-Z4XP
    Build id: M20060629-1905

    Eclipse Plug-in Development Environment

    Version: 3.2.0.v20060609m——6zXJJzJzJq
    Build id: M20060629-1905

    Eclipse Project SDK

    Version: 3.2.0.v20060609m-GNq6oQq-7es-Y81
    Build id: M20060629-1905

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    d18_74
    -product
    com.genuitec.myeclipse.product.ide
    -clean
    -vm
    C:\j2sdk1.4.2_06\bin\javaw.exe

    Here is the error log (so annoying):

    !ENTRY org.eclipse.core.jobs 4 2 2006-09-25 10:06:05.035
    !MESSAGE An internal error occurred during: “Generating Artifacts”.
    !STACK 0
    java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
    at org.apache.commons.logging.impl.Log4JCategoryLog.info(Log4JCategoryLog.java:109)
    at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:41)
    at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
    at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
    at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:366)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1877)
    at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:71)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$6.execute(GenerateArtifactsJob.java:514)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
    at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:70)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:509)
    at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:293)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

    Thanks,
    Ron

    #259175 Reply

    Riyad Kalla
    Member

    Ron,
    1) Did you check your lib/ext dir of the JDK or JRE you are using to run MyEclipse to make sure there are no custom Log4J classes in there?

    2) Also, where is the update log4j file that is causing this incompatability… please consider my position. You reported essentially “MyEclipse is not compatible with new Log4J, something breaks”, and now I’ve been trying to dig out of you *where* exactly tihs new Log4J library is such that it’s causing MyEclipse’s features to break. Clearly we would have run into this immediately during test or from every other user that uses Hibernate if we had shipped a broken plugin, but in our testing it works. So there is something specific about your system layout and potentially the location of a diferent Log4J JAR that is causing this problem. That is what I’m trying to figure out.

    If you have a custom Log4J library in your JRE’s lib/ext dir, there is nothing we can do, that’s not a good place to put libraries and it precludes every other library of the same name/type that is loaded up in the classloader hierarchy in the running VM. BUT, if you simply have an updated Log4J in your project and *that* is causing the failure, that’s definately a bug.

    For example, a few years ago, we had a bug where if folks had the Jasper libraries in their project, it broke JSP compilation for that project because we were (unknowingly) picking up the Jasper compiler from the project and not from our plugin.

    Ok I hope it’s a little clearer now what I’m trying to get information on.

    #259187 Reply

    rteodosio
    Member

    This is just additional info when I did the Hibernate Reverse Engineering:

    Unable to find MEContainer jar: C:/Program Files/MyEclipse 5.0GA/eclipse/plugins/com.genuitec.org.hibernate.eclipse_5.0.0/lib/hibernate/log4j-1.3alpha-8.jar

    I don’t know if it makes sense.

    Thanks,
    -Ron

    #259188 Reply

    rteodosio
    Member

    Hi Riyad,

    I found it the problem and solution. I was defining the in the commons.logging.properties file with the following settings:

    org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategoryLog

    I just commented out the above, so it will let the default org.apache.commons.logging.Log settings to be used in the Hibernate.

    I am now able to do Hibernate Reverse Engineering.

    Thanks for the help.

    #259196 Reply

    Riyad Kalla
    Member

    I’m really glad to hear that it’s working now, and thank you for following up for others that may have the same issue.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: [Closed] log4j BUG in MyEclipse: Piority vs. Level

You must be logged in to post in the forum log in