4 Replies Latest reply on Nov 26, 2014 12:05 PM by Sriram N

    Unable to load the teradriver... Ned help badly!!!

    Sriram N Newbie

      Hi All,

       

      I am trying to call a service bundle from SOAP UI.

      When I try to do this, I get a data access exception.

      The log says that the driver could not be loaded. Detailed log is given below...

      I am struggling with this for last 2-3 days! Please help!

       

      Environment Used:

      Windows 7; 64 bit; Jdk 7; FuseESB 7.1; maven3.2.3

       

      But, when I list the services, I have the teradata wrapper listed as seen here below.

      [  65] [Active     ] [            ] [       ] [   60] teradata.jdbc.wrapper (13.10.0)

       

      Following hibernate jars are available

      FuseESB:karaf@root> list | grep -i Hib

      [ 291] [Active     ] [            ] [       ] [   60] JBoss Hibernate Common Annotations (3.3.0.ga)

      [ 292] [Resolved   ] [            ] [       ] [   60] JBoss Hibernate Annotations (3.4.0.GA), Hosts: 294

      [ 293] [Resolved   ] [            ] [       ] [   60] JBoss Hibernate Entity Manager (3.4.0.GA), Hosts: 294

      [ 294] [Active     ] [            ] [       ] [   60] JBoss Hibernate Object-Relational Mapper (3.3.2.GA), Fragments: 292,293

       

      The pom has the dependency as shown here below

       

              <!-- Teradata Wrapper -->

              <dependency>

                  <groupId>com.ge.ae</groupId>

                  <artifactId>teradata.jdbc.wrapper</artifactId>

                  <version>13.10.0</version>

                  <type>bundle</type>

              </dependency>

       

      The pom's import package looks as shown here below

       

      <plugin>

                      <groupId>org.apache.felix</groupId>

                      <artifactId>maven-bundle-plugin</artifactId>

                      <version>2.3.4</version>

                      <extensions>true</extensions>

                      <configuration>

                          <instructions>

                              <Bundle-SymbolicName>booking.data.impl</Bundle-SymbolicName>

                              <Private-Package>com.sample.booking.data.impl.*,com.geaviation.orgregion.data.impl.*</Private-Package>

                              <Import-Package>com.sample.booking.data.api.*,

                              com.sample.region.data.api.*,

                                  com.sample.booking.entity.*,

                                  com.teradata.jdbc,

                                  oracle.jdbc,

                                  org.springframework.jdbc.datasource,

                                  <!--com.springsource.org.hibernate.*,-->

                                  org.apache.commons.dbcp,

                                  org.jasypt.encryption.pbe,

                                  org.jasypt.encryption.pbe.config,

                                  *</Import-Package>

                              <!--DynamicImport-Package>*,net.sf.ehcache.*,com.springsource.org.hibernate,org.hibernate.annotations</DynamicImport-Package-->

                              <DynamicImport-Package>*,net.sf.ehcache.*</DynamicImport-Package>

                          </instructions>

                      </configuration>

                  </plugin>

       

      The log is as shown here below

       

      Cannot load JDBC driver class 'com.teradata.jdbc.TeraDriver'

      java.lang.ClassNotFoundException: com.teradata.jdbc.TeraDriver from bundle 321 (booking.client)

              at org.apache.cxf.bus.blueprint.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:116)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

              at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)

              at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)

              at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)

              at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)

              at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)

              at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:572)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:636)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:661)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:701)

              at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:166)

              at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForList(NamedParameterJdbcTemplate.java:241)

              at com.geaviation.engine.data.impl.ShopEventDataImpl.getCurrentEngineStatus(ShopEventDataImpl.java:63)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)

              at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)

              at com.sun.proxy.$Proxy71.getCurrentEngineStatus(Unknown Source)

              at com.sample.booking.app.impl.ShopEventImpl.getCurrentBookStatusList(ShopEventImpl.java:66)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)

              at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)

              at com.sun.proxy.$Proxy70.getCurrentEngineStatusList(Unknown Source)

              at com.sample.booking.client.BookingRESTServiceImpl.getBookingDetailsList(BookingRESTServiceImpl.java:601)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)

              at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)

              at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:167)

              at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:94)

              at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)

              at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)

              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)

              at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

              at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:348)

              at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:312)

              at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)

              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1040)

              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:976)

              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)

              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)

              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)

              at org.eclipse.jetty.server.Server.handle(Server.java:363)

              at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)

              at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)

              at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)

              at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)

              at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)

              at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)

              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)

              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)

              at java.lang.Thread.run(Thread.java:745)

      Caused by: java.lang.ClassNotFoundException: com.teradata.jdbc.TeraDriver not found by engine.client [321]

              at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1499)

              at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)

              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1882)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

              at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1814)

              at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:929)

              at org.apache.cxf.bus.blueprint.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:54)

              at org.apache.cxf.bus.blueprint.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:52)

              at java.security.AccessController.doPrivileged(Native Method)

              at org.apache.cxf.bus.blueprint.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:52)

              at org.apache.cxf.bus.blueprint.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:110)

              ... 61 more

      Cannot load JDBC driver class 'com.teradata.jdbc.TeraDriver'

      java.lang.ClassNotFoundException: com.teradata.jdbc.TeraDriver from bundle 321 (engine.client)

              at org.apache.cxf.bus.blueprint.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:116)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

              at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)

              at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)

              at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)

              at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)

              at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)

              at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:572)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:636)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:661)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:701)

              at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:166)

              at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForList(NamedParameterJdbcTemplate.java:241)

              at com.sample.booking.data.impl.ShopEventDataImpl.getCurrentBookingStatus(ShopEventDataImpl.java:63)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

       

      Request someone to help me understand what is that I am missing! :-(

       

      Thanks!

       

      Regards,

      Sriram