[JBoss Portal] - Re: HTTP Status 500 - No authenticated user while accessing
by mathewa
Hi mabimal,
1) your conf/login-config.xml looks okay, and I assume works because your login servlet works?
2) dont change portal-server.war/WEB-INF/jboss-web.xml, instead change the ...ds-xml file in deploy
3) remove your login servlet - that's not the way to do it... if you want to customise your login module then do this:
4) create a new class extending the org.jboss.portal.identity.auth.DBIdentityLoginModule, and in the overridden commit method you will be given a Subject which has .getPrincipals() method that returns not just the current user but also their roles ("Authenticated" should be in there because it's specified in the following line in the login-config.xml file
<module-option name="additionalRole">Authenticated</module-option>
That role is specified in the portal-server.war/WEB-INF/web.xml here:
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>Authenticated</web-resource-name>
| <description></description>
| <url-pattern>/auth/*</url-pattern>
| </web-resource-collection>
| <auth-constraint>
| <role-name>Authenticated</role-name>
| </auth-constraint>
| </security-constraint>
|
which basically says anything down the address http://server/portal/auth/... (which includes the dashboard) will require this "Authenticated" UserPrincipal in the Subject.getPrincipals() list.
If you login this way then you can investigate the Subject to find out what roles you have. I suspect you dont have the "Authenticated" UserPrincipal in the Subject and therefore cannot view anything down the .../auth/...address path.
btw, youll have to put your jar with the new YourDBIdentityLoginModule into the portal sar (or any other deployed sar) so it's on the class path for portal to see it, and change your line in login-config.xml from
<login-module code = "org.jboss.portal.identity.auth.DBIdentityLoginModule" flag="sufficient">
to:
<login-module code = "xxx.xxx.xxx.YourDBIdentityLoginModule" flag="sufficient">
|
Hope this helps,
mat
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231386#4231386
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231386
17 years, 2 months
[Installation, Configuration & DEPLOYMENT] How to make the EAR classloader override JRE library?
by William
Hi,
Previously I posted the question at Beginners Corner, nobody answered it. Could anybody in this group help me on this question?
In my project's EAR package, I am using the latest JAXB jars by packaging them in APP-INF/lib/jaxb*.jar. The environment I am using is JBoss4 + JDK6. However, the JBOSS and JRE has old versions of JAXB.
I wish to configure the JBOSS ClassLoader to make it load my packaged JAXB jars precedence over the old versions either in JBOSS_HOME/lib/ or JAVA_HOME/jre/lib.
I set the jboss-app.xml as:
<jboss-app>
<loader-repository>
my.example:loader=my-example.ear
<loader-repository-config>
java2ParentDelegation=false
</loader-repository-config>
</loader-repository>
<library-directory>
APP-INF/lib
</library-directory>
</jboss-app>
My EAR structure for "my-example.ear" is:
- EAR my.example.impl.ear
- APP-INF/class
- APP-INF/lib
- META-INF
- WAR my-example.war
- WEB-INF
- META-INF
However, the deployment failed when verifying JAXBContext class:
...
[Loaded com.sun.jersey.core.spi.component.ProviderFactory$SingletonComponentProvider from file:/C:/jboss-4.2.3.GA-jdk6/server/default/tmp/deploy/tmp3081340691940707694my-example.ear-contents/APP-INF/lib/jersey-core-1.0.2.jar]
[Loaded com.sun.jersey.core.spi.component.ComponentDestructor from file:/C:/jboss-4.2.3.GA-jdk6/server/default/tmp/deploy/tmp3081340691940707694my-example.ear-contents/APP-INF/lib/jersey-core-1.0.2.jar]
[Loaded javax.annotation.PreDestroy from C:\Java\jdk1.6.0_13\jre\lib\rt.jar]
[Loaded javax.xml.bind.JAXBContext from C:\jboss-4.2.3.GA-jdk6\lib\endorsed\jaxb-api.jar]
[Loaded com.sun.jersey.api.json.JSONConfigurated from file:/C:/jboss-4.2.3.GA-jdk6/server/default/tmp/deploy/tmp3081340691940707694my-example.ear-contents/APP-INF/lib/jersey-json-1.0.2.jar]
[Loaded java.lang.Package$1 from C:\Java\jdk1.6.0_13\jre\lib\rt.jar]
[Loaded javax.xml.bind.JAXBContext from file:/C:/jboss-4.2.3.GA-jdk6/server/default/tmp/deploy/tmp3081340691940707694my-example.ear-contents/APP-INF/lib/jaxb-api.jar]
[Loaded com.sun.jersey.api.json.JSONJAXBContext from file:/C:/jboss-4.2.3.GA-jdk6/server/default/tmp/deploy/tmp3081340691940707694my-example.ear-contents/APP-INF/lib/jersey-json-1.0.2.jar]
[Loaded java.lang.VerifyError from C:\Java\jdk1.6.0_13\jre\lib\rt.jar]
02:24:23,953 ERROR [[/resources]] StandardWrapper.Throwable
java.lang.VerifyError: (class: my/example/impl/provider/JAXBContextResolver, method: <init> signature: ()V) Bad type in putfield/putstatic
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.getMethods(Unknown Source)
at com.sun.jersey.core.reflection.MethodList.<init>(MethodList.java:57)
at com.sun.jersey.core.spi.component.ComponentConstructor.getPostConstructMethod(ComponentConstructor.java:124)
at com.sun.jersey.core.spi.component.ComponentConstructor.<init>(ComponentConstructor.java:118)
at com.sun.jersey.core.spi.component.ProviderFactory.getInstance(ProviderFactory.java:205)
at com.sun.jersey.core.spi.component.ProviderFactory._getComponentProvider(ProviderFactory.java:133)
at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:126)
at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:168)
at com.sun.jersey.core.spi.component.ProviderServices.getProviders(ProviderServices.java:95)
at com.sun.jersey.core.spi.factory.ContextResolverFactory.<init>(ContextResolverFactory.java:90)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:410)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:317)
at com.sun.jersey.spi.container.servlet.WebComponent.initiate(WebComponent.java:422)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:433)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:167)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:197)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4071)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4375)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService(WebModule.java:61)
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(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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)
Thanks a lot,
William
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
17 years, 2 months
[Installation, Configuration & DEPLOYMENT] - Problem with logs
by chuchuaguilera
Hi there,
I'm having a lot of troubles logging my applications with jboss. We are changing Oracle Application Server with Jboss Application Server. We tested a lot our applications and after we eradicated all the mistakes, application ones, we are now facing a big trouble: all the applications deployed in a server (as a matter of fact is a cluster of two servers) logs all the activity normaly but suddenly stops logging, I mean, they continue doing things but not write to the log file anymore. I tried two other appenders, ina different file, and in a ftp console, but when it stops they stop too. I'm not a developer, just a system programmer learning about this word. Thanks in advance whomever can help me, and please excuse my poor english. I'm from Venezuela.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231376#4231376
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231376
17 years, 2 months