Fixed template loading

git-svn-id: http://svn.research-infrastructures.eu/d4science/gcube/trunk/spatial-data/geonetwork@182236 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Fabio Sinibaldi 2019-11-08 14:53:45 +00:00
parent 0adfc293a9
commit 442a7fc162
13 changed files with 83 additions and 87 deletions

View File

@ -22,17 +22,12 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/xmlTemplates">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources/org/gcube/spatial/data/geonetwork">
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>

View File

@ -4,5 +4,4 @@ encoding//src/main/resources=UTF-8
encoding//src/main/resources/org/gcube/spatial/data/geonetwork=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding//src/xmlTemplates=UTF-8
encoding/<project>=UTF-8

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8

26
log.txt
View File

@ -16865,3 +16865,29 @@ java.io.IOException: Server returned HTTP response code: 403 for URL: https://ww
4915 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.releaseConnection()
4915 [main] DEBUG org.apache.commons.httpclient.HttpConnection - Releasing connection back to connection manager.
4916 [main] INFO it.geosolutions.geonetwork.op.gn3.GN3MetadataAdmin - Set privileges for 1 groups on md#231031
635 [main] DEBUG freemarker.cache - Couldn't find template in cache for "BaseTemplate.ftlx"("en_US", UTF-8, parsed); will try to load it.
636 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("BaseTemplate_en_US.ftlx"): Not found
637 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("BaseTemplate_en.ftlx"): Not found
637 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("BaseTemplate.ftlx"): Not found
632 [main] DEBUG freemarker.cache - Couldn't find template in cache for "BaseTemplate.ftlx"("en_US", UTF-8, parsed); will try to load it.
632 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("BaseTemplate_en_US.ftlx"): Not found
633 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("BaseTemplate_en.ftlx"): Not found
633 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("BaseTemplate.ftlx"): Found
633 [main] DEBUG freemarker.cache - Loading template for "BaseTemplate.ftlx"("en_US", UTF-8, parsed) from "file:/home/fabio/workspaces/DEV/geonetwork-trunk/target/classes/xmlTemplates/BaseTemplate.ftlx"
737 [main] DEBUG freemarker.cache - Couldn't find template in cache for "Macros.ftlx"("en_US", UTF-8, parsed); will try to load it.
737 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("Macros_en_US.ftlx"): Not found
737 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("Macros_en.ftlx"): Not found
737 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("Macros.ftlx"): Found
737 [main] DEBUG freemarker.cache - Loading template for "Macros.ftlx"("en_US", UTF-8, parsed) from "file:/home/fabio/workspaces/DEV/geonetwork-trunk/target/classes/xmlTemplates/Macros.ftlx"
753 [main] DEBUG freemarker.cache - Couldn't find template in cache for "Spatial.ftlx"("en_US", UTF-8, parsed); will try to load it.
754 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("Spatial_en_US.ftlx"): Not found
754 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("Spatial_en.ftlx"): Not found
754 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("Spatial.ftlx"): Found
754 [main] DEBUG freemarker.cache - Loading template for "Spatial.ftlx"("en_US", UTF-8, parsed) from "file:/home/fabio/workspaces/DEV/geonetwork-trunk/target/classes/xmlTemplates/Spatial.ftlx"
780 [main] DEBUG freemarker.cache - Couldn't find template in cache for "Extent.ftlx"("en_US", UTF-8, parsed); will try to load it.
780 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("Extent_en_US.ftlx"): Not found
780 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("Extent_en.ftlx"): Not found
780 [main] DEBUG freemarker.cache - TemplateLoader.findTemplateSource("Extent.ftlx"): Found
780 [main] DEBUG freemarker.cache - Loading template for "Extent.ftlx"("en_US", UTF-8, parsed) from "file:/home/fabio/workspaces/DEV/geonetwork-trunk/target/classes/xmlTemplates/Extent.ftlx"
786 [main] DEBUG freemarker.beans - Key "temporalExtent" was not found on instance of org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent. Introspection information for the class is: {getClass=public final native java.lang.Class java.lang.Object.getClass(), java.lang.Object@71809907={public java.lang.String java.lang.Object.toString()=[Ljava.lang.Class;@618b19ad, public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getVerticalExtents()=[Ljava.lang.Class;@2d3379b4, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setGeographicExtents(java.util.HashSet)=[Ljava.lang.Class;@30c15d8b, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addVerticalExtent(org.opengis.metadata.extent.VerticalExtent)=[Ljava.lang.Class;@5e0e82ae, public native int java.lang.Object.hashCode()=[Ljava.lang.Class;@6771beb3, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setTemporalExtents(java.util.HashSet)=[Ljava.lang.Class;@51399530, public boolean java.lang.Object.equals(java.lang.Object)=[Ljava.lang.Class;@6b2ea799, public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getTemporalExtents()=[Ljava.lang.Class;@411f53a0, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addGeographicExtent(org.gcube.spatial.data.geonetwork.iso.tpl.extent.GeographicExtent)=[Ljava.lang.Class;@2b71e916, public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getGeographicExtents()=[Ljava.lang.Class;@36fc695d, public java.lang.String org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getDescription()=[Ljava.lang.Class;@28701274, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setVerticalExtents(java.util.HashSet)=[Ljava.lang.Class;@13c9d689, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setDescription(java.lang.String)=[Ljava.lang.Class;@3754a4bf, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addTemporalExtent(org.opengis.metadata.extent.TemporalExtent)=[Ljava.lang.Class;@62379589, public final native java.lang.Class java.lang.Object.getClass()=[Ljava.lang.Class;@4afcd809}, addTemporalExtent=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addTemporalExtent(org.opengis.metadata.extent.TemporalExtent), description=java.beans.PropertyDescriptor[name=description; propertyType=class java.lang.String; readMethod=public java.lang.String org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getDescription()], setVerticalExtents=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setVerticalExtents(java.util.HashSet), setDescription=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setDescription(java.lang.String), getGeographicExtents=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getGeographicExtents(), getDescription=public java.lang.String org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getDescription(), geographicExtents=java.beans.PropertyDescriptor[name=geographicExtents; propertyType=class java.util.HashSet; readMethod=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getGeographicExtents()], getTemporalExtents=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getTemporalExtents(), verticalExtents=java.beans.PropertyDescriptor[name=verticalExtents; propertyType=class java.util.HashSet; readMethod=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getVerticalExtents()], addGeographicExtent=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addGeographicExtent(org.gcube.spatial.data.geonetwork.iso.tpl.extent.GeographicExtent), java.lang.Object@67d48005=freemarker.ext.beans.SimpleMethod@175c2241, setTemporalExtents=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setTemporalExtents(java.util.HashSet), setGeographicExtents=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setGeographicExtents(java.util.HashSet), hashCode=public native int java.lang.Object.hashCode(), equals=public boolean java.lang.Object.equals(java.lang.Object), addVerticalExtent=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addVerticalExtent(org.opengis.metadata.extent.VerticalExtent), temporalExtents=java.beans.PropertyDescriptor[name=temporalExtents; propertyType=class java.util.HashSet; readMethod=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getTemporalExtents()], toString=public java.lang.String java.lang.Object.toString(), class=java.beans.PropertyDescriptor[name=class; propertyType=class java.lang.Class; readMethod=public final native java.lang.Class java.lang.Object.getClass()], getVerticalExtents=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getVerticalExtents()}
786 [main] DEBUG freemarker.beans - Key "verticalExtent" was not found on instance of org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent. Introspection information for the class is: {getClass=public final native java.lang.Class java.lang.Object.getClass(), java.lang.Object@71809907={public java.lang.String java.lang.Object.toString()=[Ljava.lang.Class;@618b19ad, public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getVerticalExtents()=[Ljava.lang.Class;@2d3379b4, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setGeographicExtents(java.util.HashSet)=[Ljava.lang.Class;@30c15d8b, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addVerticalExtent(org.opengis.metadata.extent.VerticalExtent)=[Ljava.lang.Class;@5e0e82ae, public native int java.lang.Object.hashCode()=[Ljava.lang.Class;@6771beb3, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setTemporalExtents(java.util.HashSet)=[Ljava.lang.Class;@51399530, public boolean java.lang.Object.equals(java.lang.Object)=[Ljava.lang.Class;@6b2ea799, public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getTemporalExtents()=[Ljava.lang.Class;@411f53a0, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addGeographicExtent(org.gcube.spatial.data.geonetwork.iso.tpl.extent.GeographicExtent)=[Ljava.lang.Class;@2b71e916, public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getGeographicExtents()=[Ljava.lang.Class;@36fc695d, public java.lang.String org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getDescription()=[Ljava.lang.Class;@28701274, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setVerticalExtents(java.util.HashSet)=[Ljava.lang.Class;@13c9d689, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setDescription(java.lang.String)=[Ljava.lang.Class;@3754a4bf, public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addTemporalExtent(org.opengis.metadata.extent.TemporalExtent)=[Ljava.lang.Class;@62379589, public final native java.lang.Class java.lang.Object.getClass()=[Ljava.lang.Class;@4afcd809}, addTemporalExtent=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addTemporalExtent(org.opengis.metadata.extent.TemporalExtent), description=java.beans.PropertyDescriptor[name=description; propertyType=class java.lang.String; readMethod=public java.lang.String org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getDescription()], setVerticalExtents=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setVerticalExtents(java.util.HashSet), setDescription=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setDescription(java.lang.String), getGeographicExtents=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getGeographicExtents(), getDescription=public java.lang.String org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getDescription(), geographicExtents=java.beans.PropertyDescriptor[name=geographicExtents; propertyType=class java.util.HashSet; readMethod=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getGeographicExtents()], getTemporalExtents=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getTemporalExtents(), verticalExtents=java.beans.PropertyDescriptor[name=verticalExtents; propertyType=class java.util.HashSet; readMethod=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getVerticalExtents()], addGeographicExtent=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addGeographicExtent(org.gcube.spatial.data.geonetwork.iso.tpl.extent.GeographicExtent), java.lang.Object@67d48005=freemarker.ext.beans.SimpleMethod@175c2241, setTemporalExtents=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setTemporalExtents(java.util.HashSet), setGeographicExtents=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.setGeographicExtents(java.util.HashSet), hashCode=public native int java.lang.Object.hashCode(), equals=public boolean java.lang.Object.equals(java.lang.Object), addVerticalExtent=public void org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.addVerticalExtent(org.opengis.metadata.extent.VerticalExtent), temporalExtents=java.beans.PropertyDescriptor[name=temporalExtents; propertyType=class java.util.HashSet; readMethod=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getTemporalExtents()], toString=public java.lang.String java.lang.Object.toString(), class=java.beans.PropertyDescriptor[name=class; propertyType=class java.lang.Class; readMethod=public final native java.lang.Class java.lang.Object.getClass()], getVerticalExtents=public java.util.HashSet org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent.getVerticalExtents()}

49
pom.xml
View File

@ -147,53 +147,6 @@
</repository>
</repositories>
<build>
<finalName>${artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>servicearchive</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/xmlTemplates</directory>
<includes>
<include>*.xml</include>
</includes>
<targetPath>xml_templates</targetPath>
</resource>
<resource>
<directory>src/main/resources/org/gcube/spatial/data/geonetwork</directory>
<includes>
<include>*.properties</include>
</includes>
<targetPath>org/gcube/spatial/data/geonetwork</targetPath>
</resource>
</resources>
</build>
<description>Java library used to communicate with GeoNetwork instances.</description>
</project>

View File

@ -5,6 +5,8 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import org.apache.commons.io.IOUtils;
@ -35,15 +37,13 @@ public class ISOMetadataByTemplate {
// Specify the source where the template files come from. Here I set a
// plain directory for it, but non-file-system sources are possible too:
File localDir=new File("./");
System.out.println("Current folder info ");
System.out.println(localDir.getAbsolutePath());
System.out.println(Arrays.toString(localDir.list()));
cfg.setDirectoryForTemplateLoading(new File("src/xmlTemplates"));
// cfg.setDirectoryForTemplateLoading(
// new File(ISOMetadataByTemplate.class.getResource("xmlTemplates").toURI()));
cfg.setClassForTemplateLoading(ISOMetadataByTemplate.class, "/xmlTemplates");
// Set the preferred charset template files are stored in. UTF-8 is
// a good choice in most applications:
cfg.setDefaultEncoding("UTF-8");

View File

@ -24,7 +24,7 @@ import it.geosolutions.geonetwork.util.GNSearchResponse.GNMetadata;
public class LoginTest {
private static final String defaultScope="/gcube/devNext";
private static final String defaultScope="/pred4s/preprod/preVRE";
// private static final String defaultScope="/gcube";
// private static final String defaultScope="/d4science.research-infrastructures.eu/gCubeApps";

View File

@ -1,7 +1,15 @@
package org.gcube.spatial.data.geonetwork.test;
import java.util.ArrayList;
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
import org.gcube.spatial.data.geonetwork.GeoNetworkAdministration;
import org.gcube.spatial.data.geonetwork.GeoNetworkReader;
import org.gcube.spatial.data.geonetwork.LoginLevel;
@ -32,23 +40,23 @@ public class ScopeTests {
static{
// DEV
scopes.add("/gcube");
scopes.add("/gcube/devNext");
scopes.add("/gcube/devsec");
scopes.add("/gcube/devNext/NextNext");
scopes.add("/gcube/devsec/StaTabTest");
scopes.add("/gcube/devsec/RMinerDev");
scopes.add("/gcube/devsec/TabProcessing");
scopes.add("/gcube/devsec/devVRE");
// scopes.add("/gcube");
// scopes.add("/gcube/devNext");
// scopes.add("/gcube/devsec");
//
// scopes.add("/gcube/devNext/NextNext");
//
// scopes.add("/gcube/devsec/StaTabTest");
//
//
// scopes.add("/gcube/devsec/RMinerDev");
//
//
//
// scopes.add("/gcube/devsec/TabProcessing");
//
// scopes.add("/gcube/devsec/devVRE");
//
// scopes.add("/gcube/preprod/preVRE");
@ -58,9 +66,7 @@ public class ScopeTests {
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/InfraScience");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ICES_TCRE");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/TabularDataLab");
// scopes.add("/d4science.research-infrastructures.eu/FARM/AquaMaps");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/PGFA-UFMT");
// scopes.add("/d4science.research-infrastructures.eu/FARM");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/EuBrazilOpenBio");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/EcologicalModelling");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-PSC");
@ -102,6 +108,9 @@ public class ScopeTests {
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/SoBigData.eu");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/PerformanceEvaluationInAquaculture");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/StrategicInvestmentAnalysis");
scopes.addAll(getScopes("/d4science.research-infrastructures.eu","8d50044c-8827-4a16-962f-1890cbeaf74e"));
}
@ -161,4 +170,16 @@ public class ScopeTests {
System.out.println("SCOPE "+scope+" found "+totalCount+" (public access : "+publicCount+", local +"+(totalCount-publicCount)+", existing in instance : "+existingCount+")");
}
}
private static final Set<String> getScopes(String scope,String resID){
HashSet<String> toReturn=new HashSet<>();
TokenSetter.set(scope);
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition("$resource/ID/text() eq '"+resID+"'");
for(ServiceEndpoint e: client.submit(query)){
toReturn.addAll(e.scopes().asCollection());
}
return toReturn;
}
}

View File

@ -9,9 +9,11 @@ log4j.appender.A1.MaxFileSize=100MB
log4j.appender.A1.MaxBackupIndex=1
log4j.logger.freemarker=DEBUG, A1
#CONSOLE
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Threshold=DEBUG
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout