EclipseLink JPA multitenancy

I am using EclipseLink to auto populate the column on inserts. (column i want it to auto update is COMPANY_ID)
Table is like
COMPANY_ID
EMPLOYEE_ID
NAME
SALARY
AGE
My entity is
@Entity
@NamedQueries({
@NamedQuery(name = "EmployeeVpd1.findAll", query = "select o from EmployeeVpd1 o")
@Table(name = "EMPLOYEE_VPD_1")
@Multitenant
@TenantDiscriminatorColumn(name ="COMPANY_ID")
public class EmployeeVpd1 implements Serializable {
private Long age;
@Id
@Column(name="EMPLOYEE_ID", nullable = false)
private Long employeeId;
@Column(length = 30)
private String name;
private Long salary;
public EmployeeVpd1() {
public EmployeeVpd1(Long age, Long employeeId,
String name, Long salary) {
this.age = age;
this.employeeId = employeeId;
this.name = name;
this.salary = salary;
public Long getAge() {
return age;
public void setAge(Long age) {
this.age = age;
public Long getEmployeeId() {
return employeeId;
public void setEmployeeId(Long employeeId) {
this.employeeId = employeeId;
public String getName() {
return name;
public void setName(String name) {
this.name = name;
public Long getSalary() {
return salary;
public void setSalary(Long salary) {
this.salary = salary;
Persistent class is (hard coded that tenant id to Oracle)
<persistence-unit name="EJB">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>java:/app/jdbc/jdbc/VPDDS</jta-data-source>
<class>ejb.EmployeeVpd1</class>
<properties>
<property name="eclipselink.target-server" value="WebLogic_10"/>
<property name="javax.persistence.jtaDataSource"
value="java:/app/jdbc/jdbc/VPDDS"/>
<property name="eclipselink.jdbc.exclusive-connection.mode" value="Always" />
<property name="eclipselink.tenant-id" value="Oracle"/>
</properties>
</persistence-unit>
Java class for creating the entity and inserting it to db
@PersistenceUnit
EntityManagerFactory emf = Persistence.createEntityManagerFactory("EJB");
em=emf.createEntityManager();
em.persist(employee1)
Its inserting the row into the table but the COMPANY_ID is not getting set to Oracle . Its always setting to null

Hi,
The multitenancy feature wasn't implemented till 2.3. Can you try a more recent version?
http://www.eclipse.org/eclipselink/downloads/nightly.php
Cheers,
Guy

Similar Messages

  • SAP MaxDB and EclipseLink/JPA?

    Folks;
    is anyone out here using MaxDB along with EclipseLink JPA 2.0 implementation, especially as far as it concerns automatic table creation using predefined @Entity classes? So far, I mainly happened to see a whole load of different error messages but yet haven't found a way of getting things to work cleanly, like, at the moment:
    Call: ALTER TABLE S_CFG_SS_CFG_ATTS ADD CONSTRAINT FK_S_CFG_SS_CFG_ATTS_atts_ID FOREIGN KEY (atts_ID) REFERENCES SS_CFG_ATTS (ID)
    Query: DataModifyQuery(sql="ALTER TABLE S_CFG_SS_CFG_ATTS ADD CONSTRAINT FK_S_CFG_SS_CFG_ATTS_atts_ID FOREIGN KEY (atts_ID) REFERENCES SS_CFG_ATTS (ID)")
    [EL Warning]: 2009-11-24 12:25:30.376--ServerSession(30633470)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.v20091031-r5713): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: com.sap.dbtech.jdbc.exceptions.DatabaseException: [-5016] (at 71): Missing delimiter: )
    Error Code: -5016
    Does anyone around here know how (if so) to get EclipseLink to behave well teaming with MaxDB?
    TIA and all the best,
    Kristian

    Please check for the official EclipseLink MaxDB support. You might want to post this question to the Eclipse forum.
    [http://wiki.eclipse.org/EclipseLink/Development/DatabasePlatform/MaxDBPlatform]
    Harald

  • EclipseLink + JPA + Generic Entity + SINGLE_TABLE Inheritance

    I was wondering if it's possible in JPA to define a generic entity like in my case PropertyBase<T> and derive concrete entity classes like ShortProperty and StringProperty and use them with the SINGLE_TABLE inheritance mode? If I try to commit newly created ElementModel instances (see ElementModelTest) over the EntityManager I always get an NumberFormatException that "value" can't be properly converted to a Short. Strangely enough if I define all classes below as inner static classes of my test case class "ElementModelTest" this seems to work. Any ideas what I need to change to make this work?
    I'm using EclipseLink eclipselink-2.6.0.v20131019-ef98e5d.
    public abstract class PersistableObject
        implements Serializable {
        private static final long serialVersionUID = 1L;
        private String id = UUID.randomUUID().toString();
        private Long version;
        public PersistableObject() {
               this(serialVersionUID);
        public PersistableObject(final Long paramVersion) {
              version = paramVersion;
        public String getId() {
    return id;
        public void setId(final String paramId) {
      id = paramId;
        public Long getVersion() {
    return version;
        public void setVersion(final Long paramVersion) {
      version = paramVersion;
        public String toString() {
      return this.getClass().getName() + "[id=" + id + "]";
    public abstract class PropertyBase<T> extends PersistableObject {
        private static final long serialVersionUID = 1L;
        private String name;
        private T value;
        public PropertyBase() {
    this(serialVersionUID);
        public PropertyBase(final Long paramVersion) {
      this(paramVersion, null);
        public PropertyBase(final Long paramVersion, final String paramName) {
      this(paramVersion, paramName, null);
        public PropertyBase(final Long paramVersion, final String paramName, final T paramValue) {
      super(paramVersion);
      name = paramName;
      value = paramValue;
        public String getName() {
    return name;
        public void setName(final String paramName) {
      name = paramName;
        public T getValue() {
    return value;
        public void setValue(final T paramValue) {
      value = paramValue;
    public class ShortProperty extends PropertyBase<Short> {
        private static final long serialVersionUID = 1L;
        public ShortProperty() {
    this(null, null);
        public ShortProperty(final String paramName) {
      this(paramName, null);
        public ShortProperty(final String paramName, final Short paramValue) {
      super(serialVersionUID, paramName, paramValue);
    public class StringProperty extends PropertyBase<String> {
        private static final long serialVersionUID = 1L;
        protected StringProperty() {
    this(null, null);
        public StringProperty(final String paramName) {
      this(paramName, null);
        public StringProperty(final String paramName, final String paramValue) {
      super(serialVersionUID, paramName, paramValue);
    public class ElementModel extends PersistableObject {
        private static final long serialVersionUID = 1L;
        private StringProperty name = new StringProperty("name");
        private ShortProperty number = new ShortProperty("number");
        public ElementModel() {
    this(serialVersionUID);
        public ElementModel(final Long paramVersion) {
      super(paramVersion);
        public String getName() {
      return name.getValue();
        public void setName(final String paramName) {
      name.setValue(paramName);
        public Short getNumber() {
      return number.getValue();
        public void setNumber(final Short paramNumber) {
      number.setValue(paramNumber);
    <?xml version="1.0" encoding="UTF-8" ?>
    <entity-mappings version="2.1"
    xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm http://xmlns.jcp.org/xml/ns/persistence/orm_2_1.xsd">
    <mapped-superclass
      class="PersistableObject">
      <attributes>
      <id name="id">
      <column name="id" />
      </id>
      <version name="version" access="PROPERTY">
      <column name="version" />
      </version>
      </attributes>
    </mapped-superclass>
    <entity class="PropertyBase">
      <table name="PropertyBase" />
      <inheritance />
      <discriminator-column name="type"/>
      <attributes>
      <basic name="name">
      <column name="name" />
      </basic>
      <basic name="value">
      <column name="value" />
      </basic>
      </attributes>
    </entity>
    <entity class="StringProperty">
      <discriminator-value>StringProperty</discriminator-value>
    </entity>
    <entity class="ShortProperty">
      <discriminator-value>ShortProperty</discriminator-value>
    </entity>
    <entity class="ElementModel">
      <table name="ElementModel" />
      <inheritance />
      <discriminator-column name="type"/>
      <attributes>
      <one-to-one name="name">
      <join-column name="name" referenced-column-name="id" />
      <cascade>
      <cascade-all />
      </cascade>
      </one-to-one>
      <one-to-one name="number">
      <join-column name="number" referenced-column-name="id" />
      <cascade>
      <cascade-all />
      </cascade>
      </one-to-one>
      </attributes>
    </entity>
    </entity-mappings>
    public class ElementModelTest extends ModelTest<ElementModel> {
        public ElementModelTest() {
      super(ElementModel.class);
        @Test
        @SuppressWarnings("unchecked")
        public void testSQLPersistence() {
      final String PERSISTENCE_UNIT_NAME = getClass().getPackage().getName();
      new File("res/db/test/" + PERSISTENCE_UNIT_NAME + ".sqlite").delete();
      EntityManagerFactory factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
      EntityManager em = factory.createEntityManager();
      Query q = em.createQuery("select m from ElementModel m");
      List<ElementModel> modelList = q.getResultList();
      int originalSize = modelList.size();
      for (ElementModel model : modelList) {
          System.out.println("name: " + model.getName());
      System.out.println("size before insert: " + modelList.size());
      em.getTransaction().begin();
      for (int i = 0; i < 10; ++i) {
          ElementModel device = new ElementModel();
          device.setName("ElementModel: " + i);
        device.setNumber((short) i);
          em.persist(device);
      em.getTransaction().commit();
      modelList = q.getResultList();
      System.out.println("size after insert: " + modelList.size());
      assertTrue(modelList.size() == (originalSize + 10));
      em.close();

    This was answered in a cross post here java - EclipseLink + JPA + Generic Entity + SINGLE_TABLE Inheritance - Stack Overflow
    Short answer: No, it shouldn't work as the underlying database field type would be constant.  So either the Short or the String would have problems converting to the database type if they both mapped to the same table field. 

  • Eclipselink JPA error

    Hi,
    I'm using Oracle JDeveloper 11.1.2.2.0 and the eclipselink JPA provider (integrated in Toplink library). I can run my web application in IDE. However, when I deployed my application to the embedded WLS via a WAR file, I got the following error:
    Exception [EclipseLink-4021] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Unable to acquire a connection from driver [null], user [null] and URL [null]. Verify that you have set the expected driver class and URL. Check your login, persistence.xml or sessions.xml resource. The jdbc.driver property should be set to a class that is compatible with your database platform
    I compared the files in the WAR directory (AppData\Roaming\JDeveloper\system11.1.2.2.39.61.83.1\o.j2ee\drs\GCLD\GCLDWebWebApp.war\*.*. The directory was created when I run my app in the IDE) with the WAR file. The only difference I could find is the IDE added the following informatoin to the weblogic.xml (other files such as persistence.xml, web.xml, applicationContext.xml and library files are identical):
    <jsp-descriptor>
    <debug>true</debug>
    <working-dir>/D:/JDeveloper/mywork/GCLD/GCLDWeb/target/classes/.wlsjsps/</working-dir>
    <keepgenerated>false</keepgenerated>
    </jsp-descriptor>
    My persistence.xml is below. The datasource has been tested and working if I start my application in IDE.
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/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">
    <persistence-unit name="GCLDWeb">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>jdbc/GCLD-DS</jta-data-source>
    <class>gov.noaa.gcld.model.jpa.Users</class>
    <properties>
    <property name="eclipselink.logging.level" value="FINE"/>
    </properties>
    </persistence-unit>
    </persistence>
    I wonder what magic that the IDE did if I start my application in the IDE, could I resolve the issue in WAR/EAR file?
    Thanks for your help!

    Hi Shay,
    The datasource has been configured in the weblogic server. The issue is because I didn't specify the type of the entity manager. For some reason the persistence unit was calling the resource-local entity manager. The driver error has been fixed after I added "transaction-type" to the persistence-unit (see below):
    <persistence-unit name="GCLDWeb" transaction-type="JTA">
    However, the WAR file works only on a fresh start of the WebLogic server (no error encountered in the web application). If I undeploy then redeploy using the same WAR file, I get a very strange error:
    "gov.noaa.gcld.model.jpa.Users cannot be cast to gov.noaa.gcld.model.jpa.Users"
    The same entity bean cannot be cast to the same object. The error will disappear after I terminate the WebLogic server then do a fresh start. Some people said this might be a class loader issue. I wonder why the WLS couldn't close the entity manager or release the loaded manager class when we undeploy the application.
    Thanks very much for your help!

  • How to use Oracle Virtual Private Database (VPD) with EclipseLink JPA

    My project required to use VPD in database to isolate data access based on different user type. How can I use EclipseLink JPA with VPD? For instance, how I could set up server context in database for each database session? Thanks for any help.

    There is some information on Oracle proxy authentication here,
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Oracle/Proxy
    VPD usage would be very similar.
    James : http://www.eclipselink.org : http://en.wikibooks.org/wiki/Java_Persistence

  • CURRENT_DATE  in EclipseLink/JPA

    When I use CURRENT_DATE in JPA queries for date comparisions, it seems to be taking time into consideration as well. So when I comapre a date with CURRENT_DATE, even though the date I am comparing is today's date, the results state that CURRENT_DATE is greater because it takes the current time into consideration. Based on docs CURRENT_DATE in JPA queries is for Date only.
    CURRENT_DATE: Returns the current date.
    CURRENT_TIME: Returns the current time.
    CURRENT_TIMESTAMP: Returns the current timestamp.
    http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e13946/ejb3_overview_query.html
    My query
    SELECT a FROM Approval a WHERE a.dateRange.endDate >= CURRENT_DATE
    In this case even though the endDate is todays's date, I get no results back because the end date has only date while the CURRENT_DATE has teh current time stamp as well.
    I would gretaly appreciate it if anyone has some ideas about this and can help me.

    What database are you running against? The platform should be auto-detected but you may need to set the property "eclipselink.target-database" in your persistence.xml file.

  • EclipseLink JPA 2: Missing Descriptor

    Hi All,
    I have a SessionBean that, when initialized, also initializes a LookupJpaController class. Here is the code for LookupJpaController:
    public class LookupJpaController {
    private static final String _QueryGetLookupForUI =
    "SELECT l "
    + "FROM lookup l "
    + "WHERE l.lookup_type = :LookupType "
    + "AND lookup_domain = :Domain";
    public List<SelectItem> getLookupForUI(enumLookupType lookupType, String domain) throws Exception {
    if (domain == null || domain.trim().equals(""))
    throw new Exception("Parameter domain cannot be null or empty.");
    else if (!this.isInitialized())
    throw new Exception("Entity Manager not set.");
    Query query = this._EM.createNativeQuery(_QueryGetLookupForUI, Lookup.class);
    query.setParameter("LookupType", lookupType.toString());
    query.setParameter("Domain", domain.trim());
    List<SelectItem> selectItems = null;
    List<Lookup> lookupList = (List<Lookup>) query.getResultList();
    if (lookupList == null || lookupList.size() < 1)
    return null;
    else {
    selectItems = new ArrayList<SelectItem>(lookupList.size());
    for (Lookup lookUp : lookupList) {
    selectItems.add(new SelectItem(lookUp.getLookupValue(), lookUp.getLookupName()));
    return selectItems;
    When LookupJpaController is called with the following parameters ("Global", "Compound/Project Code"), it fails with the following exception:
    Caused by: Exception [EclipseLink-6007] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.QueryException
    Exception Description: Missing descriptor for [class Novartis.OTM.Data.Db.Entities.Lookup].
    Query: ReadAllQuery(referenceClass=Lookup sql="SELECT l FROM lookup l WHERE l.lookup_type = :LookupType AND lookup_domain = :Domain")
    at org.eclipse.persistence.exceptions.QueryException.descriptorIsMissing(QueryException.java:433)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.checkDescriptor(ObjectLevelReadQuery.java:660)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.prePrepare(ObjectLevelReadQuery.java:1895)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.checkPrePrepare(ObjectLevelReadQuery.java:748)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.checkEarlyReturn(ObjectLevelReadQuery.java:681)
    at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:619)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:958)
    at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:432)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1021)
    at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2857)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1225)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1207)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181)
    at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:453)
    at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:681)
    at Novartis.OTM.Data.Db.Controllers.LookupJpaController.getLookupForUI(LookupJpaController.java:92)
    at Novartis.OTM.Data.DataManager.getLookupForUI(DataManager.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
    at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
    at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
    at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
    at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
    at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
    at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
    at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:139)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)
    at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
    at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
    at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
    at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:201)
    ... 81 more
    I don't understand what is going on here as my entity Lookup is there and this code also jives with Pro JPA 2.0, written by Oracle gurus. Thanks!
    Chris
    Edited by: user10773481 on Feb 11, 2011 8:37 AM
    Edited by: user10773481 on Feb 11, 2011 8:43 AM
    Edited by: user10773481 on Feb 11, 2011 12:10 PM

    Chris,
    At first glance, your code looks fine. I assume that you are injecting your (this._EM) entityManager on your session bean via the @PersistenceContext DI annotation. If so can you verify that your entity is getting processed on the predeploy of your ear. Or check the metamodel on the EM or EMF (you don't need to enable JPA 2 in persistence.xml) and see if your model is loaded there correctly.
    From your logs and the fact that you are using SVN rev# 6600 (2.0.1.v20100213-r6600) - it looks like you are using GlassFish 3.0.1.
    The following changes to your persistence.xml will enable finer logs so that you can see metadata processing and verify that your descritors are being loaded (they should be if you are running on the container - unless you are using multiple locations)
          <property name="eclipselink.logging.level" value="FINEST"/>
          <!-- enable SQL parameter binding visibility logging to override ER 329852 -->
          <property name="eclipselink.logging.parameters" value="true"/>thank you
    Michael O'Brien
    http://www.eclipselink.org

  • Eclipselink Multitenancy problem

    We have a web application that should support multi tenancy. As persistence framework we want to user Eclipselkink with its Multitenant feature.
    Here are our requirements:
    - The web application should be container managed (JTA)
    - We want to use the single table approach. Each tenant entity becomes a tenant_id.
    - Admins are able to create tenants on the fly. That means each user was assigned to its tenant. On login we read the tenantId and pass it to the EntityManager.
    At the moment I have some transaction problems. I´ve injected the EntityManagerFactory with @PersistenceUnit annotation and pass the tenant id and the shared cache setting to the entity manager. Queries works fine but merge/persist of entities don´t work anymore. There is no exception. I think its a transaction problem.
    In a further version i used the @PersistenceContext and everything is works fine. But i think injection the persistence context is don´t allowed in "Persistence Context per Tenant" (see https://wiki.eclipse.org/EclipseLink/Examples/JPA/Multitenant)
    How could I use container managed transactions (persistence context) and tell the entity manager which tenant id it should use?
    Thanks for your answers.

    We have a web application that should support multi tenancy. As persistence framework we want to user Eclipselkink with its Multitenant feature.
    Here are our requirements:
    - The web application should be container managed (JTA)
    - We want to use the single table approach. Each tenant entity becomes a tenant_id.
    - Admins are able to create tenants on the fly. That means each user was assigned to its tenant. On login we read the tenantId and pass it to the EntityManager.
    At the moment I have some transaction problems. I´ve injected the EntityManagerFactory with @PersistenceUnit annotation and pass the tenant id and the shared cache setting to the entity manager. Queries works fine but merge/persist of entities don´t work anymore. There is no exception. I think its a transaction problem.
    In a further version i used the @PersistenceContext and everything is works fine. But i think injection the persistence context is don´t allowed in "Persistence Context per Tenant" (see https://wiki.eclipse.org/EclipseLink/Examples/JPA/Multitenant)
    How could I use container managed transactions (persistence context) and tell the entity manager which tenant id it should use?
    Thanks for your answers.

  • Moving to EclipseLink (SessionCustomizer problem)

    Hi,
    I moved from Toplink Essentials to EclipseLink with Tomcat 6.0.18 and have this problem:
    I created two web applications both uses EclipseLink. Due to using non-jta-datasources I created in both applications JPAEclipseLinkSessionCustomizer as shown here: http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial
    When I start one application everything works fine. As soon as I run the other application which uses EclipseLink I got exception:
    Exception [EclipseLink-28014] (Eclipse Persistence Services - 1.1.1.v20090430-r4097): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Exception was thrown while processing property (eclipselink.session.customizer) with value (hlaseni.JPAEclipseLinkSessionCustomizer).
    Internal Exception: java.lang.ClassCastException: hlaseni.JPAEclipseLinkSessionCustomizer cannot be cast to org.eclipse.persistence.config.SessionCustomizer
    Can anyone help?
    Thanks
    PERSISTENCE.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/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">
    <persistence-unit name="hlaseniPU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <non-jta-data-source>java:comp/env/jdbc/Hlaseni</non-jta-data-source>
    <class>hlaseni.entity.Zmeny</class>
    <exclude-unlisted-classes>true</exclude-unlisted-classes>
    <properties>
    <property name="eclipselink.session.customizer" value="hlaseni.JPAEclipseLinkSessionCustomizer"/>
    <property name="eclipselink.logging.level" value="INFO"/>
    </properties>
    </persistence-unit>
    </persistence>
    CLASS JPAEclipseLinkSessionCustomizer:
    package hlaseni;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import org.eclipse.persistence.config.SessionCustomizer;
    import org.eclipse.persistence.sessions.JNDIConnector;
    import org.eclipse.persistence.sessions.Session;
    public class JPAEclipseLinkSessionCustomizer implements SessionCustomizer {
    public void customize(Session session) throws Exception {
    JNDIConnector connector = null;
    Context context = null;
    try {
    context = new InitialContext();
    if (null != context) {
    connector = (JNDIConnector) session.getLogin().getConnector(); // possible CCE
    connector.setLookupType(JNDIConnector.STRING_LOOKUP);
    System.out.println("_JPAEclipseLinkSessionCustomizer: configured " + connector.getName());
    } else {
    throw new Exception("_JPAEclipseLinkSessionCustomizer: Context is null");
    } catch (Exception e) {
    e.printStackTrace();
    }

    Pavel,
    I was able to run EclipseLink JPA using a non-JTA datasource on Tomcat 6.0.18 using the following configuration.
    I will update the tutorial with this 3rd type of database connectivity.
    1) transaction-type RESOURCE_LOCAL direct connection using "javax.persistence.jdbc" properties - previously working
    2) transaction-type RESOURCE_LOCAL non-JTA datasource connection using "non-jta-data-source" or "javax.persistence.nonJtaDataSource" - verified today
    3) transaction-type JTA "jta-data-source" - working only when Tomcat is run as a service
    2) non-jta-datasource setup for persistence.xml, web.xml and server.xml
    Note: if the resource-ref setup is missing or if the jndi names do not match you will see "name not bound" exceptions
    persistence.xml
    <persistence-unit name="statJPA" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <non-jta-data-source>java:comp/env/ds/OracleDS</non-jta-data-source>
    <class>org.eclipse.persistence.example.unified.business.***</class>
    <properties>
    <property name="eclipselink.session.customizer" value="org.eclipse.persistence.example.unified.integration.JPAEclipseLinkSessionCustomizer"/>
    <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.oracle.OraclePlatform"/>
    <!-- this one overrides -->
    <property name="javax.persistence.nonJtaDataSource" value="java:comp/env/ds/OracleDS"/>
    <property name="eclipselink.logging.level" value="FINEST"/>
    </properties>
    </persistence-unit>
    JPAEclipseLinkSessionCustomizer.java
    - matches what is on
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial#Session_Customizer
    web.xml
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    <display-name>UnifiedTomcatWeb</display-name>
    <servlet>
    <display-name>FrontController</display-name>
    <servlet-name>FrontController</servlet-name>
    <servlet-class>org.eclipse.persistence.example.unified.presentation.FrontController</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>FrontController</servlet-name>
    <url-pattern>/FrontController</url-pattern>
    </servlet-mapping>
    <persistence-context-ref>
    <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
    <persistence-unit-name>statJPA</persistence-unit-name>
    </persistence-context-ref>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>ds/OracleDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    server.xml
    <GlobalNamingResources>
    <Resource
    name="ds/OracleDS"
    auth="Container"
    type="javax.sql.DataSource"
    maxActive="100"
    maxIdle="30"
    maxWait="10000"
    username="scott"
    password="pw"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:@y.y.y.y:1521:orcl"
    />
    </GlobalNamingResources>
    <Context
    className="org.apache.catalina.core.StandardContext"
    cachingAllowed="true"
    charsetMapperClass="org.apache.catalina.util.CharsetMapper"
    cookies="true" crossContext="false" debug="0"
    displayName="UnifiedTomcatWeb"
    docBase="C:\opt\tomcat6018\webapps\UnifiedTomcatWeb.war"
    mapperClass="org.apache.catalina.core.StandardContextMapper"
    path="/UnifiedTomcatWeb"
    privileged="false" reloadable="false"
    swallowOutput="false" useNaming="true"
    wrapperClass="org.apache.catalina.core.StandardWrapper">
    <ResourceLink
    global="ds/OracleDS"
    name="ds/OracleDS"
    type="javax.sql.DataSource"/>
    </Context>
    </Host>
    Logs:
    [EL Finest]: 2009-06-01 15:19:23.828--ServerSession(13961193)--Thread(Thread[http-8080-1,5,main])--property=javax.persistence.nonJtaDataSource; value=java:comp/env/ds/OracleDS
    [EL Finest]: 2009-06-01 15:19:23.844--ServerSession(13961193)--Thread(Thread[http-8080-1,5,main])--property=eclipselink.session.customizer; value=org.eclipse.persistence.example.unified.integration.JPAEclipseLinkSessionCustomizer
    _JPAEclipseLinkSessionCustomizer: configured java:comp/env/ds/OracleDS*+_
    [EL Info]: 2009-06-01 15:19:23.844--ServerSession(13961193)--Thread(Thread[http-8080-1,5,main])--EclipseLink, version: Eclipse Persistence Services - 2.0.0.qualifier
    [EL Config]: 2009-06-01 15:19:23.859--ServerSession(13961193)--Connection(6427893)--Thread(Thread[http-8080-1,5,main])--connecting
    (DatabaseLogin(
    platform=>OraclePlatform
    user name=> ""
    connector=>JNDIConnector datasource name=>java:comp/env/ds/OracleDS
    [EL Config]: 2009-06-01 15:19:24.327--ServerSession(13961193)--Connection(24968504)--Thread(Thread[http-8080-1,5,main])--Connected
    : jdbc:oracle:thin:@y.y.y.y:1521:orcl
    User: SCOTT
    Database: Oracle Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Driver: Oracle JDBC driver Version: 11.1.0.0.0-Beta5
    EL Info]: 2009-06-01 15:19:24.358--ServerSession(13961193)--Thread(Thread[http-8080-1,5,main])--file:/C:/opt/tomcat6018/webapps/UnifiedTomcatWeb/WEB-INF/classes/-statJPA login successful
    - user sends "demo" command to servlet....
    [EL Finer]: 2009-06-01 15:19:24.39--ServerSession(13961193)--Thread(Thread[http-8080-1,5,main])--client acquired
    [EL Finest]: 2009-06-01 15:19:24.39--UnitOfWork(13645178)--Thread(Thread[http-8080-1,5,main])--PERSIST operation called on: [email protected].
    [EL Finer]: 2009-06-01 15:19:24.483--UnitOfWork(13645178)--Thread(Thread[http-8080-1,5,main])--begin unit of work commit
    [EL Finer]: 2009-06-01 15:19:24.483--ClientSession(26548428)--Connection(16408563)--Thread(Thread[http-8080-1,5,main])--begin transaction
    [EL Finest]: 2009-06-01 15:19:24.499--ClientSession(26548428)--Thread(Thread[http-8080-1,5,main])--reconnecting to external connection pool
    [EL Finest]: 2009-06-01 15:19:24.499--UnitOfWork(13645178)--Thread(Thread[http-8080-1,5,main])--Execute query InsertObjectQuery([email protected])
    [EL Fine]: 2009-06-01 15:19:24.499--ClientSession(26548428)--Connection(26760685)--Thread(Thread[http-8080-1,5,main])--INSERT INTO
    STAT_LABEL (ID, DATE_STAMP) VALUES (?, ?)
    bind => [7127, null]
    thank you
    /michael

  • Config to use JPA 2.0 in eclipse for weblogic portal 10.3.2

    Hi,
    can anyone help me to config eclipse for WLP 10.3.2 for using JPA 2.0
    Thanks!

    Hi,
    The following EclipseLink JPA tutorial for WebLogic 10.3.2 (EclipseLink 1.2 is shipped in the modules directory on WebLogic) is Eclipse IDE based and includes details on getting your EAR deployed and debuggable via the Eclipse 3.4/3.5 EE edition IDE. This is via the WebLogic server plugin or via the OEPE. Source is included for all EAR, EJB and WAR projects as well as the SE DDL generation project to setup your database.
    The following tutorial and EclipseLink 2.0 wiki sites are the most current versions
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic
    thank you
    /michael
    http://www.eclipselink.org

  • EclipseLink persistence provider issue with weblogic 10.3

    Hi All,
    I have been trying to deploy and run an EAR in weblogic but when I run the application I get the following warning: WARNING: Found unrecognized persistence provider "org.eclipse.persistence.jpa.PersistenceProvider" in place of OpenJPA provider. This provider's properties will not be used.
    The following is my persistence.xml:
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_1_0.xsd" version="1.0">
    <persistence-unit name="default" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>DataSourceName</jta-data-source>
    <class>oracle.communications.platform.entity.impl.CharacteristicSpecificationDAO</class>
    <properties>
    <property name="eclipselink.logging.level" value="FINEST" />
    <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.oracle.OraclePlatform" />
    <property name="eclipselink.target-server" value="WebLogic_10" />
    <property name="eclipselink.session-event-listener" value="oracle.communications.platform.persistence.impl.PomsSessionEventListener" />
    <property name="eclipselink.session.customizer" value="oracle.communications.platform.util.EclipseLinkSessionCustomizer" />
    <property name="poms.cache.coordination.implementation" value="jms" />
    <property name="poms.cache.coordination.ipaddress" value="10.178.139.64" />
    <property name="poms.cache.coordination.port" value="7101" />
    <property name="poms.cache.coordination.multicast.group.address" value="226.10.12.64" />
    <property name="poms.cache.coordination.multicast.port" value="3121" />
    <property name="poms.cache.coordination.topic.connection.factory.name" value="EclipseLinkTopicConnectionFactory" />
    <property name="poms.cache.coordination.topic.name" value="EclipseLinkTopic" />
    <property name="poms.cache.coordination.username" value="weblogic" />
    <property name="poms.cache.coordination.password" value="weblogic" />
    <property name="poms.cache.coordination.password.encrypted" value="false" />
    </properties>
    </persistence-unit>
    </persistence>
    I have written a session customizer that reads properties from the persistence.xml and initializes stuff. But because of the warning i mentioned earlier... I am getting null for all property entries.
    I moved the eclipselink jar entry up ahead of openjpa jar entry in weblogic.server.modules_10.3.1.0.xml and refcount.xml in /modules/features directory. I am still getting the same problem.
    I read in many posts for workarounds for this issue but didnt find anything which worked for me. I would be grateful if someone could provide me a hint as to how to make it work.
    Thanks in advance,
    Prashanth.

    Prashanth,
    Hi, there should be no issue running EclipseLink on WebLogic while you see this warning. If you are getting null properties it may be the result of another issue, could you post specific exceptions and the part of your client code that is having a problem.
    1) The warning below normally appears only when running your persistence unit with an "application managed" JTA datasource as opposed to a "globally defined server scoped datasource". Even then it can be ignored as there are still parts of WebLogic that depend on OpenJPA. Even though the warning states that properties are ignored - they are not and you should see your persistence unit loaded properly.
    I encountered this issue when running an "application managed" JTA - here is an extract of the log showing the warning and the full functioning of the pu later - the persistence unit and example code can be found on the weblogic tutorial examples link below
    "[EL Finer]: 2008.10.29 13:03:55.565--ClientSession(30346337)--Thread(Thread[[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--client released
    WARNING: Found unrecognized persistence provider "org.eclipse.persistence.jpa.PersistenceProvider" in place of OpenJPA provider. This provider's properties will not be used.
    [EL Info]: 2008.10.29 13:03:56.079--ServerSession(14772987)--EclipseLink, version: Eclipse Persistence Services - 1.1.0 (Build 20081023)
    [EL Info]: 2008.10.29 13:03:56.391--ServerSession(14772987)--file:/C:/view_w34r1a/examples/org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEJB/build/classes/-exampleLocal login successful
    15 Entities in storage: 15
    [EL ExampleLocal EM]: enterprise: Object: [email protected]( id: 6 state: null parent: HashSet@15794734 references: HashSet@15794734)
    [EL ExampleLocal EM]: enterprise: Object: [email protected]( id: 26 state: null parent: HashSet@8800655 references: HashSet@8800655)
    I raised the following minor issue with our WebLogic Server team in Oct for reference - however this warning did not affect proper functioning of EclipseLink JPA.
    https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=7520161
    You may reference the following tutorial on running EclipseLink JPA on WebLogic 10.3, it details all the steps necessary to get a JTA container managed persistence unit running via a stateless session bean and a servlet client. It also details and links to application managed datasource configuration details.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    2) eclipselink.jar location in WebLogic?
    The eclipselink.jar library should stay in the modules or patch_* directory depending on whether you are running a standalone WebLogic server or as part of a Fusion Middleware JDeveloper environment.
    See the following link that details deployment options for WebLogic and EclipseLink
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#EclipseLink_JAR_location
    Note: I have not modified the load order of EclipseLink, OpenJPA or Kodo, I am running all including this version of OpenJPA in my modules directory. [org.apache.openjpa_1.0.0.0_1-1-1-SNAPSHOT.jar]
    3) I noticed that you are defining the target-database property in your persistence unti but you are running as JTA not RESOURCE_LOCAL. This property can be removed if your JTA datasource is defined as a Transactional server scoped datasource via the WebLogic console.
    thank you
    /michael
    http://www.eclipselink.org

  • JPA caching

    Greetings,
    Could somebody help me to find answer does EclipseLink JPA implementation NativeQuery cache results of stored procedure execuing like
    call get_entities(2,3,2);Is here some way to have stored procedures excection result cached with JPA otherwise?
    Greatest thanks in advance,

    Greetings Dvohra,
    Thank you for you reply, but I have notes Eclipselink manual covers NamedQueries and Queries only in the cache paragraph (I have no direct link right now to this material). Also here are no proofs of that kind Eclipselink could catch calling stored procedures of deleting database records and to make changes in cache needed like
    # delete from goods where id > 3 and id < 112;
    call delete_goods(3,112);Greetings Konstantin,
    Thank you for you reply - I have posted to Eclipse forum, but I still have no luck to get answers.
    Best regards,

  • Toplink / Eclipselink

    Hello,
    why should I use Toplink instead of Eclipselink (open source), if I am not going to use JDeveloper?
    Is there any advantage?
    Greetings.

    ecapella wrote:
    why should I use Toplink instead of Eclipselink (open source), if I am not going to use JDeveloper?Oracle TopLink includes more than just EclipseLink. TopLink ships with eclipseLink.jar, toplink.jar (for backwards compatibility), and toplink-grid.jar which provides EclipseLink JPA and Oracle Coherence integration (see [TopLink Grid|http://www.oracle.com/technology/products/ias/toplink/tl_grid.html] on OTN). Also, as part of TopLink certification, Oracle certifies releases of EclipseLink with Oracle WebLogic and other application servers, leading databases, and operating systems.
    The other key difference is that like for all other Oracle products, support is available for Oracle TopLink which also covers EclipseLink. However, EclipseLink is often only one part of a typical enterprise Java application and Oracle support engineering has the expertise across the entire EE stack that can be necessary when dealing with complex problems.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error while deploying a war file in Oracle Weblogic 10gr3 server

    Hi
    I am trying to deploy a web application which uses Hibernate 3 in Oracle weblogic 10gr3.But I am getting following exception.The same application gets deployed in tomcat without any problem.
    urce [WEB-INF/servicesContext.xml]: Cannot resolve reference to bean 'genericDao' while setting bean property 'genericDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'saasHibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, slaUsageOfTenant.bySlaCriterion, ServiceUsage.byCriterion, SLA.getSlaList, ServiceUsage.byTenantId.
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'autoMeteringInterceptor' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'validator' while setting bean property 'validator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'tenant.tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenant.tenantService' defined in ServletContext resource [WEB-INF/servicesContext.xml]: Cannot resolve reference to bean 'genericDao' while setting bean property 'genericDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'saasHibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, slaUsageOfTenant.bySlaCriterion, ServiceUsage.byCriterion, SLA.getSlaList, ServiceUsage.byTenantId
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:256)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
         at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
         at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
         at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:16)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'tenant.tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenant.tenantService' defined in ServletContext resource [WEB-INF/servicesContext.xml]: Cannot resolve reference to bean 'genericDao' while setting bean property 'genericDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'saasHibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, slaUsageOfTenant.bySlaCriterion, ServiceUsage.byCriterion, SLA.getSlaList, ServiceUsage.byTenantId
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:256)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:248)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
         at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
         at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
         at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:16)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Initially this application was giving me absolute path related errors.But when I made changes to applicationContext.xml as follows,giviing absolute path for Hibernate mapping files
    <property name="mappingDirectoryLocations">
         <list>
         *<value>file:D:\saas-mappings</value>*
         </list>
    </property>
    I have extrached all the *.hbm.xml file to above location that is D:\saas-mappings.But now the application is giving me above mentioned error.The error says that it is related to Named queries.I am pasting the contents of a sample *.hbm.xml file having named query as a sample
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping package="com.psl.saas.domain">
         <class name="TenantSlaUsage" table="tenantslausage_v2">
                   <id name="tenantId" column="tenantId">
                   </id>
                   <property name="maxValue">
                        <column name="maxValue"></column>
                   </property>
                   <property name="thresholdValue">
                        <column name="thresholdValue"></column>
                   </property>
                   <property name="slaType" column="slaType" type="com.psl.saas.dataservice.SaasEnumSlaType"/>
                   <many-to-one name="slaCriterion" class="SLACriterion" column="slaCriterionName" lazy="false" unique="true" />          
                   <property name="usageCount">
                   <column name="usageCount"></column>
                   </property>
         </class>
         *<query name="slaUsageOfTenant.bySlaCriterion">
              <![CDATA[from com.psl.saas.domain.TenantSlaUsage where tenantId=:tenantId and slaCriterionName=:slaCriterionName]]>
         </query>*
    </hibernate-mapping>
    Any help on this will be greatly appreciated
    Thanks in Advance
    -Sameer Gijare

    Hi,
    For a tutorial with source on how to create and deploy a simple quickstart JEE5 JPA enterprise 3-tier application on your Oracle WebLogic 10.3 server - see the following example that uses the EclipseLink JPA provider. You should be able to transition all of your mapping information (the @ManyToOne and table/column overrides and named queries for example) using either JPA via entity annotations or native extensions if you do not want to implement EJB3.
    see...
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    We also have a similar version for Tomcat 6 except the JPA entity beans run outside a container-managed JTA transaction on the web container - for reference.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial
    thank you
    /michael
    www.eclipselink.org

  • Error while running HRFacadeClient of JDev 11g Tutorial

    Hi,
    I was following the tutorial under Build a Web Application with JDeveloper 11g Using EJB, JPA, and JavaServer Faces
    Section 19 says to run application under OC4J,
    <strong>19.</strong> Right click the <strong>HRFacadeBean</strong> in the Application Navigator and select <strong>Run</strong> from the context menu to launch the facade bean in the Embedded OC4J sever.
    Curently OC4J not available under JDev 11g Production version, so it runs under Web-logic Server which comes with JDeveloper 11g. Please see the log below:
    Default Server - Log
    D:\Appl\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m
    WLS Start Mode=Development
    CLASSPATH=;D:\Appl\Oracle\MIDDLE~1\patch_wls1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\Appl\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\Appl\Oracle\MIDDLE~1\patch_cie660\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\Appl\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;D:\Appl\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.0.0.jar;D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\Appl\Oracle\MIDDLE~1\modules\ORGAPA~1.5/lib/ant-all.jar;D:\Appl\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;D:\Appl\Oracle\Middleware\jdeveloper\modules\features\adf.share_11.1.1.jar;;D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;;
    PATH=D:\Appl\Oracle\MIDDLE~1\patch_wls1030\profiles\default\native;D:\Appl\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\native;D:\Appl\Oracle\MIDDLE~1\patch_cie660\profiles\default\native;D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;D:\Appl\Oracle\MIDDLE~1\modules\ORGAPA~1.5\bin;D:\Appl\Oracle\MIDDLE~1\JDK160~1\jre\bin;D:\Appl\Oracle\MIDDLE~1\JDK160~1\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;D:\Appl\OraHome1\bin;D:\Appl\OraHome1\jlib;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Appl\Java\jdk1.6.0_01\bin;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files\Apache Software Foundation\Apache2.2\php\ext;D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
    Starting WLS with line:
    D:\Appl\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m -DproxySet=true -DproxyHost=192.0.20.100 -DproxyPort=800 -Dhttp.proxyHost=192.0.20.100 -Dhttp.proxyPort=800 "-Dhttp.nonProxyHosts=*.local|10.19.37.*|localhost|10.12.36.180|*.alshaya.com" -Dhttps.proxyHost=192.0.20.100 -Dhttps.proxyPort=800 "-Dhttps.nonProxyHosts=*.local|10.19.37.*|localhost|10.12.36.180|*.alshaya.com" -Djbo.34010=false -Xverify:none -da -Dplatform.home=D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server -Ddomain.home=D:\Appl\Oracle\MIDDLE~1\JDEVEL~1\system\SYSTEM~1.56\DEFAUL~1 -Doracle.home=D:\Appl\Oracle\Middleware\jdeveloper -Doracle.security.jps.config=D:\Appl\Oracle\MIDDLE~1\JDEVEL~1\system\SYSTEM~1.56\DEFAUL~1\config\oracle\jps-config.xml -Doracle.dms.context=OFF -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=D:\Appl\Oracle\MIDDLE~1\patch_wls1030\profiles\default\sysext_manifest_classpath;D:\Appl\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath;D:\Appl\Oracle\MIDDLE~1\patch_cie660\profiles\default\sysext_manifest_classpath -Dweblogic.Name=DefaultServer -Djava.security.policy=D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy weblogic.Server
    &lt;Oct 30, 2008 12:39:05 PM AST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000395&gt; &lt;Following extensions directory contents added to the end of the classpath:
    D:\Appl\Oracle\Middleware\patch_wls1030\profiles\default\sysext_manifest_classpath\weblogic_ext_patch.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\beehive_ja.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\beehive_ko.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_CN.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_TW.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ja.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ko.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_CN.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_TW.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\testclient_ja.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\testclient_ko.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_CN.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_TW.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ja.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ko.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_CN.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_TW.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\workshop_ja.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\workshop_ko.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_CN.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_TW.jar&gt;
    &lt;Oct 30, 2008 12:39:05 PM AST&gt; &lt;Info&gt; &lt;WebLogicServer&gt; &lt;BEA-000377&gt; &lt;Starting WebLogic Server with Java HotSpot(TM) Client VM Version 10.0-b19 from Sun Microsystems Inc.&gt;
    &lt;Oct 30, 2008 12:39:05 PM AST&gt; &lt;Info&gt; &lt;Management&gt; &lt;BEA-141107&gt; &lt;Version: WebLogic Server Temporary Patch for CR380042 Thu Sep 11 13:33:40 PDT 2008
    WebLogic Server Temporary Patch for 7372756 Fri Sep 12 17:05:44 EDT 2008
    WebLogic Server 10.3 Mon Aug 18 22:39:18 EDT 2008 1142987 &gt;
    &lt;Oct 30, 2008 12:39:06 PM AST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STARTING&gt;
    &lt;Oct 30, 2008 12:39:06 PM AST&gt; &lt;Info&gt; &lt;WorkManager&gt; &lt;BEA-002900&gt; &lt;Initializing self-tuning thread pool&gt;
    &lt;Oct 30, 2008 12:39:06 PM AST&gt; &lt;Notice&gt; &lt;Log Management&gt; &lt;BEA-170019&gt; &lt;The server log file D:\Appl\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log is opened. All server side log events will be written to this file.&gt;
    &lt;Oct 30, 2008 12:39:08 PM AST&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090082&gt; &lt;Security initializing using security realm myrealm.&gt;
    &lt;Oct 30, 2008 12:39:11 PM AST&gt; &lt;Warning&gt; &lt;Deployer&gt; &lt;BEA-149617&gt; &lt;Non-critical internal application uddi was not deployed. Error: [Deployer:149158]No application files exist at 'D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddi.war'.&gt;
    &lt;Oct 30, 2008 12:39:11 PM AST&gt; &lt;Warning&gt; &lt;Deployer&gt; &lt;BEA-149617&gt; &lt;Non-critical internal application uddiexplorer was not deployed. Error: [Deployer:149158]No application files exist at 'D:\Appl\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddiexplorer.war'.&gt;
    &lt;Oct 30, 2008 12:39:11 PM AST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STANDBY&gt;
    &lt;Oct 30, 2008 12:39:11 PM AST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STARTING&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;Log Management&gt; &lt;BEA-170027&gt; &lt;The Server has established connection with the Domain level Diagnostic Service successfully.&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to ADMIN&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to RESUMING&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Warning&gt; &lt;Server&gt; &lt;BEA-002611&gt; &lt;Hostname "ITDEV-39", maps to multiple IP addresses: 192.168.76.1, 192.168.153.1, 10.19.37.39, 127.0.0.1&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default[3]" is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default" is now listening on 192.168.76.1:7101 for protocols iiop, t3, ldap, snmp, http.&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default[2]" is now listening on 10.19.37.39:7101 for protocols iiop, t3, ldap, snmp, http.&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default[1]" is now listening on 192.168.153.1:7101 for protocols iiop, t3, ldap, snmp, http.&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000331&gt; &lt;Started WebLogic Admin Server "DefaultServer" for domain "DefaultDomain" running in Development Mode&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Warning&gt; &lt;Server&gt; &lt;BEA-002611&gt; &lt;Hostname "localhost", maps to multiple IP addresses: 192.168.76.1, 192.168.153.1, 10.19.37.39, 127.0.0.1&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to RUNNING&gt;
    &lt;Oct 30, 2008 12:39:12 PM AST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000360&gt; &lt;Server started in RUNNING mode&gt;
    DefaultServer startup time: 9953 ms.
    DefaultServer started.
    [Running application HR_EJB_JPA_App on Server Instance DefaultServer...]
    Uploading credentials.
    ---- Deployment started. ---- Oct 30, 2008 12:39:14 PM
    Target platform is (Weblogic 10.3).
    Running dependency analysis...
    2008-10-30 12:39:14.937: Writing EJB JAR file to D:\Appl\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\HR_EJB_JPA_App\HR_EJB_JPA_App-EJBModel-ejb
    2008-10-30 12:39:14.984: Wrote EJB JAR file to D:\Appl\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\HR_EJB_JPA_App\HR_EJB_JPA_App-EJBModel-ejb
    2008-10-30 12:39:16.078: Writing EAR file to D:\Appl\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\HR_EJB_JPA_App
    2008-10-30 12:39:16.093: Wrote EAR file to D:\Appl\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\HR_EJB_JPA_App
    Deploying Application...
    &lt;Oct 30, 2008 12:39:17 PM AST&gt; &lt;Warning&gt; &lt;J2EE&gt; &lt;BEA-160195&gt; &lt;The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application HR_EJB_JPA_App is not versioned.&gt;
    Oct 30, 2008 12:39:17 PM oracle.as.jmx.framework.PortableMBeanFactory setJMXFrameworkProviderClass
    INFO: JMX Portable Framework initialized with platform SPI "class oracle.as.jmx.framework.wls.spi.JMXFrameworkProviderImpl"
    &lt;Oct 30, 2008 12:39:18 PM AST&gt; &lt;Warning&gt; &lt;EJB&gt; &lt;BEA-012035&gt; &lt;The Remote interface method: 'public abstract java.util.List oracle.HRFacade.queryEmployeesFindByName(java.lang.Object)' in EJB 'HRFacade' contains a parameter of type: 'java.lang.Object' which is not Serializable. Though the EJB 'HRFacade' has call-by-reference set to false, this parameter is not Serializable and hence will be passed by reference. A parameter can be passed using call-by-value only if the parameter type is Serializable.&gt;
    &lt;Oct 30, 2008 12:39:18 PM AST&gt; &lt;Warning&gt; &lt;EJB&gt; &lt;BEA-012035&gt; &lt;The Remote interface method: 'public abstract java.lang.Object oracle.HRFacade.persistEntity(java.lang.Object)' in EJB 'HRFacade' contains a parameter of type: 'java.lang.Object' which is not Serializable. Though the EJB 'HRFacade' has call-by-reference set to false, this parameter is not Serializable and hence will be passed by reference. A parameter can be passed using call-by-value only if the parameter type is Serializable.&gt;
    &lt;Oct 30, 2008 12:39:18 PM AST&gt; &lt;Warning&gt; &lt;EJB&gt; &lt;BEA-012035&gt; &lt;The Remote interface method: 'public abstract java.lang.Object oracle.HRFacade.mergeEntity(java.lang.Object)' in EJB 'HRFacade' contains a parameter of type: 'java.lang.Object' which is not Serializable. Though the EJB 'HRFacade' has call-by-reference set to false, this parameter is not Serializable and hence will be passed by reference. A parameter can be passed using call-by-value only if the parameter type is Serializable.&gt;
    Application Deployed Successfully.
    Elapsed time for deployment: 4 seconds
    ---- Deployment finished. ---- Oct 30, 2008 12:39:19 PM
    Run startup time: 5063 ms.
    [Application HR_EJB_JPA_App deployed to Server Instance DefaultServer]
    <strong>20.</strong> Right click <strong>HRFacadeClient</strong> and select <strong>Run</strong> from context.
    Now when I run <strong>HRFacadeClient</strong> the log shows following error.
    EJBModel.jpr - log
    [EclipseLink/JPA Client] Adding Java options: -javaagent:D:\Appl\Oracle\Middleware\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar
    D:\Appl\Oracle\Middleware\jdk160_05\bin\javaw.exe -client -classpath C:\JDeveloper\mywork\HR_EJB_JPA_App\.adf;C:\JDeveloper\mywork\HR_EJB_JPA_App\EJBModel\classes;D:\Appl\Oracle\Middleware\jdeveloper\modules\oracle.toplink_11.1.1\toplink.jar;D:\Appl\Oracle\Middleware\jdeveloper\modules\oracle.toplink_11.1.1\antlr.jar;D:\Appl\Oracle\Middleware\modules\com.bea.core.antlr.runtime_2.7.7.jar;D:\Appl\Oracle\Middleware\modules\javax.persistence_1.0.0.0_1-0.jar;D:\Appl\Oracle\Middleware\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar;D:\Appl\Oracle\Middleware\jdeveloper\modules\oracle.xdk_11.1.1\xmlparserv2.jar;D:\Appl\Oracle\Middleware\jdeveloper\modules\oracle.xdk_11.1.1\xml.jar;D:\Appl\Oracle\Middleware\modules\javax.jsf_1.2.0.0.jar;D:\Appl\Oracle\Middleware\modules\javax.ejb_3.0.1.jar;D:\Appl\Oracle\Middleware\modules\javax.enterprise.deploy_1.2.jar;D:\Appl\Oracle\Middleware\modules\javax.interceptor_1.0.jar;D:\Appl\Oracle\Middleware\modules\javax.jms_1.1.1.jar;D:\Appl\Oracle\Middleware\modules\javax.jsp_1.1.0.0_2-1.jar;D:\Appl\Oracle\Middleware\modules\javax.jws_2.0.jar;D:\Appl\Oracle\Middleware\modules\javax.activation_1.1.0.0_1-1.jar;D:\Appl\Oracle\Middleware\modules\javax.mail_1.1.0.0_1-1.jar;D:\Appl\Oracle\Middleware\modules\javax.xml.soap_1.3.1.0.jar;D:\Appl\Oracle\Middleware\modules\javax.xml.rpc_1.2.1.jar;D:\Appl\Oracle\Middleware\modules\javax.xml.ws_2.1.1.jar;D:\Appl\Oracle\Middleware\modules\javax.management.j2ee_1.0.jar;D:\Appl\Oracle\Middleware\modules\javax.resource_1.5.1.jar;D:\Appl\Oracle\Middleware\modules\javax.servlet_1.0.0.0_2-5.jar;D:\Appl\Oracle\Middleware\modules\javax.transaction_1.0.0.0_1-1.jar;D:\Appl\Oracle\Middleware\modules\javax.xml.stream_1.1.1.0.jar;D:\Appl\Oracle\Middleware\modules\javax.security.jacc_1.0.0.0_1-1.jar;D:\Appl\Oracle\Middleware\modules\javax.xml.registry_1.0.0.0_1-0.jar;D:\Appl\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar -DproxySet=true -DproxyHost=192.0.20.100 -DproxyPort=800 -javaagent:D:\Appl\Oracle\Middleware\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar -Dhttp.proxyHost=192.0.20.100 -Dhttp.proxyPort=800 -Dhttp.nonProxyHosts=*.local|10.19.37.*|localhost|10.12.36.180|*.alshaya.com -Dhttps.proxyHost=192.0.20.100 -Dhttps.proxyPort=800 -Dhttps.nonProxyHosts=*.local|10.19.37.*|localhost|10.12.36.180|*.alshaya.com oracle.HRFacadeClient
    Exception in thread "main" java.lang.AssertionError: Can not find generic method public abstract java.util.List&lt;oracle.Departments&gt; queryDepartmentsFindAll() in EJB Object
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.getTargetMethod(RemoteBusinessIntfProxy.java:159)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:53)
    at $Proxy11.queryDepartmentsFindAll(Unknown Source)
    at oracle.HRFacadeClient.main(HRFacadeClient.java:15)
    Process exited with exit code 1.
    Please guide me how to solve this error and continue with tutorial...
    Regards,
    Santhosh

    Hi Heidi,
    I tried once again to install a fresh instance of Oracle soa suite 10.1.3.0 and upgraded it to 10.1.3.4 successfully. I did all the JDeveloper 11g installation and configure SOA process all successfully. I can create a connection to OC4J using 12401 RMI port successfully but none of my applications are deployed to server.
    This message is repeatedly displaying in messages tab:
    Exception returned by remote server: com.evermind.server.rmi.RMIConnectionException: Disconnected: oracle.oc4j.admin.management.shared.SharedModuleType. local class incompatible during deploy ...
    The default OC4J RMI port is 23791 but in my installation it is set to 12401 when I checked the Runtime Port option of Oracle Application Server and the connection is fine with this port but applications can not be deployed with this configuration.
    I can deploy applications on separate standalone OC4J instance successfully but not able to do it with my SOA application server.
    Any comments will be appreciated.
    Thanks again
    Esfand
    Edited by: user3788199 on Sep 8, 2008 6:50 AM

Maybe you are looking for