No Effect on Packages Reload after Java-Code-Adjustment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 04:07 AM
Hi,
if I make a change to the java-source of a package (in this case of the sample vlan-package), then reload packages with "packages reload" in the NCS-cli, the change is not available.
In the following the steps I fulfilled:
- Set up eclipse-environment correspondingly
- Created vlan-package
- Adjusted yang-model
- Run "make" successfully
- Edited the java-source with an output (simple print a line)
- Run "make" successfully
- Started the Java-VM out of eclipse (NcsJVMLauncher -> main -> Run as Java Application)
- Tested the vlan-package via cli -> correct output (java-source printline is seen in the eclipse-console)
==> Now, after I made a second change to the same java-source, make, do "packages reload" via cli and test, the old output is still seen, until restart of java-vm.
My question is: Do I have to restart Java-VM every time I make a change to the sourcecode?
My assumption was that "make" and "packages reload" is sufficient to make the change available, which, it seems, is not the case (thus the former state of the java-source is kept "somehow").
Thanks & best regards,
Mesut
- Labels:
-
Other NSO Topics

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 04:12 AM
You do not have to restart the java-vm. Building and running packages reload is enough (in fact if all you change is java, then a packages package X reload is enough).
Common problems for me is either failing to build or building in a different directory than the one where the packages are loaded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 07:02 AM
the build is not failing (make returns no error).
Is the default directory not correct? I created the vlan-directory with default skeleton command.
I assumed this directory is the one, where the package is loaded - if it wouldn't, why does it load successfully after restart of java-vm?
Best regards,
Mesut

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 08:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 10:49 AM
show alarms in the cli states no problems.
The timestamp on the file in private-jar changes correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 01:55 PM
I use this to confirm that the package loaded is indeed the one with the changes made.
Change something, like description, in the packages-meta-data.xml flile.. you should see the changes after you doe the package reload/restart.
Make sure to do a 'make clean' followed by 'make' or 'make all', or as one command 'make clean all' from the src directory.
-Larry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 12:43 AM
If I make a change to the java-source while java-vm is running, the change is not seen, until restart of java-vm, so the package is the (correct) one with the changes made.
Additionally here is your test:
I edited description in packages-meta-data.xml file, run make clean all afterwards, the change is seen after package reload via show.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 07:28 AM
Any updates on this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 07:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 09:44 AM
No interesting traces in the logs/console as far as I can see.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 10:04 AM
Okay, I have no idea why it doesn't work. Does packages package vpn redeploy work? It must be something that is different with your installation that causes it, but I have no idea what, you may have to raise a TAC-case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2019 12:13 AM
