Permalink
Browse files

fixed dependency to Servlet-API

fixed rpc backend path resolving
removed default servlet declaration from web.xml to fix compatibility issue with Tomcat
updated log4j configuration
  • Loading branch information...
1 parent 7710c1c commit 55aa13b81d340c5d77066ebfb8dcf914c48b4393 tomek committed Sep 7, 2012
View
@@ -84,6 +84,10 @@
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -16,10 +16,19 @@ qx.Class.define('helenos.util.Rpc',
this.setUrl(this.__getRemoteUri(serviceName));
this.setTimeout(30000);
},
+
+ statics : {
+ serverPath : null
+ },
members : {
__getRemoteUri : function(serviceName) {
- return window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + serviceName;
+ if (helenos.util.Rpc.serverPath == undefined) {
+ var pathIdx = window.location.href.indexOf('/helenos/index.html');
+ helenos.util.Rpc.serverPath = window.location.href.substr(0, pathIdx);
+ }
+
+ return helenos.util.Rpc.serverPath + serviceName;
},
showDetails : function(details) {
@@ -1,7 +1,3 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
package com.kuprowski.helenos.service;
import com.kuprowski.helenos.types.JsonColumnFamilyDefinition;
No changes.
@@ -1,20 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
<!-- Authors: Chris Taylor, Ceki Gulcu. -->
@@ -24,11 +8,12 @@
elements,appender elements, categories and an optional root
element. -->
-<!ELEMENT log4j:configuration (renderer*, appender*,plugin*, (category|logger)*,root?,
- (categoryFactory|loggerFactory)?)>
+<!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?,
+ categoryFactory?)>
-<!-- The "threshold" attribute takes a level value below which -->
-<!-- all logging statements are disabled. -->
+<!-- The "threshold" attribute takes a level value such that all -->
+<!-- logging statements with a level equal or below this value are -->
+<!-- disabled. -->
<!-- Setting the "debug" enable the printing of internal log4j logging -->
<!-- statements. -->
@@ -42,9 +27,8 @@ element. -->
<!ATTLIST log4j:configuration
xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
- threshold (all|trace|debug|info|warn|error|fatal|off|null) "null"
+ threshold (all|debug|info|warn|error|fatal|off|null) "null"
debug (true|false|null) "null"
- reset (true|false) "false"
>
<!-- renderer elements allow the user to customize the conversion of -->
@@ -59,11 +43,9 @@ element. -->
<!-- Appenders must have a name and a class. -->
<!-- Appenders may contain an error handler, a layout, optional parameters -->
<!-- and filters. They may also reference (or include) other appenders. -->
-<!ELEMENT appender (errorHandler?, param*,
- rollingPolicy?, triggeringPolicy?, connectionSource?,
- layout?, filter*, appender-ref*)>
+<!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)>
<!ATTLIST appender
- name CDATA #REQUIRED
+ name ID #REQUIRED
class CDATA #REQUIRED
>
@@ -89,7 +71,7 @@ element. -->
<!ELEMENT logger-ref EMPTY>
<!ATTLIST logger-ref
- ref CDATA #REQUIRED
+ ref IDREF #REQUIRED
>
<!ELEMENT param EMPTY>
@@ -127,7 +109,7 @@ element. -->
<!-- touch the level of the named logger. -->
<!ELEMENT logger (level?,appender-ref*)>
<!ATTLIST logger
- name CDATA #REQUIRED
+ name ID #REQUIRED
additivity (true|false) "true"
>
@@ -136,45 +118,11 @@ element. -->
<!ATTLIST categoryFactory
class CDATA #REQUIRED>
-<!ELEMENT loggerFactory (param*)>
-<!ATTLIST loggerFactory
- class CDATA #REQUIRED>
-
<!ELEMENT appender-ref EMPTY>
<!ATTLIST appender-ref
- ref CDATA #REQUIRED
->
-
-<!-- plugins must have a name and class and can have optional parameters -->
-<!ELEMENT plugin (param*, connectionSource?)>
-<!ATTLIST plugin
- name CDATA #REQUIRED
- class CDATA #REQUIRED
->
-
-<!ELEMENT connectionSource (dataSource?, param*)>
-<!ATTLIST connectionSource
- class CDATA #REQUIRED
->
-
-<!ELEMENT dataSource (param*)>
-<!ATTLIST dataSource
- class CDATA #REQUIRED
+ ref IDREF #REQUIRED
>
-<!ELEMENT triggeringPolicy ((param|filter)*)>
-<!ATTLIST triggeringPolicy
- name CDATA #IMPLIED
- class CDATA #REQUIRED
->
-
-<!ELEMENT rollingPolicy (param*)>
-<!ATTLIST rollingPolicy
- name CDATA #IMPLIED
- class CDATA #REQUIRED
->
-
-
<!-- If no priority element is specified, then the configurator MUST not -->
<!-- touch the priority of root. -->
<!-- The root category always exists and cannot be subclassed. -->
@@ -194,15 +142,14 @@ element. -->
<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?,
- log4j:locationInfo?, log4j:properties?) >
+ log4j:locationInfo?) >
<!-- The timestamp format is application dependent. -->
<!ATTLIST log4j:event
logger CDATA #REQUIRED
level CDATA #REQUIRED
thread CDATA #REQUIRED
timestamp CDATA #REQUIRED
- time CDATA #IMPLIED
>
<!ELEMENT log4j:message (#PCDATA)>
@@ -217,11 +164,3 @@ element. -->
file CDATA #REQUIRED
line CDATA #REQUIRED
>
-
-<!ELEMENT log4j:properties (log4j:data*)>
-
-<!ELEMENT log4j:data EMPTY>
-<!ATTLIST log4j:data
- name CDATA #REQUIRED
- value CDATA #REQUIRED
->
@@ -1,27 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-<log4j:configuration>
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out" />
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d{ABSOLUTE} %5p %c{1}:%L - %m%n" />
- </layout>
- </appender>
+ <param name="Target" value="System.out"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
+ </layout>
+ </appender>
- <appender name="default" class="org.apache.log4j.rolling.RollingFileAppender">
- <param name="file" value="${lookminders.root}/WEB-INF/logs/default.log" />
- <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
- <param name="fileNamePattern" value="${lookminders.root}/WEB-INF/logs-rollover/default.%d.gz" />
- </rollingPolicy>
+ <appender name="rollingFile" class="org.apache.log4j.DailyRollingFileAppender">
+ <param name="file" value="${helenos.root}/WEB-INF/logs/helenos.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%p %d %t %c %L - %m%n" />
</layout>
</appender>
<root>
- <level>DEBUG</level>
<priority value="WARN" />
<appender-ref ref="console" />
- <appender-ref ref="default" />
+ <appender-ref ref="rollingFile" />
</root>
</log4j:configuration>
No changes.
@@ -0,0 +1,20 @@
+WARN 2012-09-07 16:54:02,960 http-bio-8080-exec-1 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:54:03,040 http-bio-8080-exec-1 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:55:20,929 http-bio-8080-exec-9 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:55:21,001 http-bio-8080-exec-9 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:56:06,667 http-bio-8080-exec-9 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:56:06,741 http-bio-8080-exec-9 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:56:17,383 http-bio-8080-exec-10 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:56:17,450 http-bio-8080-exec-10 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:57:09,520 http-bio-8080-exec-4 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:57:09,580 http-bio-8080-exec-4 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:58:03,640 http-bio-8080-exec-3 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:58:03,696 http-bio-8080-exec-3 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:58:54,536 http-bio-8080-exec-3 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:58:56,871 http-bio-8080-exec-3 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:59:45,049 http-bio-8080-exec-2 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 16:59:45,911 http-bio-8080-exec-2 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 17:00:45,004 http-bio-8080-exec-2 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 17:00:47,726 http-bio-8080-exec-2 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 17:01:57,250 http-bio-8080-exec-5 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
+WARN 2012-09-07 17:02:07,044 http-bio-8080-exec-10 org.springframework.web.servlet.PageNotFound 1057 - No mapping found for HTTP request with URI [/helenos/helenos/undefined/Schema.json] in DispatcherServlet with name 'helenos'
@@ -23,10 +23,6 @@
<param-name>log4jRefreshInterval</param-name>
<param-value>360000</param-value>
</context-param>
- <context-param>
- <param-name>useFileMappedBuffer</param-name>
- <param-value>false</param-value>
- </context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
@@ -36,16 +32,17 @@
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
+ <!-- Override init parameter to avoid nasty file locking issue on windows (Jetty only) -->
+ <!--
<servlet>
- <!-- Override init parameter to avoid nasty -->
- <!-- file locking issue on windows. -->
<servlet-name>default</servlet-name>
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
-
+ -->
+
<servlet>
<servlet-name>helenos</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

0 comments on commit 55aa13b

Please sign in to comment.