WELD-001408: Unsatisfied dependencies for type ObjectMapper with qualifiers #Default at - java-ee-7

I try to inject an ObjectMapper using fasterXML jackson like this:
#Inject
private ObjectMapper objectMapper;
but i have the next error when i try to deploy the war file:
org.jboss.weld.exceptions.DeploymentException: WELD-001408:
Unsatisfied dependencies for type ObjectMapper with qualifiers
#Default
This are my dependencies:
<!-- the core, which includes Streaming API, shared low-level abstractions (but NOT data-binding) -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-2-version}</version>
</dependency>
<!-- Just the annotations; use this dependency if you want to attach annotations
to classes without connecting them to the code. -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-2-version}</version>
</dependency>
<!-- databinding; ObjectMapper, JsonNode and related classes are here -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-2-version}</version>
</dependency>
<!-- jackson-dataformat-yaml: Support for reading and writing YAML-encoded data via Jackson abstractions -->
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jackson-2-version}</version>
</dependency>
What i did wrong?

I am making the assumption you need the ObjectMapper to do some configuration on it. For this you can use:
#Provider
public class ObjectMapperContextResolver implements ContextResolver<ObjectMapper> {
private final ObjectMapper mapper;
public ObjectMapperContextResolver() {
mapper = new ObjectMapper();
// Do some configuration here
}
#Override
public ObjectMapper getContext(Class<?> type) {
return mapper;
}
}

Related

Why does jersey jackson/json processing fail on polymorphic types?

I have a simple example program that duplicates what I believe is a bug, but in case there are real experts out there who know better than I do what's going on, I'll post my issue here.
Here is my Main class:
public class Main {
public static final String BASE_URI = "http://0.0.0.0:8080/myapp/";
public static HttpServer startServer() {
final ResourceConfig rc = new ResourceConfig()
.packages("com.example")
.register(EntityFilteringFeature.class)
.register(JacksonFeature.class)
;
return GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);
}
public static void main(String[] args) throws IOException {
final HttpServer server = startServer();
System.out.println(String.format("Jersey app started with WADL available at "
+ "%sapplication.wadl\nHit enter to stop it...", BASE_URI));
System.in.read();
server.shutdown();
}
}
And here's my Jersey resource:
#Path("myresource")
#Produces(MediaType.APPLICATION_JSON)
public class MyResource {
public static class InnerDataBase {
}
public static class InnerData extends InnerDataBase {
public String item1 = "item1";
public String item2 = "item2";
}
public static class Data {
public String name = "Got it!";
public InnerDataBase innerData = new InnerData();
}
#GET
public Data getIt() {
return new Data();
}
}
The item of note here is that I'm marshalling a class that contains a field whose concrete instance is a derived class with two fields ("item1" and item2") but whose type is actually that of the base class which has no fields. When I run this server and hit the endpoint, I get this:
{"name":"Got it!","innerData":{}}
If I comment out registration of EITHER the EntityFilteringFeature OR the JacksonFeature, the output becomes (as it should):
{"name":"Got it!","innerData":{"item1":"item1","item2":"item2"}}
Conclusion: It appears that the the Jackson media feature is not quite ready for prime time yet in Jersey 2.26-b09.
Additional Thoughts: When I comment out the JacksonFeature, I presume entity filtering is then done with the default Moxy provider. When I comment out EntityFilteringFeature, I presume then that jackson just takes over and handles marshalling for Jersey automatically.
Here's the dependencies section of my pom:
<properties>
<jersey.version>2.26-b09</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-binding</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-entity-filtering</artifactId>
</dependency>
<!-- both json modules may be included as they're enabled in the ResourceConfig -->
<dependency> <!-- use this one when using moxy json processing -->
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>
</dependency>
<dependency> <!-- use this one when using jackson json processing -->
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
</dependencies>
Your thoughts? Am I missing something important here?

Spring Boot issues serializing java.time.LocalDateTime with Jackson to return ISO-8601 JSON timestamps?

I'm working on converting some models in a spring-boot REST API app to use java 8's java.time.LocalDateTime instead of joda's DateTime. I want the timestamps returned from API call to adhere to the ISO_8601 format. Motivation is to be forward compatible with Java 8's time (more here).
The part that's proving difficult is when it comes to serialize an object containing LocalDateTime to JSON.
For example, I have the following entity:
// ... misc imports
import java.time.LocalDateTime;
import java.time.ZoneOffset;
#Data
#Entity
#Table(name = "users")
public class User {
#Id #Column
private String id;
#Column
private String name;
#Column
private String email;
#Column
#JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "UTC")
private java.time.LocalDateTime createdAt;
public User(String name, String email) {
this.id = Utils.generateUUID();
this.createdAt = LocalDateTime.now(ZoneOffset.UTC);
}
}
I have also set my application.properties to turn off the dates as timestamp jackson feature:
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS = false
My maven deps:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.3.6.RELEASE</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.0.1.Final</version>
</dependency>
Finally, I try to retrieve the JSON representation via controller:
#RequestMapping("/users")
#RestController
public class UserController {
private UserService userService;
#Autowired
public UserController(UserService userService) {
this.userService = userService;
}
#RequestMapping(
value = "/{id}",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE
)
public User getUser(#PathVariable("id") String id) {
return userService.findById(id);
}
}
When I actually make a call to this endpoint, I get the following exception:
java.lang.NoSuchMethodError:
com.fasterxml.jackson.datatype.jsr310.ser.JSR310FormattedSerializerBase.findFormatOverrides(Lcom/fasterxml/jackson/databind/SerializerProvider;Lcom/fasterxml/jackson/databind/BeanProperty;Ljava/lang/Class;)Lcom/fasterxml/jackson/annotation/JsonFormat$Value;
Alternately I also configured the app's ObjectMapper in the configuration class:
#Configuration
public class ServiceConfiguration {
#Bean
public ObjectMapper getJacksonObjectMapper() {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new JavaTimeModule());
objectMapper.configure(
com.fasterxml.jackson.databind.SerializationFeature.WRITE_DATES_AS_TIMESTAMPS,
false
);
return objectMapper;
}
}
Any leads will be greatly appreciated.
UPDATE:
Turns out it was a version mismatch between Spring Boot's Jackson version and the one I had in my pom.xml. As Miloš and Andy proposed, once I've set the correct version and run the app with spring.jackson.serialization.write_dates_as_timestamps=true, the issue was resolved, without needing to configure the ObjectMapper or adding annotations on my LocalDateTime model fields.
...
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.3.6.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.3.6.RELEASE</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
</dependencies>
The NoSuchMethodError is because you are mixing versions of Jackson. Spring Boot 1.3.6 uses Jackson 2.6.7 and you are using 2.8.1 of jackson-datatype-jsr310.
Spring Boot provides dependency management for Jackson, including jackson-datatype-jsr310, so you should remove the version from your pom. If you want to use a different version of Jackson, you should override the jackson.version property:
<properties>
<jackson.version>2.8.1</jackson.version>
</properties>
This will ensure that all your Jackson dependencies have the same version, thereby avoiding problems with mismatched versions.
You can also, if you wish, remove your Java code that's configuring the ObjectMapper. The Java Time module will be automatically registered when it's in the classpath and writing dates as timestamps can be configured in application.properties:
spring.jackson.serialization.write-dates-as-timestamps=false
Your ObjectMapper bean must be marked as #Primary in order to be picked up by Spring. Alternatively, you can just create a JavaTimeModule bean and it will get picked up by Spring and added to the default object mapper.
You've probably seen it already but take a look at the official documentation.
The error occurs because you mix versions of Jackson. You are using version 1.3.6.RELEASE of Spring Boot. If you would migrate to Spring Boot version 2.x.x.RELEASE then you can replace the com.fasterxml.jackson.datatype dependency by a spring-boot-starter-json dependency. In this way you let Spring Boot take care of the correct Jackson version.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-json</artifactId>
</dependency>

Jackson 2 on Wildfly 10: How to load ProviderBase?

There seems to be a lot of questions related to Wildfly and Jackson, yet I could not solve my problem despite searching the site far and wide...
I want to use Jackson 2 to handle JSON serialization on an app deployed on Wildfly 10, but I keep getting stuck on loading the com.fasterxml.jackson.jaxrs.base.ProviderBase class.
Offending code:
#Provider
public class CustomJsonProvider extends ResteasyJackson2Provider {
#Inject
private CustomSerializer customSerializer;
private List<JsonSerializer<?>> getSerializers() {
final List<JsonSerializer<?>> result = new ArrayList<>();
// Add custom serializers here.
result.add(customSerializer);
return result;
}
#Override
public void writeTo(Object value, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException {
final List<JsonSerializer<?>> serializers = getSerializers();
final ObjectMapper mapper = locateMapper(type, mediaType);
final SimpleModule zeModule = new SimpleModule("App", Version.unknownVersion(), serializers);
mapper.registerModule(zeModule);
this.setMapper(mapper);
super.writeTo(value, type, genericType, annotations, mediaType, httpHeaders, entityStream);
}
}
In my pom.xml, I have:
<dependencies>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.18.Final</version>
<scope>provided</scope>
<type>jar</type>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>3.0.18.Final</version>
</dependency>
<!-- dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-base</artifactId>
<version>2.5.4</version>
<scope>provided</scope>
</dependency -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
And in the jboss-deployment-structure.xml file:
<deployment>
<exclusions>
<module name="org.apache.commons.logging" />
<module name="org.apache.log4j" />
<module name="org.jboss.logging" />
<module name="org.jboss.logging.jul-to-slf4j-stub" />
<module name="org.jboss.logmanager" />
<module name="org.jboss.logmanager.log4j" />
<module name="org.slf4j.impl" />
<module name="org.codehaus.jackson" />
<module name="org.codehaus.jackson.jackson-mapper-asl" />
<module name="org.codehaus.jettison" />
<module name="org.jboss.resteasy.resteasy-jackson-provider" />
<module name="org.jboss.resteasy.resteasy-jettison-provider" />
</exclusions>
<dependencies>
<module name="org.jboss.resteasy.resteasy-jackson2-provider" services="import"/>
</dependencies>
</deployment>
With this configuration, compile and deployment go smoothly, but on runtime, I get the following exception:
Caused by: java.lang.LinkageError: loader constraint violation: when
resolving overridden method
"com.my.package.CustomJsonProvider$Proxy$_$$WeldClientProxy.disable(Lcom/fasterxml/jackson/databind/SerializationFeature;)Lcom/fasterxml/jackson/jaxrs/base/ProviderBase;"
the class loader (instance of org/jboss/modules/ModuleClassLoader) of
the current class,
com/my/package/CustomJsonProvider$Proxy$$$_WeldClientProxy, and its
superclass loader (instance of org/jboss/modules/ModuleClassLoader),
have different Class objects for the type
com/fasterxml/jackson/jaxrs/base/ProviderBase used in the signature
From what I gathered, there is a different version of ProviderBase loaded by Wildfly's classloader. So I figured that using the provided version would solve the problem (with the possible side-effect of unexpect implementation differences, but still).
Problem is, if I uncomment the commented dependency in the POM, de facto using the version of com.fasterxml.jackson.jaxrs:jackson-jaxrs-baseprovided in Wildlfy, it complains again at runtime:
Caused by: java.lang.ClassNotFoundException:
com.fasterxml.jackson.jaxrs.base.ProviderBase from [Module
"deployment.myapp-ear-0.1-SNAPSHOT.ear.myapp-core-0.1-SNAPSHOT.jar:main"
from Service Module Loader]
This seems to be a problem of conflicting classloaders.
What am I missing and how can I solve this?

Can't get json from Swagger (swagger-jaxrs)

Actually i am trying to generate swagger.json for my REST services.
i succeeded to do it using jersy, but now we use don't use jersy in our services, we just use Jax-rs, so now i am not able to generate it and got 404 error code.
Here are my pom dependencies
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.10</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
</dependencies>
and this is my app config application
import java.util.HashSet;
import java.util.Set;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
import com.skios.endpoint.EmployeeEndpoint;
import com.skios.endpoint.ShopsEndpoint;
import io.swagger.jaxrs.config.BeanConfig;
import io.swagger.jaxrs.listing.ApiListingResource;
import io.swagger.jaxrs.listing.SwaggerSerializers;
#ApplicationPath("api")
public class AppConfiguration extends Application {
public AppConfiguration() {
BeanConfig beanConfig = new BeanConfig();
beanConfig.setVersion("1.0.2");
beanConfig.setSchemes(new String[] { "http" });
beanConfig.setHost("localhost:7070");
beanConfig.setBasePath("app");
beanConfig.setResourcePackage("com.skios.endpoint");
beanConfig.setScan(true);
}
#SuppressWarnings({ "rawtypes", "unchecked" })
#Override
public Set<Class<?>> getClasses() {
Set<Class<?>> resources = new HashSet();
resources.add(ShopsEndpoint.class);
resources.add(EmployeeEndpoint.class);
// ...
resources.add(ApiListingResource.class);
resources.add(SwaggerSerializers.class);
return resources;
}
}
and these are my end points
#Api(value = "/employees", description = "Endpoint for employee listing")
#Path("/employees")
public class EmployeeEndpoint {}
#Path("/shops")
#Api(value="/shops", description="Shops")
public class ShopsEndpoint {}
andnow when i am trying to enter the path of swagger.json file
http://localhost:7070/MavenSwaggerTest/api/swagger.json
i got 404 error code.
so what is the problem? can any one help me?
thanks
You haven't configure your ApplicationPath and BasePathcorrectly.
Configure it like this.
#ApplicationPath("/api")
beanConfig.setBasePath("/api");
Now http://localhost:7070/MavenSwaggerTest/api/swagger.json would work, unless there is any other issue.

Apache Camel failed to create endpoint

I'm new on Apache Camel and I need to integrate it with Apache ActiveMQ.
I tried a basic example, I installed on my computer FileZilla Server and ActiveMQ (works both) and I want to copy a file from the local server to the JMS queue that I created in Active MQ; the problem is that the method start() of CamelContext throws org.apache.camel.FailedToCreateRouteException
Here is my code (the address in ftpLocation is the static address of my computer):
import javax.jms.ConnectionFactory;
import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.jms.JmsComponent;
import org.apache.camel.impl.DefaultCamelContext;
public class FtpToJmsExample
{
private static String url = ActiveMQConnection.DEFAULT_BROKER_URL;
private static String ftpLocation = "ftp://192.168.1.10/incoming?username=Luca&password=Luca";
public void start() throws Exception
{
CamelContext context = new DefaultCamelContext();
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
context.addComponent("jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
context.addRoutes(
new RouteBuilder() {
public void configure()
{
from(ftpLocation).
process(executeFirstProcessor()).
to("jms:TESTQUEUE");
}
});
System.out.println("START");
context.start();
System.out.println("wait");
System.out.println(loaded);
Thread.sleep(3000);
while (loaded == false)
{
System.out.println("in attesa\n");
}
context.stop();
System.out.println("stop context!");
System.out.println(loaded);
}
public static void main(String args[]) throws Exception
{
FtpToJmsExample example = new FtpToJmsExample();
example.start();
}
private Processor executeFirstProcessor()
{
return new Processor() {
#Override
public void process(Exchange exchange)
{
System.out.println("We just downloaded : "+
exchange.getIn().getHeader("CamelFileName"));
loaded = true;
}
};
}
}
This is the POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel</groupId>
<artifactId>examples</artifactId>
<version>2.11.0</version>
</parent>
<artifactId>camel-example-jms-file</artifactId>
<name>Camel :: Example :: JMS-File</name>
<description>An example that persists messages from FTP site to JMS</description>
<dependencies>
<!-- Camel dependencies -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
</dependency>
<!-- ActiveMQ dependencies -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<profiles>
<profile>
<id>Example</id>
<properties>
<target.main.class>com.ftpToJms.FtpToJMSExample</target.main.class>
</properties>
</profile>
</profiles>
</project>
And this is the report of the error
Exception in thread "main" org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[ftp://192.168.1.10/incoming?username=Luc... because of Failed to resolve endpoint: ftp://192.168.1.10/incoming?password=Luca&username=Luca due to: No component found with scheme: ftp
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:181)
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:750)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1829)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1609)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1478)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1446)
at ftptojms.FtpToJmsExample.start(FtpToJmsExample.java:51)
at ftptojms.FtpToJmsExample.main(FtpToJmsExample.java:73)
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: ftp://192.168.1.10/incoming?password=Luca&username=Luca due to: No component found with scheme: ftp
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:514)
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:62)
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:191)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114)
at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:90)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:861)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:176)
... 8 more
Someone can help me?
Sorry for the long post and the not-perfect english.
You need to add camel-ftp to your classpath. If you use Maven then its easy as just add it as dependency to the pom.xml