Some class or function has thrown an Exception while running out of a try { } catch
block. This can be for several reasons. You will have to see what the classeBean.salvar()
function might be doing that caused this error.
You may think the code is correct, and maybe it is, but there are other external factors to consider.
For example, if you are saving to a file, does the path to that file exist? Even if the program is able to create the file by itself, it will not create the folder path, and this will cause an unexpected error when trying to create or open the file in a folder that does not exist.
Or if it's a database, is it still able to connect to the database? It may be that in this change of PC you have forgotten to install the SGBD , create the user / password, or have the created with different credentials, or it may be that the tables do not exist, or that the library your Java program is using to connect is incompatible with the server version.