maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Kennedy <davek1...@gmail.com>
Subject Re: Netbeans 7.4 maven POM for com.oracle:ojdbc6:jar:11.2.0.1 is invalid
Date Sun, 09 Mar 2014 17:10:43 GMT
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:

    <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">

    <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}"
          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="ahmDataSource"
        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="ahmDataSource"
        p:entityManagerFactory-ref="entityManagerFactory"/>

    <!-- checks for annotated configured beans -->
    <context:annotation-config/>

    <!-- Scan for Repository/Service annotations -->
    <context:component-scan base-package="dao" />
    <!-- enable the configuration of transactional behavior based on
annotations -->
    <tx:annotation-driven />

</beans>



On Sun, Mar 9, 2014 at 5:14 AM, Martin Gainty <mgainty@hotmail.com> wrote:

> David
> did you check the  Junit test that ojdbc6 is listed as a dependency?
>
>
>
> <dependencies>
>
> ....
>
>  <dependency>
>
>   <groupId>com.oracle</groupId>
>   <artifactId>ojdbc6</artifactId>
>   <version>11.2.0.1</version>
>
> </dependency>
>
> ............
> </dependencies>
>
>
> Martin-
>
>
>
>
> > Date: Sat, 8 Mar 2014 13:30:59 -0800
> > Subject: Re: Netbeans 7.4 maven POM for com.oracle:ojdbc6:jar:11.2.0.1
> is invalid
> > From: davek1802@gmail.com
> > To: users@maven.apache.org
> >
> > In the log, there is a reference to 'no dependency information
> available',
> > but the POM for com.oracle:ojdbc6:jar:11.2.0.1 exists.
> > Any help/suggestions on how to resolve this issue would be appreciated.
> >
> > Verifying availability of
> >
> C:\Users\david.kennedy\.m2\repository\com\oracle\ojdbc6\11.2.0.1\ojdbc6-11.2.0.1.pom
> > from [eclipselink (
> http://download.eclipse.org/rt/eclipselink/maven.repo/,
> > releases+snapshots), central (http://repo.maven.apache.org/maven2,
> > releases)]
> >
> > The POM for com.oracle:ojdbc6:jar:11.2.0.1 is missing, no dependency
> > information available
> >
> >
> C:\Users\david.kennedy\.m2\repository\com\oracle\ojdbc6\11.2.0.1\ojdbc6-11.2.0.1.pom
> > <?xml version="1.0" encoding="UTF-8"?>
> > <project
> > xmlns="http://maven.apache.org/POM/4.0.0"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/maven-v4_0_0.xsd">
> >
> > <modelVersion>4.0.0</modelVersion>
> > <groupId>com.oracle</groupId>
> > <artifactId>ojdbc6</artifactId>
> > <version>11.2.0.1</version>
> >
> > <name>Oracle JDBC Driver</name>
> > <description>Oracle JDBC driver classes for use with
> > JDK1.7</description>
> > <url>
> > http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
> > </url>
> >
> > <licenses>
> > <license>
> > <name>Oracle Technology Network Development and Distribution
> > License Terms</name>
> > <url>
> > http://www.oracle.com/technology/software/htdocs/distlic.html</url>
> > </license>
> > </licenses>
> >
> > <organization>
> > <name>Oracle Corporation</name>
> > <url>http://www.oracle.com</url>
> > </organization>
> > </project>
> >
> >
> > On Sat, Mar 8, 2014 at 12:13 PM, Dave Kennedy <davek1802@gmail.com>
> wrote:
> >
> > > I'm not sure where I need to add a dependency declaration for the ojdbc
> > > driver
> > > These are the references to oracle
> > > pom.xml
> > > <dependency>
> > >
> > > <groupId>com.oracle</groupId>
> > > <artifactId>ojdbc6</artifactId>
> > > <version>11.2.0.1</version>
> > > <scope>provided</scope>
> > > </dependency>
> > >
> > > src/test/resources/jdbcproperties
> > > jdbc.driverClassName=oracle.jdbc.OracleDriver
> > > jdbc.url=oracle:thin:@database.com:1521:dbname
> > > jdbc.username=name
> > > jdbc.password=pass
> > >
> > > src/test/resources/testingContext.xml
> > > <bean id="jpaVendorAdapter"
> > >
> > > class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter"
> > > p:showSql="true"
> > >
> > >
> p:databasePlatform="org.eclipse.persistence.platform.database.OraclePlatform"
> > > />
> > >
> > >
> > > On Sat, Mar 8, 2014 at 11:55 AM, Wayne Fay <waynefay@gmail.com> wrote:
> > >
> > >> > I updated the ojdbc6-11.2.0.1.pom file (see below) and the 'invalid'
> > >> > message did not appear.
> > >>
> > >> Good.
> > >>
> > >> > Now there is an error running JUnit tests: No suitable driver found
> for
> > >> > oracle:thin:@dataserver.com:1521:dbname
> > >>
> > >> Most likely you are missing a dependency declaration for the ojdbc
> > >> driver in the module that threw this error during the JUnit execution.
> > >>
> > >> > I can PING the database in GlassFish Domain Admin Console and view
> the
> > >> > Tables and data in Netbeans | Services | Databases
> > >>
> > >> What makes you think this has ANYTHING to do Netbeans or Glassfish...?
> > >>
> > >> Wayne
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message