NAV WS does not see objects changes

paurolapaurola Member Posts: 43
edited 2012-02-08 in NAV Three Tier
We have a NAV Web Service running on a stand alone server on DMZ on a production environment. A table change (a field was added) was made and the object was imported into the database. Objects were compiled, database synchronized and the WS on DMZ server was restarted. When a user tries to insert a record through a browser application he gets an error stating that "cannot insert NULL value" in this new field...

The insert code in NAV codeunit has nothing to do with this new field (type code), so NAV should insert the default empty string automatically when inserting a record into that table. I traced the actual SQL Statement that is created by NAV and it DOES NOT include this new field (the SQL Statement that NAV uses in order to insert the record through ODBC should have ALL the fields from the table whether or not any data is put into them). The server has other WS:s running for different databases and applications so the server cannot be rebooted right now. I am desperately stopping and starting the Web Service but the table change just does not get "published" for the WS.

The service for the RTC clients is on a different server and records can be inserted into the table without problems. The new field is also there.

Any ideas what I should try next?

EDIT: NAV 2009 R2 build 32775

/Pauli

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Did you try by restarting both NAV Service and Web service?
  • paurolapaurola Member Posts: 43
    Mohana: Yes we did - or at least I think we did... there are quite a few NAV Services on that server so I have to recheck that we got the right one.
  • kinekine Member Posts: 12,562
    Do not forget that you need to follow this procedure:

    1) Stop WebService service
    2) Stop the main Service
    3) Start the main Service
    4) Start WebService service

    (of course, 2 a 3 could be "Restart") If you do it in different order, it could lead into situation, that nothing is reloaded...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ichladilichladil Member Posts: 68
    Hi Kine,

    is that really the case that the web service depends on the NAV server service running? I actually believed that those services are independent and that I may run the web service as standalone?

    Thanks ahead for clarification,
    Igor
  • kinekine Member Posts: 12,562
    :-k Since first time I was sure that I cannot run the WS service without the RTC service. I have tried it now, and I can. :| But still, I am not sure, if the services are not usig some "shared" things when running both from same folder through same .exe. I remember, that when I had problems with the changes not detected, only one thing helped - restarting BOTH services in this order. When I restarted one, and than second, it still used old versions of objects. Looks like "shared" object cache is used and until one service is running, the cache is not refreshed... but I can be wrong...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,112
    I always first stop both and then restart them just to be sure....
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • paurolapaurola Member Posts: 43
    This case is complicated because there are services running on multiple servers against the same database. This particular server is just for the Web Services and there is another running the services for the RTC:s. If I create a new object and publish it as a new web service, it is immediately refreshed but changes to existing tables are not... It may be so that if there is a service somewhere holding on to the objects, they will not be refreshed - perhaps this happens on the database level...

    I would really like to know more about how RTC- and WS-services use objects and where they are cached.

    /Pauli
Sign In or Register to comment.