build-impl.xml:930: The following error occurred while executing this line:

Asked

Viewed 1,299 times

0

I’m doing a college project, and every class I put together to inherit from the class Modelo, I get these mistakes.

/home/tavz-correia/Netbeansprojects/exercicio01/Acessoriosparaveiculos/nbproject/build-impl.xml:930: The following error occurred while executing this line:

/home/tavz-correia/Netbeansprojects/exercicio01/Accessoriesapples/nbproject/build-impl.xml:270: Compile failed; see the Compiler error output for Details.

Class Modelo.java:

package acessoriosveiculos;

import java.io.FileReader;
import java.util.List;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;

/**
 *
 * @author tavz-correia
 */
public class Modelo {

         private List<String> modelos;

    public Modelo() throws Exception{

        List<String> lista = ler("/home/tavz-correia/NetBeansProjects/exercicio01/AcessoriosVeiculos/src/acessoriosveiculos/ObjetosSerializados/Modelos.ser");
        this.setModelos(lista);
    }

    public List<String> getModelos() {
        return modelos;
    }

    public void setModelos(List<String> modelo) {
        this.modelos = modelo;
    }

    @SuppressWarnings("unchecked")
    public List<String> ler(String caminho) throws Exception {

        JSONParser parser = new JSONParser();
        FileReader arquivo = new FileReader("/home/tavz-correia/NetBeansProjects/exercicio01/AcessoriosVeiculos/src/acessoriosveiculos/ObjetosSerializados/Modelos.json");
        JSONObject jsonObject = (JSONObject) parser.parse(arquivo);
        List<String> lista = (List<String>) jsonObject.get("modelos");

        return lista;
    }
}

Could someone help me?

2 answers

1

[From here I started to write as a comment, but I saw that maybe it serves as an answer].

I’ve seen Netbeans give out strange bugs when it corrupts its cache. Netbeans maintains a file cache so that it can track and undo changes, and index the contents of the files more easily. However, from time to time something occurs, in some mysterious way, to mock this cache and then drive Netbeans crazy. Sometimes he ends up getting back to normal on his own, in a way as mysterious as the way he zoomed, but every now and then he doesn’t come back to normal at all.

On my machine, this cache is located in hidden system subfolders C:\Users\<nome-do-usuário>\AppData\Roaming\NetBeans\8.1\var and C:\Users\<nome-do-usuário>\AppData\Local\NetBeans\Cache\8.1\. Sometimes I have to close the Netbeans IDE, clean/delete this folder, open the Netbeans IDE again, and reconfigure it to get it back to normal.

In your case, as you are using Linux, the cache will probably be somewhere within /home/etc, I think.

  • Delete everything contained in the netbeans folder within . cache ?

  • Yeah, you can try that. If you want to make sure you’re not doing anything stupid, just rename it to something else. Erasing it once and for all if you’re firm on your decision or going back to your old name if you think it won’t help.

0

In my case I solved cleaning all libraries and reinserting only a few that the project needed.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.