james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Beat Christen <sp...@longstreet.ch>
Subject IMAP tree possibly broken in CVS?
Date Thu, 05 Sep 2002 15:03:51 GMT
Hello all,
I just tried compiling the HEAD of the cvs tree with IMAP support and 
noticed that the newly checked in files by Sascha cause problems:

According to the package statement in the two files
proposals/imap/java/org/apache/james/imapserver/commands/CommandFetch.java
proposals/imap/java/org/apache/james/imapserver/commands/FileMailbox.java

they should actually be located at
proposals/imap/java/org/apache/james/imapserver

diffing the two CommandFetch.java files gives me (after doing a tr -d '\r')
[jakarta-james]# diff /tmp/imapserver.CommandFetch.java 
/tmp/imapserver.commands.CommandFetch.java
155d154
<         System.out.println("Starting TRY");
[jakarta-james]#
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
and diffing FileMailbox.java gives me
[jakarta-james]# diff /tmp/i.c.F.java /tmp/i.F.java
141d140
<     private int highestUID;
146c145,148
<
---
 >    
 >     //Addon by s@rapi.com. Sets the UID for all Mailboxes
 >     private static HighestUID highestUID;
 >    
163a166
 >         highestUID = new FileStoreHighestUID(new 
File(conf.getChild("recordRepository").getValue()+File.separator+"#CONF.GLOBAL.uid"));
190,192d192
<         java.util.Date dt = new java.util.Date();
<        
<         highestUID = (int) dt.getTime();
461c461
<         return highestUID + 1;
---
 >         return highestUID.get() + 1;
1115c1115,1117
<         int newUID = ++highestUID;
---
 >         highestUID.increase();
 >         int newUID = highestUID.get();
 >        
1461,1464d1462
<         java.util.Iterator it = sequence.iterator();
<         while(it.hasNext())
<             System.out.println("FILEMESSAGES...."+it.next().toString());
<            

[jakarta-james]#
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I assume that I only need one of each pairs of files, but which one is 
current? I guessed that the 2 files in the
commands dir are wrong, zeroed them out with

[jakarta-james]# rm -f 
proposals/imap/java/org/apache/james/imapserver/commands/FileMailbox.java
[jakarta-james]# rm -f 
proposals/imap/java/org/apache/james/imapserver/commands/CommandFetch.java

and continued compiling which led to a problem with an uncaught 
exception at
proposals/imap/java/org/apache/james/imapserver/commands/AppendCommand.java
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Index: java/org/apache/james/imapserver/commands/AppendCommand.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-james/proposals/imap/java/org/apache/james/imapserver/commands/AppendCommand.java,v
retrieving revision 1.2
diff -r1.2 AppendCommand.java
162,163c162,170
<            
<             MimeMessageInputStreamSource source = new 
MimeMessageInputStreamSource("Mail" + System.currentTimeMillis() + "-" + 
mailbox.getNextUID(), new ByteArrayInputStream(byteout.toByteArray()));
---
 >             MimeMessageInputStreamSource source;
 >             try {
 >               source = new MimeMessageInputStreamSource("Mail" + 
System.currentTimeMillis() + "-" + mailbox.getNextUID(), new 
ByteArrayInputStream(byteout.toByteArray()));
 >               }
 >           catch(MessagingException me)
 >               {
 >               me.printStackTrace();
 >               return false;
 >               }
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This led to a clean compile. Now the distribution dir and a few other 
things in build-imap.xml were wrong:
Index: proposals/imap/build-imap.xml
===================================================================
RCS file: /home/cvspublic/jakarta-james/proposals/imap/build-imap.xml,v
retrieving revision 1.4
diff -u -r1.4 build-imap.xml
--- proposals/imap/build-imap.xml       26 Aug 2002 20:49:09 -0000      1.4
+++ proposals/imap/build-imap.xml       5 Sep 2002 14:58:54 -0000
@@ -29,7 +29,7 @@
 
   <property name="name" value="james"/>
   <property name="Name" value="James"/>
-  <property name="version" value="2.0a3"/>
+  <property name="version" value="2.1a1-cvs"/>
   <property name="year" value="1999-2001"/>
 
   <!-- There should be no need to override default compiler but need to 
change
@@ -106,12 +106,13 @@
        ===================================================================
   -->
   <property name="xerces.jar" value="${lib.dir}/xerces-1.4.3.jar"/>
-  <property name="framework.jar" 
value="${lib.dir}/avalon-framework-20011115.jar"/>
+  <!-- property name="framework.jar" 
value="${lib.dir}/avalon-framework-20011115.jar"/-->
+  <property name="framework.jar" 
value="phoenix-bin/lib/avalon-framework-20020713.jar"/>
   <property name="excalibur.jar" 
value="${lib.dir}/avalon-excalibur-20011120.jar"/>
   <property name="scratchpad.jar" 
value="${lib.dir}/avalon-scratchpad-20011122.jar"/>
-  <property name="logkit.jar" value="${lib.dir}/logkit-1.0.jar"/>
+  <property name="logkit.jar" value="phoenix-bin/lib/logkit-1.1a.jar"/>
   <property name="cornerstone.bar" 
value="${lib.dir}/cornerstone-20011230.bar"/>
-  <property name="phoenix.client.jar" 
value="${lib.dir}/phoenix-client-20011230.jar"/>
+  <property name="phoenix.client.jar" 
value="phoenix-bin/lib/phoenix-client.jar"/>
   <property name="phoenix-loader.jar" 
value="${lib.dir}/phoenix-loader-20011230.jar"/>
   <property name="phoenix-engine.jar" 
value="${lib.dir}/phoenix-engine-20011230.jar"/>
   <property name="avalon-jmx.jar" 
value="${lib.dir}/avalon-jmx-20011230.jar"/>
@@ -189,7 +190,7 @@
 
     <tstamp/>
 
-    <property name="dist.dir" value="dist"/>
+    <property name="dist.dir" value="dist/${name}-${version}"/>
     <property name="dist.bin" value="${dist.dir}/bin"/>
     <property name="dist.apps" value="${dist.dir}/apps"/>
     <property name="dist.lib" value="${dist.dir}/lib"/>
@@ -378,16 +379,16 @@
 
     <copy file="${build.lib}/${name}.sar" todir="${dist.dir}/apps"/>
 
-    <copy file="${phoenix-engine.jar}" 
tofile="${dist.dir}/bin/phoenix-engine.jar"/>
-    <copy file="${phoenix-loader.jar}" 
tofile="${dist.dir}/bin/phoenix-loader.jar"/>
+    <!-- doesn't exist.... copy file="${phoenix-engine.jar}" 
tofile="${dist.dir}/bin/phoenix-engine.jar"/-->
+    <!-- copy file="${phoenix-loader.jar}" 
tofile="${dist.dir}/bin/phoenix-loader.jar"/-->
 
     <copy file="${phoenix.client.jar}" todir="${dist.dir}/lib"/>
     <copy file="${framework.jar}" todir="${dist.dir}/lib"/>
-    <copy file="${excalibur.jar}" todir="${dist.dir}/lib"/>
-    <copy file="${scratchpad.jar}" todir="${dist.dir}/lib"/>
-    <copy file="${avalon-jmx.jar}" todir="${dist.dir}/lib"/>
+    <!--copy file="${excalibur.jar}" todir="${dist.dir}/lib"/-->
+    <!--copy file="${scratchpad.jar}" todir="${dist.dir}/lib"/-->
+    <!--copy file="${avalon-jmx.jar}" todir="${dist.dir}/lib"/-->
     <copy file="${logkit.jar}" todir="${dist.dir}/lib"/>
-    <copy file="${lib.dir}/mysql-2.0.4.jar" todir="${dist.dir}/lib"/>
+    <!--copy file="${lib.dir}/mysql-2.0.4.jar" todir="${dist.dir}/lib"/-->
 
     <copy todir="${dist.dir}/lib">
       <fileset dir="lib">
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Now finally that we are ready to run, the server is looking for a 
bizarre config.xml somewhere inside a SAR-INF file:
[james-2.1a1-cvs]# ./bin/run.sh
Using PHOENIX_HOME:   /root/cvs/jakarta-james/dist/james-2.1a1-cvs
Using PHOENIX_TMPDIR: /root/cvs/jakarta-james/dist/james-2.1a1-cvs/temp
Using JAVA_HOME:      /usr/java

Phoenix 4.0beta

Target file does not exist, defaulting to previous
There was an uncaught exception:
---------------------------------------------------------
--- Message ---
Error building configuration from 
file:/root/cvs/jakarta-james/dist/james-2.1a1-cvs/apps/james/SAR-INF/config.xml.
--- Stack Trace ---
org.apache.avalon.phoenix.interfaces.DeploymentException: Error building 
configuration from file:/root/cvs/jakarta-james/dist/j
ames-2.1a1-cvs/apps/james/SAR-INF/config.xml.
        at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.getConfigurationFor(DefaultDeployer.java:454)
        at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:284)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:498)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:491)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:476)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:466)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(DefaultEmbeddor.java:224)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
        at 
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
        at 
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:92)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:45)
rethrown from
java.io.FileNotFoundException: 
/root/cvs/jakarta-james/dist/james-2.1a1-cvs/apps/james/SAR-INF/config.xml 
(No such file or dire
ctory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:64)
        at 
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:69)
        at 
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:133)
        at java.net.URL.openStream(URL.java:798)
        at 
org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:796)
        at 
org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:741)
        at 
org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:260)
        at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:498)
        at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
        at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
        at 
org.apache.avalon.phoenix.tools.configuration.ConfigurationBuilder.build(ConfigurationBuilder.java:120)
        at 
org.apache.avalon.phoenix.tools.configuration.ConfigurationBuilder.build(ConfigurationBuilder.java:107)
        at 
org.apache.avalon.phoenix.tools.configuration.ConfigurationBuilder.build(ConfigurationBuilder.java:88)
        at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.getConfigurationFor(DefaultDeployer.java:448)
        at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:284)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:498)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:491)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:476)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:466)
        at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(DefaultEmbeddor.java:224)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
        at 
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
        at 
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:92)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:45)

---------------------------------------------------------
The log file may contain further details of error.
Please check the configuration files and restart Phoenix.
If the problem persists, contact the Avalon project.  See
http://jakarta.apache.org/avalon for more information.
Shutting down Phoenix.

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Any ideas?




--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message