Hi,
Yes it is something when I run the code in wildfly (in 4.6.0), when I run it
in standalone mode I don't get the problem.
I try to connect a PostgresDb not a mongoDB.
And the problem is (from the log):
Is the line,in DefaultSqlPrepareStatmentStrategy.java:
186: Map<?,?> bodyMap =
safeMap(exchange.getContext().getTypeConverter().tryConvertTo(Map.class,
body));
What I have done is a workaround and rebuild sql Component where I replaced
the line with:
Map<?,?> bodyMap = Collections.emptyMap();
if (body instanceof Map<?,?>) {
bodyMap =
safeMap(exchange.getContext().getTypeConverter().tryConvertTo(Map.class,
body));
}
I did the same in hasParameter function.
The code is probably not good code, but for now it works for me (and it
builds)
The log:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.apache.camel.component.mongodb.converters.MongoDbBasicConverters
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1370)
at
org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:60)
at
org.apache.camel.support.TypeConverterSupport.tryConvertTo(TypeConverterSupport.java:75)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:304)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.tryConvertTo(BaseTypeConverterRegistry.java:221)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.tryConvertTo(BaseTypeConverterRegistry.java:209)
at
org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy.lookupParameter(DefaultSqlPrepareStatementStrategy.java:186)
at
org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy$PopulateIterator.next(DefaultSqlPrepareStatementStrategy.java:279)
at
org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy.populateStatement(DefaultSqlPrepareStatementStrategy.java:131)
at
org.apache.camel.component.sql.SqlProducer$2.doInPreparedStatement(SqlProducer.java:146)
at
org.apache.camel.component.sql.SqlProducer$2.doInPreparedStatement(SqlProducer.java:116)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:633)
at
org.apache.camel.component.sql.SqlProducer.process(SqlProducer.java:116)
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-SQL-2-18-2-problem-with-MongoDbBasicConverters-tp5799167p5799699.html
Sent from the Camel - Users mailing list archive at Nabble.com.