[jboss-user] [JBoss Seam] - Re: Error selecting object
I have tried seam-gen. It does not produce a flawless project, I had to add some jars manually into the build.xml. and this is only the barebone application generated. (Shouls I submit an issue about it?) Anyway, after all with the barebone application I am hitting the following: | 17:19:01,406 INFO [Initialization] done initializing Seam | 17:19:01,484 ERROR [STDERR] May 4, 2007 5:19:01 PM com.sun.faces.config.ConfigureListener contextInitialized | INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b10-p01) for context 'null' | 17:19:01,891 ERROR [STDERR] java.lang.UnsupportedOperationException | 17:19:01,906 ERROR [STDERR] at com.sun.faces.config.ConfigureListener$InitFacesContext.getViewRoot(ConfigureListener.java:1690) | 17:19:01,906 ERROR [STDERR] at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:113) | 17:19:01,906 ERROR [STDERR] at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:277) | 17:19:01,906 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:855) | 17:19:01,922 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:502) | 17:19:01,922 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:402) | 17:19:01,922 ERROR [STDERR] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763) | 17:19:01,938 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211) | 17:19:01,938 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) | 17:19:01,938 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) | 17:19:01,938 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) | 17:19:01,953 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | 17:19:01,953 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | 17:19:01,953 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | 17:19:01,953 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597) | 17:19:01,969 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) | 17:19:01,969 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) | 17:19:01,969 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) | 17:19:01,969 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052) | 17:19:01,984 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | 17:19:01,984 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | 17:19:01,984 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | 17:19:02,000 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597) | 17:19:02,000 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) | 17:19:02,000 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) | 17:19:02,000 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) | 17:19:02,016 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297) | 17:19:02,016 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103) | 17:19:02,031 ERROR [[/gop]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener | javax.faces.FacesException: java.lang.UnsupportedOperationException | at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:408) | at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763) | at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211) | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) | 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:597) | at
[jboss-user] [JBoss Seam] - Re: Error selecting object
I have downloaded jboss-seam-CVS.20070503 and rearranged libraries etc. to use it instead of 1.2.1GA but I cannot seem to get past the following exception. Exception during request processing: javax.el.ELException: Error Parsing: #{isteklerAction.selectIstek(i)} | | com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:140) | com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:157) | com.sun.el.lang.ExpressionBuilder.createMethodExpression(ExpressionBuilder.java:208) | com.sun.el.ExpressionFactoryImpl.createMethodExpression(ExpressionFactoryImpl.java:63) | org.jboss.seam.core.Expressions$2.createExpression(Expressions.java:95) | org.jboss.seam.core.Expressions$2.invoke(Expressions.java:99) | org.jboss.seam.core.Pages.callAction(Pages.java:499) | org.jboss.seam.core.Pages.enterPage(Pages.java:284) | org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:276) | org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:214) | org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56) | com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:214) | com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140) | javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) | org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397) | org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) | org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) | org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57) | org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216) | org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) | org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) | org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216) | org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) | org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:126) | org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:248) | org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216) | org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184) | org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276) | org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) | org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) | org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240) | org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042821#4042821 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042821 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Error selecting object
In a form I fill values for an Istek object and use the combobox as a lookup for its member gorevli. I expect this mechanism to assign the selected Uzman object to the member gorevli. No stacktrace, no exceptions. Here is the corresponding action bean IsteklerAction. I have removed a lot for clarity: | @Stateful | @Name(isteklerAction) | @Scope(ScopeType.SESSION) | public class IsteklerAction implements Serializable, IsteklerActionLocal { | | @PersistenceContext(type=PersistenceContextType.EXTENDED) | private EntityManager entityManager; | | public IsteklerAction() {} | | @DataModel | private ListIstek isteklerList; | | @In(required=false) @Out(required=false) | private Istek istek; | | @Factory(isteklerList) | public void refreshIstekler(){ | System.out.println(refreshing istekler); | isteklerList=entityManager.createQuery(from Istek i order by acilis).getResultList(); | } | | @Out | private ListUzman uzmanlar; | | private void refreshUzmanlar(){ | uzmanlar=entityManager.createQuery(from Uzman u).getResultList(); | } | | public void refresh() { | refreshIstekler(); | refreshUzmanlar(); | } | | public void save() { | | if (status==N){ | entityManager.persist(istek); | } else { | istek=entityManager.merge(istek); | } | status=V; | refreshIstekler(); | } | And the Istek class has a member named gorevli which is an Uzman. | @Name(istek) | @Scope(ScopeType.PAGE) | @Entity | public class Istek implements Serializable { | @Id @GeneratedValue(strategy=GenerationType.IDENTITY) | private Long id; | | @ManyToOne | private Uzman gorevli; | ... | } Uzman extends Kullanici whis has the @Id field: @Entity | @DiscriminatorValue(value=U) | public class Uzman extends Kullanici { | | @OneToMany(mappedBy=gorevli) | private java.util.ListIstek gorevler; | | @ManyToMany(mappedBy=gorevliler) | private SetProje sorumluluklar; | ... | } | | ... | | @Entity | @Name(kullanici) | @Scope(ScopeType.CONVERSATION) | @Role(name=login,scope=ScopeType.SESSION) | @Inheritance(strategy=InheritanceType.SINGLE_TABLE) | @DiscriminatorColumn(name=turu,discriminatorType=DiscriminatorType.CHAR) | @DiscriminatorValue(value=S) | public class Kullanici implements java.io.Serializable { | @Id @GeneratedValue(strategy=GenerationType.IDENTITY) | private Long id; | private String ad; | private String adSoyad; | private String parola; | } | | Best regards. Levent View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042294#4042294 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042294 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Error selecting object
Ok, I went through creating equals and hashcode methods for the Kullanici and Uzman as well. IMHO I have doen a decent implementation with commns-lang hashcode and equals builders. Yet the problem is still there. With message I mean a JSF message that can be seen by h:messages/. And the message is Error selecting object This message is from the source : | @Name(org.jboss.seam.ui.entityConverter) | @Scope(ScopeType.CONVERSATION) | @Install(precedence = BUILT_IN) | @Converter | @Intercept(NEVER) | public class EntityConverter implements | javax.faces.convert.Converter, Serializable | { | |private ValueBindingEntityManager entityManager; | |private Log log = Logging.getLog(EntityConverter.class); | |private String errorMessage = Error selecting object; View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042463#4042463 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042463 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Error selecting object
Hello there, I have a combo box: | h:selectOneMenu id=gorevli value=#{istek.gorevli} | s:selectItems value=#{isteklerAction.uzmanlar} var=item |label=#{item.id}-#{item.ad} noSelectionLabel=Lutfen Seciniz.../ | s:convertEntity / | /h:selectOneMenu | No exception but it messages: Error selecting object. What can possibly be wrong? How could I debug? Best regards, Levent View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4041849#4041849 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4041849 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: inconsistent behaviour
I have had that already and it even may (and usually does) give the error at the very first run. And there never is a permGen error in the log. I am not sure but I am relating it with me moving the library jars out of the project (to have a smaller .ear file) and adding these jars to the application server's classpath. I also have not managed log4j to find log4j.properties and initialize properly and after a lot of googling I have a feeling that it may be something to do with the class loader. There I have really near-to-zero knowledge about class loaders and about how an application server employs one (or many) Anything? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4038240#4038240 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4038240 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: inconsistent behaviour
Oops! All I meant was to speed up while developing. That turns into a different subject now but please bear with me: I wish to know how you guys out there handling this. In the case I put things into the war/ear's lib I have a large file and that slows down build-deploy-run cycle. Just because it zips and unzips. And that specifically seems to take more time with NetBeans-JBoss combination: It removes the .ear to undeploy, then copies the new .ear and then JBoss unzips it and reinitialize everything and run. All of these take a really long time. With Netbeans-SJSAS however it does something more like an incremental deployment. It takes significantly less time. The difference was so significant that I switched to SJSAS and abandoned JBoss. Then I managed to even improve the deploy time further by taking the seam jars and hibernate jars (with SJSAS I have to ship hibernate jars as I want hibernate for the persistence) out of the project's war/ear and added those jars' paths to the server classpath (not copied them into the lib dir) Now you say that this is useless/unconventional/not recommended so I wonder how people go along with the development cycle. Doesn't it take a huge time, say correcting a typo and re-run? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4038393#4038393 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4038393 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - inconsistent behaviour
I have an app with following: Seam 1.2.1GA Facelets 1.1.12 SJSAS Platform Edition 9.0_01 (build b02-p01) Hibernate I am able to run the app perfectly but at some runs, randomly, I get something like the following. I rerun, redeploy, restart server randomly (I cannot find a consistent pattern to resolve) and it eventually starts to run correctly again. Then after a few cycles of develop-compile-run I hit it again. My best guess is some things in the application server are initialized asynchronously so that sometimes my app cannot find the bean thru jndi. I can not think of a way to resolve this. Any ideas. org.jboss.seam.InstantiationException: Could not instantiate Seam component: isteklerAction at org.jboss.seam.Component.newInstance(Component.java:1740) at org.jboss.seam.Component.getInstance(Component.java:1643) at org.jboss.seam.Component.getInstance(Component.java:1610) at org.jboss.seam.Component.getInstance(Component.java:1604) at org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:62) at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:68) at com.sun.el.parser.AstValue.getValue(AstValue.java:107) at com.sun.el.parser.AstEqual.getValue(AstEqual.java:41) at com.sun.el.parser.AstOr.getValue(AstOr.java:41) at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192) at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71) at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:402) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer$RenderedChildIterator.update(HtmlBasicRenderer.java:673) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer$RenderedChildIterator.next(HtmlBasicRenderer.java:658) at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:153) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:828) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:232) at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:277) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:828) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:883) at javax.faces.render.Renderer.encodeChildren(Renderer.java:137) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:828) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:883) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667) at
[jboss-user] [JBoss Seam] - security pattern
This is a pattern question: I have implemented something similar to the login and authentication through the security chapter. I have a User class myself and I authenticate through querying it from the database. Both Seam provided Identity and my User classes have members like username, password etc. and basically they refer to the same notion. How is it recommended that I relate Identity with the user I got from the database? Should I extend Identity to build my User class perhaps? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4036727#4036727 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4036727 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @DataModel does not create a component
Nope I have tried that already and tried once again to make sure. Also, I don't think I must have a @Factory method. I already have a @Create and I initialize the list there. I dump the contents of the List and I am certain it is initialized. Problem is just that it is not recognized by Seam as a component. For that reason, even the @Factory method does not get called. It must have something to do with the configuration View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4033892#4033892 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4033892 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @DataModel does not create a component
I wish it was a typo. The typo must have slipped in while suspecting everything and trying alternatives wildly. I have corrected the typo but the situation is same. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4033665#4033665 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4033665 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @DataModel does not create a component
Nothing, the getter is not even gets called. Whatever i write as the table's var (i.e. as i did with the typo and i also tried a weird string like qwerty) it does not complain about it; no exceptions or messages. It is like it just does not care about it. The interesting part is that when I check with seam-debug isteklerList does not exist in any context. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4033740#4033740 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4033740 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @Logger does not inject
Not in the constructor. Here is my class: | | package datassist.gop.action; | | import datassist.gop.domain.Istek; | import java.util.ArrayList; | import java.util.List; | import javax.ejb.Remove; | import javax.ejb.Stateful; | import javax.persistence.EntityManager; | import javax.persistence.PersistenceContext; | import javax.persistence.PersistenceContextType; | import org.jboss.seam.annotations.Create; | import org.jboss.seam.annotations.Destroy; | import org.jboss.seam.annotations.Logger; | import org.jboss.seam.annotations.Name; | import org.jboss.seam.annotations.datamodel.DataModel; | import org.jboss.seam.log.Log; | | @Stateful | @Name(istekler) | public class IsteklerAction implements IsteklerActionLocal { | | @PersistenceContext(type=PersistenceContextType.EXTENDED) | private EntityManager em; | | public IsteklerAction() { | } | | @Create | public void init(){ | System.out.println(initing istekler. logger is +((logger==null)?null:not null)); | //logger.debug(initing); | refresh(); | } | | @DataModel | private ListIstek istekList=new ArrayListIstek(); | | public void refresh(){ | System.out.println(refreshing istekler); | //logger.debug(refreshing); | istekList=em.createQuery(from Istek i).getResultList(); | } | | public void logSomething(){ | System.out.println(Trying to log something dummy and the logger is +((logger==null)?null:not null)); | //logger.debug(Logging something dummy); | } | | @Logger | private Log logger; | | @Remove @Destroy | public void destroy(){} | } | | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4032346#4032346 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4032346 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @Logger does not inject
I have h:commandButton value=Log action=#{istekler.logSomething}/ in my .xhtml file and click the button to invoke the logSomething method, so it is created by Seam. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4032400#4032400 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4032400 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - @Logger does not inject
Hi, I have | @Logger | private Log logger; | but i must be overseeing something basic so that logger is always null when it comes to logging. What could it be? I use SJSAS and Seam 1.2.0 p1 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4032095#4032095 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4032095 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @Logger does not inject
Nope, nothing noteworthy, no Exceptions. If I remove log4j.xml I naturally get log4j:WARN No appenders could be found for logger (org.hibernate.ejb.Version). log4j:WARN Please initialize the log4j system properly. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4032125#4032125 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4032125 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: cannot make authenticator work
Got it. It was unable to call my method as it was not included in the web.inf as SJSAS requires EJBs to be declared. It now works but: I traced down with the debugger and it generated some exception down there which did not surface (which, IMHO, would rather be thrown/logged). It simply adds a JSF message login failed. Alternatively It does add a message Welcome [username] if login succeeds. How do I override this default behaviour to add a message of my preference or most probably a localized message? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4030280#4030280 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4030280 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: cannot make authenticator work
In my last message, I sound like the problem was solved but that is not the case. I still have the problem. It looks like it goes through some default/stock authenticator instead of what I described. I cannot tell if this is the case. And my only reference is the reference manual. Could I look up some other documentation or what? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4029876#4029876 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4029876 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: cannot make authenticator work
Seems like it is OK. I am including the full output in case you notice something weird. BTW I am using SJSAS 9 and I tried with both Seam 1.1.6 and 1.2.0 p1. Thank you for the help. authenticateMethod #{otantikamator.otantikmi} | class class org.jboss.seam.security.RuleBasedIdentity | cookieEnabled false | cookieMaxAge31536000 | jaasConfigName | loggedInfalse | password | principal | rememberMe false | securityContext | securityRules | subject Subject: | username | toString() [EMAIL PROTECTED] View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4029232#4029232 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4029232 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - cannot make authenticator work
Hi, Trying seam security features. Just like the example from manual I have added the authenticator class into components.xml 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:security=http://jboss.com/products/seam/security; | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; | xsi:schemaLocation= | http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd | http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd | http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.1.xsd | | | core:init jndi-pattern=java:comp/env/gop-ejb/#{ejbName}/local debug=true/ | | core:manager conversation-timeout=12 | concurrent-request-timeout=500 | conversation-id-parameter=cid | conversation-is-long-running-parameter=clr/ | | core:transactionListener/ | | core:ejb installed=@embeddedEjb@/ | | security:identity authenticate-method=#{otantikamator.otantikmi}/ | | | /components I have a stateless bean Otantikamator @named as otantikamator having a method otantikmi. However, it does not get called. Regardless of what I write as the authenticate-method in components.xml, it does not fire any exception or something but call some standard authenticator (I imagine) and a Login failed is messaged. Best regards View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4028911#4028911 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4028911 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: outject problem
ok guys, i finally got the culprit, though it took almost two weeks. i found a in the navigation rule. i can't even remember where the hell i copy-pasted it from. thank you everybody. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4019223#4019223 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4019223 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: outject problem
How do I do that? go is annotated with @Begin. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4018899#4018899 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4018899 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - outject problem
I already (http://www.jboss.com/index.html?module=bbop=viewtopict=101517) had asked this in this forum and I could not solve the problem yet. Here I have downsized my dummy app to even simpler and it still cannot outject. I must be missing or misunderstanding something fundamental. I have the entity bean Organization: @Entity | @Name(organization) | public class Organization implements Serializable { | | @TableGenerator(name=organizationGenerator) | @Id | @GeneratedValue(strategy=GenerationType.TABLE,generator=organizationGenerator) | private Long id; | | private String name; | private String description,address; | private boolean deleted=false; | | @Temporal(TemporalType.DATE) | private Date startUpDate; | public Organization() { | name=unnamed; | } | | public Long getId() { | return this.id; | } | | public void setId(Long id) { | this.id = id; | } | | @Override | public int hashCode() { | int hash = 0; | hash += (this.id != null ? this.id.hashCode() : 0); | return hash; | } | | @Override | public boolean equals(Object object) { | // TODO: Warning - this method won't work in the case the id fields are not set | if (!(object instanceof Organization)) { | return false; | } | Organization other = (Organization)object; | if (this.id != other.id (this.id == null || !this.id.equals(other.id))) return false; | return true; | } | | @Override | public String toString() { | return [id= + id + :+ name +]; | } | | ... standart getters and setters follow ... | A stateful session bean | @Stateful | @Name(testAction) | public class TestActionBean implements TestActionLocal { | | @Out | Organization organization; | | public TestActionBean() {} | | @Begin | public String go(){ | organization=new Organization(); | organization.setName(Tester); | return org; | } | | @End | public String stop(){ | return test; | } | | @Remove @Destroy | void destroy(){} | } one initial page, only for calling the action bean: test.xhtml | ?xml version='1.0' encoding='UTF-8' ? | !DOCTYPE composition PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; | ui:composition xmlns=http://www.w3.org/1999/xhtml; | xmlns:ui=http://java.sun.com/jsf/facelets; | xmlns:h=http://java.sun.com/jsf/html; | template=listTemplate.xhtml | | ui:define name=content | h:form | h:commandButton value=Go action=#{testAction.go} / | /h:form | /ui:define | | /ui:composition | and another one that is navigated when org is returned: org.xhtml | !DOCTYPE composition PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; | ui:composition xmlns=http://www.w3.org/1999/xhtml; | xmlns:ui=http://java.sun.com/jsf/facelets; | xmlns:h=http://java.sun.com/jsf/html; | xmlns:f=http://java.sun.com/jsf/core; | template=listTemplate.xhtml | | ui:define name=content | h:form | h:outputLabel value=Name: / h:inputText value=#{organization.name}/ | /h:form | /ui:define | | | /ui:composition I construct a new Organization at the method go and set its name property to tester. I expect it to show up in the org.xhtml, but instead unnamed shows up, which is assigned in the default constructor of Organization. The instance I assigned at the go method is ignored and another instance is outjected. Where am I wrong? Regards, Levent View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4018895#4018895 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4018895 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: learning up
I cannot make neither of them work. I mean, the object is passed correctly but assigning it to the @Out Organization organization does not outject it. I cannot see it in the upcoming page but a new instance of Organization By the way, I realized that in the booking demo from Seam 1.0.1 passes the Hotel object hot differently than it is done in 1.1 demo. In 1.1 demo, hotel argument is passed by using an s:link and an argument to te selectHotel. Earlier demo uses @DataModelSelection and injects the HotelSearch into HotelBooking. BTW, explanation pages below 1.1 demo is not updated and explains up to the old style. Removing h:selectBooleanCheckbox does not make any difference. I changed everything up to the old style and tried passing the hotel with DataModelSelection. Also tried with commandLink. I am confused a lot and I still cannot get the thing working right. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4016983#4016983 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4016983 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - learning up
Hi, I am learning Seam and trying to build an app with simple small steps. I am trying something quite similar to Hotel Booking example. It is far plainer but I cannot seem to get it working. I have an entity bean called Organization, a stateful session bean OrganizationAction and quite like the main.xhtml from the Booking example I usa an as in: s:link id=viewItem value=#{item.name} action=#{organizationAction.selectOrganization(item)} / and in selectOrganization method, I do assign it to the @Out marked member in the hope that it will show up in the next page. | @In(required=false) @Out | private Organization organization; | | @Begin | public String selectOrganization(Organization selectedOrganization){ | System.out.println(Selected org:+selectedOrganization.toString()); | organization = em.merge(selectedOrganization); | return organization; | } | It is almost identical (even less. i don't have ajax stuff) to the Booking example, like selecting the hotel from the list of hotels. Everything is parallel. But in the navigated organization.xhtml i cannot find the organization object outjected. Instead, a brand new instance of Organization is displayed. I must be missing something quite basic. I have tried and thrown anything into it to make it work and yet could not manage. Best regards, Levent View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4016342#4016342 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4016342 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: learning up
BTW, I am using Netbeans, Sun Java System Application Server and Seam 1.1.6 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4016344#4016344 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4016344 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: learning up
it is part of the table: h:form id=zaba | h:dataTable value=#{organizations} var=item | h:column | f:facet name=headerNo/f:facet | #{item.id} | /h:column | h:column | f:facet name=headerAd/f:facet | s:link id=viewItem value=#{item.name} action=#{organizationAction.selectOrganization(item)} / | /h:column | h:column | f:facet name=header | h:outputText value=Address/ | /f:facet | h:outputText value=#{item.address}/ | /h:column | h:column | f:facet name=header | h:outputText value=Deleted/ | /f:facet | h:selectBooleanCheckbox value=#{item.deleted} disabled=true / | /h:column | /h:dataTable | /h:form it is passed to the method ok, so that i can see it in the log. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4016390#4016390 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4016390 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - ClassCastException org.jboss.seam.ui.HtmlLink
Hi, I am new to seam. I am even new to ejb3, jsf and facelets but i wish to use them in my next project. I thought seam may be solving a number of things before i even run into them so I could jump over some learning curve, however it turns out unlikely. Here, I try to develop a sample application of my own and it is even simpler than hotel booking example. No database yet. In the booking example the hotels are listed and upon clicking the link it starts a new conversation while opening the hotel in another page. Here I display a number of organizations in a table and upon clicking the organization's name I expect it to start the conversation likewise. Though everything is pretty much similar I run into the following exception. It breaks while trying to render the page. My page includes the s:link like that: | h:column |f:facet name=headerh:outputText value=Ad//f:facet | s:link value=#{item.name} action=#{organizationList.selectOrganization(item)} / | /h:column | If I omit the action property the page renders ok but of course it does not do what I wanted to do. I must be missing something probably obvious and perhaps it is something to do with JSF or Facelets and not Seam but I don't know which direction to go. Best regards, Levent | Error Rendering View[/organizationsList.xhtml] | java.lang.ClassCastException: org.jboss.seam.ui.HtmlLink | at com.sun.facelets.tag.jsf.ActionSourceRule$ActionMapper2.applyMetadata(ActionSourceRule.java:65) | at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36) | at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62) | at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:140) | at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) | at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:164) | at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) | at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:164) | at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) | at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58) | at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128) | at com.sun.facelets.impl.DefaultFaceletContext$1.apply(DefaultFaceletContext.java:253) | at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:263) | at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:63) | at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) | at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49) | at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) | at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248) | at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294) | at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273) | at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:136) | at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113) | at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49) | at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95) | at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:408) | at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:442) | at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133) | at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244) | at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140) | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) | at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397) | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278) | at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) | at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536) | at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240) | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179) | at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566) | at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) | at