Bugs item #971010, was opened at 2004-06-11 02:51
Message generated for change (Comment added) made by starksm
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=971010&group_id=22866

Category: JBossServer
Group: v3.2
>Status: Closed
>Resolution: Works For Me
Priority: 5
Submitted By: ulf gohde (gohde)
Assigned to: Scott M Stark (starksm)
Summary: 3.2.4 and 4DR4 can not handle spaces in dir names

Initial Comment:
An MBean loads a configuration file from the jboss start 
directory. In our case this directory contains spaces 
whicj is not a problem in JBoss 3.2.2. However, 3.2.4 
and 4DR4 seem to have problems with spaces in 
directory names.

see attached log

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

>Comment By: Scott M Stark (starksm)
Date: 2004-08-01 07:19

Message:
Logged In: YES 
user_id=175228

This little program does not show a problem using the 3.2.5
parsers.

package xml;

import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;

public class TestFilenameSpaces
{
   public static void main(String[] args) throws Exception
   {
      String filename = "/tmp/java/xml/Space Here/ejb-jar.xml";
      DOMParser parser = new DOMParser();
      parser.parse(filename);
      Document doc = parser.getDocument();
      NodeList sessions = doc.getElementsByTagName("session");
      for(int n = 0; n < sessions.getLength(); n ++)
      {
         Element ejb = (Element) sessions.item(n);
         Node name =
ejb.getElementsByTagName("ejb-name").item(0);
        
System.out.println(name.getFirstChild().getNodeValue());
      }
   }
}


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

Comment By: ulf gohde (gohde)
Date: 2004-06-23 01:11

Message:
Logged In: YES 
user_id=1022717

The code is actually quite simple. The passed filename is just 
the filename w/o any path information. After looking at the 
code it was clear that JBoss is not the problem. I replaced 
the xercesimpl.jar and xml-apis.jar with the versions used in 
JBoss 3.2.2 and after that it is working fine.



public Configuration(String strFilename) throws 
CaseWareException
    {
        m_strFilename = strFilename;

        try
        {
            DOMParser parser = new DOMParser();

            parser.parse(m_strFilename);

            m_document = parser.getDocument();

            // build hashtable with section name as key and 
corresponding handler name
            extractSections();

            // build hashtable with section name as key and 
corresponding handler instance
            extractNameValuePairs();
        }
        catch(Exception e)
        {
                        if( Debug.isOnFor(FULL_CLASS))
                                Debug.debug
(FULL_CLASS, "Configuration", Debug.INFO, e.getMessage());
            //Debug.showError(e);
                        throw new CaseWareException
(CLASS, "Configuration", 
EFWResourceBundle.ERR_APP_SERVER, SeverityType.FATAL, 
ErrorType.FLOWARE, null, e);
            //throw new FlowareException(e);
        }
    } // Configuration


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

Comment By: Scott M Stark (starksm)
Date: 2004-06-19 21:31

Message:
Logged In: YES 
user_id=175228

Show the code from:
com.plx.framework.config.Configuration.<init>(Configuration.java:139)

along with how the file URL is being obtained.


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=971010&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to