ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafal Rusin <rafal.ru...@gmail.com>
Subject Re: How can I configure the external dataSource for ode?
Date Tue, 07 Jul 2009 23:48:32 GMT
I think you should choose between tomcat war disto and servicemix jbi.
Mixing those two may be confusing.

2009/7/2 yeyanchao.whu <yeyanchao.whu@gmail.com>:
>
> I was confused. I tried many different ways to configure the servicemix and ode with
mysql, but it always doen't work.
> My platform is tomcat6.0.18, serviceMix3.3 and ode-jbi-1.2 and MySQL. First, I put the
JDBC drive in the tomcat_hom/lib. I configure the ode-jbi.properties file "ode-jbi.db.mode=EXTERNAL"
and "ode-jbi.db.ext.dataSource=java:comp/env/jdbc/odedb ". At the same time, I configure the
server.xml file which is under the path "tomcat_home\conf". What I add to the file is :
> <Context path="/servicemix" docBase="servicemix"
> debug="5" reloadable="true" crossContext="true">
> <Resource name="jdbc/odedb" auth="Container" type="javax.sql.DataSource"
>  maxActive="100" maxIdle="30" maxWait="10000"
>  username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
>  url="jdbc:mysql://localhost:3306/soaware?autoReconnect=true"/>
> </Context>
> The Context tag is under the Host tag in server.xml.
> Next I configure the resource referce in the tomcat_home/wapps/serviceMix/wibinf/web.xml.
> The contents which I add under the file's web-app tag is
> <description>MySQL Ode App</description>
> <resource-ref>
> <description>DB Connection</description>
> <res-ref-name>jdbc/odedb</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
>
> After I configure all of these, I install the ode-jbi-1.2 SE. However, when I start the
OdeBpelEngine, it report the next error:
> java.lang.Exception: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message" version="1.0">
> <jbi-task-result>
> <frmwk-task-result>
> <frmwk-task-result-details>
> <task-result-details>
> <task-id>startComponent</task-id>
> <task-result>FAILED</task-result>
> <message-type>ERROR</message-type>
> <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>OdeBpelEngine</loc-message>
> </msg-loc-info>
> </task-status-msg>
> <exception-info>
> <nesting-level>1</nesting-level>
> <loc-token/>
> <loc-message>Database configuration error.</loc-message>
> <stack-trace><![CDATA[javax.jbi.JBIException: Database configuration error.
>
>        at org.apache.ode.jbi.OdeLifeCycle.initDataSource(OdeLifeCycle.java:179)
>
>        at org.apache.ode.jbi.OdeLifeCycle.init(OdeLifeCycle.java:113)
>
>        at org.apache.servicemix.jbi.framework.ComponentMBeanImpl.init(ComponentMBeanImpl.java:201)
>
>        at org.apache.servicemix.jbi.framework.ComponentMBeanImpl.doStart(ComponentMBeanImpl.java:287)
>
>        at org.apache.servicemix.jbi.framework.ComponentMBeanImpl.start(ComponentMBeanImpl.java:216)
>
>        at org.apache.servicemix.jbi.framework.AdminCommandsService.startComponent(AdminCommandsService.java:156)
>
>        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:597)
>
>        at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
>
>        at org.apache.servicemix.jbi.management.BaseStandardMBean.invoke(BaseStandardMBean.java:323)
>
>        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
>
>        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
>
>        at org.springframework.jmx.access.MBeanClientInterceptor.invokeOperation(MBeanClientInterceptor.java:435)
>
>        at org.springframework.jmx.access.MBeanClientInterceptor.invoke(MBeanClientInterceptor.java:326)
>
>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
>
>        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>
>        at $Proxy1.startComponent(Unknown Source)
>
>        at org.apache.servicemix.web.controller.ComponentLifeCycle.handleRequest(ComponentLifeCycle.java:57)
>
>        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
>
>        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
>
>        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
>
>        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
>
>        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
>
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>        at org.apache.servicemix.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
>
>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>        at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
>
>        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
>
>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>        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:191)
>
>        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:845)
>
>        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:619)
>
> Caused by: org.apache.ode.il.dbutil.DatabaseConfigException: Failed to resolved external
DataSource at "java:comp/env/jdbc/odedb".
>
>        at org.apache.ode.il.dbutil.Database.initExternalDb(Database.java:164)
>
>        at org.apache.ode.il.dbutil.Database.initDataSource(Database.java:144)
>
>        at org.apache.ode.il.dbutil.Database.start(Database.java:99)
>
>        at org.apache.ode.jbi.OdeLifeCycle.initDataSource(OdeLifeCycle.java:175)
>
>        ... 45 more
>
> Caused by: javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
>
>        at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
>
>        at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
>
>        at javax.naming.InitialContext.lookup(InitialContext.java:392)
>
>        at org.apache.ode.il.dbutil.Database.lookupInJndi(Database.java:244)
>
>        at org.apache.ode.il.dbutil.Database.initExternalDb(Database.java:159)
>
>        ... 48 more
>
> ]]></stack-trace>
> </exception-info>
> </task-result-details>
> </frmwk-task-result-details>
> </frmwk-task-result>
> </jbi-task-result>
> </jbi-task>
>
>        at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:125)
>        at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:115)
>        at org.apache.servicemix.jbi.framework.AdminCommandsService.startComponent(AdminCommandsService.java:159)
>        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:597)
>        at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
>        at org.apache.servicemix.jbi.management.BaseStandardMBean.invoke(BaseStandardMBean.java:323)
>        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
>        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
>        at org.springframework.jmx.access.MBeanClientInterceptor.invokeOperation(MBeanClientInterceptor.java:435)
>        at org.springframework.jmx.access.MBeanClientInterceptor.invoke(MBeanClientInterceptor.java:326)
>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
>        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>        at $Proxy1.startComponent(Unknown Source)
>        at org.apache.servicemix.web.controller.ComponentLifeCycle.handleRequest(ComponentLifeCycle.java:57)
>        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
>        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
>        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
>        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
>        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at org.apache.servicemix.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
>        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        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:191)
>        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:845)
>        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:619)
> Why this happen? I can use the dataSoure in a jsp page to show the data is the database
soaware.
> Why I can't use it as the ode external dataSource?
> 2009-07-02
>
>
>
> yeyanchao.whu
>



-- 
Rafał Rusin
http://www.touk.pl
http://top.touk.pl
http://www.mimuw.edu.pl/~rrusin

Mime
View raw message