Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Communication Anylogic/ OPC UA Server
August 14, 2018
12:36, EEST
Avatar
patrick123
Member
Members
Forum Posts: 4
Member Since:
August 14, 2018
sp_UserOfflineSmall Offline

Hello,

I have integrated an OPC Client into Anylogic to allow data exchange between Anylogic and an OPC UA Server. For that i am using the Prosys OPC UA Java SDK (v2.3.2-781).
The server and Anylogic are running on the same computer.
On my computer the whole system works fine.

My problem is the following:

I have installed the System on another computer. When i am starting the simulation, the following error occurs in Anylogic:
https://drive.google.com/drive/folders/1g2Tzz1T3NcC9qQhVkv8KXWapokKiFI2X?usp=sharing

Although I use the same
– Prosys OPC UA Java SDK
– Version of Anylogic
– Java-SDK (jdk-9.0.4 – i also tried other jdk-versions)
– UA SDK C++ bundle (v1.5.5-355)
it does not work.

What could be the reason for the error?
I would appreciate any help. Thank you!

August 14, 2018
12:53, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 620
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

At the moment our Prosys OPC UA Java SDK is tested and works on java versions 6,7,8. Therefore please install and use a Java 8 runtime (or older). After java 11 is released in next month we hope to support it as it has options for LTS (long term support), i.e. 9 is already out-of-support with java 10 and 10 will be after 11 is released (next month).

In practice this issue happens because Java 9 changed on how reflection works (see e.g. https://stackoverflow.com/questions/41265266/how-to-solve-inaccessibleobjectexception-unable-to-make-member-accessible-m).

If possible, could you tell what operating system where this fails? Because I have run some tests on java 10 on windows 10 where the defaults allowed the reflection; it could be that this is platform specific.

August 14, 2018
13:59, EEST
Avatar
patrick123
Member
Members
Forum Posts: 4
Member Since:
August 14, 2018
sp_UserOfflineSmall Offline

Hello Bjarne,

thanks for your quick reply!

That was my thought, too.
So I tried to run the model with Java versions 8 and 10 (jdk-8u181, jdk-10.0.2), but it still does not work and I get the same error.

Do you know anything else that could be responsible for causing the issue?

I am running Windows 10, too.

August 14, 2018
14:25, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 620
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Could you please doublecheck that it is actually 8 that is used to run. In practice it should be impossible at least to get the same exception on 8, as the class InaccessibleObjectException is added in Java 9.. https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/InaccessibleObjectException.html

August 16, 2018
12:40, EEST
Avatar
patrick123
Member
Members
Forum Posts: 4
Member Since:
August 14, 2018
sp_UserOfflineSmall Offline

Hello Bjarne,

O.K. that’s weird.
I checked the Java version that is running and it is actually Java 8. There are no further Java versions installed. But curiously I still get the exception.

August 16, 2018
14:48, EEST
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

This does sound very interesting. Could you change the SDK logging level to DEBUG and provide the full resulting log file to us? From this file, we can see the exact Java runtime version.

With log4j logging, you can set the log level with
log4j.logger.com.prosysopc.ua=DEBUG

The log file can become very large; if you have problems pasting it here to the forum, you may also send it by email to us at uajava-support prosysopc.com.

August 19, 2018
15:39, EEST
Avatar
patrick123
Member
Members
Forum Posts: 4
Member Since:
August 14, 2018
sp_UserOfflineSmall Offline

Hello,

I have changed the logging level and send an email with the results of the log file to your given address.

Thank you very much for your help!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 109

pramanj: 86

ibrahim: 71

kapsl: 57

gjevremovic: 49

TimK: 41

fred: 41

Fransua33: 39

Xavier: 34

Thomas Reuther: 33

Member Stats:

Guest Posters: 0

Members: 1221

Moderators: 15

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1089

Posts: 4591

Newest Members:

aravindj, Deniz.Turan, DenizT, igonzalez, lavonwinters963, felicapurdy9, shoshanastopford, UlrichFM, majaba, Yash_Joshi_Pratiti

Moderators: Jouni Aro: 865, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 620, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Teppo Uimonen: 21, Markus Johansson: 30, Matti Siponen: 92, Lusetti: 0

Administrators: admin: 1