7

I downloaded the Apache James mailing server Apache-james-3.0-beta4-app . I tried to run it on Windows 7 ultimate by clicking on run.bat file inside following directory

C:\Users\Jack\Desktop\New folder\Servers\MailServer\apache-james-3.0-beta4-app\apache-james-3.0-beta4\bin.

Command prompt started for a while and it is getting disappeared. I am not able to read the error on the command prompt as it is so quick. Any kind of suggestion would be appreciated. When I am running telnet command in command prompt it is showing that command not recognized. I don't know how to turn it on in Windows.

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
Jack
  • 121
  • 3
  • 9
  • This may come across as a general computing, hardware or software question but it is not. You can think of James more like an application server (such as Tomcat) that can be used for development purposes. Development skills are required to start this version of Apache James (see the modified answer below that includes downloading libraries from maven central repo). Being able to start the server is part of the development process. – John Deverall Oct 12 '18 at 13:22

3 Answers3

3

Starting the server

The best way to start Apache James is in the terminal.

From the apache-james\bin folder type:

james.bat

You will see the following instructions:

Usage: james.bat { console : start : pause : resume : stop : restart : install : remove }

Type:

james.bat install

followed by

james.bat start

The server should start at this point. If it does not start you can see any errors in \log\wrapper.log and the server status in \log\james-server.log.

Fixing the JAXB issue

If you are running java 7 or later, it is highly likely the server will not start due to a jaxb issue in the current release of Apache James (version 3.2), which will prevent the server from starting.

To work around this, download the following files

jaxb-api-2.1.jar

jaxb-core-2.1.14.jar

jaxb-impl-2.1.14.jar

And include these files in the folder

/conf/lib

For more information on this point see How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

After following these steps, James should start. No modifications to wrapper.conf should be necessary.

John Deverall
  • 5,954
  • 3
  • 27
  • 37
additionster
  • 628
  • 4
  • 14
2

To enable telnet on Windows 7 click the Start button, click Control Panel, click Programs, and then click Turn Windows features on or off. Administrator permission required If you are prompted for an administrator password or confirmation, type the password or provide confirmation. In the Windows Features dialog box, select the Telnet Client check box. Click OK.

Apache James requires a Java Runtime Environment (JRE) version 1.5 or higher. In addition, the environment variable JAVA_HOME should be set to the JRE home directory before running James.

If you run JDK7, James will not start due to a bug in JAXB. As temporary workaround, you can download the latest 2.1 version of JAXB from http://jaxb.java.net/2.1.13/JAXB2_20100510.jar and copy the extracted jaxb-impl.jar into conf/lib.

Update:

There is, actualy, one more workaround for this. Take the latest version of James (3.0-beta5) from here, it is not affected by this annoying JAXB bug.

Jk1
  • 11,233
  • 9
  • 54
  • 64
  • Thanks Jk1 for telnet. Yes Java is installed in my PC. – Jack Oct 06 '13 at 18:33
  • @Jack, there is also a JAXB bug around, please refer to updated answer – Jk1 Oct 06 '13 at 18:35
  • @ jk1 Many thanks for your time and prompt response. yes Java version is 1.7 and Java home is set properly . I tried JAXB_20100510 from the above mentioned link but couldnt help me still facing the same problem – Jack Oct 06 '13 at 20:18
  • So we need to take a look at the errors in the command prompt. To prevent it from closing after fail try opening the command propt (Win+R, then cmd), navigate to /bin folder and run run.bat. Please post the error text/stacktrace here for me to look at it too. – Jk1 Oct 07 '13 at 05:22
  • Hi Jk1 sorry for delay in reponse. I just had a look at the cmd error. it seems that JAXB is responsible for that. Here is the complete stacktrace – Jack Oct 07 '13 at 18:47
  • Exception: Failed to create the JAXB binder; nested exception is javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Class has two properties of the same name "outputs" this problem is related to the following location: at public java.util.List org.apache.camel.model.ResequenceDefinition.getOutputs() at – Jack Oct 07 '13 at 18:54
  • org.apache.camel.model.ResequenceDefinition.getOutputs() at org.apache.camel.model.ResequenceDefinition this problem is related to the following location: at private java.util.List org.apache.camel.model.ResequenceDefinition.outputs at org.apache.camel.model.ResequenceDefinition - with linked exception:[com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Class has two properties of the same name "outputs" – Jack Oct 07 '13 at 18:55
  • I tried in JDK 1.6 its working fine. – Jack Oct 07 '13 at 18:56
  • @Jk1: Your link to the beta5 build is dead. Has it been merged into the main beta4 branch and released? – stan Jun 22 '16 at 19:00
  • @StanislavPalatnik, I'd rather say they have updated a snapshot with a fresh one. Please find the link fixed. – Jk1 Jun 24 '16 at 07:52
0

During installation of apache-james-3.0-beta4, I came across same JAXB issue as mentioned above. Even copying jaxb-impl.jar of version 2.1 to apache-james-3.0-beta4/conf/lib did not help as it was never picked up in classpath. After making below changes in the apache-james-3.0-beta4/conf/wrapper.conf file, I was able to run Apache James successfully:

  1. Point to the correct Java command:
    wrapper.java.command=/usr/java/jdk1.7.0_67/bin/java

  2. Add a new entry for classpath with increased number for jaxb-impl-2.1.jar:
    wrapper.java.classpath.120=../conf/lib/jaxb-impl-2.1.jar

Please provide log output if issue still occurs after above changes.

honk
  • 9,137
  • 11
  • 75
  • 83
AshOne
  • 11
  • 4