I updated the pom.xml and settings.xml files <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.1</version> </dependency>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>C:/Users/dave/.m2/repository</localRepository> </settings> now the output is Downloaded: http://download.eclipse.org/rt/eclipselink/maven.repo/com/oracle/ojdbc6/11.2.0.1/ojdbc6-11.2.0.1.pom(0 B at 0.0 KB/sec) Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/com/oracle/ojdbc6/11.2.0.1/ojdbc6-11.2.0.1.jar Downloading: http://repo.maven.apache.org/maven2/com/oracle/ojdbc6/11.2.0.1/ojdbc6-11.2.0.1.jar ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ On Tue, Mar 11, 2014 at 3:55 PM, Dave Kennedy <davek1...@gmail.com> wrote: > I have tried to simplify the issue by Installing Oracle XE locally to > eliminate the remote db. > I am able to connect to the local db with the username and password below. > I assume the ojdbc driver is not on the test classpath. > I'm not sure where to add the driver to the classpath. > > > I am getting the error > Could not load JDBC driver class [oracle.jdbc.OracleDriver] > > jdbc.properties > jdbc.driverClassName=oracle.jdbc.OracleDriver > jdbc.url=jdbc:oracle:thin:@localhost:1521:XE > jdbc.username=SYSTEM > jdbc.password=adminadmin > > > test-persistence.xml > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance" > xmlns:p="http://www.springframework.org/schema/p" > xmlns:context="http://www.springframework.org/schema/context" > xmlns:tx="http://www.springframework.org/schema/tx" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-3.0.xsd > http://www.springframework.org/schema/context > http://www.springframework.org/schema/context/spring-context-3.0.xsd > http://www.springframework.org/schema/tx > http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> > > <bean id="propertyConfigurer" > > class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" > p:location="classpath:jdbc.properties" /> > > <bean id="tttDataSource" > > > class="org.springframework.jdbc.datasource.DriverManagerDataSource" > p:driverClassName="${jdbc.driverClassName}" > p:url="${jdbc.url}" > p:username="${jdbc.username}" > p:password="${jdbc.password}" > /> > > <bean id="loadTimeWeaver" > class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" > /> > > > <bean id="jpaVendorAdapter" > > class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter" > p:showSql="true" > > p:databasePlatform="org.eclipse.persistence.platform.database.OraclePlatform" > /> > > <bean id="entityManagerFactory" > > class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" > p:dataSource-ref="tttDataSource" > p:jpaVendorAdapter-ref="jpaVendorAdapter" > p:persistenceXmlLocation="test-persistence.xml" > /> > > <!-- Transaction manager for a single JPA EntityManagerFactory > (alternative to JTA) --> > <bean id="transactionManager" > class="org.springframework.orm.jpa.JpaTransactionManager" > p:dataSource-ref="tttDataSource" > p:entityManagerFactory-ref="entityManagerFactory"/> > > <!-- checks for annotated configured beans --> > <context:annotation-config/> > > <!-- Scan for Repository/Service annotations --> > <context:component-scan base-package="com.gieman.tttracker.dao" /> > <context:component-scan base-package="com.gieman.tttracker.service" /> > <context:component-scan base-package="com.gieman.tttracker.web" /> > <!-- enable the configuration of transactional behavior based on > annotations --> > <tx:annotation-driven /> > > </beans> > > > > > > On Mon, Mar 10, 2014 at 7:46 PM, Martin Gainty <mgai...@hotmail.com>wrote: > >> >> MG>David...all comments prefixed by MG> >> >> > Date: Sun, 9 Mar 2014 10:10:43 -0700 >> > Subject: Re: Netbeans 7.4 maven POM for com.oracle:ojdbc6:jar:11.2.0.1 >> is invalid >> > From: davek1...@gmail.com >> > To: users@maven.apache.org >> > >> > Martin, >> > I'm not sure where you mean to check that ojdbc6 is listed as a >> dependency. >> > I am trying to convert the project from using MySql to Oracle, >> > so I might not have configured everything correctly. >> > >> > This is in the testingContext.xml file: >> >> >> MG> >> >> <!-- assume p namespace resolves >> >> <?xml version="1.0" encoding="UTF-8"?> >> > <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=" >> > http://www.w3.org/2001/XMLSchema-instance" >> > xmlns:p=http://www.springframework.org/schema/p >> >> --> >> >> MG> >> >> >> > <bean id="jpaVendorAdapter" >> > >> > class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter" >> > p:showSql="true" >> > >> > >> p:databasePlatform="org.eclipse.persistence.platform.database.OraclePlatform" >> > /> >> > >> > pom.xml: >> > <dependency> >> > <groupId>com.oracle</groupId> >> > <artifactId>ojdbc6</artifactId> >> > <version>11.2.0.1</version> >> > </dependency> >> > >> > testingContext.xml: >> > <?xml version="1.0" encoding="UTF-8"?> >> > <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=" >> > http://www.w3.org/2001/XMLSchema-instance" >> > xmlns:p="http://www.springframework.org/schema/p" >> > xmlns:context="http://www.springframework.org/schema/context" >> > xmlns:tx="http://www.springframework.org/schema/tx" >> > xsi:schemaLocation=" >> > http://www.springframework.org/schema/beans >> > http://www.springframework.org/schema/beans/spring-beans-3.0.xsd >> > http://www.springframework.org/schema/context >> > http://www.springframework.org/schema/context/spring-context-3.0.xsd >> > http://www.springframework.org/schema/tx >> > http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> >> >> >> MG>right now you list a bunch of xsds for every namespace except p >> >> MG>you *should* have a schemaLocation for xmlns:p >> >> > <bean id="propertyConfigurer" >> > >> > >> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >> > p:location="classpath:jdbc.properties" /> >> > >> > <bean id="ahmDataSource" >> > >> > class="org.springframework.jdbc.datasource.DriverManagerDataSource" >> >> >> > p:driverClassName="${jdbc.driverClassName}" >> MG>we would need to know what jdbc.driverClassName resolves to in >> jdbc.properties >> MG>BTW this is the class that needs to be packaged in your dependency >> listed above (ojdbc6-11.2.0.1.jar) >> >> > p:url="${jdbc.url}" >> MG>we would need to know what jdbc.url resolves to in jdbc.properties >> >> > p:username="${jdbc.username}" >> MG>we would need to know what jdbc.username resolves to in jdbc.properties >> >> "We do these things..not because they are easy..but because they are >> hard"...JFK > > >