• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to: use Form based auth via JDBCRealm:oracle in Glassfish 3.0

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple java web app (a collection of small games) which i am trying to port to glassfish from Tomcat (were it worked fine). When trying to port to glassfish 3.0 I am having trouble, most recently with getting the form based authentication to work. Under tomcat I used a context.xml file to specify the jdbcrealm details like so:

My web.xml file currently has this in it relating to security:

How do I get this working under glassfish? It seems the context.xml file is ignored. I am trying to root through the JEE 6 tutorial but it is not really much help unless you read through the entire thing. I see someone was having similar trouble here and seem to have fixed their problem (set digest algo to none) but not mine.
Again, I already have the database (Oracle XE) and it worked fine under tomcat.

I'm sure a concise step by step walkthrough would be valuable to more than just me.

BTW, One of the earlier problems I had was that under glassfish the loginpage.jsp was not accessible under the WEB-INF folder so I had to move to the war file root.

Thanks in advance.
 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With help from this article I made some progress (I can now deploy the app successfully) but I cannot login quite right. I tried setting digest algo to "none" and then, on my web app, when I submit my login info could not login but did at least get the loginerror.jsp page.

But when I try setting digest algo to "md5" I get an error message after submitting my login info, but then when I go back to the main page I find that I am logged in!

So now to just stop getting that 403 error page...

PS: I changed my web.xml file to include the realm info like so:
 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope I didn't give the impression my problem was totally solved, I still get the 403 message after successfully logging in. Very strange, why would that happen?

PS: on further investigation I am only partly logged in - very weird. As i surf to the different pages I get the logged in message on the top of my pages and i even access restricted data in the database, but when I try to access data via ajax I still get the 403 error message.
 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my complete web.xml file, is there anything wrong with it? (I cut some servlet and servlet-mappings for brevity.) Also I tried it with all the web-resource-collections defined within one security-constraint but the effect seems the same so far.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll move this to the Servlets forum which appears to be a better place for this question.
 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe it will help if you see what I mean yourself: just go here and click login, username and password is "any" : wierd login error
After submiting you will get the error page, then backup to the main page again and hit reload. you will see you are now logged in as user "any".
No if you click on the Mischmasch lnk a you will see a number of saved games in a drop down box. try to load one. you will get another 403 error, (you'll need to use the firebug add on to firefox to see it). So the web app seems to be in a wierd partially logged in state.

All my user name and role info is in my database. Should some of it be elsewhere?
 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After much tinkering I can no longer even partially login! After restarting my server (and before viewing the web app or trying to login) I looked in the server log and found this:


[#|2010-01-14T08:23:26.731-0500|SEVERE|glassfishv3.0|org.apache.tomcat.util.digester.Digester|_ThreadID=11;_ThreadName=Thread-1;|Begin event threw exception

java.lang.ClassNotFoundException: org.apache.catalina.realm.JDBCRealm

at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)

at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)

at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)

at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:242)

at org.apache.tomcat.util.digester.Rule.begin(Rule.java:189)

at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1414)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)

at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1699)

at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:819)

at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:760)

at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:1014)

at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:180)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)

at org.apache.catalina.core.StandardContext.init(StandardContext.java:6319)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4972)

at com.sun.enterprise.web.WebModule.start(WebModule.java:499)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)

at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:159)

at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:181)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:910)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)

at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1933)

at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1605)

at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)

at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)

at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)

at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)

at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)

at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:340)

at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:163)

at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)

at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)

at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)

at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)

at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)

at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)

at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:236)

at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:128)

at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:457)

at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:401)

at org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:125)

at org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1262)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:631)

at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)

at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)

at org.jvnet.hk2.osgimain.Main.start(Main.java:140)

at org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1262)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:631)

at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)

at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)

at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)

at java.lang.Thread.run(Thread.java:619)

|#]



[#|2010-01-14T08:23:26.747-0500|SEVERE|glassfishv3.0|org.apache.catalina.startup.ContextConfig|_ThreadID=11;_ThreadName=Thread-1;|PWC3026: Parse error in default web.xml

java.lang.ClassNotFoundException: org.apache.catalina.realm.JDBCRealm

at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2840)

at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2866)

at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1417)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)

at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1699)

at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:819)

at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:760)

at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:1014)

at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:180)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)

at org.apache.catalina.core.StandardContext.init(StandardContext.java:6319)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4972)

at com.sun.enterprise.web.WebModule.start(WebModule.java:499)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)

at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:159)

at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:181)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:910)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)

at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1933)

at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1605)

at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)

at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)

at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)

at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)

at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)

at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:340)

at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:163)

at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)

at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)

at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)

at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)

at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)

at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)

at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:236)

at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:128)

at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:457)

at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:401)

at org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:125)

at org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1262)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:631)

at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)

at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)

at org.jvnet.hk2.osgimain.Main.start(Main.java:140)

at org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1262)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:631)

at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)

at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)

at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)

at java.lang.Thread.run(Thread.java:619)

Caused by: java.lang.ClassNotFoundException: org.apache.catalina.realm.JDBCRealm

at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)

at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)

at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)

at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:242)

at org.apache.tomcat.util.digester.Rule.begin(Rule.java:189)

at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1414)

... 63 more


Seems like the server has just not been able to find the class, if so then what jar do I need to put where? I already have ojdbc14.jar in many places.
 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More server.log stuff.. seems to at once succeed in logging admin for the admin console but also to fail :


[#|2010-01-14T11:32:31.809-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.appserv.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.auth.login.FileLoginModule;MethodName=authenticate;|File login succeeded for: admin|#]



[#|2010-01-14T11:32:31.809-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.appserv.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.appserv.security.AppservPasswordLoginModule;MethodName=login;|JAAS login complete.|#]



[#|2010-01-14T11:32:31.809-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.appserv.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.appserv.security.AppservPasswordLoginModule;MethodName=commit;|JAAS authentication committed.|#]



[#|2010-01-14T11:32:31.809-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.auth.login.LoginContextDriver;MethodName=doPasswordLogin;|Password login succeeded for : admin|#]



[#|2010-01-14T11:32:31.809-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.SecurityContext;MethodName=setCurrent;|permission check done to set SecurityContext|#]



[#|2010-01-14T11:32:31.809-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.auth.login.LoginContextDriver;MethodName=doPasswordLogin;|Set security context as user: admin|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=setPolicyContext;|[Web-Security] Policy Context ID was: __admingui/__admingui|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasUserDataPermission;|[Web-Security] hasUserDataPermission perm: (javax.security.jacc.WebUserDataPermission GET)|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasUserDataPermission;|[Web-Security] hasUserDataPermission isGranted: true|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=setPolicyContext;|[Web-Security] Policy Context ID was: __admingui/__admingui|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Codesource with Web URL: file:/__admingui/__admingui|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Checking Web Permission with Principals : null|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Web Permission = (javax.security.jacc.WebResourcePermission //index.jsf GET)|#]



[#|2010-01-14T11:32:31.825-0500|FINEST|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.provider.BasePolicyWrapper;MethodName=doImplies;|JACC Policy Provider: PolicyWrapper.implies, context (__admingui/__admingui)- result was(false) permission ((javax.security.jacc.WebResourcePermission //index.jsf GET))|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasResourcePermission;|[Web-Security] hasResource isGranted: false|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasResourcePermission;|[Web-Security] hasResource perm: (javax.security.jacc.WebResourcePermission //index.jsf GET)|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=setPolicyContext;|[Web-Security] Policy Context ID was: __admingui/__admingui|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Generating a protection domain for Permission check.|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Checking with Principal : admin|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Checking with Principal : asadmin|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Codesource with Web URL: file:/__admingui/__admingui|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Checking Web Permission with Principals : admin, asadmin|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Web Permission = (javax.security.jacc.WebResourcePermission //index.jsf GET)|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.SecurityContext;MethodName=setCurrent;|permission check done to set SecurityContext|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasResourcePermission;|[Web-Security] hasResource isGranted: true|#]



[#|2010-01-14T11:32:31.825-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasResourcePermission;|[Web-Security] hasResource perm: (javax.security.jacc.WebResourcePermission //index.jsf GET)|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=28;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.SecurityContext;MethodName=setCurrentSecurityContext;|SecurityContext: setCurrentSecurityContext method called|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=setPolicyContext;|[Web-Security] Policy Context ID was: __admingui/__admingui|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasUserDataPermission;|[Web-Security] hasUserDataPermission perm: (javax.security.jacc.WebUserDataPermission /common/index.jsf GET)|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasUserDataPermission;|[Web-Security] hasUserDataPermission isGranted: true|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=setPolicyContext;|[Web-Security] Policy Context ID was: __admingui/__admingui|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Codesource with Web URL: file:/__admingui/__admingui|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Checking Web Permission with Principals : admin, asadmin|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=checkPermissionWithoutCache;|[Web-Security] Web Permission = (javax.security.jacc.WebResourcePermission /common/index.jsf GET)|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasResourcePermission;|[Web-Security] hasResource isGranted: true|#]



[#|2010-01-14T11:32:31.887-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.web.integration.WebSecurityManager;MethodName=hasResourcePermission;|[Web-Security] hasResource perm: (javax.security.jacc.WebResourcePermission /common/index.jsf GET)|#]



[#|2010-01-14T11:32:32.169-0500|INFO|glassfishv3.0|org.glassfish.admingui|_ThreadID=27;_ThreadName=Thread-1;|admin console: initSessionAttributes()|#]



[#|2010-01-14T11:32:32.403-0500|FINEST|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.auth.login.LoginContextDriver;MethodName=login;|Processing login with credentials of type: class com.sun.enterprise.security.auth.login.common.PasswordCredential|#]



[#|2010-01-14T11:32:32.403-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.auth.login.LoginContextDriver;MethodName=doPasswordLogin;|Logging in user [admin] into realm: admin-realm using JAAS module: fileRealm|#]



[#|2010-01-14T11:32:32.403-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.appserv.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.appserv.security.AppservPasswordLoginModule;MethodName=initialize;|Login module initialized: class com.sun.enterprise.security.auth.login.FileLoginModule|#]



[#|2010-01-14T11:32:32.403-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.auth.realm.file.FileRealm;MethodName=authenticate;|File authentication failed for: [admin]|#]



[#|2010-01-14T11:32:32.403-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.appserv.security|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.appserv.security.AppservPasswordLoginModule;MethodName=abort;|JAAS authentication aborted.|#]



[#|2010-01-14T11:32:32.403-0500|FINEST|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login|_ThreadID=27;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.auth.login.LoginContextDriver;MethodName=doPasswordLogin;|doPasswordLogin fails

javax.security.auth.login.LoginException: Failed file login for admin.

at com.sun.enterprise.security.auth.login.FileLoginModule.authenticate(FileLoginModule.java:80)

at com.sun.enterprise.security.auth.login.PasswordLoginModule.authenticateUser(PasswordLoginModule.java:90)

at com.sun.appserv.security.AppservPasswordLoginModule.login(AppservPasswordLoginModule.java:141)

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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)

at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)

at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)

at javax.security.auth.login.LoginContext.login(LoginContext.java:579)

at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:341)

at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:199)

at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:152)

at org.glassfish.admin.amx.impl.ext.RealmsImpl.getAnonymousUser(RealmsImpl.java:425)

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.glassfish.admin.amx.impl.mbean.AMXImplBase.getAttributeByMethod(AMXImplBase.java:547)

at org.glassfish.admin.amx.impl.mbean.AMXImplBase.getAttributeInternal(AMXImplBase.java:464)

at org.glassfish.admin.amx.impl.mbean.AMXImplBase.getAttribute(AMXImplBase.java:419)

at org.glassfish.admin.amx.impl.mbean.AMXImplBase.getAttributes(AMXImplBase.java:503)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttributes(DefaultMBeanServerInterceptor.java:726)

at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttributes(JmxMBeanServer.java:665)

at org.glassfish.admin.amx.util.jmx.MBeanProxyHandler.getAttributes(MBeanProxyHandler.java:273)

at org.glassfish.admin.amx.core.proxy.AMXProxyHandler.attributesMap(AMXProxyHandler.java:1193)

at org.glassfish.admin.amx.core.proxy.AMXProxyHandler.attributesMap(AMXProxyHandler.java:1203)

at org.glassfish.admin.amx.core.proxy.AMXProxyHandler.handleSpecialMethod(AMXProxyHandler.java:414)

at org.glassfish.admin.amx.core.proxy.AMXProxyHandler._invoke(AMXProxyHandler.java:792)

at org.glassfish.admin.amx.core.proxy.AMXProxyHandler.invoke(AMXProxyHandler.java:526)

at $Proxy103.attributesMap(Unknown Source)

at org.glassfish.admingui.common.handlers.ProxyHandlers.getProxyAttribute(ProxyHandlers.java:316)

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 com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)

at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)

at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)

at com.sun.jsftemplating.layout.descriptors.LayoutDefinition.dispatchInitPageHandlers(LayoutDefinition.java:332)

at com.sun.jsftemplating.layout.template.TemplateLayoutDefinitionManager.getLayoutDefinition(TemplateLayoutDefinitionManager.java:201)

at com.sun.jsftemplating.layout.LayoutDefinitionManager.getLayoutDefinition(LayoutDefinitionManager.java:152)

at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)

at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)

at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)

at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:255)

at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:253)

at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)

at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)

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.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:319)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)

at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:352)

at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:209)

at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1516)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)

at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:88)

at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:198)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:194)

at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)

at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:88)

at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:198)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:194)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)

at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)

at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)

at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)

at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:239)

at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)

at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)

at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)

at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)

at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)

at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)

at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)

at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)

at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)

at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)

at com.sun.grizzly.ContextTask.run(ContextTask.java:69)

at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)

at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)

at java.lang.Thread.run(Thread.java:619)

|#]



[#|2010-01-14T11:32:39.137-0500|INFO|glassfishv3.0|org.glassfish.admingui|_ThreadID=27;_ThreadName=Thread-1;|Update Component count = 0|#]


 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again, Still no solution. On the off chance anyone is interested, this thread is continued on java.net .
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic