Any class or function launched an Exception while running out of a block try { } catch
. This can be for several reasons. You’ll have to see what the function classeBean.salvar()
may be doing that caused this mistake.
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 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 is 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 created it with different credentials, or it may be that the tables do not exist, or that the library that your Java program is using to connect is incompatible with the server version.
"O problema ocorreu quando migrei de pc"
This is evidence that the program is heavily tied to some feature of the original PC environment. This is considered a dangerous practice for programming, so I suggest completely review the code that leads to error.– Oralista de Sistemas