rapetum228 commented on issue #1132:
URL: https://github.com/apache/camel-karavan/issues/1132#issuecomment-2043043627

   @davsclaus I attach the test repository 
https://github.com/rapetum228/karavan-test.
   Test project files https://github.com/rapetum228/karavan-test/tree/main/test
   
   Everything works in DEV mode. When I run it through 'Run' in web IDE
   
   
![image](https://github.com/apache/camel-karavan/assets/90648341/fd8ac355-77bb-4788-81d7-1580f89f8b57)
   
    Except that JsonSchemaValidator sees any string as correct when an 
incorrect time format is sent. For example
    ```json
    {
       "eventTime": "incirrect date-time string",
       "id": 1,
       "name": "test"
   }
    ```
   And when I build a finished image, using "Build"
   
![image](https://github.com/apache/camel-karavan/assets/90648341/49bddf10-37b5-4767-9e16-74425fdaad0e)
   
   And run it from the registry, for example with this command 
   
   ````cmd
   docker run -p 8097:8080 localhost:5555/karavan/test:dev
   ```
   
   Then I get this error when sending a message:
   ```markdown
   <a name="log-error"></a>
   <details>
     <summary markdown="span">Log of error</summary>
   ```log
   2024-04-08 14:57:10.055 ERROR 1 --- [worker-thread-0] 
or.errorhandler.DefaultErrorHandler : Failed delivery for (MessageId: 
F56780053D81F7B-0000000000000000 on ExchangeId: 
F56780053D81F7B-0000000000000000). Exhausted after delivery attempt: 1 caught: 
java.io.FileNotFoundException: my-validator.json does not exist
   
   Message History (source location and message history is disabled)
   
---------------------------------------------------------------------------------------------------------------------------------------
   Source                                   ID                             
Processor                                          Elapsed (ms)
                                            post-2bc7/post-2bc7            
from[platform-http:///test?httpMethodRestrict=POST           18
   
   Stacktrace
   
---------------------------------------------------------------------------------------------------------------------------------------
   java.io.FileNotFoundException: my-validator.json does not exist
           at 
org.apache.camel.impl.engine.DefaultResourceResolvers$FileResolver$1.getInputStream(DefaultResourceResolvers.java:76)
 ~[test-1.jar:?]
           at 
org.apache.camel.support.ResourceHelper.resolveResourceAsInputStream(ResourceHelper.java:133)
 ~[test-1.jar:?]        at 
org.apache.camel.support.ResourceHelper.resolveMandatoryResourceAsInputStream(ResourceHelper.java:111)
 ~[test-1.jar:?]
           at 
org.apache.camel.component.jsonvalidator.DefaultJsonUriSchemaLoader.createSchema(DefaultJsonUriSchemaLoader.java:44)
 ~[test-1.jar:?]
           at 
org.apache.camel.component.jsonvalidator.JsonValidatorEndpoint.getOrCreateSchema(JsonValidatorEndpoint.java:183)
 ~[test-1.jar:?]
           at 
org.apache.camel.component.jsonvalidator.JsonValidatorEndpoint.onExchange(JsonValidatorEndpoint.java:118)
 ~[test-1.jar:?]
           at 
org.apache.camel.support.ProcessorEndpoint$1.process(ProcessorEndpoint.java:61) 
~[test-1.jar:?]
           at 
org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:65)
 ~[test-1.jar:?]
           at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:210) 
~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.CamelInternalProcessor.processNonTransacted(CamelInternalProcessor.java:354)
 ~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:330)
 ~[test-1.jar:?]
           at 
org.apache.camel.processor.Pipeline$PipelineTask.run(Pipeline.java:102) 
~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.doRun(DefaultReactiveExecutor.java:199)
 ~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.executeReactiveWork(DefaultReactiveExecutor.java:189)
 ~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.tryExecuteReactiveWork(DefaultReactiveExecutor.java:166)
 ~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
 ~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:59)
 ~[test-1.jar:?]
           at org.apache.camel.processor.Pipeline.process(Pipeline.java:163) 
~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.CamelInternalProcessor.processNonTransacted(CamelInternalProcessor.java:354)
 ~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:330)
 ~[test-1.jar:?]
           at 
org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:82)
 ~[test-1.jar:?]
           at 
org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:32)
 ~[test-1.jar:?]
           at 
org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer.processExchange(VertxPlatformHttpConsumer.java:236)
 ~[test-1.jar:?]
           at 
org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer.lambda$handleRequest$1(VertxPlatformHttpConsumer.java:204)
 ~[test-1.jar:?]
           at 
io.vertx.core.impl.ContextImpl.lambda$executeBlocking$0(ContextImpl.java:177) 
~[test-1.jar:?]
           at 
io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:276) 
~[test-1.jar:?]
           at 
io.vertx.core.impl.ContextImpl.lambda$internalExecuteBlocking$2(ContextImpl.java:209)
 ~[test-1.jar:?]
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
 [?:?]
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 [?:?]
           at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 [test-1.jar:?]
           at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
   ```
   </details>
   <br/>
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to