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

Subscribe() tries to cast S7Tag to S7SubscriptionTag and fails [Bug]: #1444

Open
2 of 16 tasks
mrwhy-orig opened this issue Mar 6, 2024 · 1 comment
Open
2 of 16 tasks
Labels
bug java Pull requests that update Java code S7 https://plc4x.apache.org/users/protocols/s7.html

Comments

@mrwhy-orig
Copy link
Contributor

What happened?

Use the hello-world-plc4x-subscribe example and try to subscribe to a value change.

The subscription leads to following exception:

Exception in thread "Thread-0" java.lang.ClassCastException: class org.apache.plc4x.java.s7.readwrite.tag.S7Tag cannot be cast to class org.apache.plc4x.java.s7.readwrite.tag.S7SubscriptionTag (org.apache.plc4x.java.s7.readwrite.tag.S7Tag and org.apache.plc4x.java.s7.readwrite.tag.S7SubscriptionTag are in unnamed module of loader 'app')
	at org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.lambda$23(S7ProtocolLogic.java:407)
	at java.base/java.lang.Thread.run(Thread.java:829)

Version

v0.12.0

Programming Languages

  • plc4j
  • plc4go
  • plc4c
  • plc4net

Protocols

  • AB-Ethernet
  • ADS /AMS
  • BACnet/IP
  • CANopen
  • DeltaV
  • DF1
  • EtherNet/IP
  • Firmata
  • KNXnet/IP
  • Modbus
  • OPC-UA
  • S7
@mrwhy-orig mrwhy-orig added the bug label Mar 6, 2024
@chrisdutz
Copy link
Contributor

I actually can't confirm this behavior on the current SNAPSHOT version, can it be closed?

@splatch splatch added java Pull requests that update Java code S7 https://plc4x.apache.org/users/protocols/s7.html pending-close labels Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug java Pull requests that update Java code S7 https://plc4x.apache.org/users/protocols/s7.html
Projects
None yet
Development

No branches or pull requests

4 participants