11 Replies Latest reply on Jul 12, 2008 7:55 AM by avyo

    Data Source JNDI lookup fails in a WAR

    avyo

      Hi All,

      I'm running my app on jboss 4.2.0, using a MSSql as a database ans spring.

      My Data source:TestDB-ds.xml

      <local-tx-datasource>
      <jndi-name>TestDB</jndi-name>
      <connection-url> jdbc:sqlserver://muzicall01;database=muzicall_dev</connection-url>
      <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
      <user-name>xxx</user-name>
      <p assword>xxx</p assword>
      </local-tx-datasource>


      The JNDI lookup in spring:
      <jee:jndi-lookup id="dataSource" jndi-name="java:TestDB"/>

      In a regular EAR deployment it is working just find but when I moved to a WAR I got javax.naming.NameNotFoundException

      Follow my JNDI tree:
      java: Namespace

      +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
      +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
      +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
      +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
      +- comp (class: javax.naming.Context)
      +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
      +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
      +- jaas (class: javax.naming.Context)
      | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
      | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
      | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
      +- comp.original (class: javax.namingMain.Context)
      +- timedCacheFactory (class: javax.naming.Context)
      Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
      +- TestDB (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
      +- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
      +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
      +- Mail (class: javax.mail.Session)
      +- comp.ejb3 (class: javax.naming.Context)
      | NonContext: null
      +- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
      +- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)

      I made a small test - in a servlet I inserted those two rows:
      ((Object)context.lookup("java:SecurityProxyFactory")).getClass().getName();

      ((Object)context.lookup("java:TestDB")).getClass().getName();

      Both JNDI names are from the same level for the first one I got the right class and for the second I dont the name not found.

      Any idea why I can find the DS an EAR deployment and not on a WAR one.
      You help will be appreciated.

        • 1. Re: Data Source JNDI lookup fails in a WAR
          jaikiran

          When is the lookup being done? Is it done when the application has completed deployed or during deployment? How do you create the InitialContext object? Do you pass any properties to its constructor or do you have a jndi.properties in your application WAR file or do you rely on the one in the conf folder of JBoss?

          • 2. Re: Data Source JNDI lookup fails in a WAR
            jaikiran

            Also please post the entire exception stacktrace and the deployment logs (when the application and datasource are being deployed).

            P.S: While posting logs or xml content or code, remember to wrap it in a code block, using the Code button in the message editor window. And please use the Preview button to ensure that your post is correctly formatted.

            • 3. Re: Data Source JNDI lookup fails in a WAR
              avyo

              thanks for you help,

              I tried to lookup while deploying (while loading the spring context files) and also after deployment in a servlet.
              I'm creating the initialContext with the default jboss conf, I also tried to use my own jndi.properties and to create the initalContext using a local properties object, all ended with the same result.

              Follow is the error while running

              ((Object)context.lookup("java:TestDB")).getClass().getName();

              from a servlet:
              14:25:14,296 ERROR [STDERR] javax.naming.NameNotFoundException: JNDI object with [java:TestDB] not found: JNDI implementation returned null
              14:25:14,296 ERROR [STDERR] at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:134)
              14:25:14,296 ERROR [STDERR] at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
              14:25:14,296 ERROR [STDERR] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
              14:25:14,296 ERROR [STDERR] at com.my.yoav.test.doGet(test.java:64)
              14:25:14,296 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
              14:25:14,296 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.ui.switchuser.SwitchUserProcessingFilter.doFilter(SwitchUserProcessingFilter.java:341)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:175)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
              14:25:14,296 ERROR [STDERR] at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              14:25:14,296 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              14:25:14,296 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
              14:25:14,296 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
              14:25:14,296 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              14:25:14,296 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
              14:25:14,296 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              14:25:14,296 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
              14:25:14,296 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              14:25:14,296 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
              


              follow is the deployment log:
              14:18:03,546 INFO [Server] Starting JBoss (MX MicroKernel)...
              14:18:03,546 INFO [Server] Release ID: JBoss [Trinity] 4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)
              14:18:03,546 INFO [Server] Home Dir: C:\Java\jbosses\Test\jboss-4.2.0.GA
              14:18:03,546 INFO [Server] Home URL: file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/
              14:18:03,546 INFO [Server] Patch URL: null
              14:18:03,546 INFO [Server] Server Name: test
              14:18:03,546 INFO [Server] Server Home Dir: C:\Java\jbosses\Test\jboss-4.2.0.GA\server\test
              14:18:03,546 INFO [Server] Server Home URL: file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/
              14:18:03,546 INFO [Server] Server Log Dir: C:\Java\jbosses\Test\jboss-4.2.0.GA\server\test\log
              14:18:03,546 INFO [Server] Server Temp Dir: C:\Java\jbosses\Test\jboss-4.2.0.GA\server\test\tmp
              14:18:03,546 INFO [Server] Root Deployment Filename: jboss-service.xml
              14:18:04,000 INFO [ServerInfo] Java version: 1.6.0_02,Sun Microsystems Inc.
              14:18:04,000 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.6.0_02-b06,Sun Microsystems Inc.
              14:18:04,000 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
              14:18:04,421 INFO [Server] Core system initialized
              14:18:12,390 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
              14:18:12,390 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
              log4j: Threshold ="null".
              log4j: Retreiving an instance of org.apache.log4j.Logger.
              log4j: Setting [org.apache] additivity to [true].
              log4j: Level value for org.apache is [INFO].
              log4j: org.apache level set to INFO
              log4j: Retreiving an instance of org.apache.log4j.Logger.
              log4j: Setting [org.jboss.serial] additivity to [true].
              log4j: Level value for org.jboss.serial is [INFO].
              log4j: org.jboss.serial level set to INFO
              log4j: Retreiving an instance of org.apache.log4j.Logger.
              log4j: Setting [org.jgroups] additivity to [true].
              log4j: Level value for org.jgroups is [WARN].
              log4j: org.jgroups level set to WARN
              log4j: Retreiving an instance of org.apache.log4j.Logger.
              log4j: Setting [jacorb] additivity to [true].
              log4j: Level value for jacorb is [WARN].
              log4j: jacorb level set to WARN
              log4j: Retreiving an instance of org.apache.log4j.Logger.
              log4j: Setting [org.jboss.management] additivity to [true].
              log4j: Level value for org.jboss.management is [INFO].
              log4j: org.jboss.management level set to INFO
              log4j: Retreiving an instance of org.apache.log4j.Logger.
              log4j: Setting [com.my] additivity to [true].
              log4j: Level value for com.my is [DEBUG].
              log4j: com.my level set to DEBUG
              log4j: Class name: [org.apache.log4j.ConsoleAppender]
              log4j: Setting property [target] to [System.out].
              log4j: Setting property [threshold] to [INFO].
              log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
              log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %-5p [%c{1}] %m%n].
              log4j: Adding appender named [CONSOLE] to category [com.my].
              log4j: Adding appender named [CONSOLE] to category [root].
              log4j: Class name: [org.jboss.logging.appender.RollingFileAppender]
              log4j: Setting property [file] to [C:\Java\jbosses\Test\jboss-4.2.0.GA\server\test\log/server.log].
              log4j: Setting property [append] to [false].
              log4j: Setting property [maxFileSize] to [10000KB].
              log4j: Setting property [maxBackupIndex] to [1].
              log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
              log4j: Setting property [conversionPattern] to [%d %-5p [%c] %m%n].
              log4j: setFile called: C:\Java\jbosses\Test\jboss-4.2.0.GA\server\test\log/server.log, false
              log4j: setFile ended
              log4j: Adding appender named [FILE] to category [root].
              14:18:13,187 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
              14:18:13,187 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
              14:18:13,375 INFO [TransactionManagerService] Starting recovery manager
              14:18:13,859 INFO [TransactionManagerService] Recovery manager started
              14:18:13,859 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
              14:18:19,984 INFO [EJB3Deployer] Starting java:comp multiplexer
              14:18:23,750 INFO [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756)
              14:18:27,000 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\jdk1.6.0_02\bin
              14:18:27,078 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-8080
              14:18:27,078 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
              14:18:27,078 INFO [Catalina] Initialization processed in 284 ms
              14:18:27,078 INFO [StandardService] Starting service jboss.web
              14:18:27,078 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.GA
              14:18:27,125 INFO [Catalina] Server startup in 47 ms
              14:18:27,234 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
              14:18:49,171 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
              14:18:49,390 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp21141jbossws-context-exp.war/
              14:18:49,546 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
              14:18:50,406 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
              14:18:51,078 INFO [MailService] Mail Service bound to java:/Mail
              14:18:51,453 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
              14:18:51,515 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
              14:18:51,578 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
              14:18:51,656 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
              14:18:51,921 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
              14:18:51,984 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
              14:18:52,000 INFO [QuartzResourceAdapter] start quartz!!!
              14:18:52,062 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
              14:18:52,093 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
              14:18:52,093 INFO [RAMJobStore] RAMJobStore initialized.
              14:18:52,093 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
              14:18:52,093 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
              14:18:52,093 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
              14:18:53,046 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
              14:18:53,296 INFO [A] Bound to JNDI name: queue/A
              14:18:53,296 INFO [B] Bound to JNDI name: queue/B
              14:18:53,312 INFO [C] Bound to JNDI name: queue/C
              14:18:53,312 INFO [D] Bound to JNDI name: queue/D
              14:18:53,312 INFO [ex] Bound to JNDI name: queue/ex
              14:18:53,312 INFO [EmailQueue] Bound to JNDI name: queue/EmailQueue
              14:18:53,312 INFO [AuditQueue] Bound to JNDI name: queue/AuditQueue
              14:18:53,328 INFO [testTopic] Bound to JNDI name: topic/testTopic
              14:18:53,328 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
              14:18:53,328 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
              14:18:53,328 INFO [testQueue] Bound to JNDI name: queue/testQueue
              14:18:53,375 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
              14:18:53,406 INFO [DLQ] Bound to JNDI name: queue/DLQ
              14:18:53,531 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
              14:18:53,593 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=TestDB' to JNDI name 'java:TestDB'
              14:18:57,109 INFO [TomcatDeployer] deploy, ctxPath=/test, warUrl=.../deploy/test.war/
              14:19:04,515 ERROR [STDERR] Jul 11, 2008 2:19:04 PM com.sun.faces.config.ConfigureListener contextInitialized
              INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b10-p01) for context '/test'
              14:19:05,828 ERROR [STDERR] Jul 11, 2008 2:19:05 PM com.sun.faces.spi.InjectionProviderFactory getProviderInstance
              SEVERE: JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossInjectionProvider' does not implement the InjectionProvider interface.
              14:19:05,828 ERROR [STDERR] Jul 11, 2008 2:19:05 PM com.sun.faces.spi.InjectionProviderFactory createInstance
              INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
              14:19:07,703 INFO [STDOUT] 14:19:07,703 INFO [[/test]] Initializing Spring root WebApplicationContext
              14:19:07,703 INFO [STDOUT] 14:19:07,703 INFO [ContextLoader] Root WebApplicationContext: initialization started
              14:19:07,750 INFO [STDOUT] 14:19:07,750 INFO [XmlWebApplicationContext] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@ad4391: display name [Root WebApplicationContext]; startup date [Fri Jul 11 14:19:07 IDT 2008]; root of context hierarchy
              14:19:08,140 INFO [STDOUT] 14:19:08,140 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
              14:19:08,187 INFO [STDOUT] 14:19:08,187 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/mainApplicationContext.xml]
              14:19:08,234 INFO [STDOUT] 14:19:08,234 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/core/data-source.config.xml]
              14:19:08,328 INFO [STDOUT] 14:19:08,328 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/main.config.xml]
              14:19:08,406 INFO [STDOUT] 14:19:08,406 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/core/prototype-beans.config.xml]
              14:19:08,437 INFO [STDOUT] 14:19:08,437 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/core/persistence.config.xml]
              14:19:08,531 INFO [STDOUT] 14:19:08,531 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/app/i18n.config.xml]
              14:19:08,562 INFO [STDOUT] 14:19:08,562 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/myCommons_i18n_v1.3.jar!/com/my/common/i18n/beans.config.xml]
              14:19:08,578 INFO [STDOUT] 14:19:08,578 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/app/configuration.config.xml]
              14:19:08,593 INFO [STDOUT] 14:19:08,593 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/myCommons_config_v1.3.jar!/com/my/common/base/config/beans.config.xml]
              14:19:08,609 INFO [STDOUT] 14:19:08,609 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/core/acegi-security.config.xml]
              14:19:08,640 INFO [STDOUT] 14:19:08,640 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/app/security.config.xml]
              14:19:08,671 INFO [STDOUT] 14:19:08,671 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/myCommons_security_v1.3.jar!/com/my/common/security/beans.config.xml]
              14:19:08,687 INFO [STDOUT] 14:19:08,687 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/app/general.config.xml]
              14:19:08,718 INFO [STDOUT] 14:19:08,718 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/myCommons_file_repository_v1.3.jar!/com/my/common/filerepository/beans.config.xml]
              14:19:08,750 INFO [STDOUT] 14:19:08,750 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/app/scope.config.xml]
              14:19:08,765 INFO [STDOUT] 14:19:08,765 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/scope.config.xml]
              14:19:08,796 INFO [STDOUT] 14:19:08,796 INFO [DefaultListableBeanFactory] Overriding bean definition for bean 'flowScopeConfig': replacing [Generic bean: class [org.springframework.beans.factory.config.MapFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.springframework.beans.factory.config.MapFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
              14:19:08,812 INFO [STDOUT] 14:19:08,812 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/testconfig.jar!/config/app/jms.config.xml]
              14:19:08,875 INFO [STDOUT] 14:19:08,875 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [WEB-INF/test.view.config.xml]
              14:19:08,890 INFO [STDOUT] 14:19:08,890 INFO [XmlWebApplicationContext] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@ad4391]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5144d5
              14:19:09,234 INFO [STDOUT] 14:19:09,234 INFO [PropertyPlaceholderConfigurer] Loading properties file from class path resource [config/app/app-my.cfg.properties]
              14:19:09,406 INFO [STDOUT] 14:19:09,406 INFO [XmlWebApplicationContext] Bean 'securityInterceptorBeanNames' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
              14:19:09,406 INFO [STDOUT] 14:19:09,406 INFO [XmlWebApplicationContext] Bean 'securityInterceptorBeanNames' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
              14:19:09,734 INFO [STDOUT] 14:19:09,734 INFO [PropertiesFactoryBean] Loading properties file from class path resource [config/core/hibernate.properties]
              14:19:09,781 INFO [STDOUT] 14:19:09,781 INFO [Version] Hibernate Annotations 3.3.0.GA
              14:19:09,812 INFO [STDOUT] 14:19:09,812 INFO [Environment] Hibernate 3.2.5
              14:19:09,812 INFO [STDOUT] 14:19:09,812 INFO [Environment] hibernate.properties not found
              14:19:09,828 INFO [STDOUT] 14:19:09,828 INFO [Environment] Bytecode provider name : javassist
              14:19:09,828 INFO [STDOUT] 14:19:09,828 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
              14:19:10,000 INFO [STDOUT] 14:19:10,000 INFO [Configuration] configuring from url: jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/myCommons_config_v1.3.jar!/com/my/common/base/config/hibernate.cfg.xml
              14:19:10,125 INFO [STDOUT] 14:19:10,125 INFO [Configuration] Configured SessionFactory: sessionFactory
              14:19:10,125 INFO [STDOUT] 14:19:10,125 INFO [Configuration] configuring from url: jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/myCommons_security_v1.3.jar!/com/my/common/security/hibernate.cfg.xml
              14:19:10,140 INFO [STDOUT] 14:19:10,140 INFO [Configuration] Configured SessionFactory: sessionFactory
              14:19:10,140 INFO [STDOUT] 14:19:10,140 INFO [Configuration] configuring from url: jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/myCommons_i18n_v1.3.jar!/com/my/common/i18n/hibernate.cfg.xml
              14:19:10,140 INFO [STDOUT] 14:19:10,140 INFO [Configuration] Configured SessionFactory: sessionFactory
              14:19:10,156 INFO [STDOUT] 14:19:10,156 INFO [Configuration] configuring from url: jar:file:/C:/Java/jbosses/Test/jboss-4.2.0.GA/server/test/deploy/test.war/WEB-INF/lib/myCommons_file_repository_v1.3.jar!/com/my/common/filerepository/hibernate.cfg.xml
              14:19:10,156 INFO [STDOUT] 14:19:10,156 INFO [Configuration] Configured SessionFactory: sessionFactory
              14:19:11,484 INFO [STDOUT] 14:19:11,484 INFO [Version] Hibernate Validator 3.0.0.GA
              14:19:11,531 INFO [STDOUT] 14:19:11,531 INFO [LocalSessionFactoryBean] Building new Hibernate SessionFactory
              14:19:11,640 INFO [STDOUT] 14:19:11,640 INFO [ConnectionProviderFactory] Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
              14:19:11,953 INFO [STDOUT] 14:19:11,953 INFO [SettingsFactory] RDBMS: Microsoft SQL Server, version: 9.00.3054
              14:19:11,953 INFO [STDOUT] 14:19:11,953 INFO [SettingsFactory] JDBC driver: Microsoft SQL Server 2005 JDBC Driver, version: 1.1.1501.101
              14:19:11,984 INFO [STDOUT] 14:19:11,984 INFO [Dialect] Using dialect: org.hibernate.dialect.SQLServerDialect
              14:19:11,984 INFO [STDOUT] 14:19:11,984 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Scrollable result sets: enabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Connection release mode: on_close
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Default batch fetch size: 1
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Generate SQL with comments: disabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Order SQL updates by primary key: disabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Order SQL inserts for batching: disabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Query language substitutions: {}
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] JPA-QL strict compliance: disabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Second-level cache: enabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Query cache: disabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Cache provider: org.hibernate.cache.NoCacheProvider
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
              14:19:12,000 INFO [STDOUT] 14:19:12,000 INFO [SettingsFactory] Structured second-level cache entries: disabled
              14:19:12,015 INFO [STDOUT] 14:19:12,015 INFO [SettingsFactory] Echoing all SQL to stdout
              14:19:12,015 INFO [STDOUT] 14:19:12,015 INFO [SettingsFactory] Statistics: disabled
              14:19:12,015 INFO [STDOUT] 14:19:12,015 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
              14:19:12,015 INFO [STDOUT] 14:19:12,015 INFO [SettingsFactory] Default entity-mode: pojo
              14:19:12,015 INFO [STDOUT] 14:19:12,015 INFO [SettingsFactory] Named query checking : enabled
              14:19:12,109 INFO [STDOUT] 14:19:12,109 INFO [Version] Hibernate Search 3.0.0.Beta4
              14:19:12,250 INFO [STDOUT] 14:19:12,250 INFO [SessionFactoryImpl] building session factory
              14:19:12,656 INFO [STDOUT] 14:19:12,656 INFO [SessionFactoryObjectFactory] Factory name: sessionFactory
              14:19:12,656 INFO [STDOUT] 14:19:12,656 INFO [NamingHelper] JNDI InitialContext properties:{}
              14:19:12,656 INFO [STDOUT] 14:19:12,656 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: sessionFactory
              14:19:12,656 INFO [STDOUT] 14:19:12,656 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
              14:19:12,687 INFO [STDOUT] 14:19:12,687 INFO [HibernateTransactionManager] Using DataSource [org.jboss.resource.adapter.jdbc.WrapperDataSource@1e775bc] of Hibernate SessionFactory for HibernateTransactionManager
              14:19:12,703 INFO [STDOUT] 14:19:12,703 WARN [ConfigurableUtils] Configuration object for class com.my.common.base.config.dao.impl.CommonConfigurationDaoImpl is null!
              14:19:12,718 INFO [STDOUT] 14:19:12,718 WARN [ConfigurableUtils] Configuration object for class com.my.common.base.config.service.impl.ConfigurationServiceImpl is null!
              14:19:12,812 INFO [STDOUT] 14:19:12,812 WARN [ConfigurableUtils] Configuration object for class com.my.common.security.audit.dao.impl.AuditRecordDaoImpl is null!
              14:19:12,812 INFO [STDOUT] 14:19:12,812 WARN [ConfigurableUtils] Configuration object for class com.my.common.security.audit.service.impl.AuditRecordServiceImpl is null!
              14:19:13,218 INFO [STDOUT] Hibernate: select this_.Id as Id0_0_, this_.Description as Descript2_0_0_, this_.Name as Name0_0_, this_.Value as Value0_0_ from EW_Configuration this_
              14:19:13,468 INFO [STDOUT] 14:19:13,468 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:13,500 INFO [STDOUT] 14:19:13,500 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:13,500 INFO [STDOUT] 14:19:13,500 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:13,593 INFO [STDOUT] 14:19:13,593 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5144d5: defining beans [dataSource,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,baseViewHandler,genericServiceTemplate,daoTemplate,hibernateProps,sessionFactory,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.config.internalTransactionAdvisor,messageSource,reloadableResourceBundleMessageSource,databaseMessageSource,languageDao,moduleDao,messageDao,internationalizationService,messageCrudViewHandler,flatFileConfiguration,configurationDao,configurationService,configurationViewHandler,ewDatabaseConfiguration,systemConfigurationObject,filterChainProxy,authenticationManager,passwordEncoder,loggerListener,basicProcessingFilter,basicProcessingFilterEntryPoint,httpSessionContextIntegrationFilter,rememberMeProcessingFilter,rememberMeServices,rememberMeAuthenticationProvider,logoutFilter,securityContextHolderAwareRequestFilter,channelProcessingFilter,channelDecisionManager,secureChannelProcessor,insecureChannelProcessor,exceptionTranslationFilter,authenticationProcessingFilter,authenticationProcessingFilterEntryPoint,accessDecisionManager,roleVoter,filterInvocationInterceptor,switchUserProcessingFilter,securityInterceptor,autoProxyCreator,securityInterceptorBeanNames,securityInterceptorMethods,filterInvocationInterceptorURLs,userDao,permissionGroupDao,permissionDao,sessionDao,pendingAccountUidDao,auditRecordDao,securityService,loginViewHandler,permissionViewHandler,groupViewHandler,userViewHandler,com.my.common.aop.GenericAutoProxyCreator#0,auditingAdvisor,auditor,auditRecordService,auditRecordViewHandler,securityListener,activationFilter,hibernateConfig,repositoryItemDao,blobRepositoryDataItemDao,fileSystemRepositoryDataItemDao,fileRepositoryManagerService,repositoryItemServlet,storageSelectionStrategy,osCacheManager,cacheProviderFacade,CacheableService,mailSender,syncEmailService,dummyNavigationViewHandler,flowScopeConfig,scopeExtensions,conversationScope,flowScope,viewIdAdvertisingPhaseListener,org.springframework.beans.factory.config.CustomScopeConfigurer#0,jndiProperties,jmsQueueConnectionFactory,jmsTemplate,org.springframework.jms.listener.DefaultMessageListenerContainer#0,org.springframework.jms.listener.DefaultMessageListenerContainer#1,asyncEmailService,EmailSender,auditRecordJmsTemplate,providerViewHandler,generalInfoHandler,org.springframework.beans.factory.config.CustomScopeConfigurer#1]; root of factory hierarchy
              14:19:13,703 INFO [STDOUT] 14:19:13,703 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:13,718 INFO [STDOUT] 14:19:13,718 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:13,734 INFO [STDOUT] 14:19:13,734 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:13,750 INFO [STDOUT] 14:19:13,750 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:13,765 INFO [STDOUT] 14:19:13,765 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:13,828 INFO [STDOUT] 14:19:13,828 INFO [PropertiesFactoryBean] Loading properties file from class path resource [jndi.properties]
              14:19:13,890 INFO [STDOUT] 14:19:13,890 WARN [ConfigurableUtils] Configuration object for class com.my.common.email.service.impl.AsyncEmailServiceImpl is null!
              14:19:13,921 INFO [STDOUT] 14:19:13,921 WARN [ConfigurableUtils] No configuration value found for field exposeUserNameNotFoundErrors, using default value.
              14:19:13,921 INFO [STDOUT] 14:19:13,921 WARN [ConfigurableUtils] No configuration value found for field passwordMinimumNumberOfLowerCaseCharacters, using default value.
              14:19:13,921 INFO [STDOUT] 14:19:13,921 WARN [ConfigurableUtils] No configuration value found for field passwordAllowedSpecialCharacters, using default value.
              14:19:14,078 INFO [STDOUT] 14:19:14,078 INFO [ChannelProcessingFilter] Validated configuration attributes
              14:19:14,171 INFO [STDOUT] 14:19:14,171 INFO [AbstractSecurityInterceptor] Validated configuration attributes
              14:19:14,203 INFO [STDOUT] 14:19:14,203 INFO [AbstractSecurityInterceptor] Validated configuration attributes
              14:19:14,234 INFO [STDOUT] 14:19:14,234 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:14,250 INFO [STDOUT] 14:19:14,250 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:14,265 INFO [STDOUT] 14:19:14,265 WARN [ConfigurableUtils] No configuration value found for field maximumAllowedFindAllRecords, using default value.
              14:19:14,312 INFO [STDOUT] 14:19:14,312 INFO [OsCacheManagerFactoryBean] Creating the OSCache cache manager.
              14:19:14,312 INFO [STDOUT] 14:19:14,312 WARN [Config] OSCache: No properties file found in the classpath by filename /oscache.properties
              14:19:14,312 INFO [STDOUT] 14:19:14,312 INFO [GeneralCacheAdministrator] Constructed GeneralCacheAdministrator()
              14:19:14,312 INFO [STDOUT] 14:19:14,312 INFO [GeneralCacheAdministrator] Creating new cache
              14:19:14,437 INFO [STDOUT] 14:19:14,437 WARN [ConfigurableUtils] Configuration object for class com.my.common.email.service.impl.SyncEmailServiceImpl is null!
              14:19:14,437 INFO [STDOUT] 14:19:14,437 WARN [ConfigurableUtils] Configuration object for class com.my.common.view.jsf.handlers.DummyNavigationViewHandler is null!
              14:19:14,578 INFO [STDOUT] 14:19:14,578 INFO [ContextLoader] Root WebApplicationContext: initialization completed in 6875 ms
              14:19:14,671 INFO [STDOUT] 14:19:14,671 INFO [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
              14:19:14,687 INFO [STDOUT] 14:19:14,687 INFO [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {com.my.SECURE_SERVER_PORT=8443, facelets.LIBRARIES=my.taglib.xml;
               my.functions.taglib.xml;
               authz.taglib.xml, javax.faces.CONFIG_FILES=/WEB-INF/faces-config.xml,/WEB-INF/faces-navigation.xml,/WEB-INF/faces-managed-beans.xml, /WEB-INF/faces-components.xml, org.richfaces.SKIN=blueSky, com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, facelets.RESOURCE_RESOLVER=com.my.common.view.facelets.TemplateResolver, javax.faces.STATE_SAVING_METHOD=server, javax.faces.DEFAULT_SUFFIX=.xhtml}
              14:19:14,687 INFO [STDOUT] 14:19:14,687 INFO [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
              14:19:14,796 INFO [STDOUT] 14:19:14,796 INFO [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
              14:19:14,796 INFO [STDOUT] 14:19:14,796 INFO [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {com.my.SECURE_SERVER_PORT=8443, facelets.LIBRARIES=my.taglib.xml;
               my.functions.taglib.xml;
               authz.taglib.xml, javax.faces.CONFIG_FILES=/WEB-INF/faces-config.xml,/WEB-INF/faces-navigation.xml,/WEB-INF/faces-managed-beans.xml, /WEB-INF/faces-components.xml, org.richfaces.SKIN=blueSky, com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, facelets.RESOURCE_RESOLVER=com.my.common.view.facelets.TemplateResolver, javax.faces.STATE_SAVING_METHOD=server, javax.faces.DEFAULT_SUFFIX=.xhtml}
              14:19:14,796 INFO [STDOUT] 14:19:14,796 INFO [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
              14:19:15,000 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
              14:19:15,312 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-8080
              14:19:15,343 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
              14:19:15,343 INFO [Server] JBoss (MX MicroKernel) [4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)] Started in 1m:11s:781ms
              


              thanks,

              • 4. Re: Data Source JNDI lookup fails in a WAR
                jaikiran

                 

                14:18:53,593 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=Data
                SourceBinding,name=TestDB' to JNDI name 'java:TestDB'
                14:18:57,109 INFO [TomcatDeployer] deploy, ctxPath=/test, warUrl=.../deploy/test.war/


                This shows that the datasource is being deployed correctly at the right time (before the war deployment).

                14:25:14,296 ERROR [STDERR] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
                14:25:14,296 ERROR [STDERR] at com.my.yoav.test.doGet(test.java:64)


                This looks strange. I had not expected a spring framework related class in the JNDI lookup stacktrace. Can you post the code which does the lookup? Are there any spring classes involved in that?

                The common way of looking up JNDI objects is:

                Context ctx = new InitialContext();
                ctx.lookup("java:/TestDB");


                This code would use the jndi.properties in the conf folder of JBoss and use the appropriate INITIAL_CONTEXT_FACTORY and other properties.


                • 5. Re: Data Source JNDI lookup fails in a WAR
                  avyo

                  Thanks jaikiran

                  The spring related code is:

                  org.springframework.jndi.JndiTemplate context = new org.springframework.jndi.JndiTemplate();
                  context.lookup("java:TestDB");
                  


                  I already tried the InitialContext but it didn't work, I got a null.

                  BTW - it is working just fine in an EAR deploy, and I can get some other java:xxxx objects from the JNDI with the same code, it's very frustrating.

                  It have to be something with the differences between the EAR and WAR deploying but I didn't figure out what.

                  Thanks.

                  • 6. Re: Data Source JNDI lookup fails in a WAR
                    jaikiran

                     

                    org.springframework.jndi.JndiTemplate context = new org.springframework.jndi.JndiTemplate();
                    context.lookup("java:TestDB");


                    Sorry, i dont have any experience with Spring. So i wont be able to provide much help on that part.

                    I already tried the InitialContext but it didn't work, I got a null.


                    That's real strange. I wouldn't expect a NULL to be returned from the lookup.

                    It have to be something with the differences between the EAR and WAR deploying but I didn't figure out what.


                    Looking up from a WAR or an EAR should not make a difference. Unless there are configuration files in your WAR application which might be messing up the lookup.

                    At this point, i am actually running out of ideas. How about trying this:

                    Properties props= new Properties();
                    
                    props.put(InitialContext.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
                    props.put(InitialContext.PROVIDER_URL, "jnp://127.0.0.1:1099");
                    
                    Context ctx = new InitialContext(props);
                    ctx.lookup("java:/TestDB");
                    



                    I remember a similar issue in these forums, where a user was having problems getting the datasource lookup to work with Spring. Let me see if i can find that thread.


                    • 7. Re: Data Source JNDI lookup fails in a WAR
                      jaikiran

                       

                      I remember a similar issue in these forums, where a user was having problems getting the datasource lookup to work with Spring. Let me see if i can find that thread.


                      This is the one http://www.jboss.com/index.html?module=bb&op=viewtopic&t=133187

                      See if that helps.

                      • 8. Re: Data Source JNDI lookup fails in a WAR
                        avyo

                         

                        Properties props= new Properties();

                        props.put(InitialContext.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
                        props.put(InitialContext.PROVIDER_URL, "jnp://127.0.0.1:1099");

                        Context ctx = new InitialContext(props);
                        ctx.lookup("java:/TestDB");

                        I did all the possible combination with those properties but again no luck.

                        I read the post that you mention and tried his solution but it didn't worked (I'm running on jboss 4.2).

                        In the meanwhile I found some workaround solution, I register my data source in the global JNDI rather then in the 'java:' one, it works fine but I need to check what are the implication (i.e. security ...).- any ideas??

                        Thanks you very much for your help.






                        • 9. Re: Data Source JNDI lookup fails in a WAR
                          jaikiran

                           

                          In the meanwhile I found some workaround solution, I register my data source in the global JNDI rather then in the 'java:' one, it works fine but I need to check what are the implication (i.e. security ...).- any ideas??


                          If the datasource is bound in the global namespace then it can be looked up from any remote client (i.e. any clients which reside outside the server JVM, ex: standalone java programs).

                          Do you have any JBoss specific jar files in your application packaging? Can you post the output of the following command:

                          jar -tf test.war





                          • 10. Re: Data Source JNDI lookup fails in a WAR
                            jaikiran

                            And also post your spring xml configuration file (where the datasource/hibernate sessionfactory configuration is done).

                            • 11. Re: Data Source JNDI lookup fails in a WAR
                              avyo

                              Thanks jaikiran,

                              I found the problem, there was a jar by the name jboss-archive-browsing.jar in my WAR lib.
                              There are a few conflicts in the net package so I will need to investigate why we have this jar and where are the conflicts.

                              That will explain the differences between the EAR and WAR, in EAR the jboss jar override the EAR jars (I think ...).

                              Again thank you very much for your help.