[JBoss Seam] - exception while instantiate Seam component
by Timofey
Hello. When i deploy my easy seam application on jboss AS i got the next exception.
| org.jboss.seam.InstantiationException: Could not instantiate Seam component: authenticator
| at org.jboss.seam.Component.newInstance(Component.java:1708)
| at org.jboss.seam.Component.getInstance(Component.java:1611)
| at org.jboss.seam.Component.getInstance(Component.java:1578)
| at org.jboss.seam.Component.getInstance(Component.java:1572)
| at org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
| at org.apache.el.parser.AstValue.getTarget(AstValue.java:42)
| at org.apache.el.parser.AstValue.invoke(AstValue.java:127)
| at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
| at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
| at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
| at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:106)
| at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:104)
| 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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
| at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
| at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)
| at java.security.AccessController.doPrivileged(Native Method)
| at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703)
| at javax.security.auth.login.LoginContext.login(LoginContext.java:575)
| at org.jboss.seam.security.Identity.authenticate(Identity.java:249)
| at org.jboss.seam.security.Identity.authenticate(Identity.java:242)
| at org.jboss.seam.security.Identity.login(Identity.java:172)
| 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.apache.el.parser.AstValue.invoke(AstValue.java:131)
| at org.apache.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)
| at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
| at javax.faces.component.UICommand.broadcast(UICommand.java:383)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:274)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:405)
| 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.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 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:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.naming.NameNotFoundException: TestH not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.seam.Component.instantiateSessionBean(Component.java:1075)
| at org.jboss.seam.Component.instantiate(Component.java:1061)
| at org.jboss.seam.Component.newInstance(Component.java:1704)
| ... 78 more
|
I write two next classes for authentification:
| @Stateless
| @Name("authenticator")
| public class AuthenticatorAction implements Authenticator
| {
| @PersistenceContext EntityManager em;
|
| @Out(required=false, scope = SESSION)
| private User user;
|
| public boolean authenticate()
| {
| List results = em.createQuery("select u from User u where u.username=#{identity.username} and u.password=#{identity.password}")
| .getResultList();
|
| if ( results.size()==0 )
| {
| return false;
| }
| else
| {
| user = (User) results.get(0);
| return true;
| }
| }
|
| }
|
| @Local
| public interface Authenticator
| {
| boolean authenticate();
| }
|
...and next security mapping in components.xml
| <security:identity authenticate-method="#{authenticator.authenticate}"
| security-rules="#{securityRules}"
| remember-me="true"/>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080287#4080287
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080287
18 years, 7 months
[Installation, Configuration & DEPLOYMENT] - Re: ERROR: relation
by robhadfield
Hi, most probably your have an hsqldb-jdbc2-state-service.xml file lying around in or beneath your deploy/ directory (probably deploy/jms). The SQL code it is failing on is the CREATE CACHED TABLE - so far as I know postgres does not support the CACHED keyword in this context.
In my server.log (you should have the same indicator to the smoking gun here) :
2007-09-02 10:51:11,622 DEBUG [org.jboss.mq.pm.jdbc2.PersistenceManager] Could not create table with SQL: CREATE CACHED TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
| org.postgresql.util.PSQLException: ERROR: syntax error at or near "CACHED" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
| ...<snip>
|
Don't ask me why this is different to the INFO log output which reports
10:51:11,634 WARN [ServiceController] Problem starting service jboss.mq:service=PersistenceManager
org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Message recovery may not be accurate; - nested throwable: (org.postgresql.util.PSQLException: ERROR: syntax error at or near "TXID")
Kind regards,
ROb
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080284#4080284
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080284
18 years, 7 months
[Tomcat, HTTPD, Servlets & JSP] - IllegalStateException: Current state = FLUSHED, new state =
by sirji
Hi all,
We are seeing the following error message intermittently in our Jboss env. We are using JBoss 4.0.5 (clustered with 3 nodes) with JDK 1.5 and ours is Struts based web application with log4j-1.2.14.
| 2007-09-02 05:22:21,924 ERROR [STDERR] java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END
| 2007-09-02 05:22:21,925 ERROR [STDERR] at java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:941)
| 2007-09-02 05:22:21,925 ERROR [STDERR] at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:537)
| 2007-09-02 05:22:21,925 ERROR [STDERR] at sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.java:358)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:414)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:160)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at java.io.FilterWriter.close(FilterWriter.java:92)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.FileAppender.closeFile(FileAppender.java:171)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.FileAppender.reset(FileAppender.java:302)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.FileAppender.setFile(FileAppender.java:271)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:156)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.RollingFileAppender.rollOver(RollingFileAppender.java:145)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:228)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
| 2007-09-02 05:22:21,926 ERROR [STDERR] at org.apache.log4j.Category.callAppenders(Category.java:187)
| 2007-09-02 05:22:21,927 ERROR [STDERR] at org.apache.log4j.Category.forcedLog(Category.java:372)
| 2007-09-02 05:22:21,927 ERROR [STDERR] at org.apache.log4j.Category.log(Category.java:864)
| 2007-09-02 05:22:21,927 ERROR [STDERR] at com.abcd.xyz.common.Logger.info(Logger.java:225)
This problem is not reproducible at will. So far, restart of JBoss instances helping us out. It is very critical problem for us, as JBoss stops showing any successful request execution after this problem. And forcefully, we have to restart the Jboss environment. We did some googling but didn't find any antidote for it.
Any pointers on this will be very helpful.
Regards,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080281#4080281
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080281
18 years, 7 months
[JBoss Seam] - How to refresh datamodel in EntityQuery
by karolkarol
A need to refresh datatable/datamodel from database. I want to do this from component that removes one of entity from the list.
I tried several ways:
1) reset to null datamodel on injected EntityQuery (userList) component
|
| public class EntityH<E> extends EntityHome<E> {
|
| @In(required = false)
| @Out(required = false)
| UserList userList;
| (........)
| @Override
| public String remove() {
|
| super.remove();
|
| if (userList!=null)
| {
| userList.entityDM = null;
| }
| userList.refresh();
| (........)
|
2) remove userList component from all context to force recreation
- this method was suggested on that forum
| Contexts.removeFromAllContexts("userList");
|
No one works - when redirecting to list page, deleted entity is still present.
All components are in one conversation scope becouse I really need to propagate faces messages.
Please help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080276#4080276
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080276
18 years, 7 months