Skip to Content
0
Former Member
Feb 05, 2016 at 12:44 PM

How-to Build an Agentry Based Mobile App from Scratch Connecting to an SAP Back-end Part 1

63 Views

Hi All

I use next document

How-to Build an Agentry Based Mobile App from Scratch Connecting to an SAP Back-end Part 1

to understand How-to Build an Agentry Based Mobile App from Scratch Connecting to an SAP Back-end Part 1

I use

- Java 8 update 66

- Eclipse Version: 4.2.2

Build id: M20130204-1200

- Agentry Editor Plugin 70.10.0.9 com.syclo.agentry.editor.feature.feature.group SAP AG

from Agentry_70.10.0_EditorPlugin_x86_64.zip

On the page 109 it is read:

16. Save the Agentry.ini file

17. Start your Agentry Server (Restart if it is already running)

18. Your Agentry Server should now start without any error.

When I restarted the SMP I got next errors in the

C:\SAP\MobilePlatform3\Server\log\agentry\events.log

-----

02/05/2016 13:56:45, 0, 0, 0, Thr 2220, New files opened events.log, messages.log

02/05/2016 13:56:45, 0, 0, 2, Thr 2220, Loading the Agentry Runtime's public/private key for password exchanges.

02/05/2016 13:56:45, 0, 0, 2, Thr 2220, Key pair loaded successfully.

02/05/2016 13:56:45, 0, 0, 2, Thr 2220, Agentry Startup

02/05/2016 13:56:45, 0, 1, 4, Thr 2220, Agentry Server Agent v130.7.0.4

02/05/2016 13:56:46, 0, 20, 150, Thr 4692, Loading Development application definitions

02/05/2016 13:56:47, 1, 20, 28, Thr 4692, Error starting Java System Connection Java-1: java.lang.NoClassDefFoundError: com/syclo/sap/Server

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:888)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:511)

at java.net.URLClassLoader.access$100(URLClassLoader.java:74)

at java.net.URLClassLoader$1.run(URLClassLoader.java:423)

at java.net.URLClassLoader$1.run(URLClassLoader.java:417)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:416)

at java.lang.ClassLoader.loadClass(ClassLoader.java:488)

at java.lang.ClassLoader.loadClass(ClassLoader.java:421)

Caused by: java.lang.ClassNotFoundException: com.syclo.sap.Server

at java.net.URLClassLoader$1.run(URLClassLoader.java:425)

at java.net.URLClassLoader$1.run(URLClassLoader.java:417)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:416)

at java.lang.ClassLoader.loadClass(ClassLoader.java:488)

at java.lang.ClassLoader.loadClass(ClassLoader.java:421)

... 11 more

Caused by: java.io.IOException: invalid header field name: Implementation-Build Number (C:\SAP\MobilePlatform3\Server\work\com.sap.mobile.platform.server.agentry.application.FlightBooking\4025878905697843920\4492238632760306006\SAPCommon-130881.jar:7)

at java.util.jar.Attributes.read(Attributes.java:457)

at java.util.jar.Manifest.read(Manifest.java:280)

at java.util.jar.Manifest.<init>(Manifest.java:87)

at java.util.jar.JarFile.getManifestFromReference(JarFile.java:182)

at java.util.jar.JarFile.getManifest(JarFile.java:166)

at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:771)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:478)

at java.net.URLClassLoader.access$100(URLClassLoader.java:74)

at java.net.URLClassLoader$1.run(URLClassLoader.java:423)

... 16 more

; (resolved class path: C:\SAP\MobilePlatform3\Server\configuration\com.sap.mobile.platform.server.agentry.application.FlightBooking\ini4j.jar;C:\SAP\MobilePlatform3\Server\configuration\com.sap.mobile.platform.server.agentry.application.FlightBooking\sapjco.jar;C:\SAP\MobilePlatform3\Server\configuration\com.sap.mobile.platform.server.agentry.application.FlightBooking\SAPCommon-130881.jar;C:\SAP\MobilePlatform3\Server\configuration\com.sap.mobile.platform.server.agentry.application.FlightBooking\ZFlightBooking.jar)javaBE.cpp#357:JavaBackEnd::init

02/05/2016 13:56:47, 0, 20, 152, Thr 4692, Loading Development application definitions for default localization

02/05/2016 13:56:47, 0, 20, 151, Thr 4692, Finished loading Development application definitions

02/05/2016 13:56:47, 0, 17, 14, Thr 2220, FlightBooking v130.7.0.4

02/05/2016 13:56:47, 0, 20, 4, Thr 2220, FlightBooking v130.7.0.4

02/05/2016 13:56:47, 0, 21, 4, Thr 2220, SAPWM62 v130.7.0.4

02/05/2016 13:56:47, 0, 22, 4, Thr 2220, SAPWM62_NEW v130.7.0.4

02/05/2016 13:56:47, 0, 17, 10, Thr 2220, FlightBooking v130.7.0.4

02/05/2016 13:56:47, 0, 0, 0, Thr 2220, Old log files moved into C:\SAP\MobilePlatform3\Server\log\agentry\rolled\2016-02-05-135644

02/05/2016 13:56:47, 0, 0, 23, Thr 2220, Agentry startup is complete.

02/05/2016 13:56:49, 0, 21, 5, Thr 2220, SAPWM62

02/05/2016 13:56:50, 0, 21, 150, Thr 4708, Loading Production application definitions using file "SAPWM-v1-0-0-app"

02/05/2016 13:56:50, 0, 21, 152, Thr 4708, Loading Production application definitions for default localization

02/05/2016 13:56:54, 0, 24, 4, Thr 4708, Loaded HTTP-XML Back End (HTTPXML v130.7.0.4) from ag3httpxmlbe.dll

02/05/2016 13:56:56, 0, 23, 4, Thr 4708, Loaded Java Back End (Java v130.7.0.4) from ag3javabe.dll

02/05/2016 13:56:57, 0, 21, 153, Thr 4708, Finished loading Production application definitions for default localization

02/05/2016 13:56:57, 0, 21, 151, Thr 4708, Finished loading Production application definitions using file "SAPWM-v1-0-0-app"

02/05/2016 13:56:57, 0, 17, 14, Thr 2220, SAPWM62 v130.7.0.4

02/05/2016 13:56:57, 0, 21, 4, Thr 2220, SAPWM62 v130.7.0.4

02/05/2016 13:56:57, 0, 17, 10, Thr 2220, SAPWM62 v130.7.0.4

02/05/2016 13:57:40, 0, 22, 5, Thr 2220, SAPWM62_NEW

02/05/2016 13:57:42, 0, 22, 150, Thr 4940, Loading Production application definitions using file "SAPWM-v1-0-0-app"

02/05/2016 13:57:43, 0, 22, 152, Thr 4940, Loading Production application definitions for default localization

02/05/2016 13:58:03, 0, 24, 4, Thr 4940, Loaded HTTP-XML Back End (HTTPXML v130.7.0.4) from ag3httpxmlbe.dll

02/05/2016 13:58:11, 0, 23, 4, Thr 4940, Loaded Java Back End (Java v130.7.0.4) from ag3javabe.dll

02/05/2016 13:58:11, 0, 22, 153, Thr 4940, Finished loading Production application definitions for default localization

02/05/2016 13:58:12, 0, 22, 151, Thr 4940, Finished loading Production application definitions using file "SAPWM-v1-0-0-app"

02/05/2016 13:58:12, 0, 22, 150, Thr 4940, Loading Production application definitions using file "SAPWM-v1-0-5-app"

02/05/2016 13:58:12, 0, 22, 152, Thr 4940, Loading Production application definitions for default localization

02/05/2016 13:58:28, 0, 22, 153, Thr 4940, Finished loading Production application definitions for default localization

02/05/2016 13:58:29, 0, 22, 151, Thr 4940, Finished loading Production application definitions using file "SAPWM-v1-0-5-app"

02/05/2016 13:58:29, 0, 22, 150, Thr 4940, Loading Production application definitions using file "SAPWM-v1-0-6-app"

02/05/2016 13:58:29, 0, 22, 152, Thr 4940, Loading Production application definitions for default localization

02/05/2016 13:58:42, 0, 22, 153, Thr 4940, Finished loading Production application definitions for default localization

02/05/2016 13:58:42, 0, 22, 151, Thr 4940, Finished loading Production application definitions using file "SAPWM-v1-0-6-app"

02/05/2016 13:58:43, 0, 22, 150, Thr 4940, Loading Production application definitions using file "SAPWM-v1-0-7-app"

02/05/2016 13:58:43, 0, 22, 152, Thr 4940, Loading Production application definitions for default localization

02/05/2016 13:59:01, 0, 22, 153, Thr 4940, Finished loading Production application definitions for default localization

02/05/2016 13:59:02, 0, 22, 151, Thr 4940, Finished loading Production application definitions using file "SAPWM-v1-0-7-app"

02/05/2016 13:59:02, 0, 22, 150, Thr 4940, Loading Production application definitions using file "SAPWM-v1-0-8-app"

02/05/2016 13:59:03, 0, 22, 152, Thr 4940, Loading Production application definitions for default localization

02/05/2016 13:59:20, 0, 22, 153, Thr 4940, Finished loading Production application definitions for default localization

02/05/2016 13:59:28, 0, 22, 151, Thr 4940, Finished loading Production application definitions using file "SAPWM-v1-0-8-app"

02/05/2016 13:59:28, 0, 22, 150, Thr 4940, Loading Production application definitions using file "SAPWM-v1-0-9-app"

02/05/2016 13:59:28, 0, 22, 152, Thr 4940, Loading Production application definitions for default localization

02/05/2016 13:59:43, 0, 22, 153, Thr 4940, Finished loading Production application definitions for default localization

02/05/2016 13:59:47, 0, 22, 151, Thr 4940, Finished loading Production application definitions using file "SAPWM-v1-0-9-app"

02/05/2016 13:59:47, 0, 22, 150, Thr 4940, Loading Production application definitions using file "SAPWM-v1-0-11-app"

02/05/2016 13:59:47, 0, 22, 152, Thr 4940, Loading Production application definitions for default localization

02/05/2016 14:00:10, 0, 22, 153, Thr 4940, Finished loading Production application definitions for default localization

02/05/2016 14:00:11, 0, 22, 151, Thr 4940, Finished loading Production application definitions using file "SAPWM-v1-0-11-app"

02/05/2016 14:00:19, 0, 17, 14, Thr 2220, SAPWM62_NEW v130.7.0.4

02/05/2016 14:00:19, 0, 22, 4, Thr 2220, SAPWM62_NEW v130.7.0.4

02/05/2016 14:00:22, 1, 2, 48, Thr 4940, EADDRINUSE, Attempt to listen on an address in use, ..\Socket\win32\sockets.cpp#1438:ListeningStreamSocket::OSListeningSocket::listenOn

02/05/2016 14:00:25, 1, 2, 48, Thr 4940, EADDRINUSE, Attempt to listen on an address in use, ..\Socket\win32\sockets.cpp#1438:ListeningStreamSocket::OSListeningSocket::listenOn

02/05/2016 14:00:25, 1, 2, 48, Thr 4940, EADDRINUSE, Attempt to listen on an address in use, ..\Socket\win32\sockets.cpp#1438:ListeningStreamSocket::OSListeningSocket::listenOn

02/05/2016 14:00:25, 1, 2, 48, Thr 4940, EADDRINUSE, Attempt to listen on an address in use, ..\Socket\win32\sockets.cpp#1438:ListeningStreamSocket::OSListeningSocket::listenOn

02/05/2016 14:00:25, 1, 2, 48, Thr 4940, EADDRINUSE, Attempt to listen on an address in use, ..\Socket\win32\sockets.cpp#1438:ListeningStreamSocket::OSListeningSocket::listenOn

02/05/2016 14:00:25, 1, 2, 48, Thr 4940, EADDRINUSE, Attempt to listen on an address in use, ..\Socket\win32\sockets.cpp#1438:ListeningStreamSocket::OSListeningSocket::listenOn

02/05/2016 14:00:40, 0, 17, 10, Thr 2220, SAPWM62_NEW v130.7.0.4

02/05/2016 14:56:45, 0, 0, 7, Thr 4628,

-----

startup.log also looks not Ok

---

13:56:44 02/05/2016: Starting Agentry (64-bit Windows)

13:56:45 02/05/2016: Reading system ini file.

13:56:45 02/05/2016: Starting log file.

13:56:45 02/05/2016: Loading message groups.

13:56:45 02/05/2016: Starting threads.

13:56:45 02/05/2016: 1 initial threads. Threads will auto-scale.

13:56:45 02/05/2016: Event: 0, 2, Loading the Agentry Runtime's public/private key for password exchanges.

13:56:45 02/05/2016: Event: 0, 2, Key pair loaded successfully.

13:56:45 02/05/2016: Starting Agentry: Agentry Server Agent v130.7.0.4

13:56:45 02/05/2016: Event: 0, 2, Agentry Startup

13:56:45 02/05/2016: Loading 0 front ends

13:56:45 02/05/2016: Starting Agentry Server Agent

13:56:45 02/05/2016: Agentry Server Agent: Starting threads.

13:56:45 02/05/2016: 1 initial threads. Threads will auto-scale.

13:56:45 02/05/2016: Agentry Server Agent: Adding messages.

13:56:45 02/05/2016: Event: 1, 4, Agentry Server Agent v130.7.0.4

13:56:45 02/05/2016: Loading agent from ag3.dll

13:56:45 02/05/2016: Starting FlightBooking

13:56:45 02/05/2016: FlightBooking: reading config file

13:56:46 02/05/2016: Event: 20, 150, Loading Development application definitions

13:56:46 02/05/2016: Initializing Java-BackendSAPConnection from ag3javabe.dll

13:56:46 02/05/2016: BackendSAPConnection: Reading configuration information.

13:56:46 02/05/2016: BackendSAPConnection: Setting name to 'Java-1'.

13:56:46 02/05/2016: Java-1: Initialized.

13:56:46 02/05/2016: Java-1: Java Virtual Machine already initialized.

13:56:47 02/05/2016: Exception: 13:56:47 02/05/2016 : 20 (Agentry3), BackEndInitError (Error starting Java System Connection Java-1: java.lang.NoClassDefFoundError: com/syclo/sap/Server

), at java.lang.ClassLoader.defineClass1(Native Method)

13:56:47 02/05/2016: Failed to init Java-1 (Java v130.7.0.4) from ag3javabe.dll

13:56:47 02/05/2016: Event: 20, 152, Loading Development application definitions for default localization

13:56:47 02/05/2016: Event: 20, 151, Finished loading Development application definitions

13:56:47 02/05/2016: FlightBooking: Starting threads.

13:56:47 02/05/2016: 1 initial threads. Threads will auto-scale.

13:56:47 02/05/2016: Loading front end from angelvine

13:56:47 02/05/2016: FlightBooking: loading configuration

13:56:47 02/05/2016: Event: 17, 14, FlightBooking v130.7.0.4

13:56:47 02/05/2016: Event: 20, 4, FlightBooking v130.7.0.4

13:56:47 02/05/2016: Loading agent from ag3.dll

13:56:47 02/05/2016: Starting SAPWM62

13:56:47 02/05/2016: Event: 21, 4, SAPWM62 v130.7.0.4

13:56:47 02/05/2016: Loading agent from ag3.dll

13:56:47 02/05/2016: Starting SAPWM62_NEW

13:56:47 02/05/2016: Event: 22, 4, SAPWM62_NEW v130.7.0.4

13:56:47 02/05/2016: Starting front ends

13:56:47 02/05/2016: Starting front end FlightBooking

13:56:47 02/05/2016: FlightBooking: Opening WebSockets servlet for sub-URL /FlightBooking

13:56:47 02/05/2016: Event: 17, 10, FlightBooking v130.7.0.4

13:56:47 02/05/2016: Event: 0, 0, Old log files moved into C:\SAP\MobilePlatform3\Server\log\agentry\rolled\2016-02-05-135644

13:56:47 02/05/2016: Event: 0, 23, Agentry startup is complete.

---

My Agentry.ini file contains next info

----

[Configuration]

developmentServer=true

enableOverrideFile=Enables.ini

clientStringsFile=ClientText.ini

applicationStringsFile=ApplicationText.ini

applicationGlobalsFile=Globals.ini

clientStringNamesFile=ClientStringNames.ini

overrideTypesFile=OverrideTypes.ini

transmitConfigurationFile=TransmitConfigurations.ini

enableTransactionFailureHandling=false

enableFailedTransactionLogging=true

failedTransactionsQueue=FailedTransactionsQueue

failedTransactionFilenameFormat=%{userid} %{transaction_name} %{date} %{time}-%{count}.xml

apnsEnabled=true

apnsCertificateDirectory=apnsCertificates

apnsCertificatePassword=Rzdrj~SwixoAqzmbVxgi

apnsCertificatePasswordEncoded=true

gcmEnabled=true

gcmServerLink=https://android.googleapis.com/gcm/send

gcmServerAuthorizationKey=Authorization:key=AIzaSyDi0qWQEewdbmNSV_o9QNtSQrlxPnBXtBM

trustedCertificateStore=

[SpinDoc]

facePath=sql\custom;sql

;Use this section to enter TimeZoneAlias values

[TimeZoneAlias]

[Java-1]

enableAuthentication=true

classPath=./Java/Agentry-v5.jar;ini4j.jar;sapjco.jar;SAPCommon-130881.jar;ZFlightBooking.jar;

serverClass=com/syclo/sap/sflight/server/Server

----

and JavaBE.ini

---

[HOST]

server=192.168.0.192

APPNAME=Z00_FLIGHTBOOKING

[CONFIG]

source=SAP

[CLIENT_NUM]

CLIENT=100

[SYSTEM_NUM]

SYSNUM=00

[SERVICE_LOGON]

ENABLED=true

UID=DBOLSHAKOV

UPASSWORD=rbw,64;~yup2;-4sdq66

SERVERSERIALNUM=

[LANGUAGE]

LANG=EN

[LOGGING]

Level=4

[LOGON_METHOD]

LOGON_METHOD=USER_AUTH

;LOGON_METHOD=<logon method to SAP system>

;USER _AUTH - Standard User ID and password authentication is used.

;USER_AUTH_GLOBAL - Pooled connections using a single user ID and password; requires the section [GLOBAL_LOGON] to also be created.

;USER_AUTH_GROUP - User ID and password authentication with the SAP Message Server (load balancing) is used; requires the section [GROUP_LOGON] to also be created.

[GLOBAL_LOGON]

UID=

UPASSWORD=

SHAREDCONNECTION=100

[GROUP_LOGON]

MESSAGE_SERVER=

GROUP_NAME=

SYSTEM_ID=

CLIENT=

[REQUIRED_BAPI_WRAPPER]

com.syclo.sap.bapi.LoginCheckBAPI=/SYCLO/CORE_SUSR_LOGIN_CHECK

com.syclo.sap.bapi.RemoteUserCreateBAPI=/SYCLO/CORE_MDW_SESSION1_CRT

com.syclo.sap.bapi.RemoteParameterGetBAPI=/SYCLO/CORE_MDW_PARAMETER_GET

com.syclo.sap.bapi.SystemInfoBAPI=/SYCLO/CORE_SYSTINFO_GET

com.syclo.sap.bapi.ChangePasswordBAPI=/SYCLO/CORE_SUSR_CHANGE_PASSWD

com.syclo.sap.bapi.CTConfirmationBAPI=/SYCLO/CORE_OUTB_MSG_STAT_UPD

com.syclo.sap.bapi.DTBAPI=/SYCLO/CORE_DT_GET

com.syclo.sap.bapi.GetEmployeeDataBAPI=/SMERP/HR_DOEMPLOYEE_DATA_GET

com.syclo.sap.bapi.GetUserDetailBAPI=/SYCLO/CORE_USER_GET_DETAIL

com.syclo.sap.bapi.GetUserProfileDataBAPI=/SYCLO/CORE_USER_PROFILE_GET

com.syclo.sap.bapi.PushStatusUpdateBAPI=/SYCLO/CORE_PUSH_STAT_UPD

com.syclo.sap.bapi.RemoteObjectCreateBAPI=/SYCLO/CORE_MDW_USR_OBJ_CRT

com.syclo.sap.bapi.RemoteObjectDeleteBAPI=/SYCLO/CORE_MDW_USR_OBJ_DEL

com.syclo.sap.bapi.RemoteObjectGetBAPI=/SYCLO/CORE_MDW_SESSION_GET

com.syclo.sap.bapi.RemoteObjectUpdateBAPI=/SYCLO/CORE_MDW_SESSION_UPD

com.syclo.sap.bapi.RemoteReferenceCreateBAPI=/SYCLO/CORE_MDW_USR_KEYMAP_CRT

com.syclo.sap.bapi.RemoteReferenceDeleteBAPI=/SYCLO/CORE_MDW_USR_KEYMAP_DEL

com.syclo.sap.bapi.RemoteReferenceGetBAPI=/SYCLO/CORE_MDW_SESSION_GET

com.syclo.sap.bapi.RemoteReferenceUpdateBAPI=/SYCLO/CORE_MDW_SESSION_UPD

com.syclo.sap.bapi.RemoteSessionDeleteBAPI=/SYCLO/CORE_MDW_SESSION1_DEL

com.syclo.sap.bapi.RemoteUserDeleteBAPI=/SYCLO/CORE_MDW_SESSION1_DEL

com.syclo.sap.bapi.RemoteUserUpdateBAPI=/SYCLO/CORE_MDW_SESSION_UPD

com.syclo.sap.bapi.SignatureCaptureBAPI=/SMERP/CORE_DOBDSDOCUMENT_CRT

---