Use hibernate tools to implement hibernate reverse engineering under clipse, and report an error when viewing Database

    When using hibernate tools to implement hibernate reverse engineering under eclipse, an error is reported when viewing the Database, and the error message is caused by a slf4j conflict. The specific error is as follows:

An internal error occurred during: "Fetching children of Database". org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V

Workaround :

Step 1: Modify the artifacts.xml file in the eclipse installation directory, and change the version of id='org.slf4j.api' to '1.5.8.v20120130-2120'

 

<artifact classifier='osgi.bundle' id='org.slf4j.api' version='1.5.8.v20120130-2120'>
      <properties size='1'>
        <property name='download.size' value='35173'/>
      </properties>
    </artifact>

 Step 2: If the project is managed by maven, change the sl4j version in pom.xml to 1.5.8, as follows:

 

<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>1.5.8</version>
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>jcl-over-slf4j</artifactId>
		<version>1.5.8</version>
	</dependency>
	<dependency>
	<groupId>org.slf4j</groupId>
		<artifactId>slf4j-log4j12</artifactId>
		<version>1.5.8</version>
	</dependency>

 

   If you add the jar file directly, replace the slf4j related jar file with 1.5.8.

 

Step 3: Restart eclipse

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327069690&siteId=291194637