[Tomcat, HTTPD, Servlets & JSP] - Re: Explicit document source root using context/docbase
by gburcher
I had previously seen the wiki entry named "ExternalDirectories". This wiki entry specifically talks about serving static content like HTML pages and images. I can make this work using the instructions in the wiki.
What I want to do is to redirect the root directory for my entire application deployment file structure. We use many servlets and .jsp files. I want to keep my jsp/html/image/etc. source files plus WEB-INF in a directory outside of the JBoss install directory. We have used a number of other app servers and are just moving to JBoss. This has been possible in all other app servers.
We deploy in exploded format, not in a .war file. Initially, I deployed my file structure under the \jbossweb-tomcat55.sar\ROOT.war directory. I got that working fine. Now I want to move the entire .war directory out from under the JBoss install directory.
When I try this using the instructions in the "ExternalDirectories" wiki entry, I get a number of errors. This appears to be the root error:
org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
Not sure if this would work even if I can make this error go away. Is there an intended way to redirect an entire web app deploy directory outside of the JBoss install directory?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963585#3963585
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963585
19 years, 9 months
[Clustering/JBoss] - Single Sign On failure on Jboss 4.0.4 using LDAP Realm and S
by argaldo
Hi,
we have an application wich uses an LDAP Realm for authenticating users and has a "org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn" Valve to deal with j_security_check (and it is configured in its form-based authentication). And when the application tries to replicate the stored credentials after a succesful login throws the following exception:
| java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFac
| ade
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1149)
|
| at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
| :1502)
| at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:14
| 67)
| at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
| a:1385)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1143)
|
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:325)
| at java.util.Hashtable.writeObject(Hashtable.java:827)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:589)
| at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:94
| 5)
| at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:14
| 54)
| at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
| a:1385)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1143)
|
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:325)
| at org.jboss.web.tomcat.tc5.session.SessionBasedClusteredSession.writeEx
| ternal(SessionBasedClusteredSession.java:175)
| at org.jboss.web.tomcat.tc5.session.JBossCacheService.externalizeSession
| (JBossCacheService.java:902)
| at org.jboss.web.tomcat.tc5.session.JBossCacheService.putSession(JBossCa
| cheService.java:348)
| at org.jboss.web.tomcat.tc5.session.JBossCacheClusteredSession.processSe
| ssionRepl(JBossCacheClusteredSession.java:122)
| at org.jboss.web.tomcat.tc5.session.JBossCacheManager.processSessionRepl
| (JBossCacheManager.java:994)
| at org.jboss.web.tomcat.tc5.session.JBossCacheManager.storeSession(JBoss
| CacheManager.java:637)
| at org.jboss.web.tomcat.tc5.session.InstantSnapshotManager.snapshot(Inst
| antSnapshotManager.java:52)
| at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(Cluster
| edSessionValve.java:105)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
| torBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:105)
| at org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn.invoke(ClusteredSi
| ngleSignOn.java:499)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
| rocessConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
| int.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
| kerThread.java:112)
| at java.lang.Thread.run(Thread.java:620)
|
I'm pretty sure that I'm not storing any StandardSessionFac
ade in my code, so it must be the ClusteredSingleSignOn Valve when it tries to store the current authenticated Principal.
If authentication is omited, the session replication work as expected and performes really well.
Is this a known issue? Am I doing anything wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963584#3963584
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963584
19 years, 9 months
[JBoss jBPM] - jbpm and portlet
by yxyang
Hi All
I already make jbpm works successfully within ejb eniroment.
Linux+PostgreSQL+jbossportal 2.2.1+jboss app server 4.0.3SP1.
Now, i am trying to develope a few common portlets for jbpm. What portlets are the most important candidates?
(1)TaskInstance portlet? (for admin or for single owner)????
I think this portlet sould retrieve the task instances belong to current role of the authenticated user. maybe not. maybe owned by current authenticated user?
(2)ProcessInstance Portlet? (what functions should it include?)
(3)Deployment (i don't think it is necessary because deployment can be easily done by current servlets included)?
Any suggestions are appreciated.
yang
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963576#3963576
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963576
19 years, 9 months
[EJB 3.0] - Re: Programmatically query @RolesAllowed or if caller can ac
by wolfc
This works for me:
package test;
|
| import java.lang.annotation.Annotation;
| import java.lang.reflect.Method;
|
| import javax.annotation.security.RolesAllowed;
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
|
| @Stateless
| @Remote(MyStateless.class)
| public class MyStatelessBean implements MyStateless {
|
| @RolesAllowed("user")
| public String sayHelloTo(String name) {
| // Annotation as[] = MyStatelessBean.class.getAnnotations();
| // for(Annotation a : as) {
| // System.err.println(a.toString());
| // }
| Method ms[] = getClass().getMethods();
| for(Method m : ms) {
| Annotation as[] = m.getAnnotations();
| for (Annotation a : as) {
| System.err.println(a.toString());
| }
| RolesAllowed rolesAllowed = m.getAnnotation(RolesAllowed.class);
| if(rolesAllowed != null) {
| for(String role : rolesAllowed.value()) {
| if(role.equals("user"))
| System.err.println("method " + m + " is allowed for user");
| }
| }
| }
| return "Hi " + name;
| }
|
| @RolesAllowed("admin")
| public void notAllowed()
| {
|
| }
|
| @RolesAllowed("user")
| public void allowed()
| {
|
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963575#3963575
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963575
19 years, 9 months