Connect to FTP site with Apache commons net FTP client through Proxy

Hello,
I am trying to run this simple code to connect to FTP site through a proxy.
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
public class MyTest {
public static void main(String[] args) {
String ftpHostName = "ftp.xxx.com";
int ftpPort = 21;
String ftpUserName = "myUserName";
String ftpPassword = "myPassword";
System.setProperty("socksProxyHost" ,"10.148.0.131");
System.setProperty("socksProxyPort", "1080");
FTPClient ftpClient = new FTPClient();
try {
System.out.println("connecting");
ftpClient.connect(ftpHostName, ftpPort);
System.out.println("connected");
System.out.println("loging in");
boolean successLogin = ftpClient.login(ftpUserName, ftpPassword);
if(successLogin)
System.out.println("success login");
else
System.out.println("fail login");
catch (Exception e) {
e.printStackTrace();
finally {
try {
System.out.println("loging out");
ftpClient.logout();
System.out.println("disconecting");
ftpClient.disconnect();
catch (Exception e) {
e.printStackTrace();
I am getting the following error:
C:\temp\ftp\test>java.exe -cp ./commons-net-ftp-2.0.jar;. MyTest connecting
java.net.SocketException: Malformed reply from SOCKS server
at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:87)
at java.net.SocksSocketImpl.connectV4(SocksSocketImpl.java:265)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:437)
at java.net.Socket.connect(Socket.java:519)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:176)
at MyTest.main(MyTest.java:23)
loging out
java.lang.NullPointerException
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:471<ftp://FTP.java:471>)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534<ftp://FTP.java:534>)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:583<ftp://FTP.java:583>)
at org.apache.commons.net.ftp.FTP.quit(FTP.java:794<ftp://FTP.java:794>)
at org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:697)
at MyTest.main(MyTest.java:39)
I am able to do this using a different FTP client library, ftp4j-1.5.1<ftp://ftp4j-1.5.1> using the following code:
import it.sauronsoftware.ftp4j.FTPClient;
import it.sauronsoftware.ftp4j.connectors.SOCKS4Connector;
public class MyTestFtp4J {
public static void main(String[] args) {
String ftpHostName = "ftp.xxx.com";
int ftpPort = 21;
String ftpUserName = "myUserName";
String ftpPassword = "myPassword";
FTPClient ftpClient = new FTPClient();
ftpClient.setConnector(new SOCKS4Connector("10.148.0.131", 1080));
try {
System.out.println("connecting");
ftpClient.connect(ftpHostName, ftpPort);
System.out.println("connected");
System.out.println("loging in");
ftpClient.login(ftpUserName, ftpPassword);
System.out.println("success login");
catch (Exception e) {
e.printStackTrace();
finally {
try {
System.out.println("disconecting");
ftpClient.disconnect(true);
catch (Exception e) {
e.printStackTrace();
So I know the proxy settings are correct.
The java version I used to compile and run my apps is 1.6.0_06 Does anyone can help figure out what is wrong when I use the Apache commons net FTP client?
Thank you
Jon

Is the old AirPort Extreme base station (AEBS)
configured so that the option to distribute IP
addresses is DISABLED? If so, configure the new AEBS
to act as a bridge.
Are you suggesting I use a set-up with TWO AEBSs? Set up a bridge (not sure how) and then use the old AEBS to connect to the DSL modem and broadcast to the new Extreme which will then be the router to the other computers on the network?
Do you have any port mapping or default host enabled
on the old AEBS?
I do not understand, not do I see these options in the Base Station utitlity; perhaps they are in the FTP options--but that, I'm sorry to say, is not obvious to my inspection.
Duane, can you give me a few more basic instructions? Thanks
iMac 17    

Similar Messages

  • Apache Commons Net FTP : ListFiles not displaying all dirs and files

    So I am doing this:
    FTPClient f = new FTPClient();
    f.connect("foo.bar.com");
    boolean login = f.login("User","Pass");
    FTPFile[] list = f.listFiles();
    When I doing a "list.length" I get 2. When I list it out it just shows that it retrieved the directories only. I know there are more files there....
    Here is the wierd thing. When I manually FTP from this Windows box and do a dir I only get the two listings. When I FTP from my linux box I get the full directory listing (those two directories and more files).
    Any ideas as to why I am not picking these up?
    Thanks,
    Michael

    File permissions / hidden / visible etc?

  • Apache Commons Net - Retrieve File - Extension, Compare , Move - FTP Server

    Dear All,
    I am using Apache Commons net FTP Library for FTP Operations. I had a few doubts
    1) I like to retrieve ftp files only with some extensions like *.txt or *.jpg etc. How can we retrieve files with specifying file extension?
    2) I need to compare the FTP Files with the local files before downloading from the FTP Server?
    3) I need to move files from the ftp server to local directory. Is there is anyway to move the files rather than first retrieve files from the FTP Server and then deleting the file in the FTP Server using FTP delete()
    Thanks,
    J.Kathiresan

    1) I like to retrieve ftp files only with some
    extensions like *.txt or *.jpg etc. How can we
    retrieve files with specifying file extension?
    List the files and then filter the list to those that you want to process.
    2) I need to compare the FTP Files with the local
    files before downloading from the FTP Server?Think about this one! To compare two files you nead to read both. If you do this on the client then you will have to copy the file from the server first!
    >
    3) I need to move files from the ftp server to local
    directory. Is there is anyway to move the files
    rather than first retrieve files from the FTP Server
    and then deleting the file in the FTP Server using
    FTP delete()What is wrong with copy then delete?

  • Apache commons-net

    Hi
    I was using apache commons-net to FTP some files to an FTP server.
    I was able to login to the server. I want to know How can I move out from my root directory. Is it possible using apche coomons-net. The working directory displayed is only /home/myname.
    Thanks
    Prabhath Nair

    If you want to move to a sub-directory within your current root then could it possibly be the changeWorkingDirectory() command?
    P.S. You wont be able to move to some directory such as /etc because FTP servers constrain you to stay within a fixed root directory. Often, the home directory of the login name.

  • Apache Commons Net deployment fails to resolve, JDev classpath question

    I wrote a wrapper to apache's most recent version of commons-net package (version 1.4.1) to allow me to execute FTP services from an Oracle 9i2 database. After adding the common-net .jar file to the JDev libraries, and including this library in my project, I debugged the code in Jdeveloper, then deployed to the Oracle 9i2 server. However, many classes of the of the common-net (and my code) failed to resolve in the database.
    After downloading open source product DependencyFinder, and running against the Commons-net .jar file, I found that some packages were dependent on the Apache ORO regexp package. The ORO package, as far as I can tell, is not in any classpath that my JDev project uses. There is listed in the JDev libraries, a library called Apache Regexp, but I did not include that in the project, either.
    After I downloaded the ORO package from Apache, added it to JDev's libraries, included it in my project, and added the ORO library to the list of classes to deploy (using the loadjava deployment profile), deployment to Oracle 9i2 of the my classes, the commons-net classes, and the ORO classes properly resolved.
    My question is: Why did my application work under JDeveloper? How and where did it find the ORO classes?
    The version of Java under which JDeveloper is running, and the version being used as the compiler for this project, is a new installation of JDK1.4.2_10.

    Since the commons net 1.4.1 is compatible with jdk 1.3.1, I should only need to use loadjava on the .jar file. In fact, that works, given that there is no failure on load due to incompatible .jar or .class files structure.
    But, I've just solved this part of the problem. The commons net 1.4.1 is dependent on, but does not include the Apache ORO library. Once the ORO library was deployed to Oracle 9i2, all common net 1.4.1 classes were resolved.
    The "problem" is with JDeveloper. Without including the ORO library in the JDeveloper application, or in the classpath, it worked under JDeveloper -- the more surprising since I had never downloaded the ORO library from Apache. Only after downloading ORO, explicitly defining ORO to JDeveloper, and including ORO as a library in my JDeveloper project, did the deployment of the application to Oracle 9i2 succeed (though the application always executed successfully under JDeveloper).

  • Commons-Net  FTPS : Trust All Certificates?

    Hi,
    I am using apache's common-net 3.1 to try and establish an ftps connection(port 990). I am trying to ftp directly into another computer (long story of why I have to do it this way, but i do). When I try to connect, I get a few security errors. Is there anyway to allow/trust all certificates or disable certificate verification?
    Any help or suggestions (on maybe another library that can do this?) are greatly appreciated!
    Edited by: 943461 on Jun 28, 2012 10:16 AM

    Why are you using FTPS if you don't want it to be secure?
    Solve the real problem: import the certificates.

  • Attachements with apache commons fileupload

    I'm using:
    http://commons.apache.org/fileupload/
    to write file on server side (Tomcat running on Windows with XP or 2003).
    I'm sending data to servlet with doPost() as follows:
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try {
                DiskFileItemFactory factory = new DiskFileItemFactory();
                factory.setSizeThreshold(4096);
                factory.setRepository(new File("test"));
                ServletFileUpload upload = new ServletFileUpload(factory);
                upload.setSizeMax(1000000);
                List fileItems = upload.parseRequest(request);
                Iterator i = fileItems.iterator();
                String comment = ((FileItem) i.next()).getString();
                FileItem fi = (FileItem) i.next();
                String fileName = fi.getName();
                // db
                fi.write(new File("C:/", fileName));
            } catch (Exception ex) {
                out.print(ex.getMessage());
            out.close();
        }but it's response is:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    root cause
    java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
         org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:196)
         org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:358)
         org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
         Upload.doPost(Upload.java:69)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    root cause
    java.lang.ClassNotFoundException: org.apache.commons.io.output.DeferredFileOutputStream
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
         java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:196)
         org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:358)
         org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
         Upload.doPost(Upload.java:69)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.
    Apache Tomcat/6.0.16don't know why.. any ideas?

    java.lang.ClassNotFoundException: org.apache.commons.io.output.DeferredFileOutputStreamThe mentioned class is missing in the runtime classpath.
    Add it (in this specific case, the JAR file with the mentioned class) to the classpath and the problem will disappear.
    This class is part of Commons IO. Read the dependencies page at FileUpload user guide which JAR's you all need.

  • Problems with Apache Commons Validator

    Hello there,
    I got a quiet big problem using the a.m. validation framework. When defining a validation rule for a property like this:
    <formset>
    <form name="testForm">
    <field property="firstName" depends="isEmail">
    <arg0 key="testForm.firstname"/>
    </field>
    </form>
    </formset>
    and instanciating my validator as follows:
    Validator validator = new Validator(resources, "testForm");
    validator.setParameter(Validator.BEAN_PARAM, name);
    everything works fine! I get a correct ValidatorResult object with a correct validation value.
    But as soons as I define a second Validation on the same property like this:
    <formset>
    <form name="testForm">
    <field property="firstName" depends="isEmail,isBlankOrNull">
    <arg0 key="testForm.firstname"/>
    </field>
    </form>
    </formset>
    Nothing works anymore. When iterating over the ValidatorResults object I only get one ValidatorResult object for "isEmail" with a wrong validation value. There should be two working ValidatorResult objects for "isEmail" and "isBlankOrNull"?!?!
    Are two validation method in the depends-Attribute not allowed (although it is defined in the standard)?
    You can assume, that the used validator class is conform to the given org.apache.commons.TestValidator!
    For any help, thx in advance!
    Greets
    CN

    Hey Aaron,
    Could you post your code for your <field>...</field>?
    Here is an example from: http://www.jsn-server3.com/struts-documentation/userGuide/dev_validator.html
    <field
        property="firstName" indexedListProperty="dependents"
        depends="requiredif">
      <arg0 key="dependentlistForm.firstName.label"/>
      <var>
        <var-name>field[0]</var-name>
        <var-value>lastName</var-value>
      </var>
      <var>
        <var-name>field-indexed[0]</var-name>
        <var-value>true</var-value>
      </var>
      <var>
        <var-name>field-test[0]</var-name>
        <var-value>NOTNULL</var-value>
      </var>
    </field>
    <field
        property="dob"
        indexedListProperty="dependents"
        depends="requiredif,date">
      <arg0 key="dependentlistForm.dob.label"/>
      <var>
        <var-name>field[0]</var-name>
        <var-value>lastName</var-value>
      </var>
      <var>
        <var-name>field-indexed[0]</var-name>
        <var-value>true</var-value>
      </var>
      <var>
        <var-name>field-test[0]</var-name>
        <var-value>NOTNULL</var-value>
      </var>
    </field>
    <field
        property="coverageType"
        indexedListProperty="dependents"
        depends="requiredif">
      <arg0 key="dependentlistForm.coverageType.label"/>
      <var>
        <var-name>field[0]</var-name>
        <var-value>lastName</var-value>
      </var>
      <var>
        <var-name>field-indexed[0]</var-name>
        <var-value>true</var-value>
      </var>
      <var>
        <var-name>field-test[0]</var-name>
        <var-value>NOTNULL</var-value>
      </var>
      <var>
        <var-name>field[1]</var-name>
        <var-value>insureDependents</var-value>
      </var>
      <var>
        <var-name>field-test[1]</var-name>
        <var-value>EQUAL</var-value>
      </var>
      <var>
        <var-name>field-value[1]</var-name>
        <var-value>true</var-value>
      </var>
      <var>
        <var-name>field-join</var-name>
        <var-value>AND</var-value>
      </var>
    </field>
    </form>" Which is read as follows: The firstName field is only required if the lastName field is non-null. Since field-indexed is true, it means that lastName must be a property of the same indexed field as firstName. Same thing for dob, except that we validate for date if not blank.
    The coverageType is only required if the lastName for the same indexed bean is not null, and also if the non-indexed field insureDependents is true.
    You can have an arbitrary number of fields by using the [n] syntax, the only restriction is that they must all be AND or OR, you can't mix. "
    Hope that helps,
    Nate

  • Problems with Apache Commons FileUpload

    I'm completely stymied here. I've been trying to get the Apache Commons FileUpload working with a JBoss 4.2 server, and having no luck whatsoever. The servlet is listed out here:
    package com.areteinc.servlets;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Iterator;
    import java.util.List;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.commons.fileupload.FileItem;
    import org.apache.commons.fileupload.FileItemFactory;
    import org.apache.commons.fileupload.FileUploadException;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.log4j.Level;
    import org.apache.log4j.Logger;
    public class Filer extends HttpServlet {
         private Logger logger = Logger.getLogger(Filer.class);
         public Filer() {
              logger.setLevel(Level.DEBUG);
         protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              logger.debug("Serving up a GET page...");
              PrintWriter writer = resp.getWriter();
              StringBuffer response = new StringBuffer();
              response.append("<HTML><HEAD><TITLE>JENA File Uploader</TITLE></HEAD><BODY>");
              response.append("<FORM action=\"Filer\" method=\"POST\" enctype=\"multipart/form-data\">");
              response.append("Upload file: <input type=\"file\" name=\"file1\"/><br>");
              response.append("Upload file: <input type=\"file\" name=\"file2\"/><br>");
              response.append("<input type=submit value=\"Start upload\">");
              response.append("</BODY>");
              writer.println(response);
         protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              // First see if someone is uploading more than one file at a time...
              boolean isMultipart = ServletFileUpload.isMultipartContent(req);
              logger.debug("Received a POST request.  Multipart is flagged as " + isMultipart);
              // Create a factory for disk-based file items
              FileItemFactory factory = new DiskFileItemFactory();
              // Create a new file upload handler
              ServletFileUpload upload = new ServletFileUpload(factory);
              // Parse the request
              try {
                   List<FileItem> items = upload.parseRequest(req);
                   Iterator itr = items.iterator();
                   logger.debug("Size of upload is " + items.size() + " items.");
                   while(itr.hasNext()) {
                        FileItem item = (FileItem) itr.next();
                        logger.debug("Filename is " + item.getName());
              } catch (FileUploadException e) {
                   e.printStackTrace();
    }When run, I hit it with a get operation, and get the form. When I put in 2 forms (in reality, all i want to do is use one, but I'm tinkering), I see nothing in items list...
    Run, with 2 files selected to upload:
    13:50:15,421 DEBUG [Filer] Received a POST request. Multipart is flagged as true
    13:50:15,421 DEBUG [Filer] Size of upload is 0 items.
    I've tried variation after variation after variation, and it jst doesn't work. I'm using commons-fileupload-1.2.1.
    Help! :)

    On the client side, the client's browser must support form-based upload. Most modern browsers do, but there's no guarantee. For your case,
    The servlet can use the GET method parameters to decide what to do with the upload while the POST body of the request contains the file data to parse.
    When the user clicks the "Upload" button, the client browser locates the local file and sends it using HTTP POST, encoded using the MIME-type multipart/form-data. When it reaches your servlet, your servlet must process the POST data in order to extract the encoded file. You can learn all about this format in RFC 1867.
    Unfortunately, there is no method in the Servlet API to do this. Fortunately, there are a number of libraries available that do. Some of these assume that you will be writing the file to disk; others return the data as an InputStream.
    Jason Hunter's MultipartRequest (available from [http://www.servlets.com/])
    Apache Jakarta Commons Upload (package org.apache.commons.upload) "makes it easy to add robust, high-performance, file upload capability to your servlets and web applications"
    *CParseRFC1867 (available from [http://www.servletcentral.com/]).
    *HttpMultiPartParser by Anil Hemrajani, at the isavvix Code Exchange
    *There is a multipart/form parser availailable from Anders Kristensen ([http://www-uk.hpl.hp.com/people/ak/java/] at [http://www-uk.hpl.hp.com/people/ak/java/#utils].
    *JavaMail also has MIME-parsing routines (see the Purple Servlet References).
    *Jun Inamori has written a class called org.apache.tomcat.request.ParseMime which is available in the Tomcat CVS tree.
    *JSPSmart has a free set of JSP for doing file upload and download.
    *UploadBean by JavaZoom claims to handle most of the hassle of uploading for you, including writing to disk or memory.
    There's an Upload Tag in dotJ
    Once you process the form-data stream into the uploaded file, you can then either write it to disk, write it to a database, or process it as an InputStream, depending on your needs. See How can I access or create a file or folder in the current directory from inside a servlet? and other questions in the Servlets:Files Topic for information on writing files from a Servlet.
    Please note: that you can't access a file on the client system directly from a servlet; that would be a huge security hole. You have to ask the user for permission, and currently form-based upload is the only way to do that.
    I still have doubt if all the moentioned resources are alive or not

  • Can't enhance classes with Apache Commons Logging?

    For some reason enhancer blows on class with
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    private static final Log LOG = LogFactory.getLog(GaoParticipant.class);
    With following exception:
    java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at serp.util.MultiClassLoader.findClass(MultiClassLoader.java:224)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at
    com.solarmetric.meta.CFMetaDataParser.classForName(CFMetaDataParser.java:213
    at
    com.solarmetric.meta.CFMetaDataParser.classForName(CFMetaDataParser.java:188
    at kodo.meta.JDOMetaDataParser.startCollection(JDOMetaDataParser.java:321)
    at
    kodo.meta.JDOMetaDataParser.startClassElement(JDOMetaDataParser.java:194)
    at
    com.solarmetric.meta.CFMetaDataParser.startElement(CFMetaDataParser.java:69)
    at
    com.solarmetric.meta.XMLMetaDataParser.startElement(XMLMetaDataParser.java:3
    54)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
    Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unkno
    wn Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
    her.dispatch(Unknown Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
    Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at com.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:309)
    at com.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:254)
    at com.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:234)
    at
    kodo.meta.JDOMetaDataRepositoryImpl.getMetaDataInternal(JDOMetaDataRepositor
    yImpl.java:175)
    at
    kodo.meta.JDOMetaDataRepositoryImpl.getMetaData(JDOMetaDataRepositoryImpl.ja
    va:129)
    at kodo.enhance.JDOEnhancer.<init>(JDOEnhancer.java:110)
    at kodo.enhance.JDOEnhancer.run(JDOEnhancer.java:2175)
    at kodo.enhance.JDOEnhancer.run(JDOEnhancer.java:2116)
    at kodo.enhance.JDOEnhancer.main(JDOEnhancer.java:2088)
    at peacetech.gao.ccs.tools.Enhance.main(Enhance.java:14)
    Caused by: org.apache.commons.logging.LogConfigurationException:
    org.apache.commons.logging.LogConfigurationException:
    org.apache.commons.logging.LogConfigurationException: Class
    org.apache.commons.logging.impl.Log4JLogger does not implement Log
    at
    org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
    va:532)
    at
    org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
    va:272)
    at
    org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
    va:246)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
    at peacetech.gao.ccs.jdo.GaoParticipant.<clinit>(GaoParticipant.java:14)
    ... 35 more
    Caused by: org.apache.commons.logging.LogConfigurationException:
    org.apache.commons.logging.LogConfigurationException: Class
    org.apache.commons.logging.impl.Log4JLogger does not implement Log
    at
    org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
    mpl.java:416)
    at
    org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
    va:525)
    ... 39 more
    Caused by: org.apache.commons.logging.LogConfigurationException: Class
    org.apache.commons.logging.impl.Log4JLogger does not implement Log
    at
    org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
    mpl.java:412)
    ... 40 more
    Exception in thread "main" Process terminated with exit code 1

    Have not tried Ant but running main() runs when LOG is not initialized at
    all and blows in both cases below
    1.
    private static Log LOG ;
    static {
    LOG = LogFactory.getLog(Contact.class);
    2
    private static Log LOG = getLog();
    private static Log getLog() {
    return LogFactory.getLog(Contact.class);
    "Marc Prud'hommeaux" <[email protected]> wrote in message
    news:[email protected]...
    Alex-
    Do you see the problem if you just enhance the class from the
    command-line "jdoc" tool?
    Also, if you just don't initialize the log, do you still see the
    problem (e.g., making it a lazy initialization via some static
    getLog() method)?
    In article <[email protected]>, Alex Roytman wrote:
    It is not even ant just a class which I run from under Intellij IDEA
    package peacetech.gao.ccs.tools;
    import kodo.enhance.JDOEnhancer;
    public class Enhance {
    String arr[];
    public static void main(String[] args) throws Exception {
    String root = "D:/projects/gao/ccs/main/java/jdo/classes/";
    System.getProperties().put("kodo.properties", "ccs-jdo.properties");
    JDOEnhancer.main(new String[]{"-te", "true", root +
    "/peacetech/gao/ccs/jdo/package.jdo"});
    "Marc Prud'hommeaux" <[email protected]> wrote in message
    news:[email protected]...
    Alex-
    This seems to be a problem that happens under some classloader
    circumstances.
    Do you have a special <classloader> element for your <enhance> target?
    If so, does it still occur if you remove it (conversely, does it still
    happen if you add in a <classloader> element?
    In article <[email protected]>, Alex Roytman wrote:
    For some reason enhancer blows on class with
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    private static final Log LOG =
    LogFactory.getLog(GaoParticipant.class);
    >>>>
    With following exception:
    java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at serp.util.MultiClassLoader.findClass(MultiClassLoader.java:224)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at
    com.solarmetric.meta.CFMetaDataParser.classForName(CFMetaDataParser.java:213
    at
    com.solarmetric.meta.CFMetaDataParser.classForName(CFMetaDataParser.java:188
    atkodo.meta.JDOMetaDataParser.startCollection(JDOMetaDataParser.java:321)
    at
    kodo.meta.JDOMetaDataParser.startClassElement(JDOMetaDataParser.java:194)
    at
    com.solarmetric.meta.CFMetaDataParser.startElement(CFMetaDataParser.java:69)
    at
    com.solarmetric.meta.XMLMetaDataParser.startElement(XMLMetaDataParser.java:3
    54)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(UnknownSource)
    atorg.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
    Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(UnknownSource)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unkno
    wn Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
    her.dispatch(Unknown Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
    Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    atcom.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:309)
    atcom.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:254)
    atcom.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:234)
    at
    kodo.meta.JDOMetaDataRepositoryImpl.getMetaDataInternal(JDOMetaDataRepositor
    yImpl.java:175)
    at
    kodo.meta.JDOMetaDataRepositoryImpl.getMetaData(JDOMetaDataRepositoryImpl.ja
    va:129)
    at kodo.enhance.JDOEnhancer.<init>(JDOEnhancer.java:110)
    at kodo.enhance.JDOEnhancer.run(JDOEnhancer.java:2175)
    at kodo.enhance.JDOEnhancer.run(JDOEnhancer.java:2116)
    at kodo.enhance.JDOEnhancer.main(JDOEnhancer.java:2088)
    at peacetech.gao.ccs.tools.Enhance.main(Enhance.java:14)
    Caused by: org.apache.commons.logging.LogConfigurationException:
    org.apache.commons.logging.LogConfigurationException:
    org.apache.commons.logging.LogConfigurationException: Class
    org.apache.commons.logging.impl.Log4JLogger does not implement Log
    at
    org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
    va:532)
    at
    org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
    va:272)
    at
    org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
    va:246)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
    atpeacetech.gao.ccs.jdo.GaoParticipant.<clinit>(GaoParticipant.java:14)
    ... 35 more
    Caused by: org.apache.commons.logging.LogConfigurationException:
    org.apache.commons.logging.LogConfigurationException: Class
    org.apache.commons.logging.impl.Log4JLogger does not implement Log
    at
    org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
    mpl.java:416)
    at
    org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
    va:525)
    ... 39 more
    Caused by: org.apache.commons.logging.LogConfigurationException:Class
    org.apache.commons.logging.impl.Log4JLogger does not implement Log
    at
    org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
    mpl.java:412)
    ... 40 more
    Exception in thread "main" Process terminated with exit code 1
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Deploying unity connection at remote site with CUCM at central site

    I am planning to deploy Unity connection at remote site while the CUCM is at central site only. Will appreciate of someone can shd some light on this, has anyone already deplyed same scenario , any specific requirements to take care of please ?
    Thanks in advnace,
    AB

    AB,
    Yes, having your Unity Connection server at a different location than your CUCM is supported.  
    I cannot really help you with specifc requirements as it largely depends on exactly how you intend to deploy it and what features you intend to enable.  Clustering, Digital Networking, Unified Inbox, etc.. all have their own additional requirements the whole of which would not fit into a message board post.
    However, specific bandwidth and latency requirements are listed in the "System Requirements for Cisco Unity Connection Release 8.X.   http://www.cisco.com/en/US/partner/docs/voice_ip_comm/connection/8x/requirements/8xcucsysreqs.html
    The SRND and the System Requirements should get you on the  right  track.  I would encourage you to read both documents fully and  then  come back with any specific design questions you may have.
    -Steven

  • Connecting Multiple Remote Sites with VPN Passthrough

    I have several Win2003SBS sites requiring VPN passthrough from remote clients some using the VPN Connectoid supplied with the SBS (on the RWW - "Download Connection Manager". The requirement is for an DSL modem router with at least 10 tunnels which also supports GRE. The device should support ADSL2 as a minimum and SDSL is preferred.
    A more detailed diagram is attached. Access to the Web Server will be required from both the LAN and WAN sides later.
    Any suggestions please?

    3700 Series multiservice access routers supports GRE, SDSL, ADSL.Refer the following URL for more information
    http://cisco.com/en/US/products/hw/routers/ps282/products_data_sheet09186a00800921f0.html

  • Midnight Commander - connecting an ftp site with @ in username

    How would I have to write the needed parameters if the host needs to have login name in the form of [email protected]? This  - [email protected]:[email protected] - did not work in MC.

    Try %40 instead of @.
    eg. username%[email protected]
    That works in Firefox.

  • Connect to existing site with DreamweaverMX 2004 (Was: DreamweaverMX 2004)

    How do I connect to my exisiting website with the DreamweaverMX 2004?  I just got a new computer and the people who did my website no longer work on website designing.  They have left me on my own!

    MX 2004 is a mighty old relic. It's probably not going to run right if at all on a modern operating system. 
    If you download a 30 day trial of CS6 or CC, you might have better luck.
    http://www.adobe.com/products/creativecloud/free-trial.html
    The first step is to define your Local Site folder.   Go to Site > New site. 
    Tell DW where you would like to keep site files on your local hard drive.  See screenshots.
    Then click on Servers & tell DW what your remote site log-in details are:
    Root Directory is what your web host told you to use for your HTML files.  This varies by host and could be public_html or www or htdocs or none.  If unsure, check with your hosting provider.
    More options:  check the settings recommended by your hosting provider.
    Hit Test button to connect.  If all is good, hit Save.
    In the DW Files Panel (F8), click on Remote Server.  Click the green DOWN arrow to GET  files from the server.
    Switch to Local View, and edit your site pages...
    Nancy O.

  • Database connection encryption and integrity with ColdFusion and Oracle thin client

    As ColdFusion datasource we are using the Oracle thin client to  connect with the database. So, basically we are using a JDBC URL such as  jdbc:oracle:thin:@... and as Driver Class oracle.jdbc.OracleDriver. This works successfully however we would like to set encryption and  integrity parameters as well. In Java this is done similarly by setting a  Properties object prior to getting a connection as follows:
    Properties prop = new Properties();
    prop.put("oracle.net.encryption_client", "REQUIRED");
    prop.put("oracle.net.encryption_types_client", "( DES40 )");
    prop.put("oracle.net.crypto_checksum_client", "REQUESTED");
    prop.put("oracle.net.crypto_checksum_types_client", "( MD5 )");
    OracleDataSource ods = new OracleDataSource();
    ods.setProperties(prop);
    ods.setURL("jdbc:oracle:thin:@localhost:1521:main");
    Connection conn = ods.getConnection();
    Is there a way that I can pass these parameters to the ColdFusion  datasource. Ideally, I would love to do this centrally in such way that a  change to all the cfquery or cfstoredproc is not needed.
    I also know that in application servers such as Oracle AS there is an  option when creating a datasource which says "Add Properties". In there  you can add such properties. So, I was thinking of maybe creating a  JNDI DS in the app. server and then magically connecting to it but this  may have some impacts on the app.
    Besides this I was also thinking of communicating with the CF  datasource through the CF admin API (cfide.adminapi.administrator) and  also the option of extending the Oracle driver so that when CF connects  with it these params are already set.
    I would love to have your professional opinion and suggestions on this.

    I believe the thin driver actually needs the IP address (not the DNS name). Also, is "java" the name of the Oracle instance to which you are trying to connect?
    Try the following:String driver = "jdbc:oracle:thin";
    String dbIP = "W2RZ1NXG01's IP address";
    String dbPort = "1530";
    String dbSid = "java";
    String dbUser = "Admin";
    String dbPswd = "apassword";
    String cnctStr = driver + ":@" + dbIP + ":" + port + ":" + dbSid;
    try
        Class.forName("oracle.jdbc.driver.OracleDriver");
        con = DriverManager.getConnection( cnctStr, dbUser, dbPswd );
        stmt = con.createStatement();
        stmt.executeUpdate(createString);
        stmt.close();
        con.close();
    catch(SQLException ex)
        System.err.println( "The following SQLException occurred: " + ex );
        System.err.println( "Message: " + ex.getMessage() );

Maybe you are looking for