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

Orkweb Startup Fixes #39

Merged
merged 4 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion orkweb/context/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</context-param>
<context-param>
<param-name>Log4jConfigFile</param-name>
<param-value>logging.properties</param-value>
<param-value>logging.xml</param-value>
</context-param>
<context-param>
<param-name>HibernateConfigFile</param-name>
Expand Down
14 changes: 1 addition & 13 deletions orkweb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sf.oreka</groupId>
<artifactId>orkweb</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<sourceDirectory>src</sourceDirectory>
Expand Down Expand Up @@ -76,18 +76,6 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.6.ga</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.1.GA</version>
</dependency>

<dependency>
<groupId>tapestry</groupId>
<artifactId>tapestry</artifactId>
Expand Down
15 changes: 11 additions & 4 deletions orkweb/src/net/sf/oreka/orkweb/ContextListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@ public void contextInitialized(ServletContextEvent servletContextEvent) {
log.error("OrkWeb ContextInitialized(): Log4jConfigFile context-param missing in web.xml");
} else {
log4jConfigFile = configFolder + "/" + log4jConfigFile;
LogManager.getInstance().configure(log4jConfigFile);
log.info("OrkWeb ContextInitialized(): log4jConfigFile is " + log4jConfigFile);
try {
LogManager.getInstance().configure(log4jConfigFile);
log.info("OrkWeb ContextInitialized(): log4jConfigFile is " + log4jConfigFile);
} catch (Throwable e){
e.printStackTrace();
log.error("OrkWeb ContextInitialized(): Error configuring log4j: " + e.getMessage());
}

}

log.info("========================================");
Expand All @@ -58,8 +64,9 @@ public void contextInitialized(ServletContextEvent servletContextEvent) {
try {
OrkWeb.hibernateManager.configure(hibernateConfigFile);
}
catch (Exception e) {
log.error("OrkWeb ContextInitialized(): Error configuring Hibernate: " + e.getMessage());
catch (Throwable e) {
e.printStackTrace();
log.error("OrkWeb ContextInitialized(): Error configuring Hibernate: " + e.getMessage());
}

// Get path to server.xml file
Expand Down