Have you edited the config.xml file on Windows so that there are carriage-return characters in the file? These should not cause a problem but I have found that they sometimes do anyway.

Or perhaps any other invisible characters?

/tobe

todd thorner wrote:

Hi,

I'm a newbie James user. During the development of my most recent email-enabled app, I got James to deploy/run fine on my Windows test machine, but...

When I try to run James from a bash shell on a remote UNIX server, I get the following output:

Using PHOENIX_HOME: /opt2/home3/tthorner/bin/mailserver/james-2.1.3
Using PHOENIX_TMPDIR: /opt2/home3/tthorner/bin/mailserver/james-2.1.3/temp
Using JAVA_HOME: /usr/java
Running Phoenix:


Phoenix 4.0.1

There was an uncaught exception:

--- Message ---
Error building configuration from file:/opt2/home3/tthorner/bin/mailserver/james
-2.1.3/apps/james/SAR-INF/config.xml.
--- Stack Trace ---
org.apache.avalon.phoenix.interfaces.DeploymentException: Error building configu
ration from file:/opt2/home3/tthorner/bin/mailserver/james-2.1.3/apps/james/SAR-
INF/config.xml.

...more...
Caused by: org.xml.sax.SAXException: Not allowed to define mixed content in the 
element processor at file:/opt2/home3/tthorner/bin/mailserver/james-2.1.3/apps/j
ames/SAR-INF/config.xml:104:26

...more...
rethrown from
org.xml.sax.SAXException: Not allowed to define mixed content in the element processor 
at file:/opt2/home3/tthorner/bin/mailserver/james-2.1.3/apps/james/SAR-IN
F/config.xml:104:26

---------------------------------------------------

Now the obvious(!) solution is to check my config.xml file for errors. I had to edit the file a bit when transfering to UNIX. The thing is, I don't have a clue where the error is in my XML syntax. Here's the relevant part of that file:

<config>
<James>
<postmaster>[EMAIL PROTECTED]</postmaster>
<servernames autodetect="true" autodetectIP="true">
<servername>MyJamesServer</servername>
</servernames>
<usernames ignoreCase="true" enableAliases="true" enableForwarding="true"/>
<inboxRepository>
<repository destinationURL="file://local_inboxes/" type="MAIL"/>
</inboxRepository>
<inboxRepository>
<repository destinationURL="db://maildb/inbox/" type="MAIL"/>
</inboxRepository>
<inboxRepository>
<repository destinationURL="dbfile://maildb/inbox/" type="MAIL"/>
</inboxRepository>
</James>
<fetchpop enabled="false">
</fetchpop>
<spoolmanager>
<threads> 10 </threads>
<mailetpackages>
<mailetpackage>org.apache.james.transport.mailets</mailetpackage>
</mailetpackages>
<matcherpackages>
<matcherpackage>org.apache.james.transport.matchers</matcherpackage>
</matcherpackages>
<processor name="root"> <!-- **THIS SEEMS TO BE THE FAULTY ELEMENT** -->
<mailet match="SenderInFakeDomain" class="ToProcessor">
<processor> spam </processor>
</mailet>
<mailet match="RelayLimit=30" class="Null"/>
<mailet match="[EMAIL PROTECTED]" class="ToProcessor">
<processor> transport </processor>
</mailet>
<mailet match="InSpammerBlacklist=query.bondedsender.org"
class="ToProcessor">
<processor> transport </processor>
</mailet>
<mailet match="InSpammerBlacklist=dnsbl.njabl.org" class="ToProcessor">
<processor> spam </processor>
<notice>550 Requested action not taken: rejected - see http://njabl.org/</notice>
</mailet>
<mailet match="InSpammerBlacklist=relays.ordb.org" class="ToProcessor">
<processor> spam </processor>
<notice>550 Requested action not taken:
rejected - see http://www.ordb.org/</notice>
</mailet>
<mailet match="All" class="ToProcessor">
<processor> transport </processor>
</mailet>
</processor>
<processor name="error">
<mailet match="All" class="ToRepository">
<repositoryPath>file://errors/</repositoryPath>
<repositoryPath> db://maildb/deadletter/error </repositoryPath>
<passThrough> true </passThrough>
</mailet>
<mailet match="All" class="NotifyPostmaster"/>
</processor>
<processor name="transport">
<mailet match="RecipientIsLocal" class="LocalDelivery"/>
<mailet match="HostIsLocal" class="ToProcessor">
<processor>error</processor>
</mailet>
<mailet match="RemoteAddrNotInNetwork=**7.2**.*2*.***" class="ToProcessor">
<processor> spam </processor> <!-- **7.2**.*2*.*** is myDomain.com -->
</mailet>
<mailet match="All" class="RemoteDelivery">
<outgoing>file://outgoingmessages/</outgoing>
<outgoing> db://maildb/spool/outgoing </outgoing>
<delayTime> 30000 </delayTime>
<maxRetries> 6 </maxRetries>
<deliveryThreads> 2 </deliveryThreads>
</mailet>
</processor>
<processor name="spam">
<mailet match="All" class="Null"/>
<mailet match="All" class="NotifySender"/>
<mailet match="All" class="NotifyPostmaster"/>
<mailet match="All" class="ToRepository">
<repositoryPath>file://spam/</repositoryPath>
<repositoryPath> db://maildb/deadletter/spam </repositoryPath>
</mailet>
</processor>
</config>


---------------------------------------------------


Here is the text from phoenix.log:


[A FEW INFO/WARNINGS LINES...]
ERROR 2003-10-30 01:10:24.254 [Phoenix.] (): Error building configuration from 
file:/opt2/home3/tthorner/bin/mailserver/james-2.1.3/apps/james/SAR-INF/config.xml. 
org.xml.sax.SAXException: Not allowed to define mixed content in the element processor 
at 
file:/opt2/home3/tthorner/bin/mailserver/james-2.1.3/apps/james/SAR-INF/config.xml:104:26
 at 
org.apache.avalon.framework.configuration.SAXConfigurationHandler.endElement(SAXConfigurationHandler.java:136)
 at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:579) 
at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:646) 
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1972) 
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:878) at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDocumentFragmentScannerImpl.java:1144)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XML

DocumentFragmentScannerImpl.java:987)

---------------------------------------------------


The james.log file looks like:


29/10/03 04:02:11 INFO James: JAMES init... 29/10/03 04:02:11 INFO James: Local host is: remoteHost.myHostingService.net 29/10/03 04:02:11 INFO James: Handling mail for: remoteHost.myHostingService.net 29/10/03 04:02:11 INFO James: Handling mail for: localhost 29/10/03 04:02:11 INFO James: Handling mail for: 127.0.0.1 29/10/03 04:02:11 INFO James: Local users repository opened 29/10/03 04:02:11 INFO James: Private Repository LocalInbox opened 29/10/03 04:02:11 INFO James: JAMES ...init end



Q: Should James be trying to do anything with either localhost or any of the other things it seems to be initializing?

---------------------------------------------------


Can someone point out my errors? Thanks.



____________________________________________________________ FREE ADHD DVD or CD-Rom (your choice) - click here! http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392 AOL users go here: http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392 This offer applies to U.S. Residents Only

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to