I just cloned the rel/0.6 branch from git, until now I didn't change anything. Regards,, Etienne
On 2020/02/18 11:10:39, Julian Feinauer <[email protected]> wrote: > Did you post your code somewhere? I cant find it.. just post it somewhere and > I will have a look! > > Julian > > Am 18.02.20, 11:28 schrieb "Etienne Robinet" <[email protected]>: > > Hi Julian, > thanks for the advice, but where should I change the code to apply your > modification? Is it in the doStart() methode of de PLC4XConsumer? > Regards, > > Etienne > > On 2020/02/18 08:55:22, Julian Feinauer <[email protected]> > wrote: > > Hi Etienne, > > > > thank you for your investigation. > > I just locked at your log and it seems that connection works fine and > some messages are exchanged BUT you try to subscribe to a Value which is > currently not supported. > > Try to just use the "readRequestBuilder().addItem("", > "").build().execute().get()" approach to send a single request, that should > work. > > > > Best > > Julian > > > > Am 18.02.20, 09:39 schrieb "Etienne Robinet" <[email protected]>: > > > > Hello, > > with the help of some colleague we managed to find how to fix the > issue so that the DriverManager can find the actual s7 protocol. > > All I had to do is to create a maven project (karaf-blueprint) > archetype and do as follow: > > > > 1. Inside the pom, add the S7PlcDriver under "imports" > > 2. create a service under > main/java/resources/META-INF/services/xxx.xxx.PlcDriver containing the > implementation (S7PlcDriver) and license > > 3. Create a simple XML blueprint (with a real address this time > connected to a real PLC) > > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" > default-activation="lazy"> > > > > <camelContext id="PLC-Context" > xmlns="http://camel.apache.org/schema/blueprint" streamCache="true"> > > > > > > <route id="Route1"> > > > > <from uri="plc4x:s7://192.168.178.10/1/1"/> > > <log message=" Sending ${body}" loggingLevel="INFO" /> > > <to uri="mock:test?retainLast=10" /> > > > > </route> > > > > </camelContext> > > > > </blueprint> > > > > So now I have the next issue, I can see from the log that a > connection is established but it tells me that the connection doesn't support > connection. Am I missing a parameter or what could be the issue? > > > > Here the log: > > > > https://i.imgur.com/KgWz8DF.png > > > > On 2020/02/17 12:11:56, Christofer Dutz <[email protected]> > wrote: > > > Hi all, > > > > > > having a more detailed look at the log-trace, it seems the > DriverManager isn't able to find the S7 driver at all ... > > > But I guess if it even was available, as Cesar pointed out, the > field address is that of the mock driver and not of the S7 so this will not > work. > > > Also are you connecting to localhost, which is also probably not > what you want. Unless you are running a S7 simulator on your machine. > > > > > > Depending of if you're using a released version of the s7 driver > the connection URL is correct, however if you switch to the new S7 driver it > would look like this: s7://{ip or host} > > > Not the "/1/1" are now missing. > > > > > > Chris > > > > > > > > > > > > > > > Am 17.02.20, 13:04 schrieb "Cesar Garcia" > <[email protected]>: > > > > > > Hi, > > > > > > The PLC address does not look correct, can you confirm that > it really > > > points to a real PLC or an S7 simulator? > > > > > > <from uri="plc4x:s7:localhost/1/1"/> > > > > > > Best regards, > > > > > > > > > El vie., 14 feb. 2020 a las 18:34, Etienne Robinet > (<[email protected]>) > > > escribió: > > > > > > > Hello everyone, > > > > I've spent some days trying to figure out how to make PLC4X > work inside a > > > > karaf container in combination with camel blueprints for > routing. > > > > I've downloaded the latest release (0.5.0) and built it > with maven. I then > > > > installed the driver-s7-feature and plc4j-apache-camel > bundle into my > > > > container and got following bundles running: > > > > > > > > >PLC4J: API > > > > >PLC4J: Driver: S7 > > > > >PLC4J: Protocol: Driver-Base: Base > > > > >PLC4J: Protocol: Driver-Base: TCP > > > > >PLC4J: Protocol: ISO on TCP > > > > >PLC4J: Protocol: ISO TP > > > > >PLC4J: Protocol: S7 > > > > >PLC4j: Utils: Driver Base: Java > > > > >PLC4J: Integrations: Apache Camel > > > > > > > > After trying a simple route with this consumer component: > > > > <from uri="plc4x:s7:localhost/1/1"/> (the address is for > testing purpose) > > > > I get the following error: > > > > Error occurred during starting CamelContext: PLC-Context > > > > org.apache.camel.FailedToCreateRouteException: Failed to > create route > > > > Route1: Route(Route1)[[From[plc4x:s7:localhost/1/1]] -> > [To[mock:tes... > > > > because of Unable to find driver for protocol 's7' > > > > > > > > I've tested numerous version of PLC4X and got the same > results, so I think > > > > I might be close to fix it! > > > > Any help would be appreciated! > > > > > > > > Here the full log > > > > > > > > 16:30:45.578 INFO [Blueprint Event Dispatcher: 1] > Attempting to start > > > > CamelContext: PLC-Context > > > > 16:30:45.579 INFO [Blueprint Event Dispatcher: 1] Apache > Camel 2.24.2 > > > > (CamelContext: PLC-Context) is starting > > > > 16:30:45.580 INFO [Blueprint Event Dispatcher: 1] > StreamCaching is enabled > > > > on CamelContext: PLC-Context > > > > 16:30:45.580 INFO [Blueprint Event Dispatcher: 1] JMX is > enabled > > > > 16:30:45.600 INFO [Blueprint Event Dispatcher: 1] > Instantiating new PLC > > > > Driver Manager with class loader > > > > BundleDelegatingClassLoader(plc4j-route.xml [67]) > > > > 16:30:45.600 INFO [Blueprint Event Dispatcher: 1] > Registering available > > > > drivers... > > > > 16:30:45.601 TRACE [Blueprint Event Dispatcher: 1] > FindResource: > > > > META-INF/services/org.apache.plc4x.java.spi.PlcDriver > > > > 16:30:45.627 INFO [Blueprint Event Dispatcher: 1] > StreamCaching in use > > > > with spool directory: > > > > > C:\karaf\bin\..\data\tmp\camel\camel-tmp-00f849ac-0ccf-4b12-822d-dda62267eb6c > > > > and rules: [Spool > 128K body size] > > > > 16:30:45.629 INFO [Blueprint Event Dispatcher: 1] Apache > Camel 2.24.2 > > > > (CamelContext: PLC-Context) is shutting down > > > > 16:30:45.639 INFO [Blueprint Event Dispatcher: 1] Apache > Camel 2.24.2 > > > > (CamelContext: PLC-Context) uptime 0.060 seconds > > > > 16:30:45.640 INFO [Blueprint Event Dispatcher: 1] Apache > Camel 2.24.2 > > > > (CamelContext: PLC-Context) is shutdown in 0.011 seconds > > > > 16:30:45.640 WARN [Blueprint Event Dispatcher: 1] Changing > Camel state for > > > > bundle 67 to Failure > > > > 16:30:45.641 ERROR [Blueprint Event Dispatcher: 1] Error > occurred during > > > > starting CamelContext: PLC-Context > > > > org.apache.camel.FailedToCreateRouteException: Failed to > create route > > > > Route1: Route(Route1)[[From[plc4x:s7:localhost/1/1]] -> > [To[mock:tes... > > > > because of Unable to find driver for protocol 's7' > > > > at > > > > > org.apache.camel.impl.RouteService.warmUp(RouteService.java:147) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3954) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3861) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3647) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3488) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3247) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3243) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3266) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3243) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3159) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:255) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:297) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:188) > > > > [!/:2.24.2] > > > > at > > > > > org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:190) > > > > [!/:1.10.2] > > > > at > > > > > org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:188) > > > > [!/:1.10.2] > > > > at > java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] > > > > at > > > > > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) > > > > [?:?] > > > > at > java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] > > > > at > > > > > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) > > > > [?:?] > > > > at > java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] > > > > at > > > > > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) > > > > [?:?] > > > > at > > > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > > > > [?:?] > > > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > > > > [?:?] > > > > at java.lang.Thread.run(Thread.java:834) [?:?] > > > > Caused by: > org.apache.plc4x.java.api.exceptions.PlcConnectionException: > > > > Unable to find driver for protocol 's7' > > > > at > > > > > org.apache.plc4x.java.PlcDriverManager.getDriver(PlcDriverManager.java:98) > > > > ~[?:?] > > > > at > > > > > org.apache.plc4x.java.PlcDriverManager.getConnection(PlcDriverManager.java:71) > > > > ~[?:?] > > > > at > > > > > org.apache.plc4x.camel.Plc4XConsumer.<init>(Plc4XConsumer.java:57) ~[?:?] > > > > at > > > > > org.apache.plc4x.camel.Plc4XEndpoint.createConsumer(Plc4XEndpoint.java:72) > > > > ~[?:?] > > > > at > > > > > org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:69) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:107) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.RouteService.doWarmUp(RouteService.java:172) > > > > ~[!/:2.24.2] > > > > at > > > > > org.apache.camel.impl.RouteService.warmUp(RouteService.java:145) > > > > ~[!/:2.24.2] > > > > ... 24 more > > > > > > > > > > > > > > > > > > -- > > > *CEOS Automatización, C.A.* > > > *GALPON SERVICIO INDUSTRIALES Y NAVALES FA, C.A.,* > > > *PISO 1, OFICINA 2, AV. RAUL LEONI, SECTOR GUAMACHITO,* > > > > > > *FRENTE A LA ASOCIACION DE GANADEROS,BARCELONA,EDO. > ANZOATEGUI* > > > *Ing. César García* > > > *Cel: 0416-681.03.99* > > > > > > *Cel: 0414-760.98.95* > > > > > > *Hotline Técnica SIEMENS: 0800 1005080* > > > > > > *Email: [email protected] > > > <[email protected]>* > > > > > > > > > > > > > > > > > >
