2013-07-24 35 views
-1

我們只是把我們的項目變成了一個Maven項目,因爲我們遇到了日誌記錄問題。在此之前,所有東西都在日誌文件(System.in/err等)中,我甚至可以在netbeans glassfish選項卡中看到它們。但現在部署「stucks」在初始化部分:glassfish在部署後沒有記錄

Undeploying ... 
Distributing D:\ExtMonTool\trunk\src\target\extmon-1.0-SNAPSHOT.war to [GlassFish Server 3+] 
Initializing... 

的應用程序部署和工作,但沒有記錄在server.log或NetBeans的

任何想法,我應該怎麼改變我應該在哪裏看對於這個問題?

+0

戰爭包裝樹顯示將是有益的 – mebada

+0

我編輯的問題,現在它包含的pom.xml –

+0

我的意思是文件和目錄結構你的戰爭 – mebada

回答

1

的問題在日誌中這些線後出現了:

INFO: HHH000227: Running hbm2ddl schema export 
INFO: HHH000230: Schema export complete 
INFO: HHH000030: Cleaning up connection pool [jdbc:hsqldb:mem:richfaces_showcase] 

所以,我想這個問題是由richfaces-showcase引起的,當Hibernate試圖清理連接池。

如果你不使用richfaces-showcase(你可能不是),你可以從它的依賴中排除它,所以它不會造成任何麻煩。

通過運行dependency:tree目標,你可以看到,該richfaces-distribution包含以下內容:

+- org.richfaces.ui:richfaces-components-api:jar:4.3.2.Final:compile 
    +- org.richfaces.ui:richfaces-components-ui:jar:4.3.2.Final:compile 
    +- org.richfaces.core:richfaces-core-api:jar:4.3.2.Final:compile 
    +- org.richfaces.core:richfaces-core-impl:jar:4.3.2.Final:compile 
    +- org.richfaces.examples:richfaces-showcase:war:tomcat6:4.3.2.Final:compile 
    +- org.richfaces.archetypes:richfaces-archetype-simpleapp:jar:4.3.2.Final:compile 

只需更換richfaces-distribution依賴性:

<dependency> 
    <groupId>org.richfaces</groupId> 
    <artifactId>richfaces-distribution</artifactId> 
    <version>4.3.2.Final</version> 
    <type>zip</type> 
</dependency> 

與所包含的依賴關係,沒有richfaces-showcase

<dependency> 
    <groupId>org.richfaces.core</groupId> 
    <artifactId>richfaces-core-impl</artifactId> 
    <version>4.3.3.Final</version> 
</dependency> 
<dependency> 
    <groupId>org.richfaces.ui</groupId> 
    <artifactId>richfaces-components-api</artifactId> 
    <version>4.3.3.Final</version> 
</dependency> 
<dependency> 
    <groupId>org.richfaces.ui</groupId> 
    <artifactId>richfaces-components-ui</artifactId> 
    <version>4.3.3.Final</version> 
</dependency> 
<dependency> 
    <groupId>org.richfaces.core</groupId> 
    <artifactId>richfaces-core-api</artifactId> 
    <version>4.3.3.Final</version> 
</dependency> 

另一個解決問題的方法(但我不確定這個,它只是一個假設)將爲richfaces-showcase做一個休眠配置。 (我認爲這是GlassFish服務器所需要的,richfaces發行版中的默認配置是針對Tomcat的:org.richfaces.examples:richfaces-showcase:war:tomcat6:4.3.2.Final:compile)。