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
Android Development - warning messages and long connection time
July 18, 2012
21:07, EEST
Avatar
M.Zerwes
Member
Members
Forum Posts: 5
Member Since:
May 26, 2012
sp_UserOfflineSmall Offline

Hello,
I’m evaluating OPC UA Java SDK on Android. Is there a way to properly use log4j properly (with binary edition of the SDK)? Warn Messages:
07-18 20:28:43.217: W/System.err(723): log4j:WARN No appenders could be found for logger (com.prosysopc.ua.UaApplication).
07-18 20:28:43.388: W/System.err(723): log4j:WARN Please initialize the log4j system properly.
I tried adding log4j-over-slf4j) as described in http://stackoverflow.com/quest…..in-android, without success so far…
UPDATE: log4j over slf4j working fine now, so this part can be skipped!

There are a lot of error messages concerning security negotiation and missing classes.
I added the 4 provided libraries to the java build path and marked them to be exportet to the device. Are there further steps required?
As you can see from logging, it takes a long time until connection is established (20:28:42 – 20:29:35), what could be the reason for it?
(This occurs on both Emulator and real device Android 2.3.3 and 4.0.3. See log below:

07-18 20:28:39.516: D/opcUAndroid(723): Loading 1 servers…
07-18 20:28:39.896: D/opcUAndroid(723): srv_sock=10.0.2.2:52520 / srv_path=/OPCUA/SampleConsoleServer
07-18 20:28:39.956: D/opcUAndroid(723): setServer(10.0.2.2:52520/OPCUA/SampleConsoleServer)
07-18 20:28:40.036: D/gralloc_goldfish(723): Emulator without GPU emulation detected.
07-18 20:28:42.617: D/opcUAndroid(723): try_connect()…
07-18 20:28:43.147: I/System.out(723): * Prosys OPC UA Java SDK v0.0
07-18 20:28:43.147: I/System.out(723): * (c) Prosys PMS Ltd.
07-18 20:28:43.167: I/System.out(723): * Running in EVALUATION mode
07-18 20:28:43.167: I/System.out(723): * Connections will close after 120 minutes
07-18 20:28:43.217: W/System.err(723): log4j:WARN No appenders could be found for logger (com.prosysopc.ua.UaApplication).
07-18 20:28:43.388: W/System.err(723): log4j:WARN Please initialize the log4j system properly.
07-18 20:28:45.287: D/dalvikvm(723): GC_CONCURRENT freed 136K, 3% free 9339K/9607K, paused 48ms+11ms
07-18 20:29:02.137: W/dalvikvm(723): VFY: unable to find class referenced in signature (Lsun/security/x509/GeneralNames;)
07-18 20:29:02.137: I/dalvikvm(723): Could not find method sun.security.x509.GeneralNames.isEmpty, referenced from method com.prosysopc.ua.PkiFileBasedCertificateValidator.a
07-18 20:29:02.137: W/dalvikvm(723): VFY: unable to resolve virtual method 25039: Lsun/security/x509/GeneralNames;.isEmpty ()Z
07-18 20:29:02.147: D/dalvikvm(723): VFY: replacing opcode 0x6e at 0x0000
07-18 20:29:02.247: E/dalvikvm(723): Could not find class ‘sun.security.util.DerValue’, referenced from method com.prosysopc.ua.PkiFileBasedCertificateValidator.getSubjectAlternativeNames
07-18 20:29:02.247: W/dalvikvm(723): VFY: unable to resolve new-instance 3511 (Lsun/security/util/DerValue;) in Lcom/prosysopc/ua/PkiFileBasedCertificateValidator;
07-18 20:29:02.257: D/dalvikvm(723): VFY: replacing opcode 0x22 at 0x000a
07-18 20:29:02.467: D/dalvikvm(723): DexOpt: unable to opt direct call 0x61c6 at 0x42 in Lcom/prosysopc/ua/PkiFileBasedCertificateValidator;.a
07-18 20:29:02.477: D/dalvikvm(723): DexOpt: unable to opt direct call 0x61c8 at 0x0c in Lcom/prosysopc/ua/PkiFileBasedCertificateValidator;.getSubjectAlternativeNames
07-18 20:29:02.477: D/dalvikvm(723): DexOpt: unable to opt direct call 0x61d4 at 0x17 in Lcom/prosysopc/ua/PkiFileBasedCertificateValidator;.getSubjectAlternativeNames
07-18 20:29:03.547: D/dalvikvm(723): GC_CONCURRENT freed 61K, 2% free 9674K/9863K, paused 11ms+10ms
07-18 20:29:06.227: D/dalvikvm(723): GC_CONCURRENT freed 397K, 6% free 9732K/10247K, paused 12ms+11ms
07-18 20:29:10.077: D/dalvikvm(723): GC_CONCURRENT freed 341K, 5% free 9840K/10311K, paused 14ms+10ms
07-18 20:29:14.366: D/dalvikvm(723): GC_CONCURRENT freed 240K, 4% free 10009K/10375K, paused 13ms+12ms
07-18 20:29:17.057: D/dalvikvm(723): GC_CONCURRENT freed 343K, 5% free 10108K/10567K, paused 12ms+12ms
07-18 20:29:20.147: D/dalvikvm(723): GC_CONCURRENT freed 333K, 5% free 10202K/10695K, paused 12ms+12ms
07-18 20:29:21.587: D/dalvikvm(723): GC_CONCURRENT freed 422K, 6% free 10211K/10823K, paused 13ms+12ms
07-18 20:29:22.928: D/dalvikvm(723): GC_CONCURRENT freed 364K, 6% free 10233K/10823K, paused 44ms+11ms
07-18 20:29:23.907: D/dalvikvm(723): GC_FOR_ALLOC freed 337K, 6% free 10255K/10823K, paused 128ms
07-18 20:29:24.057: D/dalvikvm(723): GC_FOR_ALLOC freed 25K, 6% free 10251K/10823K, paused 146ms
07-18 20:29:24.837: D/dalvikvm(723): GC_FOR_ALLOC freed 388K, 6% free 10295K/10887K, paused 130ms
07-18 20:29:25.287: D/dalvikvm(723): GC_FOR_ALLOC freed 231K, 6% free 10291K/10887K, paused 126ms
07-18 20:29:25.297: I/dalvikvm-heap(723): Grow heap (frag case) to 10.295MB for 184528-byte allocation
07-18 20:29:25.457: D/dalvikvm(723): GC_FOR_ALLOC freed 130K, 7% free 10341K/11079K, paused 167ms
07-18 20:29:26.527: D/dalvikvm(723): GC_CONCURRENT freed 373K, 7% free 10381K/11079K, paused 13ms+12ms
07-18 20:29:27.466: D/dalvikvm(723): GC_CONCURRENT freed 401K, 7% free 10376K/11079K, paused 12ms+14ms
07-18 20:29:27.667: D/dalvikvm(723): GC_FOR_ALLOC freed 24K, 7% free 10351K/11079K, paused 201ms
07-18 20:29:27.667: I/dalvikvm-heap(723): Grow heap (frag case) to 10.442MB for 276788-byte allocation
07-18 20:29:27.827: D/dalvikvm(723): GC_FOR_ALLOC freed 190K, 9% free 10431K/11399K, paused 147ms
07-18 20:29:28.696: D/dalvikvm(723): GC_CONCURRENT freed 270K, 7% free 10642K/11399K, paused 12ms+14ms
07-18 20:29:28.866: D/dalvikvm(723): GC_FOR_ALLOC freed <1K, 7% free 10642K/11399K, paused 167ms
07-18 20:29:28.877: I/dalvikvm-heap(723): Grow heap (frag case) to 10.668MB for 216374-byte allocation
07-18 20:29:29.056: D/dalvikvm(723): GC_FOR_ALLOC freed 270K, 10% free 10583K/11655K, paused 172ms
07-18 20:29:30.636: D/dalvikvm(723): GC_CONCURRENT freed 770K, 13% free 10218K/11655K, paused 12ms+13ms
07-18 20:29:33.136: D/dalvikvm(723): GC_CONCURRENT freed 331K, 12% free 10353K/11655K, paused 12ms+16ms
07-18 20:29:35.237: D/opcUAndroid(723): connect[OK]. ServerTime: 2012-07-18T202935.410)
I’m looking forward to your reply,

With best regards,
M.Zerwes

July 23, 2012
9:54, EEST
Avatar
M.Zerwes
Member
Members
Forum Posts: 5
Member Since:
May 26, 2012
sp_UserOfflineSmall Offline

Hello,
is there anybody who can help with the connection issue?

We are right now seeing another issue in conjunction with MatrikonOPC UCS:
I can read a value from the Server, but I don’t necessarily get the correct value.
After an intermediate read with e.g. UaExpert for Windows, I can read exact that
value with both my Android Client and the SampleConsoleClient.
Another read still shows the exact same value.

Has andybody experienced this issue or a troubleshooting method / solution for it?

Kind regards,
M.Zerwes

July 23, 2012
11:00, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1010
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Sorry for the delay in responding. We are a bit unmanned during the vacation period…

The UA Java Stack does not currently work with security: Android has a limited version of the Bouncy Castle library, which is used by the Java Stack. I hope tho issue will be resolved in future versions of the OPC Foundation Java Stack.

The connection issue seems a bit strange. I have not heard of similar delays in connection. From your log it looks like it’s loading the classes this long.

Also the read problem sound strange. read() should be a straight forward call to the server, so I do not know why it would provide an old value.

Is it working better with the Java SampleConsoleServer? Can you use logging in the server side to verify what is happening.

Also you could install Wireshark and examine the OPCUA traffic between the applications with it.

August 29, 2012
9:42, EEST
Avatar
M.Zerwes
Member
Members
Forum Posts: 5
Member Since:
May 26, 2012
sp_UserOfflineSmall Offline

Hello,
We switched to using another OPC UA Server for our tests, so the Issue can be closed and needs no further investigation.

Kind regards,
M.Zerwes

August 29, 2012
10:03, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1010
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

OK, thanks for the heads up!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
24 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1