aspose file tools*
The moose likes Tomcat and the fly likes Please I can't connect my App. to mysqlDatabase through apache-tomcat-6.0.16 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Please I can Watch "Please I can New topic
Author

Please I can't connect my App. to mysqlDatabase through apache-tomcat-6.0.16

quadri Dauda
Greenhorn

Joined: Dec 03, 2008
Posts: 4
Hi,
I tried to install an application call OpenI and it's working,but am having a challenge on connection to the database.I am using mysql-5.0.18-2.1 as my database.
I have tried to edit the tomcat-users.xml,but I do not know much on what to do inside the conf/server.xml .

This is my tomcat-users.xml:
-------------------------------------------
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="foodmart_admin"/>
<role rolename="foodmart_user"/>
<role rolename="openi"/>
<role rolename="app_admin"/>
<user username="foodmartadmin" password="password" roles="openi,foodmart_admin"/>
<user username="foodmartuser" password="password" roles="openi,foodmart_user"/>
<user username="admin" password="password" roles="openi,app_admin"/>
</tomcat-users>

my server.xml (am using the default one in apache-tomcat-6.0.16)
-----------------------------------------------

<?xml version='2.0' encoding='utf-8'?>

<Server port="8005" shutdown="SHUTDOWN">


<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

<Listener className="org.apache.catalina.core.JasperListener" />

<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />


<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<Service name="Catalina">


<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

<Engine name="Catalina" defaultHost="localhost">


<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

</Host>
</Engine>
</Service>
</Server>


Whenever I start my apache-tomcat-6.0.16, it will give the following on the console:

2008-12-03 16:16:58 INFO org.openi.web.RequestFilter - >>> Request http://192.168.19.11:8080/openi/project_list.iface[null][?null]
2008-12-03 16:16:58 INFO org.openi.web.RequestFilter - WCF Request Execution total time: 0 ms
2008-12-03 16:16:58 DEBUG org.openi.xml.BeanStorage - restoring bean from file: /root/openi-projects/foodmart/project.xml
2008-12-03 16:16:58 INFO org.openi.web.ui.jsf.bean.home.ProjectSelectionBean - loading default analysis..
2008-12-03 16:16:59 INFO org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean - retrieving analysis instance of '/foodmart/public/Samples/MSAS/HR_Employees.analysis
2008-12-03 16:16:59 DEBUG org.openi.xml.BeanStorage - restoring bean from file: /root/openi-projects/foodmart/public/Samples/MSAS/HR_Employees.analysis
2008-12-03 16:16:59 INFO org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean - loading analysis instance of '/foodmart/public/Samples/MSAS/HR_Employees.analysis'...
2008-12-03 16:17:04 ERROR com.tonbeller.jpivot.tags.OlapModelProxy -
com.tonbeller.jpivot.olap.model.OlapException: Soap Fault code=HTTP fault string=(404)Not Found fault actor=null
at org.openi.olap.xmla.XmlaSoap.errorCheck(XmlaSoap.java:1451)
at org.openi.olap.xmla.XmlaSoap.discover(XmlaSoap.java:1400)
at org.openi.olap.xmla.XmlaSoap.discoverDS(XmlaSoap.java:628)
at org.openi.olap.xmla.XmlaSoap.<init>(XmlaSoap.java:83)
at org.openi.olap.xmla.XmlaModel.initialize(XmlaModel.java:132)
at com.tonbeller.jpivot.olap.model.OlapModelDecorator.initialize(OlapModelDecorator.java:132)
at com.tonbeller.jpivot.tags.OlapModelProxy$MyState.initialize(OlapModelProxy.java:77)
at com.tonbeller.jpivot.tags.PageStateManager.initializeAndShow(PageStateManager.java:42)
at com.tonbeller.jpivot.tags.OlapModelProxy.initializeAndShow(OlapModelProxy.java:160)
at org.openi.xmla.XMLAQueryTag.init(XMLAQueryTag.java:120)
at org.openi.web.ui.jsf.bean.reports.analysis.WcfHelper.loadAnalysis(WcfHelper.java:71)
at org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean.loadAnalysisInternal(AnalysisBean.java:253)
at org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean.loadAnalysis(AnalysisBean.java:228)
at org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean.showAnalysis(AnalysisBean.java:222)
at org.openi.web.ui.jsf.bean.reports.NavMenuBean.showContent(NavMenuBean.java:262)
at org.openi.web.ui.jsf.bean.reports.NavMenuBean.loadDefaultAnalysis(NavMenuBean.java:235)
at org.openi.web.ui.jsf.bean.home.ProjectSelectionBean.selectProject(ProjectSelectionBean.java:197)
at org.openi.web.ui.jsf.bean.home.ProjectSelectionBean.selectProject(ProjectSelectionBean.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.el.parser.AstValue.invoke(AstValue.java:152)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
at javax.faces.component.UICommand.broadcast(UICommand.java:325)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:54)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:42)
at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:65)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:44)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:139)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
2008-12-03 16:17:04 DEBUG org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean - Could not load analysis. Soap Fault code=HTTP fault string=(404)Not Found fault actor=null
2008-12-03 16:17:04 INFO org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean - analysis load process took 5396ms
2008-12-03 16:17:04 INFO org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean - completed loading analysis instance of '/foodmart/public/Samples/MSAS/HR_Employees.analysis'
2008-12-03 16:17:04 INFO org.openi.web.ui.jsf.bean.home.ProjectSelectionBean - loading default analysis..completed
2008-12-03 16:17:04 WARN org.openi.web.ui.jsf.bean.dashboard.DashboardBean - project dashboard is not available
2008-12-03 16:17:04 INFO org.openi.web.ui.jsf.event.WcfPhaseListener - entered into JSF request first phase processing..
2008-12-03 16:17:04 DEBUG org.openi.xml.BeanStorage - restoring bean from file: /root/openi-projects/foodmart/project.xml
2008-12-03 16:17:04 INFO org.openi.web.RequestFilter - >>> Request http://192.168.19.11:8080/openi/project_list.iface[null][?null]
2008-12-03 16:17:04 INFO org.openi.web.RequestFilter - WCF Request Execution total time: 0 ms
2008-12-03 16:17:04 INFO org.openi.web.ui.jsf.event.WcfPhaseListener - entered into JSF request first phase processing..
2008-12-03 16:17:04 INFO org.openi.web.RequestFilter - >>> Request http://192.168.19.11:8080/openi/reports.iface[null][?content=/foodmart/public/Samples/MSAS/HR_Employees.analysis&rvn=1]
2008-12-03 16:17:04 DEBUG org.openi.xml.BeanStorage - restoring bean from file: /root/openi-projects/foodmart/project.xml
2008-12-03 16:17:04 INFO org.openi.web.RequestFilter - WCF Request Execution total time: 0 ms
2008-12-03 16:17:04 INFO org.openi.web.ui.jsf.bean.home.ProjectSelectionBean - loading default analysis..
2008-12-03 16:17:04 INFO org.openi.web.ui.jsf.bean.home.ProjectSelectionBean - loading default analysis..completed
Exception in thread "Timer-0" java.lang.NullPointerException
at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:255)
at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:1934)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
2008-12-03 16:17:11 DEBUG org.openi.users.impl.JdbcUserServiceImpl - select query : select * from users where user_name like 'tsting'
2008-12-03 16:17:12 WARN org.openi.web.ui.jsf.bean.admin.UserProfileBean - could not get valid datasource connection. So setting user management feature links as invisible
java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy0.getConnection(Unknown Source)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:357)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:433)

Please I will be very gratefull if someone can help me out with time,I have been on this for 2 weeks now.Please I will be expecting your reply.

Thanks in advance,
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

I don't see anyting in the install documentation about a database dependency. Have you tried searching the support forum or posting a question there?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
quadri Dauda
Greenhorn

Joined: Dec 03, 2008
Posts: 4
Hi, thanks for your reply.You said you don't see anything about a database dependency in the install documentation.

Well may be am the person who doesn't understand the documentation well enough,but what I can understand from the install documentation concerning database connection is that,they only explained much about the JBoss Security with JDBC User Database & Database Setup and am not using JBoss,am using apache-tomcat-6.0.16.

I need to know how I can connect to database through Tomcat while using this openI application. Am asked to see (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html) I guess for database connection through tomcat,but the url is not available.

Guess I don't understand the install documentation well enough,if you can help me out by explaining it better(expecially the database connnection aspect) I will be very gratefull.

Actually have not tried the support forum yet,but I will do that right now and see if I can resolve it there.

Thanks very much.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

If you are using MySQL then why do I see this line in the stack trace?
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)

Apparently you have your configuration set to use the JDBC bridge driver. Given that there's a proper JDBC driver for MySQL, I wouldn't do that. But if for some reason you are forced to do it, then you could review your configuration to make sure it's correct. In terms of pointing to a valid and usable ODBC DSN, and so forth.
quadri Dauda
Greenhorn

Joined: Dec 03, 2008
Posts: 4
Hi Paul Clapham, thanks for your message.

Actually,I just noticed that it shouldn't be there.I also found it there by default in my {tomcat-dir}conf/Catalina/localhost/openi.xml

I started the tomcat before without noticing this,but when I went through the install documentation again and I read that if am using mysql,the Driver class should be:com.mysql.jdbc.Driver. This is when I changed it.

When I first invoked the tomcat and it displayed the error which I posted before,the openi.xml was like this:
------------------------------
<Context path="/openi" docBase="openi"
debug="5" reloadable="true" crossContext="true">

<Resource name="jdbc/OpenILoginDs" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="sa" password="tsting" driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
url="jdbcdbcpeni" />

</Context>
--------------------------------------------------

But now I have changed the openi.xml to:
----------------------
<Context path="/openi" docBase="openi"
debug="5" reloadable="true" crossContext="true">

<Resource name="jdbc/OpenILoginDs" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="foodmart" password="foodmart" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:8080/foodmart" />

</Context>

----------------------

But still am unable to connect to the database,it gives me the following error anytime I start it:


--------------------------------------------------------

2008-12-04 23:29:37 DEBUG org.openi.users.impl.JdbcUserServiceImpl - select query : select * from users where user_name like 'admin'

tion in thread "Timer-0" java.lang.NullPointerException
at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:255)
at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:1934)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
2008-12-04 23:36:00 WARN org.openi.security.AuthorizationFilter - project content directory is missing
2008-12-04 23:36:00 INFO org.openi.web.ui.jsf.event.WcfPhaseListener - entered into JSF request first phase processing..
2008-12-04 23:36:00 INFO org.openi.web.RequestFilter - >>> Request http://192.168.19.11:8080/openi/project_list.iface[null][?null]
2008-12-04 23:36:00 INFO org.openi.web.RequestFilter - WCF Request Execution total time: 6 ms
2008-12-04 23:54:16 DEBUG org.openi.xml.BeanStorage - restoring bean from file: /root/openi-projects/foodmart/project.xml
2008-12-04 23:54:16 INFO org.openi.web.ui.jsf.event.WcfPhaseListener - completed JSF request processing lifecycle
2008-12-04 23:54:16 INFO org.openi.web.ui.jsf.event.WcfPhaseListener - JSF lifecycle processing took 2524ms
2008-12-04 23:54:22 INFO org.openi.web.ui.jsf.event.WcfPhaseListener - entered into JSF request first phase processing..
2008-12-04 23:54:22 INFO org.openi.web.RequestFilter - >>> Request http://192.168.19.11:8080/openi/project_list.iface[null][?null]
2008-12-04 23:54:22 INFO org.openi.web.RequestFilter - WCF Request Execution total time: 0 ms
2008-12-04 23:54:22 DEBUG org.openi.xml.BeanStorage - restoring bean from file: /root/openi-projects/foodmart/project.xml
2008-12-04 23:54:22 INFO org.openi.web.ui.jsf.bean.home.ProjectSelectionBean - loading default analysis..
2008-12-04 23:54:22 INFO org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean - retrieving analysis instance of '/foodmart/public/Samples/MSAS/HR_Employees.analysis
2008-12-04 23:54:22 DEBUG org.openi.xml.BeanStorage - restoring bean from file: /root/openi-projects/foodmart/public/Samples/MSAS/HR_Employees.analysis
2008-12-04 23:54:22 INFO org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean - loading analysis instance of '/foodmart/public/Samples/MSAS/HR_Employees.analysis'...
2008-12-04 23:54:23 ERROR com.tonbeller.jpivot.tags.OlapModelProxy -
com.tonbeller.jpivot.olap.model.OlapException: Soap Fault code=HTTP fault string=(404)Not Found fault actor=null
at org.openi.olap.xmla.XmlaSoap.errorCheck(XmlaSoap.java:1451)
at org.openi.olap.xmla.XmlaSoap.discover(XmlaSoap.java:1400)
at org.openi.olap.xmla.XmlaSoap.discoverDS(XmlaSoap.java:628)
at org.openi.olap.xmla.XmlaSoap.<init>(XmlaSoap.java:83)
at org.openi.olap.xmla.XmlaModel.initialize(XmlaModel.java:132)
at com.tonbeller.jpivot.olap.model.OlapModelDecorator.initialize(OlapModelDecorator.java:132)
at com.tonbeller.jpivot.tags.OlapModelProxy$MyState.initialize(OlapModelProxy.java:77)
at com.tonbeller.jpivot.tags.PageStateManager.initializeAndShow(PageStateManager.java:42)
at com.tonbeller.jpivot.tags.OlapModelProxy.initializeAndShow(OlapModelProxy.java:160)
at org.openi.xmla.XMLAQueryTag.init(XMLAQueryTag.java:120)
at org.openi.web.ui.jsf.bean.reports.analysis.WcfHelper.loadAnalysis(WcfHelper.java:71)
at org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean.loadAnalysisInternal(AnalysisBean.java:253)
at org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean.loadAnalysis(AnalysisBean.java:228)
at org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean.showAnalysis(AnalysisBean.java:222)
at org.openi.web.ui.jsf.bean.reports.NavMenuBean.showContent(NavMenuBean.java:262)
at org.openi.web.ui.jsf.bean.reports.NavMenuBean.loadDefaultAnalysis(NavMenuBean.java:235)
at org.openi.web.ui.jsf.bean.home.ProjectSelectionBean.selectProject(ProjectSelectionBean.java:197)
at org.openi.web.ui.jsf.bean.home.ProjectSelectionBean.selectProject(ProjectSelectionBean.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.el.parser.AstValue.invoke(AstValue.java:152)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
at javax.faces.component.UICommand.broadcast(UICommand.java:325)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:54)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:42)
at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:65)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:44)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:139)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
2008-12-04 23:54:23 DEBUG org.openi.web.ui.jsf.bean.reports.analysis.AnalysisBean - Could not load analysis. Soap Fault code=HTTP fault string=(404)Not Found fault actor=null
2008

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1395)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:1414)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:625)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
at com.mysql.jdbc.Connection.<init>(Connection.java:452)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy0.getConnection(Unknown Source)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:357)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:433)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:441)
at org.openi.users.impl.JdbcUserServiceImpl.getUserById(JdbcUserServiceImpl.java:54)
at org.openi.web.ui.jsf.bean.admin.UserProfileBean.getUserById(UserProfileBean.java:142)
at org.openi.web.ui.jsf.bean.admin.UserProfileBean.afterPropertiesSet(UserProfileBean.java:316)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:283)
at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43)
at org.springframework.web.context.request.SessionScope.get(SessionScope.java:90)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:279)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:888)
at org.springframework.web.jsf.DelegatingVariableResolver.resolveSpringBean(DelegatingVariableResolver.java:142)
at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:109)
at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61)
at org.apache.el.parser.AstValue.getValue(AstValue.java:103)
at org.apache.el.parser.AstAnd.getValue(AstAnd.java:42)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:335)
at com.icesoft.faces.component.ext.HtmlOutputLink.isRendered(HtmlOutputLink.java:193) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:357)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:550)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse

** END NESTED EXCEPTION **


at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:1447)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:625)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
at com.mysql.jdbc.Connection.<init>(Connection.java:452)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
... 91 more
2008-12-04 23:36:34 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'xmlaNav'...2008-12-04 23:36:34 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'xmlaNav' completed in 3ms
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'table01'...2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'table01' completed in 1ms
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'chart01'...2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'chart01' completed in 0ms
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'chartForm'...
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'chartForm' completed in 0ms
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'mdxEditForm'...
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'mdxEditForm' completed in 0ms
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'printForm'...
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'printForm' completed in 0ms
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'sortForm'...
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.component.WcfRenderer - rendering 'sortForm' completed in 0ms
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.event.WcfPhaseListener - completed JSF request processing lifecycle
2008-12-04 23:36:35 INFO org.openi.web.ui.jsf.event.WcfPhaseListener - JSF lifecycle processing took 21142ms
----------------------------------------------

Please I will need you Guys help on this,cos I have gone through openi support forum corncerning this.I only saw the same message posted by someone to the forum and no reply on how to solve it.

I will also post mine to them and see if I can get some help over there.

Thanks very much, expecting your reply soon.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

Hey, I know nothing about this product, I'm just looking at the stack traces you post.

So, when you configured MySQL to run on that machine where Tomcat is running, what port did you configure it to listen at?
quadri Dauda
Greenhorn

Joined: Dec 03, 2008
Posts: 4
I configured it to listen at port:8080, please you can check below for better understanding.

this is my openi.xml:
------------------------------------
<Context path="/openi" docBase="openi"
debug="5" reloadable="true" crossContext="true">

<Resource name="jdbc/OpenILoginDs" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="foodmart" password="foodmart" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:8080/foodmart" />

</Context>
---------------------------------

and this is my server.xml:
---------------
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<Service name="Catalina">

<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

<Engine name="Catalina" defaultHost="localhost">

<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
</Engine>
</Service>

</Server>
---------------

Thanks.
Pankaj Upadhyay
Greenhorn

Joined: Nov 06, 2008
Posts: 21
you need to insert at least one role and one user in your DB as you can see from the error stack , the following query is failing...

select * from users where user_name like 'admin'

Hope this helps and hope this thread is not a zombie :P


Pankaj Upadhyay (SCJP 1.6 == 86%)
 
 
subject: Please I can't connect my App. to mysqlDatabase through apache-tomcat-6.0.16