You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Henry Lu <zh...@umich.edu> on 2007/10/15 14:01:13 UTC
error
I am using ibatis.net 1.6 sql mapper + spring.net 1.1RC,
oracle.dataAccess.dll for 10g (came with oracle 10g installtion). I got
the following error which I don't have any idea:
Unhandled Exception: System.Configuration.ConfigurationErrorsException:
Error in
stantiating context 'spring.root'. --->
Spring.Objects.FatalObjectException: Can
not instantiate Type [Spring.Context.Support.XmlApplicationContext]
using ctor [
Void .ctor(System.String, Boolean, System.String[])] : 'Exception has
been throw
n by the target of an invocation.' --->
System.Reflection.TargetInvocationExcept
ion: Exception has been thrown by the target of an invocation. --->
Spring.Objec
ts.Factory.ObjectCreationException: Error creating object with name
'sqlMapClien
t' defined in 'file
[C:\c#\spring_net\IBatisSpringExample\IBatisSpringExample\Ap
plicationContext.xml]' : Initialization of object failed : The invoked
member is
not supported in a dynamic module. ---> System.NotSupportedException:
The invok
ed member is not supported in a dynamic module.
at
System.Reflection.Emit.AssemblyBuilder.GetManifestResourceStream(String na
me)
at
IBatisNet.Common.Utilities.Resources.GetEmbeddedResourceAsXmlDocument(Stri
ng resource)
at IBatisSpringExample.IBatis.SqlMapClient.AfterPropertiesSet() in
C:\c#\spri
ng_net\IBatisSpringExample\IBatisSpringExample\IBatis\SqlMapClient.cs:line
47
at
Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.Invoke
InitMethods(Object target, String name, IConfigurableObjectDefinition
definition
.........
Is there any help?
-Henry
Re: error
Posted by Gilles Bayon <ib...@gmail.com>.
Before testing Spring+ibatis integration, test first ibatis alone to see if
you have problems in your config/mapping files
--
Cheers,
Gilles
<a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE">Wish List</a>
sqlmap 1.3 and 1.6
Posted by Henry Lu <zh...@umich.edu>.
I am using sqlmap 1.6 now and got the following errors:
Unhandled Exception: IBatisNet.Common.Exceptions.ConfigurationException:
- The error occurred while loading SqlMap.
- loading select tag
- The error occurred in <sqlMap resource="../../dao/User_TableDao.xml"
xmlns="ht
tp://ibatis.apache.org/dataMapper" />.
- Check the getListTables. ---> System.NullReferenceException: Object
reference
not set to an instance of an object.
at
IBatisNet.Common.Utilities.Objects.ObjectFactory.CreateFactory(Type typeTo
Create, Type[] types)
at
IBatisNet.DataMapper.Configuration.Statements.Statement.Initialize(Configu
rationScope configurationScope)
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureSqlMap()
at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize()
at
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument docu
ment, DataSource dataSource, Boolean useConfigFileWatcher, Boolean
isCallFromDao
)
--- End of inner exception stack trace ---
at
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument docu
ment, DataSource dataSource, Boolean useConfigFileWatcher, Boolean
isCallFromDao
.......................
here is the map file:
<?xml version="1.0" encoding="UTF-8" ?>
<sqlMap namespace="User_Table"
xmlns="http://ibatis.apache.org/mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- ================================= -->
<!-- =========== ORACLE ============== -->
<!-- ================================= -->
<alias>
<typeAlias alias="user_table" type="HelloWorld.domain.User_Table,
HelloWorld"/>
<typeAlias alias="user_table_list"
type="HelloWorld.domain.User_TableList, HelloWorld"/>
</alias>
<statements>
<select id="getListTables"
resultClass="user_table"
listClass ="user_table_list">
SELECT
TABLE_NAME
FROM
USER_TABLES
ORDER BY 1
</select>
</statements>
</sqlMap>
This map file works with 1.3 and now if didn't work for 1.6.
How to fix it?
-Henry