servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r709773 - in /servicemix/smx4/kernel/trunk/testing: itests/src/test/java/org/apache/servicemix/kernel/testing/itests/ itests/src/test/resources/ support/src/main/java/org/apache/servicemix/kernel/testing/support/
Date Sat, 01 Nov 2008 20:19:40 GMT
Author: gnodet
Date: Sat Nov  1 13:19:39 2008
New Revision: 709773

URL: http://svn.apache.org/viewvc?rev=709773&view=rev
Log:
Remove hack for scanning jaxp parsers on the classpath, as we now use the osgi enabled specs

Added:
    servicemix/smx4/kernel/trunk/testing/itests/src/test/resources/log4j.properties
Modified:
    servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java
    servicemix/smx4/kernel/trunk/testing/support/src/main/java/org/apache/servicemix/kernel/testing/support/SmxKernelPlatform.java

Modified: servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java?rev=709773&r1=709772&r2=709773&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java
(original)
+++ servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java
Sat Nov  1 13:19:39 2008
@@ -74,7 +74,6 @@
             getBundle("org.apache.felix", "org.apache.felix.configadmin"),
             getBundle("org.ops4j.pax.logging", "pax-logging-api"),
             getBundle("org.ops4j.pax.logging", "pax-logging-service"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxp-ri"),
             getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.aopalliance"),
             getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.asm"),
             getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit"),

Added: servicemix/smx4/kernel/trunk/testing/itests/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/testing/itests/src/test/resources/log4j.properties?rev=709773&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/testing/itests/src/test/resources/log4j.properties (added)
+++ servicemix/smx4/kernel/trunk/testing/itests/src/test/resources/log4j.properties Sat Nov
 1 13:19:39 2008
@@ -0,0 +1,43 @@
+# 
+# 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.
+#
+#
+
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=DEBUG, stdout
+
+log4j.logger.org.springframework=INFO
+log4j.logger.org.apache.activemq=INFO
+log4j.logger.org.apache.activemq.spring=WARN
+
+
+#log4j.logger.org.apache.servicemix=DEBUG
+
+# CONSOLE appender 
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=target/servicemix-test.log
+log4j.appender.out.append=true

Modified: servicemix/smx4/kernel/trunk/testing/support/src/main/java/org/apache/servicemix/kernel/testing/support/SmxKernelPlatform.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/testing/support/src/main/java/org/apache/servicemix/kernel/testing/support/SmxKernelPlatform.java?rev=709773&r1=709772&r2=709773&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/testing/support/src/main/java/org/apache/servicemix/kernel/testing/support/SmxKernelPlatform.java
(original)
+++ servicemix/smx4/kernel/trunk/testing/support/src/main/java/org/apache/servicemix/kernel/testing/support/SmxKernelPlatform.java
Sat Nov  1 13:19:39 2008
@@ -93,59 +93,19 @@
             String name = cl.getName().replace('.', '/') + ".class";
             URL url = (cl.getClassLoader() != null ? cl.getClassLoader() : getClass().getClassLoader()).getResource(name);
             String path = url.toString();
-            path = path.substring(0, path.indexOf('!'));
+            if (path.startsWith("jar:")) {
+                path = path.substring(0, path.indexOf('!'));
+            } else {
+                path = path.substring(0, path.indexOf(name));
+            }
             jars.add(path);
         }
         return jars;
     }
 
     public void start() throws Exception {
-        // Check environment.
-        // If the classloader contains JAXP providers, the META-INF infos will certainly
be found
-        // by OSGi, but classes won't be found, leading to errors.
-        ClassLoader cll = Thread.currentThread().getContextClassLoader();
-        if (cll == null) {
-            cll = getClass().getClassLoader();
-        }
-        URL url1 = cll.getSystemResource("META-INF/services/javax.xml.transform.TransformerFactory");
-        URL url2 = cll.getSystemResource("META-INF/services/javax.xml.parsers.DocumentBuilderFactory");
-        List<String> additionalPackages = new ArrayList<String>();
-        /*
-        if (url1 != null) {
-            String line = new BufferedReader(new InputStreamReader(url1.openStream())).readLine();
-            line = line.substring(0, line.lastIndexOf('.'));
-            System.err.println(line);
-            additionalPackages.add(line);
-        }
-        if (url2 != null) {
-            String line = new BufferedReader(new InputStreamReader(url2.openStream())).readLine();
-            line = line.substring(0, line.lastIndexOf('.'));
-            System.err.println(line);
-            additionalPackages.add(line);
-        }
-        */
-        if (url1 != null || url2 != null) {
-            String s1 = null;
-            if (url1 != null) {
-                s1 = url1.toString();
-                s1 = s1.substring(s1.lastIndexOf(':') + 1, s1.indexOf('!'));
-            }
-            String s2 = null;
-            if (url2 != null) {
-                s2 = url2.toString();
-                s2 = s2.substring(s2.lastIndexOf(':') + 1, s2.indexOf('!'));
-            }
-            throw new Exception("An xml parser or xslt engine has been found in the classpath.\n"
+
-                    "It is probably included as a transitive dependencies by Maven.\n" +
-                    "Check by running 'mvn dependency:tree' and exclude the jars from dependencies.\n"
+
-                    "Offending resources:\n" +
-                    (s1 != null ? "\t" + s1 + "\n" : "") +
-                    (s2 != null ? "\t" + s2 + "\n" : ""));
-        }
-
         Set<String> jars = getJars(Felix.class);
-        //System.out.println(jars);
-        ClassLoader classLoader = new GuardClassLoader(toURLs(jars.toArray(new String[jars.size()])),
additionalPackages);
+        ClassLoader classLoader = new GuardClassLoader(toURLs(jars.toArray(new String[jars.size()])),
null);
 
         BundleActivator activator = new BundleActivator() {
             private ServiceRegistration registration;



Mime
View raw message