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

Similar Messages

  • 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

  • Right problem with apache and tomcat

    Bonjour;
    I use a user login "apache" to stop/start Apache and tomcat. Because never launching apache et tomcat as root.
    But I have the following problem with apache (file error.log) :
    [Tue May  6 17:26:22 2003] [error] Connection "warpConnection" cannot connect
    [Tue May  6 17:26:22 2003] [error] Cannot open connection "warpConnection"
    [Tue May  6 17:27:01 2003] [error] Re-Trying to deploy connections
    As root the error msg does'nt exists (lost)
    Best regards;
    A+;

    Run it from the shell to see whats wrong:
    # httpd

  • Problem with Apache reverse proxy after applying SP13 NW

    Hello,
    we have a NW04 EP Portal and a Apache reverse proxy in the DMZ. After applying SP 13 for the portal we get the following error from the reverse proxy:
    Proxy Error
    The proxy server received an invalid response from an upstream server.
    The proxy server could not handle the request GET /irj/.
    Reason: Error reading from remote server
    Apache/2.0.52 (Win32) mod_ssl/2.0.52 OpenSSL/0.9.7e Server at servername.company.de Port 443
    Is is it possible, that there is a problem with sp13?
    Best regards
    Daniel Holstein

    Hi Daniel,
    ok I`ll try to find a solution in parallel and keep you up to date.
    In the following my settings in case I missed something:
    <VirtualHost test.firma.de:443>
    SSLEngine on
    SSLProxyEngine on
    SSLCertificateFile /apache/keys/pac_ssl_qep_dmz_server.crt
    SSLCertificateKeyFile /apache/keys/pac_ssl_qep_dmz_server.key
    ServerName test.firma.de:443
    ServerAdmin [email protected]
    LogLevel debug
    ErrorLog logs/ssl_443_error
    CustomLog logs/ssl_443_access_log common
    ProxyVia Off
    ProxyPreserveHost On
    ReWriteEngine on
    ReWriteLogLevel 0
    ReWriteLog logs//ssl_443_rewrite_http.log
    ProxyPass / https://backend.firma.de:50001/
    ProxyPassReverse / https://backend.firma.de:50001/
    </VirtualHost>
    Regards, Jens

  • 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.

  • 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

  • Tomcat 4.1 Oracle Blob problem using apache commons DBCP

    Hi all,
    We are using Tomcat 4.1.12, Java 1.4.x and trying to take advantage of the connection pooling that comes with Tomcat(the apache commons DBCP).
    We are connecting to a oracle database.
    Works fine for everything EXCEPT Blobs. We have a servlet that serves images from Oracle, that works fine when it doesn't use the connection pooling, but throws an exception when we call the
    ERROR: Class:DisplayGraphic Method:processRequest(HttpServletRequest request, Ht
    tpServletResponse response)
    Exception: org.apache.commons.dbcp.DelegatingResultSet
    DataSource ds = (DataSource)ctx.lookup("jdbc/db_connection");
    Connection conn = ds.getConnection();
    PreparedStatement pstmt = null;
    ResultSet rs = null;
    pstmt = conn.prepareStatement("SELECT graphic FROM graphics WHERE graphic_id = 1");
    rs = pstmt.executeQuery();
    if(rs.next())
        oracle.sql.BLOB oBlob = ((OracleResultSet) oRS).getBLOB("GRAPHIC");
        InputStream oIS =  oBlob.getBinaryStream();
        ... etc etc...
    }Any ideas?
    Cheers,
    Alex.

    solved the problem.. i was using getBLOB instead of
    getBlob
    doh..Hi Alex,
    your problem is very interesting for me because I have a similar problem and your identical configuration...
    the instruction
    oracle.slq.BLOB aBlob = ((OracleResultSet)super.mRs).getBLOB("BLOBBONE")
    causes this:
    java.lang.ClassCastException: org.apache.commons.dbcp.DelegatingResultSet
    To resolve this, I changed, in server.xml , the factory
    <parameter>
                        <name>factory</name>
                        <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
                   </parameter>
    with:
    <parameter>
    <name>factory</name>
    <value>oracle.jdbc.pool.OracleDataSourceFactory</value>
    </parameter>          
    and magically all works fine...
    But the question is... Why doesn't it work with the standard factory???
    There is a problem in the CLASSPATH that I don't see?
    Any suggestions is welcome!
    Thanks in advance!
    Giselda

  • 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    

  • Problem with Apache

    I have a problem with starting Apache process.
    There is a log:
    fopen: Invalid argument
    Processing config directory: c:/oracle/product/10.2.0/db_2/apache/modplsql/conf"
    Apache.exe: could not open config directory c:/oracle/product/10.2.0/db_2/apache/modplsql/conf"

    Kostya,
    Is that directory there (does it exist)? And is it readable by the Apache service user?
    Earl

  • Problems with apache

    I downloaded XAMPP Moodle today to do some development and found that apache would not start. It complained that Web Sharing was already turned on in System Preferences and that I should turn it off. When I checked in System Preferences, all indications were that Web Sharing was not enabled. Furthermore, when I tried to turn it on from System Preferences, it would not do so. I opened up http://localhost and my own user account (i.e. localhost/~micah) functions properly and httpd shows up as three processes in Activity Monitor (one under root and two under _www).
    I am confident that I can kill it (using sudo), but I'm not confident that it will not come back in the same way when I restart. Also, how does System Preferences deterine whether or not httpd is running? Does it check the process list? Does it check the port? Is there a pid file? Why does it not show up properly in System Preferences?
    How do I properly fix this situation?

    AstroNauts wrote:
    Thanks for your response!
    Okay, done. Moved it from /Library/WebServer/Documents to /Sites/, stopped working. Now I suppose I have to look into the CGI?
    (apologies, haven't been near this project for a while).
    Okay, it now works!
    Following your hint about the CGI, I uncommented the line below. I don't why it was commented (or should be), but it now works. Had some other help stating it was indeed a problem with how to handel php.
    We're cool, now; thank you for your responses and help!
    Best,
    -Pim
    +LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so+

  • Problems with Apache and custom JSPs

    Hi
    We've made an application on top of IFS, using JWS in our test envirnment. Just before making some stress tests, I'd like to try it using Apache. We're currently having two problems:
    1) I switch to the apache configuration running ifsconfig and not selecting JWS. When I try to access the ifs using http://host/ifs/files, everything goes well except that the "logout" icon doesn't appear. I did a little research and found out that the link goes to /ifs/webui/images/logout.gif. This gives an error in mod_jserv.log, like this one:
    [07/06/2001 22:54:20:315] (ERROR) ajp12: Servlet Error: ClassNotFoundException: webui
    It seems it's trying to find a "webui" class, since in ifs.properties every url that begins with /ifs goes to jserv.
    I don't know if this is a know problem or what should I've check...
    2) This one is more important. We're using some custom JSPs, which we use to edit the properties of some types of documents. Basically, when the user clicks over a file one of our JSP appears. These JSPs call a bean to do some processing, passing the HttpRequest as a parameter. The problem is that when using JWS we get the "path" request variable like in path=/%3A29464
    However, when using Apache we get path=/ifs/files/%3A29464 ( and afterwards we get an exception because the ifsSession.getPublicObject method doesn't work).
    Any hints on this? One way could be to check if the path begins with /ifs/files, but that's not really nice.. and besides I could have the same problem in some other parts.
    It's kind of urgent....
    Thanks
    Ramiro
    null

    Hi,
    The answer to your path problem is that you can make use of API to find out the current path so that it works both with Apache and with JWS. Follow the steps
    1. import the oracle.ifs.adk.http package in your custom jsps
    <%@ page import = "oracle.ifs.adk.http.*" %>
    2. Then within your jsp use the method
    getIfsPathFromJSPRedirect
    <%= oracle.ifs.adk.http.HttpUtils.getIfsPathFromJSPRedirect(request) %>
    This will give you the current path of the object on which you clicked on and which initiates the custom jsp.
    You can look at the CMS application which has made use of this API. URL is
    http://otn.oracle.com/sample_code/products/ifs/sample_code_index.htm
    Choose, sample applicatin -> Content Management system.
    Hope this helps
    Rajesh
    null

  • New MS patch problems with Apache & SSL on NetWare web serve

    This week our users began to experience problems accessing our Intranet based on a NetWare 6.5 box running Apache and using a Verisign SSL certificate. IE would say it was connecting but you would never get there. Firefox could get to the server but I had similar problems with Safari & Chrome.
    I discovered that the MS security patch KB980436 had modified some portion of IE and was causing the problem. Uninstalling that patch put us back to where we could once again access our Intranet.
    This seems to have something to do with how IE accesses using the SSL 443 port. When, internally, I accessed this same site using http instead of https it worked perfectly.
    This patch was applied to Win XP and Win 7 with the same bad results.
    If there is a more appropriate place for this post please move it there.

    Have you tried the registry settings to go back to compatible mode? The
    settings are listed in the MS KB article.
    "boomchuck" <[email protected]> wrote in message
    news:[email protected]..
    >
    > This week our users began to experience problems accessing our Intranet
    > based on a NetWare 6.5 box running Apache and using a Verisign SSL
    > certificate. IE would say it was connecting but you would never get
    > there. Firefox could get to the server but I had similar problems with
    > Safari & Chrome.
    >
    > I discovered that the MS security patch KB980436 had modified some
    > portion of IE and was causing the problem. Uninstalling that patch put
    > us back to where we could once again access our Intranet.
    >
    > This seems to have something to do with how IE accesses using the SSL
    > 443 port. When, internally, I accessed this same site using http
    > instead of https it worked perfectly.
    >
    > This patch was applied to Win XP and Win 7 with the same bad results.
    >
    > If there is a more appropriate place for this post please move it
    > there.
    >
    >
    > --
    > boomchuck
    > ------------------------------------------------------------------------
    > boomchuck's Profile: http://forums.novell.com/member.php?userid=28653
    > View this thread: http://forums.novell.com/showthread.php?t=418742
    >

  • Problem with JPA + Hibernate Validator when performing update

    When I try to insert an new entity with a validation problem, Hibernate Validator works normally, but when I try to update an entity the InvalidStateException is not thrown when persist() is called, so when commit() is called a RollbackException is thrown.
    I'm using the latest versions of the hibernate libraries. The problem happened with JSF(NetBeans 6 VWP) and Java SE.
    Sample code:
          EntityManagerFactory emf = Persistence.createEntityManagerFactory("HibernateValidatorTest");        
          EntityManager em = emf.createEntityManager ();       
          ScfaqAssunto assunto = em.find(ScfaqAssunto.class, 2); // new ScfaqAssunto() works normally
          assunto.setAssunto(""); // the property assunto is with @NotEmpty              
          try
             em.getTransaction().begin();
             em.persist(assunto);
             em.getTransaction().commit();
          catch(InvalidStateException e)
             if( em.getTransaction().isActive())
                em.getTransaction().rollback();
             for(InvalidValue invalidValue : e.getInvalidValues())
                System.out.println (invalidValue.getMessage());
          catch(Exception e)
             if(em.getTransaction().isActive())
                em.getTransaction().rollback();
             System.out.println(e.getMessage());
          finally
             em.close();
          } Thanks for any help,
    Felipe

    Hi Thomas
    I loose hours with this problem
    there is a problem with toplink lib version
    just download toplink librairies at http://www.oracle.com/technology/products/ias/toplink/jpa/index.html
    replace oldest in $Glassfishdir\lib
    It have to works
    tested on postGres and Derby
    Can netbeans update center fix this problem?

  • CVE-2007-1862 vulnerability - problem with Apache mem_cache.

    I have a problem with CVE-2007-1862, which is an Apache mem_cache vulnerability. Even though my Snow Leopard machine is currently running Apache 2.2.17 and the problem supposedly went away with a much earlier version, the problem has not gone away. By the way, this machine also has Java Update 24 on it, while a similarly configured Snow Leopard machine does not have it (and the Filemaker Pro Admin Console still works on that one).
    Anyway, I am hoping that installing Apache 2.2.18 in a Software update will take care of this problem.
    Does anyone know when Apache 2.2.18 will be in a Software Update?

    Your parameter db_recovery_file_dest look strange
    db_recovery_file_dest = I:\oracle\product\10.2.0/flash_recove db_recovery_file_dest_size= 10737418240
    Did you put a slash (/) instead of a backslash (\) ?
    You're saying "can´t enter this the SYS user"
    It could be your log_archive_dest that is full.
    Do you get an error message?

  • Problem with Apache Plugin

              Hi,
              Hi I am getting some Errors when i am trying to Run the Apache Server. Actual Problem is
              I want to create an Cluster Environment using 2 weblogic Cluster. i read that documentation, using apache-weblogic plug-in, we can improve the cluster performence.
              I follow the Same rules and i install ed the Apache server and i copy the *.so file that required for apache(if i commented out the LoadModule weblogic_module libexec/mod_wl.so , serverrunning fine)
              But whenever i am trying to run apache Server with that
              Its given a error like
              "BUG IN DYNAMIC LINKER ld.so:dynamic-link.h:57: elf_get_dynamic_info: Assertion '! "bad dynamic tag" failed!
              ./apachectl start: httpd could not be started
              If u will give some help about this its most helpful for me.
              ThankQ
              Krishna Botla
              

    Which version of Apache are you using? Are you on Solaris?
              Have you enabled the bootstap module mod_so for apache? Do httpd -l to ensure that.
              Did you use apxs to deploy mod_wl.so?
              Please go through the steps described in the docs again to see if you missed something.
              --Vinod.
              KrishnaKumar wrote:
              > Hi,
              > Hi I am getting some Errors when i am trying to Run the Apache Server. Actual Problem is
              > I want to create an Cluster Environment using 2 weblogic Cluster. i read that documentation, using apache-weblogic plug-in, we can improve the cluster performence.
              > I follow the Same rules and i install ed the Apache server and i copy the *.so file that required for apache(if i commented out the LoadModule weblogic_module libexec/mod_wl.so , serverrunning fine)
              > But whenever i am trying to run apache Server with that
              > Its given a error like
              > "BUG IN DYNAMIC LINKER ld.so:dynamic-link.h:57: elf_get_dynamic_info: Assertion '! "bad dynamic tag" failed!
              > /apachectl start: httpd could not be started
              >
              > If u will give some help about this its most helpful for me.
              >
              > ThankQ
              > Krishna Botla
              

Maybe you are looking for

  • Can I use my airport extreme to view the internet from my PC on a HDTV

    I am trying to set-up a Samsung 60" HDTV for use in my office conference room and want to access the Internet for skype conference videos but also need to use my PC laptop for power point presentations. What is the best way to go about getting this d

  • Same material in two company codes

    Hi all,    I want to use the same material code (A1 - reynolds pen) for two company codes 1000 & 2000 what are all the implications i vl get in future,,, plz any guide me,,, regards, urendra

  • Indesign CS6 has started bombing out on launch.

    Hi there, Now, when I launch InDesign CS6, it crashes with this error detail from event viewer. Date/Time:          2013-01-09 10:03:35.606 +0000 OS Version:        Mac OS X 10.8.2 (12C60) Report Version:  10 Interval Since Last Report:              

  • Oracle Fatal error when trying to connect through sqlplus

    Hi, I am getting the below error when trying to connect to instance through sqlplus Database version is :10.2.0.3 Operating system= Solaris Operating System (SPARC 64-bit) OS version=5.10 [lscbd07p2*BMC]-\ORACLE>sqlplus SQL*Plus: Release 10.1.0.4.0 -

  • Profile problems for wifi settings

    We are testing the iPhone at our orginization. One of my co-workers has created a profile for vpn/wifi and sent it to several of us. The problem exists on the phone I am using, while there is no username in the username field for wifi, I am unable to