Issue Details (XML | Word | Printable)

Key: JRA-4536
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Gili
Votes: 0
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
JIRA

Tomcat 5.5 installation

Created: 12/Sep/04 09:47 PM   Updated: 28/Mar/06 10:50 PM
Component/s: Documentation
Affects Version/s: 2.6.1 Enterprise
Fix Version/s: 3.3

Time Tracking:
Not Specified

File Attachments: 1. XML File entityengine.xml (4 kB)
2. XML File jira-5.0.xml (2 kB)
3. XML File jira-5.5.xml (0.9 kB)

Environment: JIRA 2.6.1, Tomcat 5.5
Issue Links:
Part
 

Participants: Angelo Schneider, carlos orrego, Gili, Lars, Nick Menere [Atlassian] and Owen Fellows
Since last comment: 3 years, 14 weeks ago
Resolution Date: 28/Mar/06 10:50 PM
Labels:


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Gili added a comment - 12/Sep/04 10:00 PM
Woohoo! Figured it out!

The final change that needs to be made to make JIRA run under Tomcat 5.5 is:

  • All references from java:comp/UserTransaction to java:comp/env/UserTransaction

You will find two references in <tomcat>\webapps\jira\WEB-INF\classes\entityengine.xml

Ok, now you can update the online documentation for JIRA for Tomcat 5.5 and save a lot of users a lot of headaches!

Be sure to throw a free license my way


Gili added a comment - 12/Sep/04 10:09 PM
Final note: for an unknown reason, if one specifies the WAR file in the docBase instead of "/jira", on startup Tomcat wipes out most of the contents of /webapps/jira and renders the webapp unusable. I have no idea why it is doing this, especially since it was working fine in Tomcat 5.0.

I'm going to attach before/after snapshots of my configuration so you understand everything I've been describing above.


Gili added a comment - 12/Sep/04 10:10 PM
jira.xml, Tomcat 5.5

Gili added a comment - 12/Sep/04 10:12 PM
Correction. This is JIRA.XML from Tomcat 5.0. Please remove the previous attachment.

Gili added a comment - 12/Sep/04 10:12 PM
JIRA.XML from Tomcat 5.5

Owen Fellows added a comment - 13/Sep/04 04:24 AM
Can you confirm that the remaining attachments are correct?
Can you also attach your entityengine.xml so we can see the UserTransaction change.

Gili added a comment - 13/Sep/04 06:51 AM
Tomcat 5.5 entityengine.xml

Gili added a comment - 13/Sep/04 06:54 AM
BTW: The Tomcat guys claim that UserTransaction has not been moved, but I can say for a fact that JIRA won't run unless I change its setting in entityengine.xml from java:comp/UserTransaction to java:comp/env/UserTransaction

You should be able to test all my proposed changes on your end against Tomcat 5.5.1 and verify that they are all indeed required.


Gili added a comment - 13/Sep/04 03:54 PM
Note from the Tomcat guys: you should not refer to the default factory (i.e. org.apache.commons.dbcp.BasicDataSourceFactory) in your configuration. Just omit the 'factory' attribute and it'll prevent migration issues like this one in the future.

Lars added a comment - 02/Oct/04 02:08 PM
Gili,

Thank you. I've just got JIRA 3.0 up and running on Tomcat 5.5 in less than 15 minutes thank's to your notes.


Gili added a comment - 02/Oct/04 02:34 PM
Glad I could help

Angelo Schneider added a comment - 27/Oct/04 03:23 PM
I run into the problems you solved here.
However I like to run the "standard" hsql distribution.
I'm not familiar with they deployment by dropping an xml file into $TOMCAT/conf/Catalina/localhost ... probably thas why I can not get it running.

I downloaded both files jira-5.5.xml and entityengine.xml.

I found references to mysql and changed them (also the JDBC driver class). But it did not help for me.

I get a very long ex ception starting with:

2004-10-27 21:23:02,390 WARN [core.entity.transaction.JNDIFactory] [ConnectionFactory.getConnection] Failed to find DataSource named java:comp/env/jdbc/JiraDS in JNDI server with name default. Trying normal database.
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
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: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(InitialContext.java:351)
at org.ofbiz.core.entity.transaction.JNDIFactory.getJndiConnection(JNDIFactory.java:192)
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:140)
at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:99)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:53)
at org.ofbiz.core.entity.jdbc.DatabaseUtil.getConnection(DatabaseUtil.java:56)
at org.ofbiz.core.entity.jdbc.DatabaseUtil.getTableNames(DatabaseUtil.java:658)
at org.ofbiz.core.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:71)
at org.ofbiz.core.entity.GenericDAO.checkDb(GenericDAO.java:1295)
at org.ofbiz.core.entity.GenericHelperDAO.checkDataSource(GenericHelperDAO.java:245)
at org.ofbiz.core.entity.GenericDelegator.<init>(GenericDelegator.java:147)
at org.ofbiz.core.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:89)
at com.atlassian.core.ofbiz.CoreFactory.getGenericDelegator(CoreFactory.java:33)
at com.atlassian.jira.ComponentManager.registerComponents(ComponentManager.java:313)
at com.atlassian.jira.ComponentManager.initialise(ComponentManager.java:188)
at com.atlassian.jira.ComponentManager.<init>(ComponentManager.java:181)
at com.atlassian.jira.ComponentManager.<clinit>(ComponentManager.java:169)

Tomcat removes the jira-5.5.xml file after strying to start the server ... so I have to place it there again all the time after a change ..

I tried to fiddle with the path= and docBase= ... but well, as said above, I'm not familiar with this kind of deployment ... now it seems the server is starting and comming farer; new exception:

Oct 27, 2004 9:45:00 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Exception sending context initialized event to listener instance of class com.atlassian.jira.upgrade.ConsistencyLauncher
com.opensymphony.module.propertyset.PropertyImplementationException: Unable to esablish a connection with the database. (Cannot create PoolableConnectionFactory (User not found: JIRAUSER))
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.getKeys(OFBizPropertySet.java:100)
at com.opensymphony.module.propertyset.AbstractPropertySet.getKeys(AbstractPropertySet.java:292)
at com.opensymphony.module.propertyset.PropertySetCloner.cloneProperties(PropertySetCloner.java:114)
at com.opensymphony.module.propertyset.PropertySetManager.clone(PropertySetManager.java:61)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.init(JiraCachingPropertySet.java:411)
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:45)
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:22)
at com.atlassian.jira.config.properties.PropertiesManager.loadPropertySet(PropertiesManager.java:79)
at com.atlassian.jira.config.properties.PropertiesManager.<init>(PropertiesManager.java:25)
at com.atlassian.jira.config.properties.PropertiesManager.getInstance(PropertiesManager.java:35)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getPropertiesManager(ApplicationPropertiesImpl.java:43)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getStringsWithPrefix(ApplicationPropertiesImpl.java:261)
at com.atlassian.jira.plugin.JiraPluginStateStore.loadPluginState(JiraPluginStateStore.java:41)
at com.atlassian.plugin.DefaultPluginManager.<init>(DefaultPluginManager.java:20)
at com.atlassian.jira.plugin.JiraPluginManager.<init>(JiraPluginManager.java:30)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:100)

Seems HSQL is more or less up, but the initialization of the database fails.

Any help appreciated!

Regards,
Angelo


Angelo Schneider added a comment - 27/Oct/04 05:21 PM
Hi,

I figured from where to copy suitable usernames and an empty passwd

It works with shql now on Tomcat 5.5.3. If you want, I can attach the suitable Jira.xml file.

Angelo


carlos orrego added a comment - 28/Mar/06 06:04 PM
i am having the same issue with hsql, could you please upload your jira.xml that solved this?

Nick Menere [Atlassian] added a comment - 28/Mar/06 10:35 PM
Carlos,
I have answered you on your support request.

Cheers,
Nick