You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by miro <mi...@yahoo.com> on 2008/12/01 23:29:17 UTC

no suitable driver found error with hibernate hibernate3-maven-plugin

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: no suitable driver found error with hibernate hibernate3-maven-plugin

Posted by GĂ©rald Quintana <ge...@gmail.com>.
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 <mi...@yahoo.com>:
>
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org