Showing results for 
Search instead for 
Did you mean: 

No Effect on Packages Reload after Java-Code-Adjustment



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,

11 Replies 11

Cisco Employee
Cisco Employee
Hi Mesut

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.

Hi vleijon

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,

No, packages/vlan/src should be the right directory to build in in 4-rfs-service. I wonder why it doesn’t happen until you restart the java-vm. Does packages reload give an error? Check show alarms for problems. Also make sure that the timestamp on the file in private-jar changes.

No, packages reload does not give an error.

show alarms in the cli states no problems.

The timestamp on the file in private-jar changes correctly.

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.





Hi Larry

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.

Any updates on this?

I have never seen this, can you check in state/packages-in-use/1/ and check that the jar file gets copied over okay? What does devel.log, ncs-java-vm.log and ncs.log say, any interesting traces?

Yes, the jar files get copied over okay.
No interesting traces in the logs/console as far as I can see.

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.

Confirmed, thanks.