cancel
Showing results for 
Search instead for 
Did you mean: 

Problem at Startup of Agentry Server

Former Member
0 Kudos

I have followed the instructions from the PDF "How-to Build an Agentry Based Mobile App from Scratch Connecting to an SAP Back-end Part 1" and I have searched online for a solution, including various threads in this forum. But I still get this error when starting the Agentry server:

BackEndInitError (Java Back End - NoClassDefFoundError|java.lang.NoClassDefFoundError: com/syclo/sap/Server), at java.lang.ClassLoader.defineClass1(Native Method)

Failed to init Java Back End (Java v6.1.0.3 (JVM version 1.7.0, AJAPI version  build )) from ag3javabe.dll

I have all JARs and DLLs in the server directory, my Agentry.ini parameters are:

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

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

As you can see my classPath is correct (and I use the same files from this folder as build path in Eclipse):

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Jurgen,

You classpath matches mine so as you mention you should be good there.  Plesae take a look at my response on the following thread.

You will want to make sure you have updated your SAPCommon or you will end up with that error.   I am assuming you are using the SAPCommon from the SMP 2.3 SDK which has this error in it.

Let me know if you are still having problems after checking your SAPCommon jar file.

--Bill

Former Member
0 Kudos

Hi Bill,

Now I get this error:

(Java Back End - NoClassDefFoundError|java.lang.NoClassDefFoundError: serverClass=com/syclo/sap/sflight/server/Server

), Caused by: java.lang.ClassNotFoundException: serverClass=com.syclo.sap.sflight.server.Server

No idea why, I didn't change the Agentry.ini. I have even rebuilt the ZFlightBooking.jar

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you check your events.log file and post the error details.  It should include a stack trace that might give us some more details about what the underlying issue is.

--Bill

Former Member
0 Kudos

Events log:

03/12/2014 09:59:47, 0,         0,         0, Thr       6812, New files opened events.log, messages.log

03/12/2014 09:59:47, 0,         0,         2, Thr       6812, System Startup

03/12/2014 09:59:47, 0,         0,        18, Thr       6812, Memory: page: 14589882368/16912564224, phys: 6284283904/8457236480, virtual: 8796018642944/8796092891136

03/12/2014 09:59:47, 0,        17,        14, Thr       6812, ANGEL Front End v6.1.0.3

03/12/2014 09:59:47, 0,         0,         2, Thr       6812, Loading the Agentry Server's public/private key for password exchanges.

03/12/2014 09:59:47, 0,         0,         2, Thr       6812, Key pair loaded successfully.

03/12/2014 09:59:47, 0,         1,         4, Thr       6812, Agentry v6.1.0.3

03/12/2014 09:59:47, 0,         0,        30, Thr       3416, Admin client 192.168.1.90:57184 authenticated successfully.

03/12/2014 09:59:47, 0,         0,        27, Thr       3416, Admin client 192.168.1.90:57184 has connected

03/12/2014 09:59:47, 1,        20,        28, Thr       6812, Java Back End - NoClassDefFoundError|java.lang.NoClassDefFoundError: serverClass=com/syclo/sap/sflight/server/Server

Caused by: java.lang.ClassNotFoundException: serverClass=com.syclo.sap.sflight.server.Server

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

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

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

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

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

  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

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

|classpath = C:\Agentry\ServerDev\sapjco3.jar;C:\Agentry\ServerDev\Java\SapCommon-130881.jar;C:\Agentry\ServerDev\Java\ZFlightBooking.jar;C:\Agentry\ServerDev\Java\Agentry-v5.jar;C:\Agentry\ServerDev\Java\ini4j-0.4.1.jar;C:\Agentry\ServerDev\Java\sapjco.jarjavaBE.cpp#428:JavaBackEnd::init

03/12/2014 09:59:48, 0,        20,       150, Thr       5856, Loading Development application definitions

03/12/2014 09:59:48, 0,        20,       152, Thr       5856, Loading Development application definitions for default localization

03/12/2014 09:59:48, 0,        20,       153, Thr       5856, Finished loading Development application definitions for default localization

03/12/2014 09:59:48, 0,        20,       151, Thr       5856, Finished loading Development application definitions

03/12/2014 09:59:48, 0,        20,         4, Thr       6812, Server v6.1.0.3

03/12/2014 09:59:48, 0,        17,        10, Thr       6812, 0.0.0.0:7003 open

03/12/2014 09:59:48, 0,        17,        10, Thr       6812, 127.0.0.1:7013 open

03/12/2014 09:59:48, 0,        17,        10, Thr       6812, 127.0.0.1:7080 open

03/12/2014 09:59:48, 0,        17,        10, Thr       6812, 192.168.1.90:7020 open

03/12/2014 09:59:48, 0,        17,        16, Thr       6812, Threads in thread pool 'ANGEL Front End' expanded to 4. Adding thread 5304

03/12/2014 09:59:48, 1,         2,        48, Thr       6812, EADDRINUSE, ..\Socket\win32\sockets.cpp#1514:ListeningStreamSocket::OSListeningSocket::listenOn

03/12/2014 09:59:48, 0,        17,        10, Thr       6812, ANGEL Front End v6.1.0.3

03/12/2014 09:59:48, 0,         0,        18, Thr       6812, Memory: page: 14530150400/16912564224, phys: 6252163072/8457236480, virtual: 8795630833664/8796092891136

03/12/2014 09:59:48, 0,         0,        20, Thr       6812, Disk: 156864868352 bytes total, 46943240192 bytes free

03/12/2014 09:59:48, 0,         0,         0, Thr       6812, Old log files moved into Logs-Rolled\2014-03-12-095947

03/12/2014 09:59:48, 0,         0,         2, Thr       6812, Server startup is complete.

jason_latko
Advisor
Advisor
0 Kudos

ZFlightBooking.jar must not have the com/syclo/sap/sflight/server/Server class where you expect?  You are also getting a socket address in use error, usually caused by the same port being used in your Agentry.ini or JavaBE.ini files for multiple functions.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

I have fixed the socket error, one Angel port was listed twice in Agentry.ini

But the class should be there:

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Looking at your class path I suspect the problem is that you are using sapjco3.   The SAPCommon jar you are using is built on JCo2 so you will need to include the older jco libraries for it to work.  I suspect the missing class is coming from within the Server class as it tries to load the Jco2 classes.

Please try with the previous version and let us know the results.

--Bill

Former Member
0 Kudos

I have no Idea where this sapjco3.jar at the start of the log class path is comming from. My agentry.ini only contains the sapjco.jar you can see at the end of the path. Here is my complete Agentry class path again:

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

And I don't have the sapcjo3.jar file in my Agentry folder.

edit: found it, was a system environment variable. Didn't help though.

03/12/2014 17:30:11, 0,         0,         0, Thr       5796, New files opened events.log, messages.log

03/12/2014 17:30:11, 0,         0,        30, Thr       5964, Admin client 192.168.1.90:49207 authenticated successfully.

03/12/2014 17:30:11, 0,         0,         2, Thr       5796, System Startup

03/12/2014 17:30:11, 0,         0,        18, Thr       5796, Memory: page: 14967341056/16912564224, phys: 6672834560/8457236480, virtual: 8796018642944/8796092891136

03/12/2014 17:30:11, 0,         0,        27, Thr       5964, Admin client 192.168.1.90:49207 has connected

03/12/2014 17:30:11, 0,        17,        14, Thr       5796, ANGEL Front End v6.1.0.3

03/12/2014 17:30:11, 0,         0,         2, Thr       5796, Loading the Agentry Server's public/private key for password exchanges.

03/12/2014 17:30:11, 0,         0,         2, Thr       5796, Key pair loaded successfully.

03/12/2014 17:30:11, 0,         1,         4, Thr       5796, Agentry v6.1.0.3

03/12/2014 17:30:22, 1,        20,        28, Thr       5796, Java Back End - NoClassDefFoundError|java.lang.NoClassDefFoundError: serverClass=com/syclo/sap/sflight/server/Server

Caused by: java.lang.ClassNotFoundException: serverClass=com.syclo.sap.sflight.server.Server

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

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

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

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

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

  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

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

|classpath = c:\agentry\serverdev\.\Java\SapCommon-130881.jar;c:\agentry\serverdev\.\Java\ZFlightBooking.jar;c:\agentry\serverdev\.\Java\Agentry-v5.jar;c:\agentry\serverdev\.\Java\ini4j-0.4.1.jar;c:\agentry\serverdev\.\Java\sapjco.jarjavaBE.cpp#428:JavaBackEnd::init

03/12/2014 17:30:23, 0,        20,       150, Thr       4816, Loading Development application definitions

03/12/2014 17:30:23, 0,        20,       152, Thr       4816, Loading Development application definitions for default localization

03/12/2014 17:30:23, 0,        20,       153, Thr       4816, Finished loading Development application definitions for default localization

03/12/2014 17:30:23, 0,        20,       151, Thr       4816, Finished loading Development application definitions

03/12/2014 17:30:23, 0,        20,         4, Thr       5796, Server v6.1.0.3

03/12/2014 17:30:23, 0,        17,        10, Thr       5796, 0.0.0.0:7003 open

03/12/2014 17:30:23, 0,        17,        10, Thr       5796, 127.0.0.1:7013 open

03/12/2014 17:30:23, 0,        17,        10, Thr       5796, 127.0.0.1:7080 open

03/12/2014 17:30:23, 0,        17,        10, Thr       5796, 192.168.1.90:7020 open

03/12/2014 17:30:23, 0,        17,        16, Thr       5796, Threads in thread pool 'ANGEL Front End' expanded to 4. Adding thread 4828

03/12/2014 17:30:23, 0,        17,        10, Thr       5796, ANGEL Front End v6.1.0.3

03/12/2014 17:30:23, 0,         0,        18, Thr       5796, Memory: page: 14861418496/16912564224, phys: 6610108416/8457236480, virtual: 8795630833664/8796092891136

03/12/2014 17:30:23, 0,         0,        20, Thr       5796, Disk: 156864868352 bytes total, 46239211520 bytes free

03/12/2014 17:30:23, 0,         0,         0, Thr       5796, Old log files moved into Logs-Rolled\2014-03-12-173008

03/12/2014 17:30:23, 0,         0,         2, Thr       5796, Server startup is complete.

03/12/2014 17:30:39, 0,         0,        19, Thr       5940, Virtual memory: 8795628736512 avail (464154624 used)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Nor sure where that would come from either.  Perhaps there as a CLASSPATH envinronment variable that is being picked up.

Here is the classpath from my Agentry.ini for the FlightBooker tutorial.

classPath=.\Java\Agentry-v5.jar;.\Java\ini4j-0.4.1.jar;sapjco.jar;.\Java\ZFlightBooking.jar;.\Java\SAPCommon-130881fixed.jar;.\Java

Maybe try re-ordering the jar files to see if that makes any difference.  Can you also send me your SAPCommon jar so I can test on my setup to see if that might still be the issue?

--Bill

Former Member
0 Kudos

Please make sure your ServerClass line on the Agentry.ini is correct, and does not have "ServerClass=ServerClass=com/syclo/sap/sflight/server/Server"

Former Member
0 Kudos

Yes, thanks, I had noticed that too. It solved this error, but only for the next to appear.

Event log:

03/13/2014 11:38:54, 0,         0,         0, Thr       5864, New files opened events.log, messages.log

03/13/2014 11:38:54, 0,         0,         2, Thr       5864, System Startup

03/13/2014 11:38:54, 0,         0,        18, Thr       5864, Memory: page: 14311358464/16912564224, phys: 6071857152/8457236480, virtual: 8796019691520/8796092891136

03/13/2014 11:38:54, 0,        17,        14, Thr       5864, ANGEL Front End v6.1.0.3

03/13/2014 11:38:54, 0,         0,         2, Thr       5864, Loading the Agentry Server's public/private key for password exchanges.

03/13/2014 11:38:54, 0,         0,         2, Thr       5864, Key pair loaded successfully.

03/13/2014 11:38:54, 0,         1,         4, Thr       5864, Agentry v6.1.0.3

03/13/2014 11:38:57, 1,        20,        18, Thr       5864, JAVA EXCEPTION CAUGHT: com.syclo.agentry.AgentryException: For input string: ""

03/13/2014 11:38:58, 0,        20,       150, Thr       5736, Loading Development application definitions

03/13/2014 11:38:58, 0,        20,       152, Thr       5736, Loading Development application definitions for default localization

03/13/2014 11:38:58, 0,        20,       153, Thr       5736, Finished loading Development application definitions for default localization

03/13/2014 11:38:58, 0,        20,       151, Thr       5736, Finished loading Development application definitions

03/13/2014 11:38:58, 0,        20,         4, Thr       5864, Server v6.1.0.3

03/13/2014 11:38:58, 0,        17,        10, Thr       5864, 0.0.0.0:7003 open

03/13/2014 11:38:58, 0,        17,        10, Thr       5864, 127.0.0.1:7013 open

03/13/2014 11:38:58, 0,        17,        10, Thr       5864, 127.0.0.1:7080 open

03/13/2014 11:38:58, 0,        17,        10, Thr       5864, 192.168.1.90:7020 open

03/13/2014 11:38:58, 0,        17,        16, Thr       5864, Threads in thread pool 'ANGEL Front End' expanded to 4. Adding thread 4612

03/13/2014 11:38:58, 0,        17,        10, Thr       5864, ANGEL Front End v6.1.0.3

03/13/2014 11:38:58, 0,         0,        18, Thr       5864, Memory: page: 14244679680/16912564224, phys: 6030807040/8457236480, virtual: 8795630092288/8796092891136

03/13/2014 11:38:58, 0,         0,        20, Thr       5864, Disk: 156864868352 bytes total, 47316017152 bytes free

03/13/2014 11:38:58, 0,         0,         0, Thr       5864, Old log files moved into Logs-Rolled\2014-03-13-113853

03/13/2014 11:38:58, 0,         0,         2, Thr       5864, Server startup is complete.

JavaBE.ini (of course with correct values instead of  XXXXXXXXXXXXXX):

[HOST]

server=XXXXXXXXXXXXXXXXXXX

APPNAME=Z_FLIGHTBOOKING

[CONFIG]

source=SAP

[CLIENT_NUM]

CLIENT=001

[SYSTEM_NUM]

SYSNUM=00

[LANGUAGE]

LANG=EN

[LOGGING]

Level=4

[LOGON_METHOD]

LOGON_METHOD=USER_AUTH

[SERVICE_LOGON]

UID==XXXXXXXXXXXXXXXXX

UPASSWORD==XXXXXXXXXXXXXXXXXXXXX

SERVERSERIALNUM=XXXXXXXXXXXXXXXXXXXXXX

[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=/SYCLO/HR_EMPLOYEE_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.TransactionCommitBAPI=WFD_TRANSACTION_COMMIT

com.syclo.sap.bapi.SignatureCaptureBAPI=/SYCLO/CS_DOBDSDOCUMENT_CRT

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Jurgen,

I tested my server using your SAPCommon jar and it started fine.  I also compared my JavaBE with yours and have a difference in the [SERVICE LOGIN] section.  Not sure if that makes any difference or not but worth a try.

[SERVICE_LOGON]

ENABLED=true

UID=XXXXXXXXXXXXXXXXX

UPASSWORD=XXXXXXXXXXXXXXXXX

UPASSWORDENCODED=false

SERVERSERIALNUM=XXXXXXXXXXXXXXXXX

--Bill

Former Member
0 Kudos

Going off of what bill said, I do see you have "==" on UID" and "UPASSWORD" keys.  Please make sure to only have one "=" as the second one will be added onto the username and password.

Stephen

Former Member
0 Kudos

Thanks for the tips, they probably save me from future problems. But this particular error persists.

@Bill: I have tried your jar, didn't work either.

Former Member
0 Kudos

The issue was an invisible sign at the end of javabe.ini after copy-pasting the wrappers from the PDF.

Former Member
0 Kudos

This message was moderated.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Experts,

I am following the document at How-to Build an Agentry based mobile app from scratch connecting to an SAP back-end Part1 and I have followed all the steps as suggested in the document.

I am using Agentry Server 6.0 here.

In order to plug in my custom java code, I have exported my Java project and added under ClassPath variable under Server's Agentry.INI file.

classPath=./ini4j.jar;./sapjco.jar;./Java/Agentry-v5.jar;./Java/SAPWM-5.3.0.0.jar;./Java/SAPCommon-122971.jar;./Java/ZFlightBooking.jar;./Java;

I have given the serverClass path as : serverClass=com/syclo/sap/sflight/server/Server

While starting the server, I get the following error:

Exception: 01:37:26 03/15/2014 : 20 (Agentry3), BackEndInitError (Java Back End

- NoClassDefFoundError|java.lang.NoClassDefFoundError: com/syclo/sap/sflight/ser

ver/Server|classpath = .;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip;.\J

ava\Agentry-v5.jar), javaBE.cpp#407:JavaBackEnd::init

I can confirm that the required DLL files are present under the ServerDev directory.

Init4j and sapjco are present under ServerDev directory.

SAPWM, SAPCommon , Agentry V5 and ZFlightbooking are present under ServerDev/Java directory.

I have also tried all possible combinations  including  editing the standard "Classpath" and "Path" variables under "Environment Variables" too, and added the path to this JAR file, but nothing seems to be working.

Request your advice on the same.

Former Member
0 Kudos

The class path in your exception doesn't have ZFlightBooking.jar (and several other JARs), so probably the class path in your Agentry.ini is somehow not working correctly.

jason_latko
Advisor
Advisor
0 Kudos

Jurgen,

I could be wrong as I have not gone through this flight tutorial, but I believe your serverClass is wrong in your Agentry.ini.

You have - serverClass=com/syclo/sap/sflight/server/Server

But should be - serverClass=com/syclo/sap/sflight/Server

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Hi Jason,

thanks for the answer, but the serverClass is correct. The packages is named com/syclo/sap/sflight/server with the class Server, so combined it is com/syclo/sap/sflight/server/Server

jason_latko
Advisor
Advisor
0 Kudos

Jurgen,

OK, sorry about that.  We don't keep the product Server classes in the server package, so it jumped out at me as looking strange.  I guess the flight tutorial is set up differently as you say.

Jason Latko - Senior Product Developer at SAP