[Security & JAAS/JBoss] - Re: JAAS, login configuration + Hi everybody
by purbano
Of course I can:
| <security-constraint>
| <display-name>My Security Constraint</display-name>
| <web-resource-collection>
| <web-resource-name>Protected Area</web-resource-name>
| <!-- Define the context-relative URL(s) to be protected -->
| <url-pattern>/view/*</url-pattern>
| <url-pattern>/documentation/*</url-pattern>
| <url-pattern>/control/*</url-pattern>
|
| <!-- If you list http methods, only those methods are protected -->
| <http-method>DELETE</http-method>
| <http-method>GET</http-method>
| <http-method>POST</http-method>
| <http-method>PUT</http-method>
| </web-resource-collection>
| <auth-constraint>
| <!-- Anyone with one of the listed roles may access this area -->
| <role-name>Administrators</role-name>
| <role-name>Route Managers</role-name>
| </auth-constraint>
|
About the second question, I know that the login module has a public Group[] getRoleSets() function, but I think it is not being called, according to the logs.
Thank you for your response,
Pablo J.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060253#4060253
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060253
18Â years, 9Â months
[EJB 3.0] - separate Entity Beans
by witterkoer
hi,
on a workin ear, i tryied to separate my Entity Beans into a jar, added this one to my project libpath, but i've got this error :
18:07:08,515 INFO [EntityBinder] Bind entity
com.satis.specific.bpoccitane.archive.standard.search.data.ArchRequestForSearch on table VARCH
REQUESTFINDWITHPERIMETER
18:07:08,562 WARN [ServiceController] Problem starting service
persistence.units:ear=satis.ear,jar=satis.jar,unitName=SatisDatabase
java.lang.TypeNotPresentException: Type org.jboss.seam.annotations.Name not present
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:351)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:175)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:2998)
at java.lang.Class.getAnnotations(Class.java:2980)
at org.hibernate.reflection.java.JavaAnnotationReader.getAnnotations(JavaAnnotationReader.java:29)
at
org.hibernate.reflection.java.EJB3OverridenAnnotationReader.initAnnotations(EJB3OverridenAnnotationReader.java:275)
at
org.hibernate.reflection.java.EJB3OverridenAnnotationReader.getAnnotation(EJB3OverridenAnnotationReader.java:249)
at org.hibernate.reflection.java.JavaXAnnotatedElement.getAnnotation(JavaXAnnotatedElement.java:36)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1474)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:699)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:353)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:265)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1015)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:751)
at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:350)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:119)
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:99)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor4.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)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor7.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)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy49.start(Unknown Source)
at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:82)
at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:626)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:475)
at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor4.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)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor7.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)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.start(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
at
org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy35.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor15.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.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
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.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)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
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.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)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:464)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.annotations.Name
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
... 168 more
any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060249#4060249
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060249
18Â years, 9Â months
[JBoss Seam] - New to seam: How to choose proper context and achieve extern
by mmakundi
Hi!
Here is what I am trying to do:
1. I need a page that loads its dataTable contents from db fresh every time I access the page.
2. The items in the dataTable need to be clickable and bookmarkable in the future; this is why s:link was chosen. According to my experience, @Scope(PAGE) does not cut it with <s:link> elements, as the parameters are passed on as null.
3. My business items allow clicking a link, but instead of directly linking the user to the external url I want to record the click-count first. So intuitively I thought I could just return the url from the click-counting action.
The solutions I have tried are the following:
1. Page scope seems to have the right idea: the dataTable contents are refreshed from db each time the page is refreshed. However, page context seem to have problems with requirement 2 -- or am I doing something else wrong?
2. If I use Session scope, the <s:link> works fine and passes the actual objects as parameters to the desired method recordLinkClickAndRedirect(). However, with Session scope the dataTable does not get fresh data in a new page-refresh, because the session is still alive. I can actually make this happen by binding the @Destroy and @Remove annotations to my recordLinkClickAndRedirect() method, but it seams like a hack and I would rather not do that if there is a better way.
3. I have not found a way to redirect from within my recordLinkClickAndRedirect() method, but intuitively it seems like there should be a way as this is how navigation can normally be affected.
Here are my code snipplets:
::: from items.xhtml
<!-- content -->
<ui:define name="content">
<h1>Latest business items</h1>
<h:outputText value="No items found on this round. Please refresh page to check again!"
rendered="#{businessItems == null or businessItems.rowCount==0}" />
<h:dataTable var="businessItem" value="#{businessItems}"
rendered="#{businessItems.rowCount>0}">
<h:column>
#{businessItem.description}
<s:link value="#{businessItem.externalLinkURL}"
action="#{itemViewer.recordLinkClickAndRedirect(businessItem)}" />
</h:column>
</h:dataTable>
</ui:define>
::: from ItemViewer.java
@Stateless
@Scope(ScopeType.PAGE)
@Name("itemViewer")
public class ItemViewer implements LocalInterface {
@PersistenceContext
private EntityManager entityManager;
@DataModel
@SuppressWarnings("unused")
private List businessItems;
/**
* This method TODO
*
*/
@Factory("businessItems")
@SuppressWarnings("unchecked")
public void getFreshBusinessItems() {
businessItems = (List) entityManager
.createQuery("select b from businessItem b");
}
/**
* This method records that the link has been clicked and redirects the
* browser to the specific link.
*
* @param businessItem
* @return
*/
public String recordLinkClickAndRedirect(BusinessItem businessItem) {
businessItem.incrementClicks();
return businessItem.getExternalLinkURL();
}
/**
* This method is required by some scopes, e.g., Session scope.
*/
// @Destroy
// @Remove
public void destroyAndRemove() {
// n.a.
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060241#4060241
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060241
18Â years, 9Â months
[JBoss jBPM] - Re: [newbie] problem with hibernate mapping while trying to
by syngolis
Your object is stored in jbpm_bytearray/block because there is no hibernate mapping for it, that means, unknown serializeable objects are stored as byte-array. (This behaviour is declared in jbpm.varmapping.xml)
I tired a similar scenario some time ago. I am not sure if it fits exactly your needs but maybe this helps:
1. Create table in your jbpm-db, e.g. jbpm_test
2. Create mapping class for test: com/test/Test.java
3. Create hibernate mapping file: com/test/Test.hbm.xml
4. Put mapping into your hibernate.cfg.xml:
5. Put all into your ear/war
Thats all...
Now you should be able to create/use objects of type test in your process, which are taken/stored in your table. In variableinstance, only references to your table are stored.
I am not sure but in your example you use package "dgbdatamodel". hibernate tells you "Resource: com/dgbdatamodel/Student.hbm.xml not found". So maybe you should change your package to "com.dgbdatamodel".
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060240#4060240
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060240
18Â years, 9Â months