我正在使用hibernate 3 maven插件爲使用JPA實體的模式生成DDL。它一切正常,但插件執行大約需要3-4分鐘才能執行。Hibernate 3 maven插件hbm2ddl非常慢
Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/user15273/.m2/repository/org/slf4j/slf4j- nop/1.6.1/slf4j-nop-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/user15273/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[INFO] Executed tasks
我試着用-X標誌運行maven,看看它在打印後面的輸出後卡住了一會兒。
main:
Class org.hibernate.tool.ant.HibernateToolTask loaded from parent loader (parentFirst)
+Datatype hibernatetool org.hibernate.tool.ant.HibernateToolTask
[mkdir] Created dir: C:\user15273\MySource\Workspace\NewSourceCode\Entity\target\sql\hibernate3
[hibernatetool] Executing Hibernate Tool with a JPA Configuration
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/user15273/.m2/repository/org/slf4j/slf4j-nop/1.6.1/slf4j-nop-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/user15273/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Class org.hibernate.ejb.Ejb3Configuration loaded from parent loader (parentFirst)
Couldn't load ResourceStream for commons-logging.properties
ResourceStream for META-INF/services/org.apache.commons.logging.LogFactory loaded from parent loader
Class org.apache.commons.logging.impl.SLF4JLogFactory loaded from parent loader (parentFirst)
Couldn't load ResourceStream for hibernate.properties
Couldn't load ResourceStream for META-INF/services/javax.xml.parsers.DocumentBuilderFactory
Class com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.impl.dv.xs.ExtendedSchemaDVFactoryImpl loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl loaded from parent loader (parentFirst)
有沒有人有任何想法如何找出這種延遲的原因或如何解決這個問題? TIA。
此排除已被添加。並且它不失敗的任何依賴。它只是掛了一段時間,並在一段時間後醒來完成該過程。我正在試圖分析這個過程,看看我能否看到線程在做什麼。如果有人有任何其他想法,請讓我知道。謝謝。 – user451445