Good afternoon, I'm trying to run a code on Vraptor, which when running my route, I need the system to trigger a connection using a URL to a page and return the body.
This is a method of my controller
public void exe(){
try{
URL oracle = new URL("http://www.google.com.br");
URLConnection yc = oracle.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}catch(Exception e){
System.out.println("ERROR");
}
result.redirectTo(HomeController.class).index();
return;
}
I've put here a test-only example, and the following error is returned:
WELD-001435: Normal scoped bean class br.com.teste.controllers.ModuloController is not proxyable because it has no no-args constructor - <unknown javax.enterprise.inject.spi.Bean instance>.
Can anyone help me?