Problema con Tutorial JavaEE: Annotations from javax.faces.bean will be deprecated
Hola, estoy leyendo el tutorial de Java EE de Oracle, y al tratar de hacer el primer ejercicio me genera el siguiente error:
Annotations from the packages javax.faces.bean will be deprecated in the next JSF version. CDI ones are recommended instead.
CONSOLA:
Error during deployment : class com.sun.faces.application.annotation.PersistenceUnitScanner cannot access its superinterface com.sun.faces.application.annotation.Scanner
/home/user/glassfish-3.0.1/glassfish/docs/javaee-tutorial/examples/web/hello1/nbproject/build-impl.xml:1023: The module has not been deployed.
See the server log for details.
IDE LOG:
The module has not been deployed.
See the server log for details.
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
INFO [org.glassfish.tools.ide]: Caught InterruptedIOException: null
¿Debo reemplazar esta librerías? :
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
???
- Inicie sesión o regístrese para enviar comentarios
Era Java EE 6
Ya encontré, que el tutorial era para Java EE 6, y ahora revisando el Java EE 7, las anotaciones son diferentes:
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
@Named
@RequestScoped