Confluence, slow and many startup errors
Asked by Peter:

Hello,

I am running 5.3.4, and when the app starts, I have errors such as these:

java.lang.NoClassDefFoundError: javax/servlet/ServletContext

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)

at java.lang.Class.privateGetPublicMethods(Class.java:2651)

at java.lang.Class.getMethods(Class.java:1467)  
Which should prevent it from working I would expect, and these:  
2014-06-03 19:04:18,623 INFO \[localhost-startStop-1\] \[com.atlassian.confluence.lifecycle\] contextInitialized Starting Confluence 5.3.4 \[build 4532 based on commit hash e44e912a19b4356578af38c61df778d5fda2d014\]

Exception in thread "ThreadPoolAsyncTaskExecutor::Thread 5" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handler' defined in URL \[bundle://27.0:0/META-INF/spring/web-context.xml\]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/ServletContext

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

at java.security.AccessController.doPrivileged(Native Method)  
There were other errors such as JSP compilation or other problems, with Soy ...  
I have not gone too far into this, should I try a re-install ?  
Thanks,  
Peter


Answers:
author: Rodrigo Girardi Adami
body: Hi Peter,

I believe that the Soy renderer might be having some problems as we can see in this [KB](https://confluence.atlassian.com/display/CONFKB/Comment+Box+Disappears%253A+%2524soyTemplateRendererHelper.getRenderedTemplateHtml).

The Kb is not the same behaviour but it's similar. I recommend to check the KB and try to reset the plugins to default as well.  

Cheers,  

Rodrigo

comments: author: Peter
body: Eduardo's suggestion above fixed all issues - thanks for your help.


author: Mallmann
body: Hey Peter,

Could you confirm which Apache Tomcat version you are using?

Also, have a look on the following link to be sure that you are running your instance with the right java, tomcat and database versions: [](https://confluence.atlassian.com/display/CONF53/Supported+Platforms)<https://confluence.atlassian.com/display/CONF53/Supported+Platforms>

Best regards,

Eduardo Mallmann

Atlassian Support

comments: author: Peter
body: Hi Eduardo,

Java version is 1.7.0_51 and it is running on Tomcat 7. I have Jira running without issue on the same server. MySQL is the latest version as well ... so thinking it is solely a Confluence issue -- you tell me.

Peter


author: Mallmann
body: Hey Peter,

I see. Well, Tomcat 7 is not supported for your current Confluence version, so I'd recommend you to downgrade your Tomcat to version 6.

The following answer thread is related to a similar issue, with very similar error messages you are facing: [](/questions/66628/weird-classnotfoundexception-during-startup-of-osgi-bundles)<https://answers.atlassian.com/questions/66628/weird-classnotfoundexception-during-startup-of-osgi-bundles>

He was running Tomcat 7 with a Confluence version that did not support Tomcat 7. When he downgraded to Tomcat 6 the error messages stopped.

Please, let me know if it fixes your issue as well.

Best regards,

Eduardo Mallmann

Atlassian Support


author: Peter
body: Eduardo,

Great suggestion - put it on Tomcat 6 and no issues, faster and no errors !

Now ... what is the easiest way to upgrade to the latest version ?


author: Mallmann
body: Hey Peter,

That's awesome! :)

Well, before jumping to the standard procedures to perform an upgrade, we suggest the users to [check the plugin compatibility with the next versions](https://confluence.atlassian.com/display/UPM/Checking+Add-on+Compatibility+with+Application+Updates) to avoid further issues. Having that in mind, you can start the upgrade process by following the standard procedures:

1. Go to <http://atlassian.com>and download [Confluence](https://www.atlassian.com/software/confluence/download-archives).

2. Extract the zip/tar.gz file of the latest version of Confluence on the place you choose.

3. Into the extracted folder, open the file confluence-init.properties, which is located at **\<confluence-install-folder\>\\confluence\\web-inf\\classes** and edit the line: **confluence.home=/usr/local/confluence/home** to point to the path where your old home folder of your **Confluence current version** is.

4. Now start Confluence through your new installation folder.

We also have a documentation about the procedures: [](https://confluence.atlassian.com/display/DOC/Upgrading+Confluence)<https://confluence.atlassian.com/display/DOC/Upgrading+Confluence>

Hope it helps :)  

Best regards,

Eduardo Mallmann

Atlassian Support


author: Peter
body: I performed the upgrade and it went well. Now, for setting up mail - set it up per my provider - and I still get mail errors when sending test message:

An error has occurred with sending the test email:

com.atlassian.mail.MailException: javax.mail.MessagingException: Could not connect to SMTP host: [mail.noip.com](http://mail.noip.com), port: 587;

nested exception is:

java.net.SocketException: Network is unreachable

at com.atlassian.confluence.jmx.JmxSMTPMailServer.doSendWithMessageIdSupport


author: Peter
body: Also, with the version before the upgrade and now after, I am not able to connect to the Marketplace - could this be related to mail - some connectivity issue from Confluence ?


author: Nic Brough -Adaptavist-
body: Both those problems suggest that Confluence is on a machine that cannot reach the network it's supposed to be connected to

"Network is unreachable" really does mean "I can't reach a network to talk to", and not being able to reach the marketplace is probably the same problem.