users@glassfish.java.net

Re: Custom Realm

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Tue, 27 Jan 2009 11:07:37 -0800

This was the clue:

javax.naming.NameNotFoundException: access-manager not found
         at
com.sun.enterprise.server.PersistenceUnitInfoImpl._getJtaDataSource

Regards,
-marina

Daniel H. Cavalcanti wrote:
> Ops...
> That's what it was. I had forgotten to add the jdbc resources in the
> test environment. Since access-manager was also the realm name, I
> ended up not noticing the missing piece, and after looking over and
> over again, it just became one of those things that someone needs to
> take a peek to catch on.
>
> Thanks for the tip!
>
> Marina Vatkina wrote:
>> Hi Daniel,
>>
>> Is your jdbc datasource called "access-manager"? can you ping it from
>> the adminGUI?
>>
>> thanks,
>> -marina
>>
>> Daniel H. Cavalcanti wrote:
>>> Hello,
>>>
>>> I have a custom realm that I developed.
>>> On my machine, which is not running as a cluster, the realm works fine.
>>> However, when I deploy into our test environment, which is
>>> configured as a cluster (with 4 node-agents and 4 instances), the
>>> realm seems to give problems and the application doesn't even load.
>>>
>>> The realm is called access-manager. I configured it in the domain
>>> and restarted the domain and cluster, so I see the required jar
>>> files in the path, they are in the proper directory, and the
>>> login.conf file has the proper entry.
>>>
>>> Here is the log file of one of the instances (the others have the
>>> same logging entries). Any help is greatly appreciated.
>>>
>>> [#|2009-01-26T11:52:43.764-0500|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Application
>>> server startup complete.|#]
>>>
>>> [#|2009-01-26T11:53:45.710-0500|INFO|sun-appserver9.1|javax.ee.enterprise.system.tools.synchronization|_ThreadID=18;_ThreadName=RMI
>>> TCP Connection(8)-192.168.3.150;|SYNC062: Synchronization for
>>> access-manager-enterprise is complete. Total time spent 2069 milli
>>> second(s).|#]
>>>
>>> [#|2009-01-26T11:53:45.871-0500|WARNING|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=18;_ThreadName=RMI
>>> TCP
>>> Connection(8)-192.168.3.150;access-manager-enterprise;_RequestID=c7ba9acd-0964-40b2-911f-8d95551f4644;|SEC5055:
>>> Role mapping conflicts found in application
>>> access-manager-enterprise. Some roles may not be mapped.|#]
>>>
>>> [#|2009-01-26T11:53:45.899-0500|WARNING|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=18;_ThreadName=RMI
>>> TCP
>>> Connection(8)-192.168.3.150;_RequestID=c7ba9acd-0964-40b2-911f-8d95551f4644;|javax.naming.NameNotFoundException:
>>> access-manager not found
>>> java.lang.RuntimeException: javax.naming.NameNotFoundException:
>>> access-manager not found
>>> at
>>> com.sun.enterprise.server.PersistenceUnitInfoImpl._getJtaDataSource(PersistenceUnitInfoImpl.java:283)
>>>
>>> at
>>> com.sun.enterprise.server.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:116)
>>>
>>> at
>>> com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:121)
>>>
>>> at
>>> com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84)
>>>
>>> at
>>> com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:898)
>>>
>>> at
>>> com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:184)
>>>
>>> at
>>> com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126)
>>>
>>> at
>>> com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:244)
>>> at
>>> com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336)
>>>
>>> at
>>> com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:210)
>>>
>>> at
>>> com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:645)
>>>
>>> at
>>> com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:928)
>>>
>>> at
>>> com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:912)
>>>
>>> at
>>> com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:461)
>>>
>>> at
>>> com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
>>>
>>> at
>>> com.sun.enterprise.ee.admin.mbeans.ServerRuntimeMBean.forwardEvent(ServerRuntimeMBean.java:95)
>>>
>>> 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.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
>>>
>>> at
>>> com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
>>>
>>> at
>>> com.sun.enterprise.admin.runtime.BaseRuntimeMBean.invoke(BaseRuntimeMBean.java:462)
>>>
>>> at
>>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
>>>
>>> at
>>> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
>>> at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown
>>> Source)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at
>>> com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
>>>
>>> at $Proxy1.invoke(Unknown Source)
>>> at
>>> com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
>>>
>>> at
>>> com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
>>>
>>> at
>>> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
>>>
>>> at
>>> javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
>>>
>>> at
>>> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
>>>
>>> at
>>> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)
>>>
>>> at
>>> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
>>>
>>> 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
>>> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
>>> at sun.rmi.transport.Transport$1.run(Transport.java:159)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
>>> at
>>> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
>>>
>>> at
>>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
>>>
>>> at
>>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
>>>
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>
>>> at java.lang.Thread.run(Thread.java:619)
>>> Caused by: javax.naming.NameNotFoundException: access-manager not found
>>> at
>>> com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
>>>
>>> at
>>> com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
>>>
>>> at
>>> com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)
>>>
>>> at
>>> com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
>>>
>>> at
>>> com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:111)
>>>
>>> at
>>> com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
>>> at javax.naming.InitialContext.lookup(InitialContext.java:392)
>>> at
>>> com.sun.enterprise.connectors.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:196)
>>>
>>> at
>>> com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:1099)
>>>
>>> at
>>> com.sun.enterprise.server.PersistenceUnitInfoImpl.lookupPMDataSource(PersistenceUnitInfoImpl.java:294)
>>>
>>> at
>>> com.sun.enterprise.server.PersistenceUnitInfoImpl._getJtaDataSource(PersistenceUnitInfoImpl.java:281)
>>>
>>> ... 50 more
>>> |#]
>>>
>>> [#|2009-01-26T11:53:45.904-0500|WARNING|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=18;_ThreadName=RMI
>>> TCP
>>> Connection(8)-192.168.3.150;access-manager-enterprise;_RequestID=c7ba9acd-0964-40b2-911f-8d95551f4644;|CORE5021:
>>> Application NOT loaded: [access-manager-enterprise]|#]
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>