Place Oracle dependency in plugin dependencies, like this:
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <components>
                        <component>
                            <name>hbm2doc</name>

<implementation>annotationconfiguration</implementation>
                        </component>
                        <component>
                            <name>hbm2ddl</name>

<implementation>annotationconfiguration</implementation>
                        </component>
                    </components>
                    <componentProperties>

<configurationfile>src/main/resources/hibernate.cfg.xml</configurationfile>
                        <jdk5>true</jdk5>
                        <drop>true</drop>
                        <update>false</update>
                        <export>false</export>
                        <format>true</format>
                        <outputfilename>hbm2ddl.sql</outputfilename>
                    </componentProperties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.oracle</groupId>
                        <artifactId>ojdbc14</artifactId>
                        <version>10.2.0.3.0</version>
                    </dependency>
                </dependencies>
            </plugin>


2008/12/1 miro <[EMAIL PROTECTED]>:
>
> we are trying to  use hibernate3-maven-plugin  to generate ddl files and
> failing with   sql exception
>
> java.sql.SQLException: No suitable driver
>
> here   the configration
>
>                <plugin>
>                        <groupId>org.codehaus.mojo</groupId>
>                        <artifactId>hibernate3-maven-plugin</artifactId>
>                        <version>2.1</version>
>                         <configuration>
>                        <componentProperties>
>
> <configurationfile>src/main/java/.../.../hibernate.cfg.xml</configurationfile>
>
>                                <create>false</create>
>                                <jdk5>true</jdk5>
>                        </componentProperties>
>             </configuration>
>
>     </plugin>
>
> we installed oracle driver  into our local repository   and added reference
> in extensions
>        <extensions>
>      <extension>
>        <groupId>com.oracle</groupId>
>        <artifactId>ojdbc14</artifactId>
>        <version>10.2.0.2.0</version>
>      </extension>
>    </extensions>
>
> here our hibernate-cfg.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE hibernate-configuration PUBLIC
>                "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
>                
> "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>
> <hibernate-configuration>
>    <session-factory name="mysessionFactory">
>        <property
> name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
>        <property
> name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
>                <property
> name="connection.url">jdbc:oracle:thin:@myhost.com:1521:mysid</property>
>                <property name="connection.username">username</property>
>                <property name="connection.password">password</property>
>
>                 <mapping  class="com...entity.SomeEntity"/>
>           </session-factory>
> </hibernate-configuration>
> please help us resolve this .
>
> --
> View this message in context: 
> http://www.nabble.com/no-suitable-driver-found-error--with-hibernate---hibernate3-maven-plugin-tp20782044p20782044.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to