Posts

Showing posts with the label oracle xe

Maven + Oracle XE + Sample App

<dependency>     <groupid>com.oracle</groupid>     <artifactid>ojdbc6</artifactid>     <version>11.2.0.3</version> </dependency> ... <repositories>     <repository>       <id>codelds</id>       <url>https://code.lds.org/nexus/content/groups/main-repo</url>     </repository>   </repositories> public class OracleSample {     public static final String DBURL = "jdbc:oracle:thin:@localhost:1521:XE";     public static final String DBUSER = "rtpmodern";     public static final String DBPASS = "P@ssw0rd";     public static void main(String[] args) throws SQLException {         // Load Oracle JDBC Driver         DriverManager.registerDriver(new oracle.jd...

Configuring Oracle XE connection pool in Glassfish and Using JPA

To setup an Oracle Datasource in Glassfish, follow these steps: 1. Download and copy the Oracle JDBC driver (ojdbc14.jar ) to /glassfish/domains/domain1/lib/ext directory. 2. Start Glassfish. 3. Login to the admin interface and create a JDBC Connection Pool.     Delete all properties, and add following properties:     * user - set this to Oracle userid     * password - set this to Oracle password     * URL - set this to the URL, example jdbc:oracle:thin:@localhost:1521:xe.     * xa-driver-does-not-support-non-tx-operations - set this to true. Test the connection pool using ping. 4. Create a JDBC DataSource using the Connection Pool. If in case of Oracle major version error : javax.persistence.PersistenceException: org.hibernate.HibernateException: unknown Oracle major version [11] The fix for the error is add <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/...