[jboss-user] [JBoss Seam] - Re: How to reliably count active sessions and connected user
A little bit more about this : the org.jboss.seam.security.loggedOut event is not raised when the web session expire and there was a connected user. Can I consider this a seam bug or not ? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4121331#4121331 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4121331 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - How to reliably count active sessions and connected users ?
Hello. I'm using seam 2.0.0 and I'd like to cound the active sessions and connected users. For session, I'm using two observer methods in an application scoped ejb to count : @Observer(org.jboss.seam.postCreate.org.jboss.seam.web.session) | public void increaseUserCount() { | userCount++; | } | | @Observer(org.jboss.seam.preDestroyContext.SESSION) | public void decreaseUserCount() { | userCount--; | } For connected users, I use those two seam security events : @Observer(org.jboss.seam.security.loginSuccessful) | public void increaseConnectedUserCount() { | connectedUserCount++; | } | | @Observer(org.jboss.seam.security.loggedOut) | public void decreaseConnectedUserCount() { | connectedUserCount--; | } Both solutions aren't ok. For example, sometimes I have a number of -1 for connected users. And for sessions, the number keeps high, so I don't know If a really catch all session ending. Do you have / know a better idea ? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4121298#4121298 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4121298 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: IllegalArgumentException: Stack must not be null
well, indeed.Here is the complete asynchronous method : @Stateless | 36 @Name(importRunAction) | 37 public class ImportRunAction implements ImportRunActionInterface { | 38 | 39 @In | 40 EntityManager entityManager; | 41 | 42 public ImportRunAction() { | 43 } | 44 | 45 @Override | 46 public void run(Import importRule, User user) { | 47 | 48 int bookCount = 0; | 49 boolean success = true; | 50 File passthroughData = null; | 51 Datasource datasource = importRule.getDataSource(); | 52 | 53 ListObject passthroughMetaData = null; | 54 ListMicroStepAction microActions = new ArrayListMicroStepAction(); | 55 | 56 CollectionDataType previousDataType; | 57 previousDataType = new ArrayListDataType(); | 58 previousDataType.add(DataType.NONE); | 59 | 60 Event importRunEvent = Tools.getNewEvent(); | 61 importRunEvent.setUser(user); | 62 importRunEvent.setIsParent(true); | 63 importRunEvent.setObjectType(IMPORT); | 64 importRunEvent.setName(datasource.getName()); | 65 | 66 importRule.setStartDate(new Date(System.currentTimeMillis())); | 67 | 68 /* | 69 * Asynchronous and ongoing task progress reporting | 70 */ | 71 AsynchronousImportController aip = (AsynchronousImportController) Component | 72 .getInstance(asynchronousImportController); | 73 Progress progress = aip.getProgress(importRule); | 74 | 75 try { | 76 for (MicroStep m : importRule.getMicroSteps()) { | 77 if (!m.isEnabled()) { | 78 continue; | 79 } | 80 if (!m.acceptInputDatas(previousDataType)) { | 81 FacesMessages.instance().addFromResourceBundle( | 82 lrb.error.import.incorrectPreviousData); | 83 aip.remove(importRule); | 84 throw new Exception( | 85 m.getName() | 86 + | 87 + Tools | 88 .getTranslation(lrb.error.import.incorrectPreviousData)); | 89 } | 90 MicroStepAction msa = (MicroStepAction) Class.forName( | 91 com.lrb.dataImport.microStepActions. | 92 + m.getClass().getSimpleName() + Action) | 93 .newInstance(); | 94 msa.setProgress(progress); | 95 microActions.add(msa); | 96 msa.setMicroStep(m); | 97 msa.setInputData(passthroughData); | 98 msa.setInputMetaData(passthroughMetaData); | 99 | 100 /* Add all the parameters */ | 101 msa.addParameter(user, user); | 102 msa.addParameter(datasource, datasource); | 103 msa.addParameter(table, importRule.getDataSource() | 104 .getTableName()); | 105 | 106 /* Actually run the microStepAction */ | 107 success = success msa.run(); | 108 | 109 msa.getEvent().setName( | 110 datasource.getName() + : + msa.getEvent().getName()); | 111 importRunEvent.addChild(msa.getEvent()); | 112 | 113 if (success) { | 114 passthroughData = msa.getOutputData(); | 115 passthroughMetaData = msa.getOutputMetadata(); | 116 previousDataType =
[jboss-user] [JBoss Seam] - IllegalArgumentException: Stack must not be null
I've got this because I'm modifying an object managed by hibernate in an asynchronous method. Persisting new objects work fine though. The error occur after the method is run. I'm usins seam CVS. Any ideas ? here is the full stack : 19:07:48,163 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for [EMAIL PROTECTED] | javax.persistence.PersistenceException: javax.el.ELException: java.lang.IllegalArgumentException: Stack must not be null | at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:527) | at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114) | at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247) | at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86) | at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177) | at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1382) | at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135) | at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87) | at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175) | at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87) | at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) | at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214) | at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:184) | at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:81) | at $Proxy1350.run(Unknown Source) | 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 org.jboss.seam.util.Reflections.invoke(Reflections.java:21) | at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31) | at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76) | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) | at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:50) | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106) | at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54) | at org.javassist.tmp.java.lang.Object_$$_javassist_11.run(Object_$$_javassist_11.java) | 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 org.jboss.seam.util.Reflections.invoke(Reflections.java:21) | at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125) | at
[jboss-user] [JBoss Seam] - Re: IllegalArgumentException: Stack must not be null
Here is the class with some code removed as I think it's not relevant. When entityManager.merge is uncommented, the above exception ocurs. @Stateless | @Name(importRunAction) | public class ImportRunAction implements ImportRunActionInterface { | | @In | EntityManager entityManager; | | public ImportRunAction() { | } | | @Override | public void run(Import importRule, User user) { | | /* | * Asynchronous and ongoing task progress reporting | */ | AsynchronousImportController aip = (AsynchronousImportController) Component | .getInstance(asynchronousImportController); | Progress progress = aip.getProgress(importRule); | | try { | | [...] | importRunEvent.setMessage(Success); | importRunEvent.end(); | entityManager.persist(importRunEvent); | } | | } catch (Exception e) { | FacesMessages.instance().add(e.getMessage()); | e.printStackTrace(); | aip.remove(importRule); | } | | aip.remove(importRule); | | datasource.setBookCount(bookCount); | | // entityManager.merge(datasource); | | System.out.println(end run); | } | } View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4096221#4096221 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096221 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - @Restrict on entity bean and orm.xml and @Startup EJB3 probl
I'm using seam cvs (2 weeks old I think). I use @Restrict on entity beans. The doc here http://docs.jboss.com/seam/2.0.0.B1/reference/en/html/security.html#d0e6939 states anonymous wrote : If you are using a Hibernate SessionFactory configured via Seam, you don't need to do anything special to use entity security. As I use this : persistence:managed-persistence-context name=entityManager | auto-create=true | persistence-unit-jndi-name=java:/metabookEntityManagerFactory/ I was using a Hibernate SessionFactory configured via Seam ? It seems not so I looked for an @Restrict example. The only one used in entitybeans is in seamspace example. And the example has this orm.xml file. So I've put it too in our project and ... it works, but breaks this : @Name(settings) | @Scope(APPLICATION) | @Startup | public class Settings { | | @In | private EntityManager entityManager; | | private MapString, String settings; | | public String getSetting(String key) { | if (settings.containsKey(key)) { | return settings.get(key); | } else { | return ; | } | } | | @Create | @SuppressWarnings(unchecked) | public void loadSettings() { | | ListParameter resultSet = entityManager.createQuery( | select p from Parameter p where realm = 'application') | .getResultList(); | [ ... ] | } | | @Remove | @Destroy | public void destroy() { | } | } | Without the orm.xml file, the above component works and is successfully loaded and created at startup, but @Restrict on entities doesn't work. I get this when deploying with the orm.xml file : 08:18:23,325 INFO [Contexts] starting up: org.jboss.seam.remoting.remoting | 08:18:23,326 INFO [Contexts] starting up: org.jboss.seam.ui.graphicImage.graphicImageResource | 08:18:23,331 INFO [Contexts] starting up: org.jboss.seam.ui.resource.styleResource | 08:18:23,332 INFO [Contexts] starting up: settings | 08:18:23,820 ERROR [[/metabook]] Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.jboss.seam.servlet.SeamListener | java.lang.IllegalStateException: No active session context | at org.jboss.seam.security.Identity.instance(Identity.java:157) | at org.jboss.seam.security.EntitySecurityListener.postLoad(EntitySecurityListener.java:26) | 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 org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:31) | at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:78) | at org.hibernate.ejb.event.EntityCallbackHandler.postLoad(EntityCallbackHandler.java:71) | at org.hibernate.ejb.event.EJB3PostLoadEventListener.onPostLoad(EJB3PostLoadEventListener.java:35) | at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:201) | at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854) | at org.hibernate.loader.Loader.doQuery(Loader.java:729) | at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) | at org.hibernate.loader.Loader.doList(Loader.java:2220) | at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) | at org.hibernate.loader.Loader.list(Loader.java:2099) | at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) | at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) | at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) | at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) | at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) | at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64) | at com.lrb.metabook.Settings.loadSettings(Settings.java:50) | 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 org.jboss.seam.util.Reflections.invoke(Reflections.java:23) | at
[jboss-user] [JBoss Seam] - Re: @Restrict on entity bean and orm.xml and @Startup EJB3 p
up ! :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4084025#4084025 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084025 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Can I use @In EntityManager entityManager; in an entity bean
Can I use @In EntityManager entityManager; in an entity bean ? I have this in my entity bean : @Transient @In(required=true) EntityManager entityManager; But the entityManager is always null. I works in other classes thought, si I wonder if it's possible ? Is this related to this : http://www.jboss.com/index.html?module=bbop=viewtopict=107353 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4057193#4057193 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057193 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Validation throws an exception instead of redisplaying the p
Here is the page : !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:s=http://jboss.com/products/seam/taglib; | xmlns:ui=http://java.sun.com/jsf/facelets; | xmlns:f=http://java.sun.com/jsf/core; | xmlns:h=http://java.sun.com/jsf/html; | xmlns:rich=http://richfaces.ajax4jsf.org/rich; | template=../layout/template.xhtml | | ui:define name=body | | h:messages styleClass=message/ | | ui:include src=usersMenu.xhtml/ | | h:form | | s:validateAll | | f:facet name=aroundInvalidField | s:span styleClass=errors/ | /f:facet | f:facet name=afterInvalidField | s:span s:message//s:span | /f:facet | | s:decorate#{messages['lrb.user.id']} h:inputText id=id value=#{user.id}//s:decoratebr/ | s:decorate#{messages['lrb.user.username']} h:inputText id=username value=#{user.username}//s:decoratebr/ | s:decorate#{messages['lrb.user.password']} h:inputText id=password value=#{user.password}//s:decoratebr/ | s:decorate#{messages['lrb.user.email']} h:inputText id=email value=#{user.email}//s:decorate | | /s:validateAll | | !-- actions -- | div class=actionButtons | | s:link view=/admin/users.xhtml value=#{messages['lrb.cancel']}/ | h:outputText value= / | h:commandLink action=#{userHome.update} value=#{messages['lrb.update']} rendered=#{userHome.managed}/ | h:outputText value= / | s:link action=#{userHome.remove} value=#{messages['lrb.delete']} rendered=#{userHome.managed}/ | h:outputText value= / | h:commandLink action=#{userHome.persist} value=#{messages['lrb.create']} rendered=#{!userHome.managed}/ | | /div | /h:form | | /ui:define | /ui:composition the entity in components.xml : factory name=user value=#{userHome.instance}/ | fwk:entity-home name=userHome | entity-class=com.lrb.metabook.User | new-instance=#{newUser}/ | |component name=newUser class=com.lrb.metabook.User/ | |fwk:entity-query name=users |max-results=5 | fwk:ejbqlfrom User/fwk:ejbql | fwk:orderid/fwk:order | /fwk:entity-query The thing is that if I add required=true to each h:inputText, it works as expected, but do not follow annotated validation. Here is the entity bean : package com.lrb.metabook; | | // Generated 10 juin 2007 20:21:17 by Hibernate Tools 3.2.0.b9 | | import java.util.Iterator; | | /** | * User generated by hbm2java | */ | @Entity | public class User implements java.io.Serializable { | | private long id; | | private String password; | | private String username; | | private ListRole roles; | | private String email; | | public User() { | } | | public User(long id, String password, String username) { | this.id = id; | this.password = password; | this.username = username; | } | | @Id | @GeneratedValue | public long getId() { | return this.id; | } | | public void setId(long id) { | this.id = id; | } | | @NotNull | @Length(min = 1, max = 20) | public String getPassword() { | return this.password; | } | | public void setPassword(String password) { | this.password = password; | } | | @NotNull | @Length(min = 1, max = 20) | public String getUsername() { | return this.username; | } | | public void setUsername(String username) { | this.username = username; | } | | @ManyToMany | public ListRole getRoles() { | return roles; | } | | private void setRoles(ListRole roles) { | this.roles = roles; | } | | /** | * @return roles list | */ | public String rolesList() { | | if (roles != null) { | StringBuffer sb = new StringBuffer(); | for (Iterator iter = roles.iterator(); iter.hasNext();) { | Role role = (Role) iter.next(); | sb.append(role.getName() + ); | } | return sb.toString(); | } | return ; | } | | @NotNull | @Email
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
I've never done that with a seam application ... do you have any help about how I can setup that ? The app has been generated by seam-gen and I'm using eclipse, It shouldn't be too hard ... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056549#4056549 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056549 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
I've managed to debug it but I don't know where and what it fails. Moreover I miss some sources. Anyway, here is my whole test application : http://beta.livre-rare-book.net/metadebug.tar.bz2 I've not included the lib dir as it's the one from seam 1.3.0.ALPHA. The app uses DefaultDS Step to reproduce : - just deploy the app - login - go to admin (top-right) - click to users (there must be two) - click on new - valid without filling in the form by clicking on create = no validation, but the above exception. pete.muir I'll test tomorrow to see if then the validation occur when adding required=true or if it just avoid empty fields. Thanks for your help :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056584#4056584 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056584 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - cannot compile seam cvs, included fix
I had to change this in order to compile seam cvs : diff -r1.198 build.xml 609c609 --- Because the antlr library has been renamed from ./lib/ant-antlr-1.6.5.jar to ./lib/ant-antlr.jar View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4055690#4055690 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055690 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: cannot compile seam cvs, included fix
ops, the submit delete some text of my diff ?!? Here it is, again : diff -r1.198 build.xml | 609c609 |include name=ant-antlr-*.jar / | --- |include name=ant-antlr*.jar / View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4055692#4055692 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055692 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Greate thanks to Jboss team and Jboss-Seam team especial
+1 :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054776#4054776 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054776 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Help about permissions with seam-security
Oops, my previous post has been cut off. It'snot posible to edit ? anonymous wrote : Please let me know if this is helpful (I haven't tried it myself :) Sure ! Thanks for the tip :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4010839#4010839 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4010839 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Help about permissions with seam-security
[EMAIL PROTECTED] wrote : | Not much I can do about that. JSF forces me to swallow these things. I'm not going to do it silently, that's just dangerous. Yes, but in the end, the security rule is not applied. It's not a problem that's there's an exception raised. I guess there sould not be a exception in fact. anonymous wrote : Please let me know if this is helpful (I haven't tried it myself :). View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4010823#4010823 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4010823 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Help about permissions with seam-security
Hello ! I'm trying the latest seam with seam-security. Using roles is pretty easy, but I haven't managed using permissions yet. It's really hard to write rules when you're new to JBoss Rules. How can I debug my rules ? I know they does not work. Is there a jboss rules verbose+debug mode, which could help writing, underderstanding and debuging seam-security rules ? I also added some restrictions to pages.xml. No way either to verify it's correct as I have no feedback. I have this in pages.xml | page view-id=/userList.xhtml | restrict/ | /page | page view-id=/userList.* | restrict/ | /page And this in my rules file : package Permissions; | | import java.security.Principal; | | import org.jboss.seam.security.PermissionCheck; | import org.jboss.seam.security.Role; | | rule CanUserViewUserList | when | c: PermissionCheck(page : name, name == /userList.xhtml, action == render) |Role(name == admin) | then | System.out.println(test : + page); | c.grant(); | end; And a potential bug I think : in seamspace example, if you are not logged in and try to access http://localhost:8080/seam-space/comment.xhtml It works but the file is downloaded (usgin firefox). If you go to http://localhost:8080/seam-space/comment.seam : you indeed get a org.jboss.seam.security.NotLoggedInException. Thank you ! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4010631#4010631 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4010631 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Help about permissions with seam-security
Me again, sorry :) After reading other topics, I downloaded seam CVS. It works much better even if i also have Swallowing exception thrown by page action error. At least I'm now sure the pages.xml and rules files are taken into account. One more question : in the documentation, you added a Requirements section. I noted that commons-lang-2.1.jar is not in application.xml neither it is copied in the final ear (I started froma seam-gen project). I added it to both. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4010656#4010656 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4010656 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: geam-gen generate-entities error
It workd if I use property name=hibernate.hbm2ddl.auto value=update/. Thanks! Anyway, I'll experiment a bit more and I will probably report this to hibernate. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3996848#3996848 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3996848 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: geam-gen generate-entities error
Dunno If it's related to hibernate ot not, maybe. Please tell me if so and I will report the problem to hibernate. Here is more information : if I have a char(X) column in a mysql table which is reverse engineered using generate-entities (which runs successfully) I get these errors in my jboss as output : 11:25:23,740 INFO [SchemaValidator] Running schema validator | 11:25:23,740 INFO [SchemaValidator] fetching database metadata | 11:25:23,763 INFO [TableMetadata] table found: lrb.abocc | 11:25:23,763 INFO [TableMetadata] columns: [dt_bgn_test, dp_rglt_post, dp_use, dt_end_test, nb_div, nb_ren, dt_end, dt_creat, dt_bgn, nb_ofs, tx_tva, mt_ht, dt_modif, ct_pers, ct_ref, ty, lb, ct] | 11:25:23,765 WARN [ServiceController] Problem starting service persistence.units:ear=lrbseamtest.ear,unitName=lrbseamtest | javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: ty, expected: varchar(4) | at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698) | at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127) | at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264) | 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.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102) | at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) | at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) | at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:585) | at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) | at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) | at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) | and then at the end : 11:25:26,212 INFO [StartupServletContextListener] Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory | 11:25:26,250 INFO [EARDeployer] Started J2EE application: file:/home/gaboo/progs/jboss-4.0.5.GA/server/default/deploy/lrbseamtest.ear/ | 11:25:26,251 ERROR [URLDeploymentScanner] Incomplete Deployment listing: | | --- MBeans waiting for other MBeans --- | ObjectName: persistence.units:ear=lrbseamtest.ear,unitName=lrbseamtest | State: FAILED | Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: ty, expected: varchar(4) | I Depend On: | jboss.jca:service=DataSourceBinding,name=lrbseamtestDatasource | | --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- | ObjectName: persistence.units:ear=lrbseamtest.ear,unitName=lrbseamtest | State: FAILED | Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: ty, expected: varchar(4) | I Depend On: | jboss.jca:service=DataSourceBinding,name=lrbseamtestDatasource View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3996607#3996607 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3996607 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: geam-gen generate-entities error
one more note : I tried with a char(255) and i get the same error. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3996608#3996608 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3996608 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: geam-gen generate-entities error
I tried with latest CVS seam version and seam gen did not worked : 20:50:13 [EMAIL PROTECTED]:~/workspace/jboss-seam$ ./seam setup | Buildfile: build.xml | | BUILD FAILED | /home/gaboo/workspace/jboss-seam/seam-gen/build.xml:15: taskdef class org.jboss.seam.tool.PathFilenameTask cannot be found | | Total time: 0 second I also tried with seam 1.1GA and replace its hibernate-tools.jar with the one from my CVS checkout : same errors as before. Any idea on how to get a working fixed version of seam ? Thank you ! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3996507#3996507 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3996507 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: geam-gen generate-entities error
Indeed, it works :) But, I found another problem, maybe it is configurable : generate-entities works, but crashes once deployed if there is a column which type is char(X) with X 1. It works with X=1. For example, it works with the above abocc table if I change ty and lb columns to be varchar instead of char. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3996555#3996555 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3996555 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: geam-gen generate-entities error
no ideas ? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992026#3992026 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992026 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user