I'm using an FTP connector to read a CSV file. The application is an example app out of Exchange at ftp.devrel.mulesoft.com.
It all works fine when the "Pooling profile" in the FTP Config is set to "use default connection pool configuration". Test Connection returns successfully.
If I change the "Pool profile" to Edit inline, and keep all default settings, the connection test fails with the following error:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FTP_Config':
Cannot create inner bean '(inner bean)#3393fd09' of type [org.mule.runtime.module.extension.internal.config.dsl.connection.ConnectionProviderObjectFactory$$EnhancerByCGLIB$$fc09cb67] while setting bean property 'connectionProviderResolver';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3393fd09': Cannot create inner bean '(inner bean)#52e62e2e' of type [org.mule.runtime.api.config.PoolingProfile] while setting bean property 'poolingProfile';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '(inner bean)#52e62e2e': Unsatisfied dependency expressed through constructor parameter 3: Could not convert argument value of type [null] to required type [int]: Failed to convert value of type 'null' to required type 'int';
nested exception is java.lang.IllegalArgumentException: Cannot convert value of type 'null' to required type 'int': PropertyEditor [org.springframework.beans.propertyeditors.CustomNumberEditor] returned inappropriate value of type 'null'
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FTP_Config': Cannot create inner bean '(inner bean)#3393fd09' of type [org.mule.runtime.module.extension.internal.config.dsl.connection.ConnectionProviderObjectFactory$$EnhancerByCGLIB$$fc09cb67] while setting bean property 'connectionProviderResolver';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3393fd09': Cannot create inner bean '(inner bean)#52e62e2e' of type [org.mule.runtime.api.config.PoolingProfile] while setting bean property 'poolingProfile';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '(inner bean)#52e62e2e': Unsatisfied dependency expressed through constructor parameter 3: Could not convert argument value of type [null] to required type [int]: Failed to convert value of type 'null' to required type 'int';
nested exception is java.lang.IllegalArgumentException: Cannot convert value of type 'null' to required type 'int': PropertyEditor [org.springframework.beans.propertyeditors.CustomNumberEditor] returned inappropriate value of type 'null'
at
Related
When storing a java object as json, #class will be added to data and that will be used to DEserialize in to the respective object.
But when a Kotlin data class is involved, it is not adding the #class and when I try to deserialize ,I am getting the error
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Missing type id when trying to resolve subtype of [simple type, class java.lang.Object]: missing type id property '#class'
at [Source: (byte[])"{"Integer":1}"; line: 1, column: 13]
at com.fasterxml.jackson.databind.exc.InvalidTypeIdException.from(InvalidTypeIdException.java:43)
at com.fasterxml.jackson.databind.DeserializationContext.missingTypeIdException(DeserializationContext.java:1771)
at com.fasterxml.jackson.databind.DeserializationContext.handleMissingTypeId(DeserializationContext.java:1300)
I cannot add the annotation #JsonTypeInfo(use = JsonTypeInfo.Id.CLASS) as this would expose my data class and I understand that the error is because Kotlin data classes are final by default.
Is there any solution to overcome this error?
I want to convert my domain classes to JSON format. But during the conversion, I've encountered this issue below:
java.lang.RuntimeException: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.apache.catalina.core.ApplicationHttpRequest
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.apache.catalina.core.ApplicationHttpRequest
at grails.converters.JSON.value(JSON.java:202)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:202)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:202)
at grails.converters.JSON.render(JSON.java:134)
Caused by: java.lang.IllegalAccessException: Class org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller can not access a member of class org.apache.catalina.core.ApplicationHttpRequest with modifiers "public"
I used JSON converters to convert Object to JSON format.
render myDomain as JSON
These are the domain classes of my app.
MyDomain {
String username
String password
ApplicationHttpRequest request
OtherDomain otherDomain
}
OtherDomain {
String otherField1
String otherFiled2
ApplicationHttpRequest request
}
I really wanted to convert objects to json excluding the request field above. How can I do it? Thanks.
How can I call JTable.getColumn(x) in Kotlin? The obvious code:
table.getColumn(0)
Results in this Exception:
java.lang.IllegalArgumentException: Identifier not found
When I am trying to run my application on jboss, I am getting following stack trace, My application needs database connection at the start of application I am using hibernate, spring integration and my database is mysql. my database details correct. is there anything I am missing ?
2017-01-06 12:12:23,933 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 70) MSC000001:
Failed to start service jboss.undertow.deployment.default-server.default-host./ZealWay:
org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./ZealWay:
java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'webController': Unsatisfied dependency expressed through field 'transactionManagerService':
Error creating bean with name 'transactionManagerServiceImpl': Unsatisfied dependency expressed through field 'gatewayFacade':
Error creating bean with name 'gatewayFacade': Unsatisfied dependency expressed through field 'gatewayRouter':
Error creating bean with name 'gatewayRouterImpl': Unsatisfied dependency expressed through field 'gatewayAquirers':
Error creating bean with name 'gatewayAquirers' defined in class path resource [com/iz/zw/configuration/GatewayAquirerConfig.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [java.util.HashMap]: Factory method 'gatewayAquirers' threw exception;
nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction;
nested exception is org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection;
Datasource configuration code
#Bean
public DataSource dataSource() throws IllegalStateException, PropertyVetoException {
ComboPooledDataSource dataSource = new ComboPooledDataSource();
dataSource.setDriverClass(environment.getRequiredProperty("jdbc.driverClassName"));
dataSource.setJdbcUrl(environment.getRequiredProperty("jdbc.url"));
dataSource.setUser(environment.getRequiredProperty("jdbc.username"));
dataSource.setPassword(environment.getRequiredProperty("jdbc.password"));
dataSource.setInitialPoolSize(Integer.parseInt(environment.getProperty("jdbc.initial.pool.size")));
dataSource.setMinPoolSize(Integer.parseInt(environment.getProperty("jdbc.min.pool.size")));
dataSource.setMaxPoolSize(Integer.parseInt(environment.getProperty("jdbc.max.pool.size")));
return dataSource;
}
In your GatewayAquirerConfig you have not defined the bean gatewayAquirers. You probably have:
#Autowired
GatewayAquirers gatewayAquirers;
Somewhere but GatewayAquirers does not have a #Component or #Service or is not being picked up in the package scan.
I am getting the following exception while static method of Sets of guava collection is being used, though the method is statically imported. What could be the reason? Guava version used here is 12.0.1.
Exception in thread "Task-Thread-for com.mchange.v2.async.ThreadPerTaskAsynchronousRunner#57e5a02" java.lang.NoSuchMethodError: com.google.common.collect.Sets.newLinkedHashSetWithExpectedSize(I)Ljava/util/LinkedHashSet;
at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1034)
at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:445)
at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:183)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:256)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:248)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:246)
at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:960)
at org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1519)
at org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1489)
at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1489)
at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:162)
at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:129)
at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:120)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:143)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:132)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPerTaskAsynchronousRunner$TaskThread.run(ThreadPerTaskAsynchronousRunner.java:255)