on 12-05-2013 6:23 AM
Hello All ,
I have developed Custom SAP Backend application , and according to me i have configure correctly .
but i am getting below error :
Exception: 11:21:47 12/05/2013 : 20 (Agentry3), BackEndInitError (Java Back End - NoClassDefFoundError|java.lang.NoClassDefFoundError: /com/syclo/sap/sflight/server/
), Caused by: java.lang.ClassNotFoundException: .ZFlightBooking.src.com.syclo.sap.sflight.server.
11:21:47 12/05/2013: Failed to init Java Back End (Java v6.0.22.0 (JVM version 1.6.0_34, AJAPI version build )) from ag3javabe.dll
Tags edited by: Michael Appleby
This error indicates that your Agentry server can't find the java classes you created necessary for the server to start the java backend. Did you export your .jar file (pg 107 step 5) and update the Agentry.ini (pg 114) to include it on the classpath?
Hopefully this will help get you further.
--Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kunal,
I am new to this Agentry and trying to develop the flight application, facing couple of problems:
1. I changed the Agengrty.ini files as
classPath=.\ZflightBooking.jar;.\ini4j.jar;.\sapjco.jar;.\SAPCommon121161.jar;.\JavaBE.ini;.\librfc32.dll;.\sapjcorfc.dll;.\Java\Agentry-v5.jar;
serverClass=com/syclo/sap/sflight/server/Server
but the error comes up as
NoClassDefFounderror:com/syclo/sap/server
When i change the serverClass to com/syclo/sap/server the server got started but problem 2 occurs
2. Test environment ask for id and password: I supplied the one used to login thr ERP, but it says invalid password for the user, I use the same to login into sap wiht same id/pwd.
Please suggest and provide me some suggestions.
Thanks in advance
Pooja
Pooja,
This should probably be a new thread but here goes.
It sounds like you have a similar problem in that the server cannot find the base class (part of the SAPCommon jar). Your classpath and serverClass entries in the Agentry.ini should be similar to the following.
classPath=.\Java\Agentry-v5.jar;ini4j.jar;sapjco.jar;.\Java\SAPCommon-122971.jar;.\Java\ZFlightBooking.jar
serverClass=com/syclo/sap/sflight/server/Server
This assumes the ini4j, sapjco (and required dlls) are in the ServerDev directory and that the SAPCommon-122971 and your ZFlightBooking jar files are in the ServerDev\Java directory.
You need the make sure the serverClass is pointing to the above so that it calls your application code. If you point it to the generic server class it will not know how to authenticate the user and what to do. This will lead to the second problem you listed.
Try changing it back and making sure the classpath is correct and ensure your jars are in the right locations and try again.
--Bill
Thanks Bill/Kunal,
here are the steps I follwed after your suggestions,
1. all the dlls and jar files are copied into java folder except the ZflightBooking.jar
2. updated the agentry.ini files as below
classPath=C:\Agentry\ServerDev\Java\Agentry-v5.jar;C:\Agentry\ServerDev\Java\ini4j.jar;C:\Agentry\ServerDev\Java\sapjcorfc.dll;C:\Agentry\ServerDev\Java\sapjco.jar;C:\Agentry\ServerDev\Java\SAPCommon-121161.jar;C:\Agentry\ServerDev\ZflightBooking.jar
serverClass=com/syclo/sap/sflight/server/Server
now the error is
JavaBackendError(Java Exception caught: Java.lang.ExceptionInIntializationError: JCO.classInitialize(): could not load middlewear layer 'com.sap.mw.jco.rfc.Middlewearrfc'), JCO.nativeInit(); not initialized.
I thing this is only related to the Agnetry.ini file. Please suggest.
Thanks
Pooja
Hello Pooja ,
This error is related to java backend ,
so you have to change your JAVABE.ini files like below :
server=(your SAP Server IP Address)
[SERVICE_LOGON]
ENABLED=true
UID=your SAP User Name
UPASSWORD=your SAP Password
UPASSWORDENCODED=false
SERVERSERIALNUM=your Serial key for software
Regards,
Kunal Varaiya
Kunal,
I hv updated the javabe.ini file as per the above guideleines, and i hv aready included the the the jdk and jre in the path variable:
C:\Program Files\Java\jdk1.6.0_45\bin;C:\Program Files\Java\jdk1.6.0_45\jre\bin\server;C:\Program Files\Java\jdk1.6.0_45\jre\lib;
I m using a 32 bit machine.
thanks
Pooja
Pooja,
The class path only needs to reference the jar files and should not include the .dlls. Agentry also deals very will with relative references where dot (.) equates to the ServerDev or ServerProd directory.
I suspect your error may be due to missing the one dll required for the JCo.
I would put and keep the Jco files (sapjco.jar, sapjcorfc.dll and librfc32.dll) in the ServerDev directory and reference them using just by including sapjco.jar in the classpath (see my example from my previous post).
Your ini4j.jar can also just go in ServerDev and reference as ini4j in the classpath
I would put your SapCommon121161.jar and your ZFlightbooking.jar in the Java folder and reference each with .\Java\ prefixes in the classpath. Same for your Agentry-v5.jar.
Try that and see if that solves the problem. If not let us know and we can continue troubleshooting.
--Bill
Hello Pooja ,
Lets go with step by step
1) you have given correct path for ini4j.jar , sapjco.jar , Agentry-v5 , SAPCommon-122971.jar, and your application class files . No any dll files path you need to give in agentry.ini
2) you have given correct IP or server name for SAP
3) SAP Username and password
4) make sure there is no error in agentry front end and java class files
5) and also make sure you dont have any error in ABAP and you have taken correct code from PDF files.
Regards,
Kunal
Yes kunal I have verified again
1) you have given correct path for ini4j.jar , sapjco.jar , Agentry-v5 , SAPCommon-122971.jar, and your application class files . No any dll files path you need to give in agentry.ini --Done
2) you have given correct IP or server name for SAP -Done
3) SAP Username and password -Done
4) make sure there is no error in agentry front end and java class files-DoneNo errors/warnings
5) and also make sure you dont have any error in ABAP and you have taken correct code from PDF files.-Yes but what do u mwan by error in ABAP?...there is no abap code only the configuration that is
mentionedin doc, that I have verified.
Please respond to above newly created thread so that I can also assign points to your inputs.
Thanks
Pooja
Kunal,
The Agentry Server is failing when it is looking for the class called "ZflightBooking.src.com.syclo.sap.sflight.server". This to me looks like the class that is being called is is no a complied class, and also still in the workspace.
Did you compile the class files into a Jar file?
Do you have the Jar file (or folder with the com folder below it) with the complied classes in the classPath key of the Agentry.ini in the [Java-n] section?
How does the ServerClass key look in the Agentry.ini file?
Stephen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.