Hi there, I am a completely newbie with iBbatis, Eclipse, and even with Java development, so I hope you'll exercise a bit of patience with me :-)
There is my problem: I'm trying to integrate iBatis' sqlmaps into an Eclipse plugin I am developing. I generated all the abator artifacts and a TestSqlConfig.java class which builds the SqlMapClient. Then I wrote a "main" in my plugin's Application class which should simply add a record to one of the tables of my db. But I keep getting those "Could not find resource SqlMapConfig.xml" wherever I put this file. This is an extract from my TestSqlConfig class: //FileReader reader = new FileReader("e:/SqlMapConfig.xml"); String resource = "SqlMapConfig.xml"; Reader reader = Resources.getResourceAsReader(resource); sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader); Note that SqlMapConfig.xml is in the "root" directory of my plugin (fr.grenoble.db). I tried to copy it in the fr.grenoble.db/src/fr.grenoble.db folder where the TestSqlConfig class lies, or even in the plugin I created to bundle all iBatis' jars. I tried different values for the string resource, like "fr.grenoble.db/SqlMapConfig.xml", "fr/grenoble/db/SqlMapConfig.xml", "/fr/grenoble/db/SqlMapConfig.xml" "/SqlMapConfig.xml", but had no luck in none of them. The only way for it to load the SqlMapConfig.xml file is to use the FileReader solution, but the problem arises again when it needs to load the first map file. Is anybody willing to help me in sorting things out? Thanks in advance. JL java.io.IOException: Could not find resource SqlMapConfig.xml at com.ibatis.common.resources.Resources.getResourceAsStream(Resources.java:101) at com.ibatis.common.resources.Resources.getResourceAsStream(Resources.java:86) at com.ibatis.common.resources.Resources.getResourceAsReader(Resources.java:150) at fr.grenoble.db.TestSqlConfig.<clinit>(TestSqlConfig.java:31) at fr.grenoble.db.Application.run(Application.java:21) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948) -- View this message in context: http://www.nabble.com/Could-not-find-resource-error-t1310881.html#a3492688 Sent from the iBATIS - User - Java forum at Nabble.com.