Showing posts with label jpa. Show all posts
Showing posts with label jpa. Show all posts

Thursday, July 4, 2013

JPA Reference Card

Collection of basic types



Saturday, October 3, 2009

Persistence Unit for Toplink Essentials

Minimum configurations required for persistence unit in case of Toplink essentials is given below:

<?xml version="1.0" encoding="windows-1252" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="Model" transaction-type="RESOURCE_LOCAL">
<provider>
oracle.toplink.essentials.PersistenceProvider
</provider>
<class>org.engineers.adf.hrdemo.model.Departments</class>
<class>org.engineers.adf.hrdemo.model.Employees</class>
<properties>
<property name="toplink.logging.level" value="INFO"/>
<property name="toplink.jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/>
<property name="toplink.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:XE"/>
<property name="toplink.jdbc.password" value="password"/>
<property name="toplink.jdbc.user" value="user"/>
</properties>

</persistence-unit>

</persistence>

JPA with Toplink Essentials Error Code: 17002

From this post, I am going to start to post solution for different problems or errors in java technologies which i face during development so that others also could get help from my research and don't waste time on that now.

Error is given below:

Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b52-fcs (09/24/2008))):
oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Io exception:
Invalid number format for port number
Error Code: 17002

Cause Was: I just copied url from a web site and then pasted to persistence. Probably it appended some hidden characters due to which provider game an error about port format. I just rewrite the port number again and error resolved.

Second Error which i faced was:

Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b52-fcs (09/24/2008))):
oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException:
Io exception: The Network Adapter could not establish the connection
Error Code: 17002

Cause Was: wrong port number, ip address or network disconnection