[JBoss JIRA] (JBSEAM-5140) Install jboss-seam-mail with Maven and NullPointerException
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5140?page=com.atlassian.jira.plugi... ]
Marek Novotny updated JBSEAM-5140:
----------------------------------
Assignee: (was: Pete Muir)
> Install jboss-seam-mail with Maven and NullPointerException
> -----------------------------------------------------------
>
> Key: JBSEAM-5140
> URL: https://issues.jboss.org/browse/JBSEAM-5140
> Project: Seam 2
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Mail
> Affects Versions: 2.3.1.Final
> Environment: JBoss AS 7.1.1, Eclipse Kepler, Project Facets (Java 1.6, JSF 2.2, Seam 2.3) e Jboss-seam-mail 2.3.1.Final
> Reporter: Cláudio Torcato
>
> Post install jboss-seam-mail and configuratio components.xml and start application:
> 11:56:19,288 ERROR [org.jboss.seam.jsf.SeamPhaseListener] (http-localhost-127.0.0.1-8080-1) swallowing exception: java.lang.NullPointerException
> at org.jboss.seam.Component.getInstance(Component.java:2020) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
> at org.jboss.seam.Component.getInstance(Component.java:2013) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
> at org.jboss.seam.Component.getInstance(Component.java:2007) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
> at org.jboss.seam.Component.getInstance(Component.java:1980) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
> at org.jboss.seam.web.Session.getInstance(Session.java:122) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
> at org.jboss.seam.contexts.FacesLifecycle.beginRequest(FacesLifecycle.java:56) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
> at org.jboss.seam.jsf.SeamPhaseListener.beforeRestoreView(SeamPhaseListener.java:380) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
> at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:139) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
> at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:117) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (JBSEAM-5140) Install jboss-seam-mail with Maven and NullPointerException
by Cláudio Torcato (JIRA)
Cláudio Torcato created JBSEAM-5140:
---------------------------------------
Summary: Install jboss-seam-mail with Maven and NullPointerException
Key: JBSEAM-5140
URL: https://issues.jboss.org/browse/JBSEAM-5140
Project: Seam 2
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Mail
Affects Versions: 2.3.1.Final
Environment: JBoss AS 7.1.1, Eclipse Kepler, Project Facets (Java 1.6, JSF 2.2, Seam 2.3) e Jboss-seam-mail 2.3.1.Final
Reporter: Cláudio Torcato
Assignee: Pete Muir
Post install jboss-seam-mail and configuratio components.xml and start application:
11:56:19,288 ERROR [org.jboss.seam.jsf.SeamPhaseListener] (http-localhost-127.0.0.1-8080-1) swallowing exception: java.lang.NullPointerException
at org.jboss.seam.Component.getInstance(Component.java:2020) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.seam.Component.getInstance(Component.java:2013) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.seam.Component.getInstance(Component.java:2007) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.seam.Component.getInstance(Component.java:1980) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.seam.web.Session.getInstance(Session.java:122) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.seam.contexts.FacesLifecycle.beginRequest(FacesLifecycle.java:56) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.seam.jsf.SeamPhaseListener.beforeRestoreView(SeamPhaseListener.java:380) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:139) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:117) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (SEAM-143) javax.servlet.ServletException: WELD-000052 Cannot return null from a non-dependent producer method: [method] @Produces @LoggendIn @RequestScoped @Named public edu.unl.sbe.securiy.Account.getLogger
by Jimmy Añazco (JIRA)
Jimmy Añazco created SEAM-143:
---------------------------------
Summary: javax.servlet.ServletException: WELD-000052 Cannot return null from a non-dependent producer method: [method] @Produces @LoggendIn @RequestScoped @Named public edu.unl.sbe.securiy.Account.getLogger
Key: SEAM-143
URL: https://issues.jboss.org/browse/SEAM-143
Project: Seam 3 Distribution
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Environment: Seam 3, Jboss 7.2
Reporter: Jimmy Añazco
My application has this problem when multiple users use the application multiple times on the intranet but locally localhost bone runs without any problem on my machine some ideas please?
Please any idea about. Here the code
package edu.unl.sbe.security;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.ejb.TransactionAttribute;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Produces;
import javax.inject.Inject;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import edu.unl.sbe.cdi.LoggedIn;
import edu.unl.sbe.cdi.Web;
import edu.unl.sbe.model.profile.Profile;
import edu.unl.sbe.profile.ProfileService;
import edu.unl.sbe.security.authorization.SecurityRules;
import org.jboss.seam.security.Identity;
/**
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
* @adapter <a href="mailto:jimmy.anazco@gmail.com">Jimmy Alexander Añazco</a>
*
*/
@Named("account")
@RequestScoped
public class Account implements Serializable
{
private static final long serialVersionUID = 8474539305281711165L;
@Inject
@Web
private EntityManager em;
@Inject
private Identity identity;
@Inject
private ProfileService ps;
@PostConstruct
public void init()
{
ps.setEntityManager(em);
}
Profile loggedIn = new Profile();
@Produces
@LoggedIn
@RequestScoped
@Named("userProfile")
public Profile getLoggedIn()
{
if (identity.isLoggedIn() && !loggedIn.isPersistent())
{
try {
loggedIn = ps.getProfileByIdentityKey(identity.getUser().getKey());
}
catch (NoResultException e) {
throw e;
}
}
else if (!identity.isLoggedIn())
{}
return loggedIn;
}
@TransactionAttribute
public void saveAjax()
{
Profile current = getLoggedIn();
ps.save(current);
}
@TransactionAttribute
public void displayBootcampAjax()
{
Profile current = getLoggedIn();
current.setShowBootcamp(true);
ps.save(current);
}
@TransactionAttribute
public void dismissBootcampAjax()
{
Profile current = getLoggedIn();
current.setShowBootcamp(false);
ps.save(current);
}
public void setEntityManager(final EntityManager em)
{
this.em = em;
ps.setEntityManager(em);
}
public String accesoSistema(Identity role){
SecurityRules security=new SecurityRules();
if(security.isAdmin(identity)){
return "Admin";
}
else if(security.isBecas(identity)){
return "Becas";
}
else if(security.isPsicopedagogico(identity)){
return "Psicopedagogico";
}
else if (security.isDirector(identity)){
return "Director";
}
return "Estudiante";
}
public boolean accesoSistemaSBE(final String grupoIden) {
SecurityRules s = new SecurityRules();
if (SecurityRules.ADMIN.equals(grupoIden)) {
return s.isAdmin(identity);
} else if (SecurityRules.BECAS.equals(grupoIden)) {
return s.isBecas(identity);
} else if (SecurityRules.PSICOPEDAGOGICO.equals(grupoIden)) {
return s.isPsicopedagogico(identity);
} else if (SecurityRules.DIRECTOR.equals(grupoIden)) {
return s.isDirector(identity);
}
return false;
}
public String loadPages() {
if (identity.isLoggedIn()) {
return null;
}
return "/pages/login.xhtml";
}
//Metodo Agregado para cambio de contraseña
public Long getLoggedId() {
Long id = new Long(0);
if (identity.isLoggedIn()) {
try {
loggedIn = ps.getProfileByIdentityKey(identity.getUser().getKey());
if (loggedIn != null) {
id = loggedIn.getId();
return id;
}
} catch (NoResultException e) {
throw e;
}
} else if (!identity.isLoggedIn()) {
}
return id;
}
}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months