how do I complile the source code for this application? I have all the .java files in their respective directories and I still get a ton of errors when compiling using javac
I have included a screenshot of the errors I get. The compiler is not finding the dependent classses.
Can anyone offer instructions as to how to compile this using javac?
thanks
fpirillo,
you need to include some jars into the classpath, something like
javac -classpath "abc.jar;def.jar".These jars are available in the zip you could download. The delimiter between the classpath entries varies by the used OS, e.g. linux uses colon, windows uses semicolon.
Regards
Heller
but it still didn't work. Specifically which jar files do i need for the source to compile?? What zip do I download in order to get thesse jars (or are they the ones included in the binary distribution?)
thanks for your help
fpirillo,
these are the jars of the binary distribution, you are right. Just add them all to the classpath and this should work.
Regards
Heller
I get the following error when attempting to run the program
C:\b9>java -classpath C:\b9\classes\jlib\activation.jar;C:\b9\classes\jetty\lib\jsp-2.0\ant-1.6.4.jar;C:\b9\classes\jetty\lib\jsp-2.1\ant-1.6.4.jar;C:\b9\classes\jlib\bcmail-jdk15-131.jar;C:\b9\classes\jlib\bcprov-jdk15-131.jar;C:\b9\classes\jlib\commons-codec-1.3.jar;C:\b9\classes\jetty\lib\jsp-2.0\commons-el-1.0.jar;C:\b9\classes\jetty\lib\jsp-2.1\commons-el-1.0.jar;C:\b9\classes\jlib\commons-httpclient-3.0.1.jar;C:\b9\classes\jlib\commons-logging.jar;C:\b9\classes\jetty\lib\jsp-2.1\core-3.1.0.jar;C:\b9\classes\jlib\help4.jar;C:\b9\classes\jlib\help4-nls.jar;C:\b9\classes\jlib\hsqldb.jar;C:\
b9\classes\jetty\lib\jsp-2.0\jasper-compiler-5.5.15.jar;C:\b9\classes\jetty\lib\jsp-2.0\jasper-compiler-jdt-5.5.15.jar;C:\b9\classes\jetty\lib\jsp-2.0\jasper-runtime-5.5.15.jar;C:\b9\classes\jlib\javamail-1.3.jar;C:\b9\classes\jetty\lib\jsp-2.0\jcl104-over-slf4j-1.0-rc5.jar;C:\b9\classes\jetty\lib\jetty.jar;C:\b9\classes\jetty\lib\management\jetty-management.jar;C:\b9\classes\jetty\lib\naming\jetty-naming.jar;C:\b9\classes\jetty\lib\plus\jetty-plus.jar;C:\b9\classes\jetty\lib\jetty-util.jar;C:\b9\classes\jetty\lib\xbean\jetty-xbean.jar;C:\b9\classes\jetty\lib\jsp-2.1\jsp-2.1.jar;C:\b9\classes\jetty\lib\jsp-2.0\jsp-api-2.0.jar;C:\b9\classes\jetty\lib\jsp-2.1\jsp-api-2.1.jar;C:\b9\classes\jre\jre\lib\security\local_policy.jar;C:\b9\classes\mec_as2.jar;C:\b9\classes\jetty\lib\management\mx4j-3.0.1.jar;C:\b9\classes\jetty\lib\management\mx4j-tools-2.1.1.jar;C:\b9\classes\jlib\ohj-jewt.jar;C:\b9\classes\jlib\oracle_ice5.jar;C:\b9\classes\jetty\lib\ser
vlet-api-2.5.jar;C:\b9\classes\jlib\servlet-api.jar;C:\b9\classes\jetty\lib\jsp-2.0\slf4j-simple-1.0-rc5.jar;C:\b9\classes\jetty\start.jar;C:\b9\classes\jre\jre\lib\security\US_export_policy.jar;C:\b9\classes\jlib\xalan_2_6_0.jar;C:\b9\classes\jlib\xerces_2_6_2.jar;C:\b9\classes\jetty\lib\jsp-2.0\xercesImpl-2.6.2.jar;C:\b9\classes\jetty\lib\jsp-2.1\xercesImpl-2.6.2.jar;C:\b9\classes\jlib\xml-apis.jar;C:\b9\classes\jetty\lib\jsp-2.0\xmlParserAPIs-2.6.2.jar;C:\b9\classes\jetty\lib\jsp-2.1\xmlParserAPIs-2.6.2.jar de.mendelson.comm.as2.AS2
ERROR IS BELOW
--------------
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.mortbay.start.Main.isAvailable(Main.java:147)
at org.mortbay.start.Main.configure(Main.java:272)
at org.mortbay.start.Main.start(Main.java:450)
at org.mortbay.start.Main.main(Main.java:116)
at de.mendelson.comm.as2.server.AS2Server.startHTTPServer(AS2Server.java:94)
at de.mendelson.comm.as2.server.AS2Server.(AS2Server.java:69)
at de.mendelson.comm.as2.AS2.main(AS2.java:90)
i'm looking in the ant-1.6.4.jar file in winzip, and there is no AntMain.class file in the jar, but there is a Main.class file in org/apache/tools/ant/
Is this an error, or am I doing something wrong???
thanks for your help
fpirillo,
just add the ant.jar, where the AntMain.class file could be found in.
Regards
Heller
I have a copy of ant.jar, however the AntMain.class file is not in that jar file (I obtained Ant 1.6.5 from apache.org's site)
Is there somewhere else I can get the ant.jar that I need to get this working???
Can you please post instructions on how to compile and run the source code. That would be greatly appreciated as I've figured out the AntMain problem (the AntMain class is in the ant-launcher.jar file in the Ant 1.6.5 distribution, not in the ant.jar file.
But now I am getting null pointer exceptions because the system cannot find some help files.
I know I probably have to just copy the help files from the installation directory of mec AS2, however this has been somewhat trying as once I've corrected one error, I run into another one. So maybe if you could conjure up a list of requirements to compile and run the code would be extremely helpful
thanks in advance
I get the following error when trying to compile the source code.
[Server@20c906]: [Thread[Thread-3,5,main]]: putPropertiesFromString(): [port=3333;database.0=file:AS
2_DB;silent=true;trace=false;hsqldb.cache_scale=15;hsqldb.cache_file_scale=8;no_system_exit=true;shutdownarg=COMPACT;]
[Server@20c906]: [Thread[Thread-3,5,main]]: checkRunning(false) entered
[Server@20c906]: [Thread[Thread-3,5,main]]: checkRunning(false) exited
java.lang.NullPointerException at de.mendelson.comm.as2.send.DirPollManager.partnerConfigurationChanged(DirPollManager.java:85)
at de.mendelson.comm.as2.server.AS2ServerRemoteImpl.(AS2ServerRemoteImpl.java:94)
at de.mendelson.comm.as2.server.AS2Server.registerRMI(AS2Server.java:120)
at de.mendelson.comm.as2.server.AS2Server.(AS2Server.java:80)
at de.mendelson.comm.as2.AS2.main(AS2.java:90)
Any idea why this occurs??? I think maybe for some reason the DB is not being initialized on my localhost.
fpirillo,
In my opinion this is not a db related issue.
Looks like a RMI problem. Have you used
rmicto to create the RMI stub and skeleton?Regards
Heller
I didn't know I had to use that to compile. Do I need to compile all the .java files using rmic or just a specific set of them???
Is there anything else I need to make sure I do to get this code to compile and run properly??
fpirillo,
I would recommend to download Netbeans, create a new project using the source code of m-e-c as2, adding the jars found in the zip download and build the project.
Compiling the project this way is really easy and fast, just give it a try.
Regards
Heller
I will let you know how it goes....thanks for your help :)
Thanks Heller for all your help!!!! You've been great!!!
Just one more question though.....how can one get involved in the project???
There are two process
1. Sending
2. Receiving
Using the source that u have provided we are able to send the files but we do not know how to receive the files that are sent.
Can any one help me in doing this?
Madalai Muthu.J
This is a multi posting. Please see the comments here: How to do the receiving process ?
Regards
Heller