cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r293187 - /cocoon/blocks/jcr/trunk/java/org/apache/cocoon/jcr/JackrabbitRepository.java
Date Mon, 03 Oct 2005 00:32:34 GMT
Author: antonio
Date: Sun Oct  2 17:32:31 2005
New Revision: 293187

URL: http://svn.apache.org/viewcvs?rev=293187&view=rev
Log:
Show a better message: The block does not run in java 1.3.

Modified:
    cocoon/blocks/jcr/trunk/java/org/apache/cocoon/jcr/JackrabbitRepository.java

Modified: cocoon/blocks/jcr/trunk/java/org/apache/cocoon/jcr/JackrabbitRepository.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/jcr/trunk/java/org/apache/cocoon/jcr/JackrabbitRepository.java?rev=293187&r1=293186&r2=293187&view=diff
==============================================================================
--- cocoon/blocks/jcr/trunk/java/org/apache/cocoon/jcr/JackrabbitRepository.java (original)
+++ cocoon/blocks/jcr/trunk/java/org/apache/cocoon/jcr/JackrabbitRepository.java Sun Oct 
2 17:32:31 2005
@@ -18,6 +18,7 @@
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.cocoon.components.source.SourceUtil;
+import org.apache.commons.lang.SystemUtils;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
 import org.apache.excalibur.source.impl.FileSource;
@@ -51,6 +52,12 @@
 
     public void configure(Configuration config) throws ConfigurationException {
         super.configure(config);
+        // Java VM must be at least 1.4
+        if (SystemUtils.isJavaVersionAtLeast(140) == false) {
+            String message = "The jcr block needs at least a java VM version 1.4 to run properly.
Plase update to a newer java or exclude the jcr block from your Cocoon block configuration.";

+            getLogger().error(message);
+            throw new ConfigurationException(message);
+        }
 
         String homeURI = config.getChild("home").getAttribute("src");
         String homePath;



Mime
View raw message