javax.naming.NamingException: Cannot create resource instance

Atlassian JIRA | Gili | 1 decade ago
  1. 0

    Tomcat 5.5 has different handling for JNDI resources. <ResourceParams> have been folded into <Resource> tags. So instead of providing a bunch of <parameter> <name/> <value/> </parameter> tags, you now specify them inline as attribute of the <Resource> tag. Please update the documentation to reflect this; the current "Jira under Tomcat 5.0" documentation will not work. Also, org.apache.commons.dbcp.BasicDataSourceFactory has been renamed to org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory so you should change this in all your configuration files. I got very close to getting JIRA up and running but finally ended up getting stuck with the following Tomcat output: 12-Sep-2004 10:02:02 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-80 12-Sep-2004 10:02:02 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 813 ms 12-Sep-2004 10:02:02 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina 12-Sep-2004 10:02:02 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.1 12-Sep-2004 10:02:02 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled 12-Sep-2004 10:02:04 PM org.apache.catalina.session.PersistentManagerBase start SEVERE: No Store configured, persistence disabled 2004-09-12 22:02:04,390 WARN [atlassian.jira.upgrade.ConsistencyCheckImpl] Detected that you are using Tomcat or Websphere - turned off all transactions. 2004-09-12 22:02:05,250 WARN [core.entity.transaction.JNDIFactory] NamingException while finding UserTransaction named java:comp/UserTransaction in JNDI. javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:98) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:792) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(Unknown Source) at org.ofbiz.core.entity.transaction.JNDIFactory.getUserTransaction(JNDIFactory.java:109) at org.ofbiz.core.entity.TransactionFactory.getUserTransaction(TransactionFactory.java:91) at org.ofbiz.core.entity.TransactionUtil.getStatus(TransactionUtil.java:78) at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:244) at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:283) at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1024) at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:595) at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:134) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:782) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:767) at org.ofbiz.core.entity.GenericDelegator.findAll(GenericDelegator.java:696) at com.atlassian.jira.upgrade.ConsistencyCheckImpl.checkConnection(ConsistencyCheckImpl.java:197) at com.atlassian.jira.upgrade.ConsistencyCheckImpl.checkConsistency(ConsistencyCheckImpl.java:143) at com.atlassian.jira.upgrade.ConsistencyCheckImpl.initialise(ConsistencyCheckImpl.java:133) at com.atlassian.jira.upgrade.ConsistencyLauncher.contextInitialized(ConsistencyLauncher.java:23) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3637) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4114) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:587) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1076) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:1967) at org.apache.catalina.startup.Catalina.start(Catalina.java:541) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) I can't figure out how to make it see "java:comp/UserTransaction" even though it is declared in jira.xml. I've got it declared as: <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> Please let me know if you know how to solve this problem. I'd like to move to a Tomcat 5.5 server as soon as possible.

    Atlassian JIRA | 1 decade ago | Gili
    javax.naming.NamingException: Cannot create resource instance
  2. 0

    Tomcat 5.5 has different handling for JNDI resources. <ResourceParams> have been folded into <Resource> tags. So instead of providing a bunch of <parameter> <name/> <value/> </parameter> tags, you now specify them inline as attribute of the <Resource> tag. Please update the documentation to reflect this; the current "Jira under Tomcat 5.0" documentation will not work. Also, org.apache.commons.dbcp.BasicDataSourceFactory has been renamed to org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory so you should change this in all your configuration files. I got very close to getting JIRA up and running but finally ended up getting stuck with the following Tomcat output: 12-Sep-2004 10:02:02 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-80 12-Sep-2004 10:02:02 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 813 ms 12-Sep-2004 10:02:02 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina 12-Sep-2004 10:02:02 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.1 12-Sep-2004 10:02:02 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled 12-Sep-2004 10:02:04 PM org.apache.catalina.session.PersistentManagerBase start SEVERE: No Store configured, persistence disabled 2004-09-12 22:02:04,390 WARN [atlassian.jira.upgrade.ConsistencyCheckImpl] Detected that you are using Tomcat or Websphere - turned off all transactions. 2004-09-12 22:02:05,250 WARN [core.entity.transaction.JNDIFactory] NamingException while finding UserTransaction named java:comp/UserTransaction in JNDI. javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:98) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:792) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(Unknown Source) at org.ofbiz.core.entity.transaction.JNDIFactory.getUserTransaction(JNDIFactory.java:109) at org.ofbiz.core.entity.TransactionFactory.getUserTransaction(TransactionFactory.java:91) at org.ofbiz.core.entity.TransactionUtil.getStatus(TransactionUtil.java:78) at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:244) at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:283) at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1024) at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:595) at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:134) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:782) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:767) at org.ofbiz.core.entity.GenericDelegator.findAll(GenericDelegator.java:696) at com.atlassian.jira.upgrade.ConsistencyCheckImpl.checkConnection(ConsistencyCheckImpl.java:197) at com.atlassian.jira.upgrade.ConsistencyCheckImpl.checkConsistency(ConsistencyCheckImpl.java:143) at com.atlassian.jira.upgrade.ConsistencyCheckImpl.initialise(ConsistencyCheckImpl.java:133) at com.atlassian.jira.upgrade.ConsistencyLauncher.contextInitialized(ConsistencyLauncher.java:23) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3637) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4114) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:587) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1076) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:1967) at org.apache.catalina.startup.Catalina.start(Catalina.java:541) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) I can't figure out how to make it see "java:comp/UserTransaction" even though it is declared in jira.xml. I've got it declared as: <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> Please let me know if you know how to solve this problem. I'd like to move to a Tomcat 5.5 server as soon as possible.

    Atlassian JIRA | 1 decade ago | Gili
    javax.naming.NamingException: Cannot create resource instance
  3. 0

    Tomcat/Seam Seam component Instantiation Exception

    Stack Overflow | 3 years ago | user1171699
    org.jboss.seam.InstantiationException: Could not instantiate Seam component: someComponent
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Quartz cannot find transaction with Spring

    Stack Overflow | 3 years ago | Chris Thompson
    javax.naming.NamingException: Cannot create resource instance
  6. 0

    javax.naming.NamingException: Cannot create resource instance - Spring Forum

    spring.io | 8 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'datasource': Invocation of init method failed; nested exception is javax.naming.NamingException: Cannot create resource instance

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.naming.NamingException

      Cannot create resource instance

      at org.apache.naming.factory.TransactionFactory.getObjectInstance()
    2. Web Container Naming Utilities
      TransactionFactory.getObjectInstance
      1. org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:98)
      1 frame
    3. Java RT
      NamingManager.getObjectInstance
      1. javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
      1 frame
    4. Web Container Naming Utilities
      SelectorContext.lookup
      1. org.apache.naming.NamingContext.lookup(NamingContext.java:792)
      2. org.apache.naming.NamingContext.lookup(NamingContext.java:139)
      3. org.apache.naming.NamingContext.lookup(NamingContext.java:780)
      4. org.apache.naming.NamingContext.lookup(NamingContext.java:152)
      5. org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
      5 frames
    5. Java RT
      InitialContext.lookup
      1. javax.naming.InitialContext.lookup(Unknown Source)
      1 frame
    6. org.ofbiz.core
      GenericDelegator.findAll
      1. org.ofbiz.core.entity.transaction.JNDIFactory.getUserTransaction(JNDIFactory.java:109)
      2. org.ofbiz.core.entity.TransactionFactory.getUserTransaction(TransactionFactory.java:91)
      3. org.ofbiz.core.entity.TransactionUtil.getStatus(TransactionUtil.java:78)
      4. org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:244)
      5. org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:283)
      6. org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1024)
      7. org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:595)
      8. org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:134)
      9. org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:782)
      10. org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:767)
      11. org.ofbiz.core.entity.GenericDelegator.findAll(GenericDelegator.java:696)
      11 frames
    7. com.atlassian.jira
      ConsistencyLauncher.contextInitialized
      1. com.atlassian.jira.upgrade.ConsistencyCheckImpl.checkConnection(ConsistencyCheckImpl.java:197)
      2. com.atlassian.jira.upgrade.ConsistencyCheckImpl.checkConsistency(ConsistencyCheckImpl.java:143)
      3. com.atlassian.jira.upgrade.ConsistencyCheckImpl.initialise(ConsistencyCheckImpl.java:133)
      4. com.atlassian.jira.upgrade.ConsistencyLauncher.contextInitialized(ConsistencyLauncher.java:23)
      4 frames
    8. Glassfish Core
      Catalina.start
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3637)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4114)
      3. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
      4. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      5. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      6. org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:587)
      7. org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
      8. org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
      9. org.apache.catalina.startup.HostConfig.start(HostConfig.java:1076)
      10. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
      11. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      12. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
      13. org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
      14. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
      15. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420)
      16. org.apache.catalina.core.StandardService.start(StandardService.java:450)
      17. org.apache.catalina.core.StandardServer.start(StandardServer.java:1967)
      18. org.apache.catalina.startup.Catalina.start(Catalina.java:541)
      18 frames
    9. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    10. Glassfish Core
      Bootstrap.main
      1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
      2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
      2 frames