This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Error 500--Internal Server Error After Redeploying

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I tried to change the gui of the discussion forum and after changing the logo and doing the redeploy on my web server, I got this error message:

Error 500--Internal Server Error
net.jforum.exceptions.DatabaseException: Error while trying to start the database: net.jforum.exceptions.DatabaseException: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:468)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:125)
at net.jforum.C3P0PooledConnection.getConnection(C3P0PooledConnection.java:137)
at net.jforum.ForumStartup.startDatabase(ForumStartup.java:78)
at net.jforum.JForum.init(JForum.java:95)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:274)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:504)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3243)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: net.jforum.exceptions.DatabaseException: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
... 27 more
Caused by: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
... 27 more
Caused by: com.mchange.v2.resourcepool.TimeoutException: The pool timed out while waiting to acquire a resource -- timeout at awaitAvailable()
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1157)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:405)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:351)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:466)
... 24 more


Does anyone know was cause this and how to fix it?

[originally posted on jforum.net by nadj]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like you're database connection information got changed and is invalid. Maybe you're using the test server and not production?

When you say "redeployed" does that mean your application server needs to have a full war to make changes? If that's the case, you'll need to be careful about how you make changes. There are various "dynamic" files that are created in the jForum application directory. Things like the config file, which can be edited via the admin screens; and attachments to postings.

If you're application server environment doesn't let you update individual files, you will probably have to take steps to protect these changes. E.g., shut the forum application down, make a "snapshot war" from the application directory, then modify this with your changes, and then re-deploy the war, and restart the application.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I still get the same error. I reinstall the forum from scracth on BEA WebLogic 9.2 and I am using an Oracle 10g database and i use a pooled connection. After the installation, everything works but when i do an update of the files with BEA, I cannot access the forum after. I keep getting the Error 500

net.jforum.exceptions.DatabaseException: Error while trying to start the database: net.jforum.exceptions.DatabaseException: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:468)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:125)
at net.jforum.C3P0PooledConnection.getConnection(C3P0PooledConnection.java:137)
at net.jforum.ForumStartup.startDatabase(ForumStartup.java:78)
at net.jforum.JForum.init(JForum.java:95)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:274)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:504)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3243)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: net.jforum.exceptions.DatabaseException: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
... 27 more
Caused by: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
... 27 more
Caused by: com.mchange.v2.resourcepool.TimeoutException: The pool timed out while waiting to acquire a resource -- timeout at awaitAvailable()
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1157)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:405)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:351)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:466)



I don't know what i am doing wrong or if someone had have the same problem and how they fix it. It seems the combination of WL oracle and JForum is not the best. Any suggestions?

Thanks
[originally posted on jforum.net by nadj]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I don't really use Oracle and Weblogic so I can't say for sure, but the error message and location REALLY look like you don't have your DB connection information set up correctly.

Common things that come to mind might be JDBC driver versions and security issues (e.g. the DB user you are using doesn't have the right to connect from that machine, etc). If you are using a JNDI datasource for your DB access, sometimes the URLs for these can be tricky.

Have you tried just writing a simple jsp page to access the DB using the standard JDBC calls from the jForum web context? This sometimes can give you more information about what is going wrong and if it's a jForum or just connection issue.

FWIW, I'm not sure, but I think there are people using WL and Oracle...
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
now I found the reason for my problem. It was that I used different MySQL Database settings (username, password and databasename) in the test- and productive environment.
After I changed these settings in the config file: /WEB-INF/config/database/mysql/mysql.properties
everything works as expected. I can now redeploy my application without going through the /install.jsp


[originally posted on jforum.net by rsoika]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have the same problem. When I redeploy my customized JForum on Glassfish I got these DatabaseExceptions and I need to call the /install.jsp page. This solves the problem but removes my data stored in a mysql database.

Ok I understand that I should backup my data to avoid this situation after a redeploy. But what did you mean exactly with

monroe wrote:There are various "dynamic" files that are created in the jForum application directory



Is there a short description available what steps are necessary when I want to redeploy a customized JFourm war file?

The funny thing is that in my developer environment (Ubuntu/Eclipse/Glassfish/Mysql) I did lot of redeployments with out this problem! I triggered the redeployment by the Ant-Script (where I copy the new build directly into the autodeploy folder of glassfish). This works without any problems. I can see my changes in my testforum without backup the mysql data before.

thanks for help
ralph

[originally posted on jforum.net by rsoika]
 
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic