You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Nilesh Joshi (JIRA)" <ib...@incubator.apache.org> on 2006/01/03 14:44:06 UTC

[jira] Created: (IBATIS-241) Unable to find resource

Unable to find resource
-----------------------

         Key: IBATIS-241
         URL: http://issues.apache.org/jira/browse/IBATIS-241
     Project: iBatis for Java
        Type: Test
  Components: Testing  
 Environment: JAVA 1.4.2, Linux
    Reporter: Nilesh Joshi
    Priority: Minor


When i try to read resource sql-config-map.xml in following code i get "java.io.IOException: Could not find resource sql-map-config.xml" error please help.

private static SqlMapClient sqlMap = null;
    public static final String IBATIS_XML_CONFIG_FILE = "sql-map-config.xml";
    private static Logger log = Logger.getLogger("userUtil");
    
    static{
        try{
            String resource = IBATIS_XML_CONFIG_FILE;
            Reader reader = Resources.getResourceAsReader(resource);
            sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
        }catch (IOException ex) {
            System.out.println("error in static block "+ex);
        }        
    }

Thanx in Advance
Nilesh

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


[jira] Commented: (IBATIS-241) Unable to find resource

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-241?page=comments#action_12361728 ] 

Brandon Goodin commented on IBATIS-241:
---------------------------------------

Also, this is more of a user list question than a bug. I am going to close this and recommend further dialog happen on the user list.

> Unable to find resource
> -----------------------
>
>          Key: IBATIS-241
>          URL: http://issues.apache.org/jira/browse/IBATIS-241
>      Project: iBatis for Java
>         Type: Test
>   Components: Testing
>  Environment: JAVA 1.4.2, Linux
>     Reporter: Nilesh Joshi
>     Priority: Minor

>
> When i try to read resource sql-config-map.xml in following code i get "java.io.IOException: Could not find resource sql-map-config.xml" error please help.
> private static SqlMapClient sqlMap = null;
>     public static final String IBATIS_XML_CONFIG_FILE = "sql-map-config.xml";
>     private static Logger log = Logger.getLogger("userUtil");
>     
>     static{
>         try{
>             String resource = IBATIS_XML_CONFIG_FILE;
>             Reader reader = Resources.getResourceAsReader(resource);
>             sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
>         }catch (IOException ex) {
>             System.out.println("error in static block "+ex);
>         }        
>     }
> Thanx in Advance
> Nilesh

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


[jira] Closed: (IBATIS-241) Unable to find resource

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-241?page=all ]
     
Brandon Goodin closed IBATIS-241:
---------------------------------

    Resolution: Invalid

This is a support question that belongs on the user list.

> Unable to find resource
> -----------------------
>
>          Key: IBATIS-241
>          URL: http://issues.apache.org/jira/browse/IBATIS-241
>      Project: iBatis for Java
>         Type: Test
>   Components: Testing
>  Environment: JAVA 1.4.2, Linux
>     Reporter: Nilesh Joshi
>     Priority: Minor

>
> When i try to read resource sql-config-map.xml in following code i get "java.io.IOException: Could not find resource sql-map-config.xml" error please help.
> private static SqlMapClient sqlMap = null;
>     public static final String IBATIS_XML_CONFIG_FILE = "sql-map-config.xml";
>     private static Logger log = Logger.getLogger("userUtil");
>     
>     static{
>         try{
>             String resource = IBATIS_XML_CONFIG_FILE;
>             Reader reader = Resources.getResourceAsReader(resource);
>             sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
>         }catch (IOException ex) {
>             System.out.println("error in static block "+ex);
>         }        
>     }
> Thanx in Advance
> Nilesh

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


[jira] Commented: (IBATIS-241) Unable to find resource

Posted by "Nathan Maves (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-241?page=comments#action_12361625 ] 

Nathan Maves commented on IBATIS-241:
-------------------------------------

Nilesh,

It appears that you think your sql-map-confile.xml is in your root, default, java package.   Make sure that you specify the full relative path to this file.  It should look something like "/com/abc/sqlmap/sql-map-config.xml.


Nathan

> Unable to find resource
> -----------------------
>
>          Key: IBATIS-241
>          URL: http://issues.apache.org/jira/browse/IBATIS-241
>      Project: iBatis for Java
>         Type: Test
>   Components: Testing
>  Environment: JAVA 1.4.2, Linux
>     Reporter: Nilesh Joshi
>     Priority: Minor

>
> When i try to read resource sql-config-map.xml in following code i get "java.io.IOException: Could not find resource sql-map-config.xml" error please help.
> private static SqlMapClient sqlMap = null;
>     public static final String IBATIS_XML_CONFIG_FILE = "sql-map-config.xml";
>     private static Logger log = Logger.getLogger("userUtil");
>     
>     static{
>         try{
>             String resource = IBATIS_XML_CONFIG_FILE;
>             Reader reader = Resources.getResourceAsReader(resource);
>             sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
>         }catch (IOException ex) {
>             System.out.println("error in static block "+ex);
>         }        
>     }
> Thanx in Advance
> Nilesh

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