[FrontPage] [TitleIndex] [WordIndex

deegree 3 web service troubleshooting

Contents

  1. Logging

This page collects practices for solving problems with deegree 3 web services that don't start after configuration changes.

1. Logging

A documented log4j.properties is generated nightly and can be downloaded from the artefactory.

If you're using maven, you can also take advantage of its magic, and include the latest generated properties file automatically, as generated resource. Here are the appropriate snippets for your pom.xml:

First, include the generated resource directory:

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>add-resource</id>
            <goals>
              <goal>add-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                   <directory>${project.build.directory}/generated-resources</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>

Second, copy the dependency:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>target/generated-resources</outputDirectory>
              <outputAbsoluteArtifactFilename>log4j.properties</outputAbsoluteArtifactFilename>
              <includeGroupIds>org.deegree</includeGroupIds>
              <includeArtifactIds>deegree-log4j-properties</includeArtifactIds>
              <includeTypes>properties</includeTypes>
              <stripVersion>true</stripVersion>
            </configuration>
          </execution>
        </executions>
      </plugin>

Third, rename the file (if someone knows the Maven Way for this, it would be most welcome):

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>rename-props</id>
            <phase>generate-resources</phase>
            <configuration>
              <tasks>
                <move file="target/generated-resources/deegree-log4j-properties.properties" tofile="target/generated-resources/log4j.properties" />
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

Last but not least, change your dependency to deegree-services to this:

    <dependency>
      <groupId>org.deegree</groupId>
      <artifactId>deegree-log4j-properties</artifactId>
      <version>3.0-SNAPSHOT</version>
      <type>properties</type>
      <exclusions>
        <exclusion>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>servlet-api-2.5</artifactId>
        </exclusion>
      </exclusions>
    </dependency>


CategoryDeegree3


2018-04-20 12:05