Starting Rest Manager

Posted by meyrick on 12-Mar-2014 07:20

Does anybody know the process of how to get the rest manager to start on an external tomcat. we are not using the tomcat version that comes with progress.

thanks.

All Replies

Posted by Shivani on 12-Mar-2014 07:25

You can start it like any other web application, from tomcat. ‘Oerm’ is the application name.
 
Thanks and Regards,
Shivani Sripada
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: 12 March 2014 17:52
To: TU.Mobile@community.progress.com
Subject: Starting Rest Manager
 
Starting Rest Manager
Thread created by meyrick

Does anybody know the process of how to get the rest manager to start on an external tomcat. we are not using the tomcat version that comes with progress.

thanks.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Srinivas Munigala on 12-Mar-2014 07:30

Copy the oerm.war (@$DLC/servlets/rest/) to webapps folder of your tomcat and start it. It will be up and running.
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: Wednesday, March 12, 2014 5:52 PM
To: TU.Mobile@community.progress.com
Subject: Starting Rest Manager
 
Thread created by meyrick

Does anybody know the process of how to get the rest manager to start on an external tomcat. we are not using the tomcat version that comes with progress.

thanks.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Donicello Lampe on 12-Mar-2014 07:35

More detailed information can be found in chapter 9 of the OpenEdge Management and OpenEdge Explorer: Configuration manual. The OpenEdge 11.3 documentation can be found here.

Posted by meyrick on 12-Mar-2014 07:39

Hi smunigal,

We have tried that already and it still wont start.

Posted by eswarm on 12-Mar-2014 07:45

Should this be done on both client-side and server-side? I have tried copying oerm.war and restart the server, but that didn’t help.
 
Thanks,
[collapse]
From: smunigal [mailto:bounce-smunigal@community.progress.com]
Sent: 12 March 2014 12:31
To: TU.Mobile@community.progress.com
Subject: RE: Starting Rest Manager (-0.1)
 
Reply by smunigal
Copy the oerm.war (@$DLC/servlets/rest/) to webapps folder of your tomcat and start it. It will be up and running.
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: Wednesday, March 12, 2014 5:52 PM
To: TU.Mobile@community.progress.com
Subject: Starting Rest Manager
 
Thread created by meyrick

Does anybody know the process of how to get the rest manager to start on an external tomcat. we are not using the tomcat version that comes with progress.

thanks.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Stop receiving emails on this subject.

Flag this post as spam/abuse.



This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Broadcasting Dataservices. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the sender.
[/collapse][/collapse]

Posted by Shivani on 12-Mar-2014 07:50

Meyrick,
 
Please see oerm.log file, if it has any errors?
 
$TOMCAT_HOME/webapps/oerm/WEB-INF/oerm.data/oerm.log
 
Thanks and Regards,
Shivani Sripada
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: 12 March 2014 18:11
To: TU.Mobile@community.progress.com
Subject: RE: Starting Rest Manager
 
RE: Starting Rest Manager
Reply by meyrick

Hi smunigal,

We have tried that already and it still wont start.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Srinivas Munigala on 12-Mar-2014 07:50

Can you check for the error messages in catalina.log / catalina.out files
 
Are you able to see oerm.log  file (@webapps/oerm/WEB-INF/oerm.data/oerm.log)?
 
If yes, does it show any error?
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: Wednesday, March 12, 2014 6:11 PM
To: TU.Mobile@community.progress.com
Subject: RE: Starting Rest Manager
 
Reply by meyrick

Hi smunigal,

We have tried that already and it still wont start.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by meyrick on 12-Mar-2014 07:59

I dont see any errors, does that mean it should be working? How do we check that the rest manager is working correctly?

Posted by Shivani on 12-Mar-2014 08:05

 
8080 is your tomcat port.
 
Thanks and Regards,
Shivani Sripada
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: 12 March 2014 18:30
To: TU.Mobile@community.progress.com
Subject: RE: Starting Rest Manager
 
RE: Starting Rest Manager
Reply by meyrick

I dont see any errors, does that mean it should be working? How do we check that the rest manager is working correctly?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by meyrick on 12-Mar-2014 08:49

It says that its running but we still can't connect. Any other ideas?

Posted by Srinivas Munigala on 12-Mar-2014 09:11

Can’t connect means? How are you trying to connect to it?
 
Are you trying to connect to it using restman command? Or OEM? any error that you see while connecting?
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: Wednesday, March 12, 2014 7:20 PM
To: TU.Mobile@community.progress.com
Subject: RE: Starting Rest Manager
 
Reply by meyrick

It says that its running but we still can't connect. Any other ideas?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by meyrick on 12-Mar-2014 09:21

The application wont connect with OE explorer because the explorer is not functioning correctly. Would we still need to do a restman deploy for it to work correctly?

Posted by Srinivas Munigala on 12-Mar-2014 09:31

Yes, you can use restman command to access REST Manager to work with it.
 
To do so, you have add an entry in ubroker.properties file as below:
 
[REST.restmgr1]
    restUrl=http://<hostname>:<tomcat-port>/oerm
 
Restart the AdminServer and open proenv, execute the following command to query the REST Mgr:
 
restman –i restmgr1 –q
 
For more commands, please execute the help:
 
restman –h
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: Wednesday, March 12, 2014 7:52 PM
To: TU.Mobile@community.progress.com
Subject: RE: Starting Rest Manager
 
Reply by meyrick

The application wont connect with OE explorer because the explorer is not functioning correctly. Would we still need to do a restman deploy for it to work correctly?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by meyrick on 12-Mar-2014 09:38

We have done the above and it says that there are no deployed services. how would we deploy a service manually using restman?

Posted by Anil Kumar on 12-Mar-2014 09:43

Hi meyrick,

Please use following command to deploy a WAR file using restman utility.

restman -i restmgr1 -war <war file location> -deploy

Ex: proenv>restman -i restmgr1 -war C:\qa\OE_Exports\OEProj.war -deploy

Once the deploy process is successful please check for the availability of the application in webapps directory under $DLC location ($DLC\\servers\tomcat\webapps)

Thanks and Regards,

Anil Kumar.

Posted by meyrick on 13-Mar-2014 01:34

Hi anikumar,

The deployment went through fine, we enabled the rest manager but once again it still does not work.

The app still keeps loading when i try run it. 

Posted by Srinivas Munigala on 13-Mar-2014 01:40

Are you unable to access the REST application that you deployed?
 
Check for the errors in oerm.log file and application log file (@ webapps/<appname>/WEB-INF/adapters/logs)
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: Thursday, March 13, 2014 12:05 PM
To: TU.Mobile@community.progress.com
Subject: RE: Starting Rest Manager
 
Reply by meyrick

Hi anikumar,

The deployment went through fine, we enabled the rest manager but once again it still does not work.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by meyrick on 13-Mar-2014 02:05

Hi Smunigal,

There is no errors in the log file. It seems to be up and running, but we dont know exactly how to confirm if its running correctly.

Posted by Srinivas Munigala on 13-Mar-2014 02:15

Can you try to access the application using browser in below format:
 
http://<hostname>:<port>/<appname>/rest
 
or query the application using restman command:
 
restman –i restmgr1 –<appname> –q
 
[collapse]
From: meyrick [mailto:bounce-meyrick@community.progress.com]
Sent: Thursday, March 13, 2014 12:36 PM
To: TU.Mobile@community.progress.com
Subject: RE: Starting Rest Manager
 
Reply by meyrick

Hi Smunigal,

There is no errors in the log file. It seems to be up and running, but we dont know exactly how to confirm if its running correctly.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Anil Kumar on 13-Mar-2014 02:19

Hi meyrick,

Can you please elaborate on following

>> The deployment went through fine, we enabled the rest manager but once again it still does not work. The app still keeps loading when i try run it.

If I understand this correctly the app got deployed properly to Tomcat location (webapps) and the application cannot be accessed properly?

Are you trying to access the application from:

- General browser?

- Any REST Client (say Postman, RESTClient)?

You can check the status of the deployed applications from the restman. Use following command to verify the same:

                 proenv>restman -i restmgr1 -appname <Application Name> -list

Know the application status from browser:

http://localhost:8980/<Service or App Name>/

Ex: http://localhost:8980/ExprTestService/

The response will be 'REST Adapter' in the browser body.

For any of the problems with respect to deployed application the logs are located in specific application under webapps directory and the rest manager (server) logs are located in oerm.log

Application logs: $DLC/server/tomcat/webapps/<App Name>/WEB-INF/adapters/logs

oerm.log : $DLC\servers\tomcat\webapps\oerm\WEB-INF\oerm.data\oerm.log

Hope this helps.

Thanks and Regards,

Anil Kumar.

Posted by meyrick on 13-Mar-2014 02:29

We have the Rest Service up and running and can access it through the browser, but the mobile app itself wont connect.

Posted by Anil Kumar on 13-Mar-2014 02:41

Hi meyrick,

>>but the mobile app itself wont connect

Can you please check for the availability of the REST URI in the Mobile App Builder in 'MobileService_Settings' page under 'Services' section. It should point to the IP address such that it can be accessed from external machines.

Attached snapshot specifying.

Thanks and Regards,

Anil Kumar.

Posted by meyrick on 13-Mar-2014 07:55

Hi anikumar,

we are using the correct IP and we can connect to it from the test tablet browser but not from within the app. ie we can see the rest service is there from the internet but the app will not connect to it.

Posted by whenshaw on 13-Mar-2014 08:07

Hi meyrick,

How did you create the mobile app? Did you create it from Progress Developer Studio or the Mobile App Builder? If so, is it an "Express" app, a "Session-Enabled" app, or a default Phone or Tablet project?

--Wayne Henshaw

Posted by meyrick on 13-Mar-2014 08:27

Hi Wayne,

I created the app from the developer studio and then you click on the project in the developer studio and it takes you to the builder. I'm not sure how to check, but I'm pretty sure its the default tablet project.  

Posted by whenshaw on 13-Mar-2014 08:45

How does the mobile app connect to the service? Do you use the Session Services? And what do you have for Session services? If you created the app before this past Tuesday (March 11), you would have a group that consists of:

 MobileService_Login

 MobileService_Logout

 MobileService_Settings

If you created it after Tuesday morning, you would have a group with these:

 SessionService_Login

 SessionService_Logout

 SessionService_Session

 SessionService_Settings

There was a change in the new release of the Mobile App  Builder that requires you to make sure you invoke the SessionService_Session before you invoke the Login. Could that be the problem?  (If not, it would be good to see if we can get some  info on what the error is when you try to connect. I can help you with that.)

Posted by meyrick on 13-Mar-2014 08:58

I have the mobileService. The app is loading through passed the code, which it wasn't doing before but there's no data being returned to a simple list item for a look up. This is the code i am using on the first page:

if ($t.ProgressSession == undefined || $t.ProgressSession.loginResult != progress.data.Session.LOGIN_SUCCESS) {

 var settings = MyTestService_beCustomer_Settings;

 var pdsession = $t.ProgressSession;

 if (pdsession == undefined)    

   pdsession = $t.ProgressSession = new progress.data.Session();

   if (settings.serviceURI == undefined || settings.serviceURI == '')

     console.log("serviceURI was not specified." +

               " catalogURI: " + settings.catalogURI +

               " resourceName: " + settings.resourceName);

 var loginResult = pdsession.login (settings.serviceURI, "", "");

 if (loginResult != progress.data.Session.LOGIN_SUCCESS) {

   var msg = 'ERROR: Login failed with code: ' + loginResult;

   console.log(msg);

   alert(msg);

   return;

 }

 pdsession.addCatalog(settings.catalogURI);

}

Posted by whenshaw on 13-Mar-2014 09:08

So the pdsession.login() and the pdsession.addCatalog() execute successfully, but when a JSDO tries to get data, there is no data returned? Does the server return an error on the request for data, or does it return "200 OK" but has no data?

Posted by meyrick on 13-Mar-2014 09:13

This is from the localhost access log, does this look correct? We didnt get an error.

196.11.122.163 - - [13/Mar/2014:15:53:24 +0200] "OPTIONS /MyTest/static/home.html HTTP/1.1" 200 -

196.11.122.163 - - [13/Mar/2014:15:53:24 +0200] "GET /MyTest/static/home.html HTTP/1.1" 200 35

196.11.122.163 - - [13/Mar/2014:15:53:24 +0200] "OPTIONS /MyTest/static/mobile/MyTestService.json HTTP/1.1" 200 -

196.11.122.163 - - [13/Mar/2014:15:53:24 +0200] "GET /MyTest/static/mobile/MyTestService.json HTTP/1.1" 200 2990

Posted by whenshaw on 13-Mar-2014 09:25

That looks fine, those entries indicate that the login and addCatalog worked. Are there entries for when the app requests the data?

Posted by meyrick on 13-Mar-2014 09:26

where would we find that?

Posted by whenshaw on 13-Mar-2014 09:39

I think it would be in the same log (it is in the apps I'm familiar with). If you are simply retrieving data, it might look something like:

 ... GET /MyTest/rest/<specifics of the resource you're requesting>

How do you make the request for the data?

Posted by meyrick on 13-Mar-2014 09:43

We have an invoke service that calls the json. We are going according to the progress exchange 2013 OpenEdge Mobile Document. Those four lines i sent to you earlier in the previous message are the only lines we got.

Posted by whenshaw on 13-Mar-2014 09:46

Does this other thread sound like the same problem you are seeing? :

 community.progress.com/.../35121.aspx

Posted by meyrick on 13-Mar-2014 09:49

yes it does but there is no solution for it? Our app was never connecting before because we had OE explorer issues.

Posted by whenshaw on 13-Mar-2014 09:53

Not yet. That other conversation was happening just this morning while you and I were posting back and forth. It looks like it has been submitted as a high priority issue.

Posted by meyrick on 13-Mar-2014 09:57

alright thanks, ill check back tomorrow. hopefully there will be a solution. thanks for your help.

Posted by whenshaw on 13-Mar-2014 09:59

If you don't mind sharing your app with me, I can take a look at it.

Posted by meyrick on 13-Mar-2014 10:00

ok no problem. What is your email address??

Posted by whenshaw on 13-Mar-2014 10:05

whenshaw@progress.com

I won't be able to look at it right away, but probably later today.

Posted by meyrick on 13-Mar-2014 10:07

no problem. I will only be back online tomorrow. thanks again.

Posted by whenshaw on 13-Mar-2014 20:21

Unfortunately, it doesn't look like your problem is the same as that other one. I did see one thing, though -- in the mapping for the CustomerRead, on the data tab of the SelectionPage, the "filter" field for the request has just the number "50" in it. Is your ABL code on the server written so that it needs only a number, or should the filter be something like "CustNum EQ 50" ? If that's not the problem, I would try checking the traffic between your app and the server, using the Network tab of a browser debugger or a standalone HTTP monitor, to see whether the request for the data is being sent and exactly what is coming back.

Posted by meyrick on 14-Mar-2014 03:49

Below is the preview and then the response:

lastModified: "Fri Feb 28 14:40:39 CAT 2014"

services: [{name:ElcbCrmService, address:/rest/ElcbCrmService, useRequest:true,…}]

0: {name:ElcbCrmService, address:/rest/ElcbCrmService, useRequest:true,…}

address: "/rest/ElcbCrmService"

name: "ElcbCrmService"

resources: [{name:beCustomer, path:/beCustomer, schema:{type:object, additionalProperties:false,…},…}]

0: {name:beCustomer, path:/beCustomer, schema:{type:object, additionalProperties:false,…},…}

name: "beCustomer"

operations: [{path:, type:update, verb:put, params:[{name:dsCustomer, type:REQUEST_BODY}]},…]

0: {path:, type:update, verb:put, params:[{name:dsCustomer, type:REQUEST_BODY}]}

params: [{name:dsCustomer, type:REQUEST_BODY}]

path: ""

type: "update"

verb: "put"

1: {path:, type:delete, verb:delete, params:[{name:dsCustomer, type:REQUEST_BODY}]}

params: [{name:dsCustomer, type:REQUEST_BODY}]

path: ""

type: "delete"

verb: "delete"

2: {path:?filter={filter}, type:read, verb:get, params:[]}

params: []

path: "?filter={filter}"

type: "read"

verb: "get"

3: {path:, type:create, verb:post, params:[{name:dsCustomer, type:REQUEST_BODY}]}

params: [{name:dsCustomer, type:REQUEST_BODY}]

path: ""

type: "create"

verb: "post"

path: "/beCustomer"

schema: {type:object, additionalProperties:false,…}

additionalProperties: false

properties: {dsCustomer:{type:object, additionalProperties:false,…}}

dsCustomer: {type:object, additionalProperties:false,…}

additionalProperties: false

properties: {custSel:{type:array, items:{additionalProperties:false,…}}}

custSel: {type:array, items:{additionalProperties:false,…}}

items: {additionalProperties:false,…}

additionalProperties: false

properties: {_id:{type:string}, dm-accno:{type:string, ablType:CHARACTER, default:, title:Account Number},…}

_id: {type:string}

dm-accno: {type:string, ablType:CHARACTER, default:, title:Account Number}

ablType: "CHARACTER"

default: ""

title: "Account Number"

type: "string"

dm-name: {type:string, ablType:CHARACTER, default:, title:Debtor Name}

ablType: "CHARACTER"

default: ""

title: "Debtor Name"

type: "string"

rc-number: {type:string, ablType:CHARACTER, default:, title:Rental Contract Number}

ablType: "CHARACTER"

default: ""

title: "Rental Contract Number"

type: "string"

type: "array"

type: "object"

type: "object"

useRequest: true

version: "1.0"

{

   "version": "1.0",

   "lastModified": "Fri Feb 28 14:40:39 CAT 2014",

   "services": [{

       "name": "ElcbCrmService",

       "address": "\/rest\/ElcbCrmService",

       "useRequest": true,

       "resources": [{

           "name": "beCustomer",

           "path": "\/beCustomer",

           "schema": {

               "type": "object",

               "additionalProperties": false,

               "properties": {"dsCustomer": {

                   "type": "object",

                   "additionalProperties": false,

                   "properties": {"custSel": {

                       "type": "array",

                       "items": {

                           "additionalProperties": false,

                           "properties": {

                               "_id": {"type": "string"},

                               "dm-accno": {

                                   "type": "string",

                                   "ablType": "CHARACTER",

                                   "default": "",

                                   "title": "Account Number"

                               },

                               "rc-number": {

                                   "type": "string",

                                   "ablType": "CHARACTER",

                                   "default": "",

                                   "title": "Rental Contract Number"

                               },

                               "dm-name": {

                                   "type": "string",

                                   "ablType": "CHARACTER",

                                   "default": "",

                                   "title": "Debtor Name"

                               }

                           }

                       }

                   }}

               }}

           },

           "operations": [

               {

                   "path": "",

                   "type": "update",

                   "verb": "put",

                   "params": [{

                       "name": "dsCustomer",

                       "type": "REQUEST_BODY"

                   }]

               },

               {

                   "path": "",

                   "type": "delete",

                   "verb": "delete",

                   "params": [{

                       "name": "dsCustomer",

                       "type": "REQUEST_BODY"

                   }]

               },

               {

                   "path": "?filter={filter}",

                   "type": "read",

                   "verb": "get",

                   "params": []

               },

               {

                   "path": "",

                   "type": "create",

                   "verb": "post",

                   "params": [{

                       "name": "dsCustomer",

                       "type": "REQUEST_BODY"

                   }]

               }

           ]

       }]

   }]

}

Should the response contain the data?

Posted by whenshaw on 14-Mar-2014 06:17

This seems to be the response to addCatalog. If that's the last request/response you see, it looks like the request for the data is not being made. I would try 2 things at this point, to determine whether the app even gets to the point of requesting data :

1. Your app is designed to invoke Customer Read in response to Value Change of srcCustomer. Add an error handler for customerRead on the data tab for that screen -- just have it put up an alert box saying there was an error (there is other info you could add later if it turns out that there is an error).

2. also add a "run JavaScript" handler for Value Change of srcCustomer, and have it execute before the customerRead, just to confirm that that event is being generated.

Posted by meyrick on 14-Mar-2014 07:39

this is the error we got when calling the JSDORead:

ERROR condition: beCustomer Singleton object instantiation ended with an ERROR condition. (16819) (7211)

Posted by Anil Kumar on 14-Mar-2014 07:52

Hi meyrick,

One possible reason could be database association for the OpenEdge Appserver (restbroker1). Can you please check for the availability of database connection for restbroker1 at the server side.

If it is not associated please assign the database connection, recompile business logic and publish to Appserver

Thanks and Regards,

Anil Kumar.

Posted by meyrick on 14-Mar-2014 08:50

Thanks to everyone for their help. we have got the app working with the data getting passed to it but is there an easier way to redeploy every time I change code other than tomcat in the box.

Posted by Anil Kumar on 15-Mar-2014 09:54

Hi meyrick,

You can add the external (or new) tomcat server to OEM (OpenEdge Management) and then to 'Servers view' in PDS OE (Progress Developer Studio for OpenEdge) such that it will have features of Tomcat In the box with respect to PDS OE like auto publish changes to tomcat and Run on Server operations.

Hope this helps.

Thanks and Regards,

Anil Kumar.

Posted by meyrick on 16-Mar-2014 10:30

thank you, we have added it but when trying to start it through PDSOE it throws an error of:

Cannot start the OE Web Server since it is not configured as Tomcat in the box.

any idea on how to solve this and get it started?

Posted by Matt Baker on 16-Mar-2014 11:20

If you are using your own Tomcat, you have to start/stop it yourself using the startup/shutdown scripts provided with the Tomcat install.  PDS normally starts/stops the tomcat-in-the-box via OEM, but it can't do this if you're using your own install.  There is no way to add your own Tomcat install into OEM.  It only works with the one shipped with OpenEdge install.

Posted by Phillip Molly Malone on 16-Mar-2014 16:25

You could add Tomcat starting/stopping to OEM via a job but I'm guessing this isn't exactly what your after.

[mention:89fc5d694d9c44e28801ce6a5d07a449:e9ed411860ed4f2ba0265705b8793d05] Any thoughts of allowing OEM to plugin to an external Tomcat for that stuff or is the OEM stuff to specific at this point? Not sure there is any great benefit. Personally I was very close to using an external Tomcat just to get the option to start and stop it as a service on windows anyway.

JMTC

Posted by Matt Baker on 16-Mar-2014 19:11

The tomcat in the box support was added strictly for PDS, and uses protc and not the startup/shutdown scripts provided by a standard tomcat install.  You could point protc to some other install of Tomcat, and then allow it to be controlled by OEM that way.

This thread is closed