Bug 50351 - javax.naming.NamingException: No set method found for property: singleton
javax.naming.NamingException: No set method found for property: singleton
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Catalina
7.0.5
PC All
: P2 regression (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-11-27 16:27 UTC by Flávio Henrique
Modified: 2010-12-10 09:03 UTC (History)
0 users



Attachments
Binary patch for Tomcat 7 (5.53 KB, application/octet-stream)
2010-11-30 04:49 UTC, Mark Thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Flávio Henrique 2010-11-27 16:27:45 UTC
Get trunk here http://people.apache.org/~markt/dev/tomcat-7/v7.0.5/
The application that works with 7.0.4 now gets this error after execution:

19:20:02,926 ERROR DatasourceConnectionProvider:78 - Could not find datasource: java:comp/env/jdbc/myAppName

javax.naming.NamingException: No set method found for property: singleton
	at org.apache.naming.factory.BeanFactory.getObjectInstance(BeanFactory.java:215)
	at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:142)
	at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:826)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
	at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
	at javax.naming.InitialContext.lookup(Unknown Source)
	at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
	at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:143)
	at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:51)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:91)
	at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383)
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:892)
	at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32)
	at net.metha.utils.persistence.JPAUtil.<clinit>(JPAUtil.java:24)
	at net.metha.bestfork.servlets.filters.JPASessionFilter.doFilter(JPASessionFilter.java:19)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:561)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
27/11/2010 19:20:02 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [Faces Servlet] in context with path [/bestforkprime] threw exception [Filter execution threw an exception] with root cause
javax.naming.NamingException: No set method found for property: singleton
	at org.apache.naming.factory.BeanFactory.getObjectInstance(BeanFactory.java:215)
	at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:142)
	at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:826)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
	at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
	at javax.naming.InitialContext.lookup(Unknown Source)
	at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
	at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:143)
	at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:51)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:91)
	at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383)
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:892)
	at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32)
	at net.metha.utils.persistence.JPAUtil.<clinit>(JPAUtil.java:24)
	at net.metha.bestfork.servlets.filters.JPASessionFilter.doFilter(JPASessionFilter.java:19)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:561)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Comment 1 Mark Thomas 2010-11-28 08:12:12 UTC
Update version
Comment 2 Flávio Henrique 2010-11-28 19:16:33 UTC
I downloaded again apache-tomcat-7.0.5-windows-x86.zip from http://people.apache.org/~markt/dev/tomcat-7/v7.0.5/bin/ and got the same problem. When you say update version you mean build from the trunk? I have never compile from the trunk yet, but I can trie.

Thanks for your answer

Flavio
Comment 3 Flávio Henrique 2010-11-28 19:20:04 UTC
Sorry, I am lazzy, now I undestood: you update the version from trunk to 7.0.5! Sorry, you can ignore my last message.
Comment 4 Mark Thomas 2010-11-29 08:57:15 UTC
I think I have a patch for this. If I attach a binary patch to this bug along with instructions on how to test it would you be able to test the patch to see it it fixes the issue?
Comment 5 Mark Thomas 2010-11-29 10:41:54 UTC
Thanks for the report. This has been fixed in 7.0.x and will be included in 7.0.6 onwards.
Comment 6 Flávio Henrique 2010-11-29 17:26:30 UTC
Sure, I will try to do my best, but I am a regular user, not a specialized one.


(In reply to comment #4)
> I think I have a patch for this. If I attach a binary patch to this bug along
> with instructions on how to test it would you be able to test the patch to see
> it it fixes the issue?
Comment 7 Mark Thomas 2010-11-30 04:49:00 UTC
Created attachment 26355 [details]
Binary patch for Tomcat 7

To apply this patch, create the following directories in Tomcat's lib directory:
org/apache/naming/factory

Place the BeanFactory.class file in this new directory.

Restart Tomcat.

Let us know how you get on.
Comment 8 Flávio Henrique 2010-11-30 11:35:19 UTC
Mark, the patch works!

Thank you!
Comment 9 Christophe Thiébaud 2010-12-10 09:03:24 UTC
I confirm the patch works for me as well.
thanks
Christophe