james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bagnara (JIRA)" <server-...@james.apache.org>
Subject [jira] Assigned: (JAMES-295) Missing sqlDefs wont be detected
Date Mon, 08 Aug 2005 07:31:39 GMT
     [ http://issues.apache.org/jira/browse/JAMES-295?page=all ]

Stefano Bagnara reassigned JAMES-295:
-------------------------------------

    Assign To: Stefano Bagnara

> Missing sqlDefs wont be detected
> --------------------------------
>
>          Key: JAMES-295
>          URL: http://issues.apache.org/jira/browse/JAMES-295
>      Project: James
>         Type: Bug
>     Versions: 2.2.0
>     Reporter: Mark Daring
>     Assignee: Stefano Bagnara
>     Priority: Minor

>
> Starting at line 113 in SQLResources.java
> Elements with tagname "sqlDefs" are scanned for the name of the class we want the sql-strings
for.
> At line 125 if this element isnt found, by assuming "sectionElement==null", an exception
is thrown.
> So the question is, how can sectionElement be ever null if the "sqlDef" we are looking
for isnt in the xml-file?
> For your convenience:
> " ...
>         // Now get the section defining sql for the repository required.
> 113     NodeList sections = sqlDoc.getElementsByTagName("sqlDefs");
> 114     int sectionsCount = sections.getLength();
>         Element sectionElement = null;
>         for (int i = 0; i < sectionsCount; i++ ) {
>             sectionElement = (Element)(sections.item(i));
>             String sectionName = sectionElement.getAttribute("name");
>             if ( sectionName != null && sectionName.equals(sqlDefsSection) )
{
>                 break;
>             }
>         }
> 125      if ( sectionElement == null ) {
>             StringBuffer exceptionBuffer =
>                 new StringBuffer(64)
>                         .append("Error loading sql definition file. ")
>                         .append("The element named \'")
>                         .append(sqlDefsSection)
>                         .append("\' does not exist.");
>             throw new RuntimeException(exceptionBuffer.toString());
>         }
> ... "

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message