-
1. Re: Seam identity problem
swd847 Jun 16, 2009 2:22 PM (in response to sherkan777)Your going to have to post more than that. The stack trace and the code for the class where the stack trace occurs would be a start.
-
2. Re: Seam identity problem
sherkan777 Jun 16, 2009 4:57 PM (in response to sherkan777)Sure:)
Here is my configuration at now.
I've switched to tomcat without managed transactions (only jdbc for app)My app uses, richfaces, facelets, jsf, seam 2.0.1GA
This problem happen only after server startup. Sometimes when server start I try to login and I get this:
2009-06-16 16:46:41,266 ERROR [org.jboss.seam.web.ExceptionFilter] handling uncaught exception javax.servlet.ServletException: #{identity.login}: java.lang.NullPointerException at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281) at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) Caused by: javax.faces.FacesException: #{identity.login}: java.lang.NullPointerException at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107) at javax.faces.component.UICommand.broadcast(UICommand.java:383) at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184) at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162) at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) ... 28 more Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91) ... 36 more Caused by: java.lang.NullPointerException at org.drools.common.AbstractWorkingMemory.addHandleToMaps(AbstractWorkingMemory.java:1045) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:761) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659) at org.jboss.seam.security.RuleBasedIdentity.synchronizeContext(RuleBasedIdentity.java:248) at org.jboss.seam.security.RuleBasedIdentity.addRole(RuleBasedIdentity.java:203) at org.jboss.seam.security.Identity.postAuthenticate(Identity.java:298) at org.jboss.seam.security.RuleBasedIdentity.postAuthenticate(RuleBasedIdentity.java:80) at org.jboss.seam.security.Identity.authenticate(Identity.java:260) at org.jboss.seam.security.Identity.authenticate(Identity.java:248) at org.jboss.seam.security.Identity.login(Identity.java:205) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342) at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58) at org.jboss.el.parser.AstValue.invoke(AstValue.java:96) at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77) ... 37 more 2009-06-16 16:46:41,270 ERROR [org.jboss.seam.web.ExceptionFilter] exception root cause javax.faces.FacesException: #{identity.login}: java.lang.NullPointerException at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107) at javax.faces.component.UICommand.broadcast(UICommand.java:383) at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184) at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162) at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281) at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91) ... 36 more Caused by: java.lang.NullPointerException at org.drools.common.AbstractWorkingMemory.addHandleToMaps(AbstractWorkingMemory.java:1045) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:761) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659) at org.jboss.seam.security.RuleBasedIdentity.synchronizeContext(RuleBasedIdentity.java:248) at org.jboss.seam.security.RuleBasedIdentity.addRole(RuleBasedIdentity.java:203) at org.jboss.seam.security.Identity.postAuthenticate(Identity.java:298) at org.jboss.seam.security.RuleBasedIdentity.postAuthenticate(RuleBasedIdentity.java:80) at org.jboss.seam.security.Identity.authenticate(Identity.java:260) at org.jboss.seam.security.Identity.authenticate(Identity.java:248) at org.jboss.seam.security.Identity.login(Identity.java:205) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342) at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58) at org.jboss.el.parser.AstValue.invoke(AstValue.java:96) at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77) ... 37 more
After another try to restart and try to login, I can or not login.
Sometimes I need to restart one, two, three etc. times server to get identity login working.
If server starts and I get this exception, none can login since I restart server.
If server starts fine, app works fine until I restart it again.Here is my components.xml
<?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:async="http://jboss.com/products/seam/async" xmlns:persistence="http://jboss.com/products/seam/persistence" xmlns:security="http://jboss.com/products/seam/security" xmlns:transaction="http://jboss.com/products/seam/transaction" xmlns:drools="http://jboss.com/products/seam/drools" xmlns:theme="http://jboss.com/products/seam/theme" xmlns:web="http://jboss.com/products/seam/web" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd http://jboss.com/products/seam/async http://jboss.com/products/seam/async-2.0.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd http://jboss.com/products/seam/theme http://jboss.com/products/seam/theme-2.0.xsd http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd"> <!-- <core:init jndi-pattern="@jndiPattern@" debug="false"/>--> <core:init transaction-management-enabled="false"/> <transaction:no-transaction /> <core:manager conversation-timeout="60000" concurrent-request-timeout="500" conversation-id-parameter="cid"/> <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="false" /> <drools:rule-base name="securityRules"> <drools:rule-files><value>/META-INF/security-rules.drl</value></drools:rule-files> </drools:rule-base> <component name="org.jboss.seam.remoting.remoting"> <property name="debug">false</property> </component> <factory name="remoteAddr" value="#{facesContext.externalContext.request.remoteAddr}"/> <theme:theme-selector cookie-enabled="true" /> <async:quartz-dispatcher/> </components>
My war/WEB-INF/lib jars list:
<include name="antlr.jar" /> <include name="antlr-runtime.jar" /> <include name="commons-beanutils.jar" /> <include name="commons-collections.jar" /> <include name="commons-digester.jar" /> <include name="commons-logging.jar" /> <include name="dom4j.jar" /> <include name="drools-compiler.jar" /> <include name="drools-core.jar" /> <include name="hibernate.jar" /> <include name="hibernate-validator.jar" /> <include name="javassist.jar" /> <include name="jboss-el.jar" /> <include name="jboss-seam.jar" /> <include name="jboss-seam-remoting.jar" /> <include name="jboss-seam-ui.jar" /> <include name="jsf-api.jar" /> <include name="jsf-facelets.jar" /> <include name="jsf-impl.jar" /> <include name="jstl.jar" /> <include name="jta.jar" /> <include name="mail.jar" /> <include name="persistence-api.jar" /> <include name="quartz.jar" /> <include name="richfaces-api.jar" /> <include name="richfaces-impl.jar" /> <include name="richfaces-ui.jar" /> <include name="mvel14.jar" /> <include name="commons-lang.jar" />
What do you need else?
-
3. Re: Seam identity problem
swd847 Jun 16, 2009 11:03 PM (in response to sherkan777)Can you post the code for the authenticator? The important bit of the stack trace is:
Caused by: java.lang.NullPointerException at org.drools.common.AbstractWorkingMemory.addHandleToMaps(AbstractWorkingMemory.java:1045) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:761) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659) at org.jboss.seam.security.RuleBasedIdentity.synchronizeContext(RuleBasedIdentity.java:248)
Something is not right with your drools setup.
-
4. Re: Seam identity problem
sherkan777 Jun 17, 2009 9:32 AM (in response to sherkan777)My authenticator class is little big:)
This is my drools file:
package SGUniPermissions;
here is my authenticator without methods:
@Name("authenticator") public class Authenticator extends SecurityEngine implements Serializable { private static final long serialVersionUID = 1L; public Authenticator() { checkMultiLogin = true; } @In("#{remoteAddr}") private String ipString; private String selectedWorld; @In(scope=ScopeType.APPLICATION, value="gameStatus", required=false) private Boolean gameStatus; private String errorMsg; private boolean checkMultiLogin; @SuppressWarnings("deprecation") public boolean authenticate() { boolean ret = false; Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; try { errorMsg = ""; disabledLeave = false; if (canLogin()) { boolean userFlag = true; if (identity.getUsername().length() == 0) { errorMsg = messages.get("login.giveLogin"); userFlag = false; } else if (identity.getUsername().length() < 2) { errorMsg = messages.get("login.loginToShort"); userFlag = false; } if (identity.getPassword().length() == 0) { errorMsg = messages.get("login.givePassword"); userFlag = false; } else if (identity.getPassword().length() < 2) { errorMsg = messages.get("login.passwordToShort"); userFlag = false; } if (identity.getUsername().length() == 0) { errorMsg = messages.get("login.givePassword"); userFlag = false; } if (identity.getUsername().contains("Test") && identity.getPassword().contentEquals("Test")) dbWorld = 1; else { if (Validator.isInt(selectedWorld)) dbWorld = Integer.parseInt(selectedWorld); else userFlag = false; } if (isPlayerThrowedOutByCookie()) { errorMsg = messages.get("system.throwedOut"); userFlag = false; } boolean disableBanFlag = false; if (userFlag) { conn = ConnEngine.getConn(dbWorld); String password = ""; Date currentTime = new Date(); Date banTime = null; int account = 0; ps = conn.prepareStatement("SELECT p.password, p.acc_status, p.id, pd.ban_time " + "FROM Person p, Person_Data pd " + "WHERE p.username = ? " + "AND p.password = ? " + "AND p.id = pd.person_id"); ps = addParam(ps, 1, identity.getUsername()); ps = addParam(ps, 2, identity.getPassword()); rs = ps.executeQuery(); while (rs.next()) { password = rs.getString(1); account = rs.getInt(2); idPerson = rs.getInt(3); banTime = convTimestampToDate(rs.getTimestamp(4)); } if (idPerson == null) { errorMsg = messages.get("login.noUser"); userFlag = false; } else { if (identity.getPassword().contentEquals(password)== false) { errorMsg = messages.get("login.passwordError"); userFlag = false; } else if (account == AccountStatus.NOT_ACTIVE) { errorMsg = messages.get("login.accountNotActive"); userFlag = false; } else if (account == AccountStatus.BLOCKED && idPerson != null) { errorMsg = loadBanReason(idPerson, conn); userFlag = false; } else if (account == AccountStatus.BANNED && idPerson != null) { if (currentTime.getTime() < banTime.getTime()) { errorMsg = loadBanReason(idPerson, conn); userFlag = false; } else { disableBanFlag = true; } } else if (account == AccountStatus.THROWED_OUT) { errorMsg = messages.get("system.throwedOut"); userFlag = false; saveThrowedOutCookie(); } } } if (userFlag) { if (isIPBlocked(ipString, conn)) { userFlag = false; errorMsg = loadBanReason(idPerson, conn); } } if (userFlag) { Date currentTime = new Date(); currentPerson = loadPerson(idPerson, true, conn); if (disableBanFlag) currentPerson.setAcc_status(AccountStatus.ACTIVE); boolean isModerator = false; ps = conn.prepareStatement("SELECT r.name FROM person_has_role phr, roles r WHERE phr.person_id = ? AND phr.role_id = r.id"); ps = addParam(ps, 1, idPerson); rs = ps.executeQuery(); while (rs.next()) { String roleName = rs.getString(1); identity.addRole(roleName); if (roleName.contentEquals("moderator")) isModerator = true; } List<String> alianceRoles = Converters.encodeAlianceRole(currentPerson.getAliance_leader()); for (int i = 0; i < alianceRoles.size(); i++) identity.addRole(alianceRoles.get(i)); if (currentPerson.getPremium_time() != null) { identity.addRole("premium"); premium = Integer.valueOf(1); } else premium = Integer.valueOf(0); if (currentPerson.getPremium_time() != null) { if (currentPerson.getPremium_time().getTime() < currentTime.getTime()) currentPerson.setPremium_time(null); } if (currentPerson.getAcc_status() == AccountStatus.BLOCKED) currentPerson.setAcc_status(AccountStatus.ACTIVE); currentPerson.getPerson_data().setBan_time(null); main = Integer.valueOf(0); country = currentPerson.getPerson_data().getCountry(); idPerson = currentPerson.getId(); idCapital = loadCapitalPlanetId(idPerson, conn); idPlanet = idCapital.intValue(); boolean multiAccountAlert = false; if (isModerator == false && currentPerson.getUsername().contentEquals("Test") == false && checkMultiLogin) { //multiAccountAlert = checkMultiLogin(currentPerson.getUsername(), dbWorld, idPerson, conn); } if (multiAccountAlert) { identity.removeRole("user"); identity.logout(); errorMsg = messages.get("login.multiAccount"); } else { Planets userPlanet = loadPlanet(idCapital, conn, true, true, true, false, false, false, true); //currentPerson = addPersonBonus(userPlanet, world); idPersonData = currentPerson.getPerson_data().getId(); userTech = loadUserTech(conn, idPerson); person_data = currentPerson.getPerson_data(); int person_points = currentPerson.getPerson_data().getTop_army() + currentPerson.getPerson_data().getTop_eco() + userTech.getTop_tech(); if (currentPerson.getPerson_data().getLeave_time() != null) disabledLeave = Boolean.valueOf(true); else disabledLeave = Boolean.valueOf(false); this.galaxy = userPlanet.getGalaxy().getGalaxy(); this.system = userPlanet.getGalaxy().getSystem(); this.planet = userPlanet.getGalaxy().getPlanet(); logLogin(idPerson, ipString, UserLoginReports.LOGIN_SUCCESFULL, conn); if (currentPerson.getPerson_data().isFull_account_activate() == false && person_points >= 500) { shortEventEmail(idPerson, LetterType.FULL_ACTIVATE_BY_POINTS, "", 0, 0, 0, 0, 0, conn); currentPerson.getPerson_data().setFull_account_activate(true); } currentPerson.getPerson_data().setWarning_sended(false); userPlanet = addPersonBonus(idPerson, userPlanet, conn); resourcesAction = new ResourcesAction(); long scrap = updateAndCorrectScrap(userPlanet.getResources().getScrap(), userPlanet.getBuildings().getScrapyard(), false, conn); userPlanet.getResources().setScrap(scrap); userPlanet = calculatePlanetProduction(userPlanet, conn); resourcesAction.fillResources(userPlanet, true); //======================================================== ps = conn.prepareStatement("SELECT * FROM count_not_readed_messages(?)"); ps = addParam(ps, 1, idPerson); rs = ps.executeQuery(); int index = 0; while (rs.next()) { switch (index) { case (0) : resourcesAction.setNewMessages(rs.getInt(1)); break; case (1) : resourcesAction.setSpyReports(rs.getInt(1)); break; case (2) : resourcesAction.setWarReports(rs.getInt(1)); break; } index++; } resourcesAction.fillPlanetsList(loadPlanetsName(idPerson, conn)); resourcesAction.fillPlanetAction(BLANK_ADR, PLANETS_ADR, messages, userPlanet, this.galaxy, this.system, this.planet); resourcesAction.setPointsPosition(checkPersonPointsPosition(idPerson, conn)); resourcesAction.setSelectedPlanet(resourcesAction.getAllPlanets().get(0).getLabel()); resourcesAction.setCountry(getCivStatus(currentPerson.getPerson_data().getCountry())); resourcesAction.setPoints(person_points); loadSysParameters(); ret = true; updatePerson(currentPerson, conn); updatePersonData(person_data, conn); } conn.commit(); } } } catch (SQLException e) { rollback(conn); e.printStackTrace(); } catch (Exception e) { rollback(conn); e.printStackTrace(); } finally { closePS(ps); closeRS(rs); closeConn(conn); } return ret; }
or if u tell me with line u want to see.
My authenticator extends by abstract class my identity.
public abstract class SecurityEngine extends PersonSystem { public SecurityEngine() {} @In protected Identity identity; }
-
5. Re: Seam identity problem
sherkan777 Jun 17, 2009 8:45 PM (in response to sherkan777)Hi Stuart,
Maybe this exception happen because of injecting Identity by annotation to abstract class? -
6. Re: Seam identity problem
swd847 Jun 18, 2009 2:43 AM (in response to sherkan777)What version of drools are you using?
-
7. Re: Seam identity problem
sherkan777 Jun 18, 2009 10:01 AM (in response to sherkan777)drools-core.jar has manifest file like:
Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: fmeyer Build-Jdk: 1.5.0_07 Specification-Title: Drools :: Compiler Specification-Version: 4.0.3 Specification-Vendor: JBoss Inc. Implementation-Title: Drools :: Compiler Implementation-Version: 4.0.3 Implementation-Vendor-Id: org.drools Implementation-Vendor: JBoss Inc.
-
8. Re: Seam identity problem
sherkan777 Jun 18, 2009 10:02 AM (in response to sherkan777)sorry, that was drool-compiler.jar
this is drool-core.jar
Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: fmeyer Build-Jdk: 1.5.0_07 Specification-Title: Drools :: Rete-OO Core Specification-Version: 4.0.3 Specification-Vendor: JBoss Inc. Implementation-Title: Drools :: Rete-OO Core Implementation-Version: 4.0.3 Implementation-Vendor-Id: org.drools Implementation-Vendor: JBoss Inc.
-
9. Re: Seam identity problem
swd847 Jun 18, 2009 11:13 AM (in response to sherkan777)Try upgrading to 4.0.7 and see if that helps
-
10. Re: Seam identity problem
sherkan777 Jun 18, 2009 12:26 PM (in response to sherkan777)Yep, I think this is it.
over 10 tomcat 6.0 restarts, 10 logins without problem:)
Do you know what was that?But now I've got another problem.
My logout button not working (previos it worked).I get this after click on logout:
this is my logout link in menu:<s:link value="#{messages['gameMenu.logout']}" propagation="none" action="#{identity.logout}" />
pages.xml event handler:
<page view-id="/pages/*" login-required="true"> <navigation from-action="#{identity.logout}"> <redirect view-id="/index.html"/> </navigation> </page>
after user logout page url looks like this
/pages/planet.seam?actionMethod=pages%2Fplanet.xhtml%3Aidentity.logout
and it seems that user session isn't destroyed. I can again order on my menu.
U can see it yourself here on test server: http://jokes.com.pl
login/pass: Test/Test -
11. Re: Seam identity problem
sherkan777 Jun 18, 2009 12:47 PM (in response to sherkan777)strange, after couple more restarts, logout started to work..hmmmm
-
12. Re: Seam identity problem
rmrui Jun 9, 2010 3:43 PM (in response to sherkan777)Updating drools worked for me. Thanks!