Hallo Dave, I am not really understand your problem as your report touch multiple points, so let me do this systematically. Appologies if I state something obvious:
a) there is no ojdbc driver in the public maven repositories. The JDBC driver from oracle is propeitary. So I am not sure where you get that POM from. b) I am not sure how this is related to netbeans, could you make try to reproduce this with a minimum sample only using maven on the command line? c) if you get "class not found" errors after the download/search in repository failed that means the pom is missing, if you get the error after the pom was found it is most likely a configuration issue. d) the location where and how you define your dependency in the pom is responsible where the artifact (if found) is added to the classpath. There is especially a difference for scope=provided and scope=test artifaces, but it could also be that the dependency is only defined local to a specific plugin, and missing to another. e) the location of your database is not an issue for the dependency resolving. You might however (what is typical for ojdbc.jar) define a dependency with a system path to a locally installed (or copied) oracle artifact (which could be the XE installation dir). f) I am not sore about your sping/jpa test infrastructure, but you typically dont have to look at the setup there as long as your Pom fails to get your dependencies. Greetings Bernd Am Tue, 11 Mar 2014 15:55:59 -0700 schrieb Dave Kennedy <davek1...@gmail.com>: > 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 > > MG>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 > > MG>jdbc.properties > > > > > p:username="${jdbc.username}" > > MG>we would need to know what jdbc.username resolves to in > > MG>jdbc.properties > > > > "We do these things..not because they are easy..but because they are > > hard"...JFK > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org