cancel
Showing results for 
Search instead for 
Did you mean: 

Exceptions about Agentry Server connecting SQL

Former Member
0 Kudos

Hi Experts,

I am beginner of  Agentry.

and I made a simple application connecting SQL database as backend from scratch.

But I encountered exceptions and can't see the screen on ATE because of login failure. (see attached events.log)

Could you give me some clue to solve.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

mark_pe
Active Contributor
0 Kudos

Takayoshi,

Your error states:

11/12/2013 15:44:55, 1,        16,       103, Thr       8496, BackEnd SQL-1.ini [Misc] getUserName=getUserName.sql, 3: SA_DBMS_API_Error, DB Code: 102, DB Text:42000 [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'flunky'.

42000 [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could not be prepared., query.cpp#145:SQLQuery::run

-The first part says that you have a Backend SQL.

-[Misc] is pointing to a section under your sqlBE.ini.

- the sqlBE.ini normally have several sections from logging in, logging out, error, pushes and so forth.

-sqlBE.ini stands for SQL Backend initialization file.

- In that section it is trying to run a sql script called = getUserName.sql that is normally found in your sql folder which will populate the SAP/Syclo Data Markup Language - SDML <<userinfo.getUserName>>

If this is a custom application from scratch, you may opt to comment that line in the sqlBE.ini but note, in order for Agentry to work with your client you need to make sure that you authenticate against one backend first. 

The out of the box have default and template SQL script that normally is used as a basis to authenticate.  You will see in your agentry.ini [SQL-1] section that there are options to authenticate is it will be stated as true.

When the error states that a 'flunky' is missing means that a pre-requisite to run that getUserName.sql is missing or cannot be resolved. It could be fixed by either 1) Not using that flunky and giving the correct query or 2) try to resolve the SDML query that the flunky needs to address (i.e. return at least 1 record).

I hope this explanation above gives you some insights to help you customize your application.

Former Member
0 Kudos

Hi Mark

Thank you for your kind reply.

but It doesn't work yet.

I commented out "getUserName=getUserName.sql" in [Misc] section on SqlBE.ini  file. but same message appeared when ATE log in.

When Agentry server starting up there is below errors as you can find attached log.

How do you think that?

11/12/2013 15:43:07, 1,        20,        28, Thr      11176, failed to open query config file 'SQL-1.ini'sqlBE.cpp#707:SQLBackEnd::init
11/12/2013 15:43:07, 1,        20,        28, Thr      11176, failed to open query constants file ''sqlBE.cpp#726:SQLBackEnd::init

I don't konw how should I resolve this problem at this point and I attached Agentry.ini and SqlBE.ini file.

Could you give me some clue to resolve.

Thanks

mark_pe
Active Contributor
0 Kudos

My suggestion:

Study the contents of the sql folder of Agentry.

Those sql files are used inside the sqlBE.ini.

The purpose of that sqlBE.ini is to specify that you are using the SQL (Back End).ini - initialization file.

You have a custom SQL-1.ini file that you placed in your agentry.ini.  Try to mimic how the SQLBE.ini is or just simply use the SQLBE.ini and see if you can somehow customize the sql templates in the sql folder.

Your INI has a Java connection too. So you are saying you have two backend you want to support Java + SQL.  You mentioned in your ini that you want to authenticate use Java and not SQL. You need to authenticate at least in one backend.  If this is a SQL only backend you need to follow how the sqlBE.ini is setup (like getting users and so forth).  If you rely on SAP Java back end to authenticate then that is okay but your error is  saying that the sqlBE.ini (Required file is missing) or the new name you gave it SQL-1.ini is missing in your directory.

To summarize:

I would take the out of the box sqlBE.ini and look inside of it.

It will point to several files in the sql folder.

Study those files and how it maps to the sqlBE.ini.

Some files are used for getting the user information or getting the user name and so forth against your backend and some are use to handle logging in and out.

Formula:

Agentry.ini = SQL-x section = files needed to connect against your backend SQL.

sqlBE.ini is required.

This same reasoning is true for connecting to the Java backend.  The javaBE.ini is required.

If you look at your error there is an internal code error sqlBE.cpp trying to process the sqlBE.ini but it is missing..

Those are just some information not normally taught in class.. just FYI.

Former Member
0 Kudos

Hi Mark,

Thank you very much for good advise.

Finally These exception were removed.

The way I did was not cool but it is okay.

I think my agentry.ini was not good and did below.

1) Uninstall agentry Server

2) Delete agentry Server forlder

3) Install agentry Server again

4) Publish application from eclipse.

5) start agentry server

6) edit agentry.ini file from agentry administration client.

  (1) from menu=>edit=>configuration settings

  (2) select SQL-1 tab

  (3) edit below field

      - dbConnectionName

      - dbConnectionPassword

      - dbConnectionUserID

      - timeZoneName

7) restart agentry server

When publishing application from eclipse.

required settings in SQL-1 section was added automatically.

It' nice 🙂

Thanks

Answers (1)

Answers (1)

0 Kudos

Been a while since I worked with an SQL backend to agentry, but it looks like the ini files are missing or corrupted.  These should be in the same serverDev folder in which your AgentryServer.exe file is located. 

The security credentials should be located there as well, I think.

Regards, Mike

SAP Rapid Innovation Group - RIG