Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camel K Validator Component hangs on URL input #1207

Closed
Jonathan-Eid opened this issue Jan 15, 2020 · 8 comments
Closed

Camel K Validator Component hangs on URL input #1207

Jonathan-Eid opened this issue Jan 15, 2020 · 8 comments
Milestone

Comments

@Jonathan-Eid
Copy link

Jonathan-Eid commented Jan 15, 2020

I am trying to route an xml file to a remote xsd schema for validation, using the validator component, and whenever a valid https;// URL is entered, all parts of the route fails and the integration hangs with no error outputs.

I know when the URL is invalid as there would errors in the console log.

Is using the validator component the correct / preferred method of validating xml in Camel-K?

  from("Source:{{my.sourceType}}:{{my.sourceName}}")
          .streamCaching()
          .doTry()
            .to("validator:{{my.xsdSchemaPath}}")
            .log("Received validated source ${body}")
            .to(ExchangePattern.InOnly, "Target1:{{my.targetType1}}:{{my.targetName1}}")
            .log("Messsage sent to target 1 :: ${body}")
            .to(ExchangePattern.InOnly, "Target2:{{my.targetType2}}:{{my.targetName2}}")
            .log("Messsage sent to target 2 :: ${body}")
          .doCatch(ValidationException.class)
            .log("FAILURE")
          .endDoTry();

Console output on valid URL:

image

@Jonathan-Eid Jonathan-Eid changed the title Camel K Validator hangs on URL input Camel K Validator Component hangs on URL input Jan 15, 2020
@lburgazzoli
Copy link
Contributor

It looks like there is a logging clash, can you please provide some more info about the dependencies, the command you are using to run the integration and so on ?

@nicolaferraro nicolaferraro added this to the 1.0.0-RC2 milestone Jan 16, 2020
@Jonathan-Eid
Copy link
Author

This is the config map for the integration

apiVersion: v1
kind: ConfigMap
metadata:
name: test-config-routebuilder
data:
application.properties: |
my.sourceBrokerType=activemq
my.sourceUser=
my.sourcePass=
my.sourceURI=tcp://-------:61616
my.sourceType=queue
my.sourceName=testconfig.queue
my.targetBrokerType1 = activemq
my.targetUser1=
my.targetPass1=
my.targetURI1=tcp://--------:32191
my.targetType1=topic
my.targetName1=testconfig.topic
my.targetBrokerType2 = artemis
my.targetUser2=artemis
my.targetPass2=simetraehcapa
my.targetURI2=tcp://--------:32192
my.targetType2=queue
my.targetName2=testconfig.queue
my.xsdSchemaPath=https://bin.jvnv.net/file/stSwQ/foo-schema.xsd

This is the command to run the integration:

kamel run --configmap=test-config-routebuilder -d mvn:org.apache.activemq:activemq-all:5.5.1 -d mvn:org.apache.activemq:activemq-camel:5.5.1 -d mvn:org.apache.activemq:artemis-jms-client-all:2.10.1 --dependency=camel-validator RouteBuilderTest.java

@Jonathan-Eid
Copy link
Author

Connection time out error

image

@lburgazzoli
Copy link
Contributor

I'm not sure you need to explicit add all the activemq deps as from camel 3.0 the camel-activemq has been moved to the apache camel repository so you may just need -d camel:activemq

@oscerd should know better

@oscerd
Copy link
Contributor

oscerd commented Jan 16, 2020

on camel 3 the activemq component is camel-activemq and not activemq-camel

@Jonathan-Eid
Copy link
Author

Is there anyway to package a file inside the pod at integration creation

@oscerd
Copy link
Contributor

oscerd commented Jan 16, 2020

so you need to specify it as a camel dependency. --dependency=camel-activemq

@nicolaferraro
Copy link
Member

Is there anyway to package a file inside the pod at integration creation

You should use kamel run --resource thefile.xsd Intgegration.java to package the file in the pod as resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants