Removing entity

Hello
I am using Tomlink JPA as persistence provider for EJB3.
The problem has raised when I tried to remove some entities from a collection. As I have some exprience in Hibernate, I thought all the details entities will be removed when I remove them from the collection but soon I realized that in TopLink this is not the case.
now I am removing the entities individually, but the problem is that it seems the entity manager has removed the entities I declared but in database all the records are exists!!!
More stranger, in next execution the deleted entities are not loaded and everything seems ok but if I restart the application server all the removed data is coming back!!
after removing the entity I called entityManager.flush() and even I put TransactionAttribute for the value of REQUIRES_NEW but nothing has changed.
would you please help me on this problem?
thanks

Hi
I just found that, if I remove the REQUIRES_NEW from the delete() method of my DAO that works fine.
Would anyone explain me what happens here? As I have read, if you put REQUIRES_NEW the new transaction will start for that method and after exiting the method the transaction will be committed so my assumption is the data is visible to other transaction when it is going to read the same data (including removed records) but this is quite different from my understanding?

Similar Messages

  • TL11g & EJB3: One-to-Many problems with removing entity from list

    Hi,
    I posted this problem on JDev11g forum, but I hope I will get some information here as well.
    I have two entities based on tables in HR schema (Departments and Employees). Department has a list of employees. These are the annotations:
    @Entity
    public class Departments implements Serializable {
        @OneToMany(mappedBy = "departments", cascade = {CascadeType.ALL})
        private List<Employees> employeesList;
    @Entity
    public class Employees implements Serializable {
        @ManyToOne
        @JoinColumn(name = "DEPARTMENT_ID")
        private Departments departments;
    }On a test page, I have a master-detail tables that show all departments and employees in the selected department (drag&drop from data control), a button that removes selected employee from employeeList iterator, and a button that calls em.merge(department).
    The problem is that when I remove some employees from employeeList, on merge, the incoming entity, as well as the return result of the 'merge', are OK (the list doesn't contain the removed entities), but nothing is updated in the database, and no error is shown.
    Can anyone help me with this? I can send the test case if anyone is interested.
    Thanks,
    Pedja

    The transaction is Container Managed, but I did try with flushing the changes, but without success. Here is the log:
    [TopLink Finest]: 2008.08.06 04:31:25.431--ServerSession(27620915)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Execute query ReadAllQuery(model.Employees)
    [TopLink Finest]: 2008.08.06 04:31:25.431--ServerSession(27620915)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--reconnecting to external connection pool
    [TopLink Fine]: 2008.08.06 04:31:25.431--ServerSession(27620915)--Connection(21332891)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--SELECT EMPLOYEE_ID, LAST_NAME, COMMISSION_PCT, PHONE_NUMBER, SALARY, HIRE_DATE, FIRST_NAME, EMAIL, JOB_ID, MANAGER_ID, DEPARTMENT_ID FROM EMPLOYEES WHERE (DEPARTMENT_ID = ?)
         bind => [20]
    [TopLink Finest]: 2008.08.06 04:31:25.431--ServerSession(27620915)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Execute query ReadObjectQuery(model.Employees)
    [TopLink Finest]: 2008.08.06 04:31:25.431--ServerSession(27620915)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Execute query ReadObjectQuery(model.Departments)
    [TopLink Finest]: 2008.08.06 04:31:25.431--UnitOfWork(14721024)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Employees@3001c6
    [TopLink Finest]: 2008.08.06 04:31:25.431--UnitOfWork(14721024)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Employees@1f7d08a
    [TopLink Finest]: 2008.08.06 04:31:25.431--UnitOfWork(14721024)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Employees@3001c6
    [TopLink Finest]: 2008.08.06 04:31:25.431--UnitOfWork(14721024)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Departments@1b21b91
    [TopLink Finer]: 2008.08.06 04:31:36.836--ServerSession(27620915)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--client acquired
    [TopLink Finer]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--TX binding to tx mgr, status=STATUS_ACTIVE
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Merge clone with references model.Departments@1c49e79
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Employees@3001c6
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Employees@aa10a9
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Departments@12c0836
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Employees@aa10a9
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Departments@1b21b91
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Employees@3001c6
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Employees@1f7d08a
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Employees@3001c6
    [TopLink Finest]: 2008.08.06 04:31:36.836--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Register the existing object model.Departments@1b21b91
    [TopLink Finer]: 2008.08.06 04:31:38.711--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--TX beforeCompletion callback, status=STATUS_ACTIVE
    [TopLink Finer]: 2008.08.06 04:31:38.711--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--begin unit of work commit
    [TopLink Finer]: 2008.08.06 04:31:38.711--ClientSession(2685953)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--TX beginTransaction, status=STATUS_ACTIVE
    [TopLink Finest]: 2008.08.06 04:31:38.711--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--Execute query UpdateObjectQuery(model.Departments@776fc0)
    [TopLink Finer]: 2008.08.06 04:31:38.711--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--TX afterCompletion callback, status=COMMITTED
    [TopLink Finer]: 2008.08.06 04:31:38.805--UnitOfWork(631279)--Thread(Thread[HTTPThreadGroup-1,9,HTTPThreadGroup])--end unit of work commitThanks,
    Pedja

  • EJB3: One-to-Many problems with removing entity from list

    Hi,
    I have two entities based on tables in HR schema (Departments and Employees). Department has a list of employees. These are the annotations:
    @Entity
    public class Departments implements Serializable {
        @OneToMany(mappedBy = "departments", cascade = {CascadeType.ALL})
        private List<Employees> employeesList;
    @Entity
    public class Employees implements Serializable {
        @ManyToOne
        @JoinColumn(name = "DEPARTMENT_ID")
        private Departments departments;
    }On a test page, I have a master-detail tables that show all departments and employees in the selected department (drag&drop from data control), a button that removes selected employee from employeeList iterator, and a button that calls em.merge(department).
    The problem is that when I remove some employees from employeeList, on merge, the incoming entity, as well as the return result of the 'merge', are OK (the list doesn't contain the removed entities), but nothing is updated in the database, and no error is shown.
    Can anyone help me with this? I can send the test case if anyone is interested.
    Thanks,
    Pedja

    Hi,
    I have two entities based on tables in HR schema (Departments and Employees). Department has a list of employees. These are the annotations:
    @Entity
    public class Departments implements Serializable {
        @OneToMany(mappedBy = "departments", cascade = {CascadeType.ALL})
        private List<Employees> employeesList;
    @Entity
    public class Employees implements Serializable {
        @ManyToOne
        @JoinColumn(name = "DEPARTMENT_ID")
        private Departments departments;
    }On a test page, I have a master-detail tables that show all departments and employees in the selected department (drag&drop from data control), a button that removes selected employee from employeeList iterator, and a button that calls em.merge(department).
    The problem is that when I remove some employees from employeeList, on merge, the incoming entity, as well as the return result of the 'merge', are OK (the list doesn't contain the removed entities), but nothing is updated in the database, and no error is shown.
    Can anyone help me with this? I can send the test case if anyone is interested.
    Thanks,
    Pedja

  • Remove Entity from ERD Diagram

    I have an ERD diagram with several entities on it. I have also
    included an entity from another container on that diagram. But
    no matter what I do, I cannot remove the included entity from
    the diagram without deleting the entire entity.
    How do I get rid of the entity on my ERD diagram without
    deleting the entity? I've tried checking out/in every
    combination of owning container, owning diagram, the entity
    itself. I never get an option to delete the reference from my
    diagram. I've been doing all this in RON. The erd diagrammer
    tool only gives me the option to delete the whole entity.

    Did you try to cut it? that is, you should Ctrl+X if you want
    to get rid of an entity only from your ERD.

  • Can't persist removed entity

    I have a problem with toplink. I'm using Glassfish as my application server.
    The problem is that i get an exception when i try to persist an object a second time after just having removed the first one. More specifically, i call methodes in the following order:
    AccountAdminDaoLocal adminDAO; // this is a local bean interface
    AccountManagementLocal accman; // this is a local bean interface
    AdvertiserAccount acc = accman.createAdvertiserAccount("name");
    AccountAdmin admin = adminDAO.createAccountAdmin("login", "password", acc);
    adminDAO.removeAccountAdmin(admin.getName());
    admin = adminDAO.createAccountAdmin("login", "password", acc);
    The last call gives this exception:
    root cause
    javax.persistence.EntityExistsException:
    Exception Description: Cannot persist detached object [entities.users.AdvertiserAdmin[id=login]].
    Class> snailcard.entities.users.AccountAdmin Primary Key> [login]
    root cause
    Exception [TOPLINK-7231] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: Cannot persist detached object [entities.users.AdvertiserAdmin[id=login]].
    Class> snailcard.entities.users.AccountAdmin Primary Key> [login]
    I also get the same exception with remote interfaces. Using merge instead of persist fixes the exeption however the AccountAdmin is not added to the database the second time.
    Methods:
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public AccountAdmin createAccountAdmin(String login, String password, AdvertiserAccount account) throws EntityExistsCheckedException, IllegalArgumentException {
    if (entityManager.find(AccountAdmin.class, login) == null) {
    AccountAdmin admin = new AccountAdmin();
    admin.setName(login);
    admin.setPassword(password);
    admin.setCreationDate(new Date());
    if (account != null) {
    account = entityManager.find(AdvertiserAccount.class, account.getName());
    account.getAccountAdmins().add(admin);
    admin.setAdvertiserAccount(account);
    Group group = entityManager.find(Group.class, "AccountAdmins");
    group.getRegisteredUsers().add(admin);
    //admin = entityManager.merge(admin);
    entityManager.persist(admin);
    return admin;
    } else {
    throw new IllegalArgumentException("AdvertiserAccount not found");
    } else {
    throw new EntityExistsCheckedException("AccountAdmin Exists");
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public void removeAccountAdmin(String login) throws EntityNotFoundCheckedException {
    AccountAdmin admin = entityManager.find(AccountAdmin.class, login);
    if (admin != null) {
    entityManager.remove(admin);
    } else {
    throw new EntityNotFoundCheckedException("Not found");
    Entities have the following relationship:
    @ManyToOne
    public AdvertiserAccount getAdvertiserAccount() {
    return advertiserAccount;
    @OneToMany(cascade = {CascadeType.REMOVE, CascadeType.REFRESH}, mappedBy = "advertiserAccount")
    public Collection<AccountAdmin> getAccountAdmins() {
    return this.accountAdmins;
    Message was edited by:
    user633287
    null
    Message was edited by:
    user633287
    incomplete exception

    Update:
    Restructuring the create-method solved that the element wasn't saved in the database the second time.
    public AccountAdmin createAccountAdmin(String login, String password, AdvertiserAccount account) throws EntityExistsCheckedException, IllegalArgumentException {
    if (entityManager.find(AccountAdmin.class, login) == null) {
    AccountAdmin admin = new AccountAdmin();
    admin.setName(login);
    admin.setPassword(password);
    admin.setCreationDate(new Date());
    account = entityManager.find(AdvertiserAccount.class, account.getName());
    if (account != null) {
    admin = entityManager.merge(admin);
    account.getAccountAdmins().add(admin);
    admin.setAdvertiserAccount(account);
    Group group = entityManager.find(Group.class, "AccountAdmins");
    group.getRegisteredUsers().add(admin);
    admin.getGroups().add(group);
    entityManager.persist(admin);
    return admin;
    } else {
    throw new IllegalArgumentException("AdvertiserAccount not found");
    } else {
    throw new EntityExistsCheckedException("AccountAdmin Exists");
    }

  • I still can load to entities that were remove from Org in Enterprise 6.3.1

    I had to delete entities from my application in Enteprise 6.3.1. I went to entities select the ones I needed to removed and Edit > Remove Entity. Then I went to Task > Unowned Entities > Purge Unowned Entities. After I ran a report to confirm that all my Unowned Entities. The report was empty.
    I made a test and try to load data in the entities I removed. I was able to load data to does entities even I I removed them and I can't see them from the Unowned Entities report.
    I extract the whole application and then open it in a text editor. I was able to find the entities in the [Entity] portion only.
    Why I can't see them anywhere from the Entity module in enterprise? Is it a Bug?

    I had entities that were removed from the hierarchy with jouyrnal still posted in those entities.

  • Abstract Entity classes with Collections

    I trying to figure out a way to have a generics collection in a parent collection that can hold various entity types of the same super-class.
    One thing I've tried was the following:
    @Entity
    public class ParentEnt implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @GeneratedValue(strategy = GenerationType.AUTO)
        private Long id;
        @Column
        private String parentName;
        @OneToMany(mappedBy="parentEnt")
        private Collection<ChildAbs> children;
        /* Methods removed */
    @Entity
    public abstract class ChildAbs implements java.io.Serializable {
        protected static final long serialVersionUID = 1L;
        @Id
        protected Long id;
        @ManyToOne
        protected ParentEnt parentEnt;
        /* Methods removed */
    @Entity
    public class ChildEnt extends ChildAbs implements Serializable {
        @Column
        protected String childName;
    }but this is the error I get:
    Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7
    Internal Exception: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
    Exception Description: predeploy for PersistenceUnit [testPU] failed.
    Internal Exception: Exception [TOPLINK-7250] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: [class test.ParentEnt] uses a non-entity [class test.ChildAbs] as target entity in the relationship attribute [private java.util.Collection test.ParentEnt.children].So, it looks like there is no way to have a generics collection for an abstract entity class. Is there another way to accomplish what I want using a generics collection?
    Additionally, entity ChildEnt generates an error due to the abstract class' id property not carrying forward (see Abstract Entities: http://java.sun.com/javaee/5/docs/tutorial/doc/bnbqa.html#bnbqo)
    Exception Description: Entity class [class testprintservices.ChildEnt] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass.Any input would be appreciated.

    As far as my first question, I was trying to make my collection so it can hold various type of entity classes, but now that I think about it, it was a bad idea. For instance, being able to hold ChildEnt and ChildEnt2 in the same collection. If JPA did allow this, it might be possible to save the entities to the DB, but the reverse wouldn't be possible.
    Ok, regarding my 2nd question: I don't understand why having it as @Entity wouldn't. The links (mine and yours) clearly shows that @Id is carried forward in the example they provide. Anyway, since I can't use the superclass in the collection, this is pointless. I'll use the suggested annotation.
    Thanks.

  • How to delete a row from database table in facade client

    Hi all,
    I followed the tutorial in creating a persistence entity from database table, then a session facade. Then I followed the tutorial to create a sample client to test the model. In the session facade, I could use persistEntity method to insert a record to the database. I am just thinking of an extension to the tutorial, i.e., being able to delete the record too. So I created a new method removeEntity in the session facade
    public void removeEntity(Object entity) {
    entity=em.merge(entity);
    em.remove(entity);
    em.flush();
    and called it in the sample client. It was executed without any error, but the record in the table still exists.
    I tried to look around for a solution, but I did not find one. Would anybody here please help out? Many thanks in advance!

    Hi Frank,
    I tried the code snippet, but I got the following exception when executing this code:
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
         java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.; nested exception is: java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.
    java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.
         at weblogic.deployment.BasePersistenceContextProxyImpl.validateInvocation(BasePersistenceContextProxyImpl.java:121)
         at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:86)
         at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:91)
         at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:80)
         at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:26)
         at $Proxy141.getTransaction(Unknown Source)
         at model.SessionEJBBean.removeEntity(SessionEJBBean.java:60)
         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.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:55)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy143.removeEntity(Unknown Source)
         at model.SessionEJB_qxt9um_SessionEJBImpl.removeEntity(SessionEJB_qxt9um_SessionEJBImpl.java:142)
         at model.SessionEJB_qxt9um_SessionEJBImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
         java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.; nested exception is: java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
         at $Proxy0.removeEntity(Unknown Source)
         at model.SessionEJBClient.main(SessionEJBClient.java:71)
    Caused by: java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.
         at weblogic.deployment.BasePersistenceContextProxyImpl.validateInvocation(BasePersistenceContextProxyImpl.java:121)
         at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:86)
         at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:91)
         at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:80)
         at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:26)
         at $Proxy141.getTransaction(Unknown Source)
         at model.SessionEJBBean.removeEntity(SessionEJBBean.java:60)
         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.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:55)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy143.removeEntity(Unknown Source)
         at model.SessionEJB_qxt9um_SessionEJBImpl.removeEntity(SessionEJB_qxt9um_SessionEJBImpl.java:142)
         at model.SessionEJB_qxt9um_SessionEJBImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Process exited with exit code 0.

  • How-To "Refresh a table of data after inserting or deleting"

    I'd like to say a word on the how-to article "How to refresh a table of data after inserting or deleting a row using ADF".
    (http://www.oracle.com/technology/products/jdev/howtos/1013/updtable/index.html?_template=/ocom/technology/content/print)
    I spent a lot of time on it because I needed help in implementing simple CRUD functionality on a table, using JSF-ADF-TopLink technologies.
    While the the article does provide correct steps, it is in one important place not specific enough, so the reader may easily get stuck. In section "Refresh the data table", point 1: when you double click on the removeEntity() button, in Structure window, then you do not get the required dialog. You get CommandButton Properties dialog.
    You must click on the removeEntity() button in Editor's Design view. But even there you may get the CommandButton Properties dialog, not managed beans dialog.
    You may resolve that by going to JSF configuration file, faces-config.xml, and switch to Overview view. This will show you the managed beans that you have.
    Then, you may already have a backing bean for the page. You can use that and avoid creating a new managed bean.
    I could understand what the operations mean only after very careful reading of "Creating More Complex Pages", section "Overriding Declarative Methods" in JDeveloper Help (or in ADF Developer's Guide PDF document).
    In general: I believe that "ADF bindings" need more conceptual explanation, maybe in form of an article. Grammatical form "bindings" may create a false understanding that "bindings" are just references. But they are not -- ADF bindings are active objects that handle traffic between UI components and Data Controls. It seems that "bindings" even communicate among themselves. Maybe it would be more understandable to differentiate strictly between "binding objects" (or "binders"?), binding object definitions and binding object references.
    It would be very helpful to have a diagram showing grahically what specific binder objects are created in a small apllication (2-3 pages using 1-2 tables), with whom they communicate and what type of data is passed on.
    Priit

    Hi
    Thanks for your infos.
    Yes exactly I use almost the same code you have post here.
    Could You answer to my next questions?
    First - >what do you mean by saying that "it's not good idea using refreshing in IE?" Of course I use refreshing in backing_bean for my button "remove" that removes row, commit changes to database and refresh table, almost the same as You said in your post:
    Code in backing_bean is and comments on difference to Your code is below:
    public commandButton2_action1(){
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("removeEntity");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    //above remove entity, but I dont now if it do commit to database? So i do it below
    OperationBinding commit1 = bindings.getOperationBinding("Commit");
    commit1.execute();
    //and at the end I refresh my table, "findAllRezerwacja1 - it is an id of the methodAction, not the iterator -> is it ok? or should I change to Iterator id?
    OperationBinding requery = bindings.getOperationBinding("findAllRezerwacja1");
    requery.execute();
    return null;
    Page Definition code for this:
    <methodAction id="findAllRezerwacja1"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="findAllRezerwacja"
    RequiresUpdateModel="true" Action="999"
    ReturnName="SessionEJBLocal.methodResults.SessionEJBLocal_dataProvider_findAllRezerwacja_result"/>
    <table id="findAllRezerwacja2" IterBinding="findAllRezerwacja1Iter">
    <AttrNames>
    <Item Value="dataDo"/>
    <Item Value="dataOd"/>
    <Item Value="idRezerwacja"/>
    <Item Value="liczbaUczestnikow"/>
    <Item Value="prowadzacy"/>
    <Item Value="uwagi"/>
    </AttrNames>
    </table>
    <methodAction id="removeEntity" InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="removeEntity"
    RequiresUpdateModel="true" Action="999">
    <NamedData NDName="entity"
    NDValue="${bindings.findAllRezerwacja2.currentRow.dataProvider}"
    NDType="java.lang.Object"/>
    </methodAction>
    <action id="Commit" IterBinding="findAllRezerwacja1Iter"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" RequiresUpdateModel="true"
    Action="2"/>
    </bindings>
    //and rest of code for Iterator etc
    My second question is, why when you use refresh button in IE (I know is not recommended as You said, but sometimes user do it, so I want prevent situations that I will describe here) so when I press refresh button in IE exactly after removing one row by clicking my button, refreshing by pressing IE button is doing the same --> is deleting next row. How to stop deleting row, when for example user would press IE refresh button after pressing remove button for table. If I change selection in table after deleting row, and press refresh button in IE, instead of deleting row, I got error message: JBO-29000: JBO-35007: and
    JBO-35007. So where Im doing wrong. Maybe I should do sth with postback ? Could You help me? Thanks in advance
    Last one question: what is the difference between using delete and removeEntity from operations node? Im now reading carefully ADF Dev Guide, so I hope I can find infos there? But if You know, please answer to this question.
    Thanks

  • How to catch Exception in backingbean which is thrown from the Model layer.

    Hi,
    JDev Ver: 11.1.1.2.0
    In my application there are two layer viewcontroller & model.
    In model layer I have created JPA service facade which does the database operation like persist, merge & remove entity.
    I am calling this service facade method from backing bean via below standard code.
    public static Object invokeMethod(String methodName, String mapKey,
    Object object){
    BindingContext bcx =
    DCUtil.getBindingContext((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest());
    JUFormBinding bc1 = (JUFormBinding)bcx.getCurrentBindingsEntry();
    FacesCtrlActionBinding reassignOperationBinding =
    (FacesCtrlActionBinding)bc1.findControlBinding(methodName);
    if (mapKey != null && object != null) {
    Map params = reassignOperationBinding.getParamsMap();
    params.put(mapKey, object);
    Object result = reassignOperationBinding.execute();
    return result;
    This is a static method which I am calling from backingbean to invoke service facade persist, merge or remove entity method
    I have written throws in all the methods signature of service facade.
    The exception which is thrown from the service facade are not comming back to backingbean catch block.
    Is there any way to catch this exception in backingbean.
    regards,
    devang

    Hi,
    2 things to check
    1 - does reassignOperationBinding has errors. You can check on the component
    2 - does the exception show on the binding layet. See the Fusion Developer guide for how to define an error handler on the databindings.cpx file
    Frank

  • Running 5.5 U2e and VUM will no longer download software packages from patch source?

    We had a vSphere 5.5 cluster configured for us by a 3rd-party through Dell as part of our purchase agreement. We are running vCenter Server 5.5 U2e on Windows 2012 R2 as a physical host. It does run Update Manager. In my most recent check today, Update Manager will scan a host and report patches that are needed. In this case we're at 5.5.0 Build 2456374 on our ESXi hosts. Update Manager detects 5 missing patches. After I put the host in maintenance mode, I remediate, select the patch group, and proceed through the screens. It starts its process and goes from 0% to 16% to 25% then sits there for about 1–3 minutes, then goes to 90%, 91%, and errors out saying:
    "Cannot download software packages from patch source. Check the events and the Update Manager log for download details."
    Multiple strange things:
    This server was updating just fine a few months back when some previous patches were released.
    It can see the internet just fine. No firewall issues.
    Our failover site on the same network, but in a different location in the city is able to update just fine. Same hardware, network, and software versions.
    Any ideas on where to look or what to try? I had gone ahead and update from vCenter Server 5.5 U2b to U2e (along with a VUM reinstall) hoping that would fix it, but it did not. Any help would be greatly appreciated, because we're not VMware experts and thought everything was set up correctly by the vendor. We were given a small amount of knowledge transfer, but nothing that would allow us to troubleshoot this.
    The Update Manager config listed in vCenter Server points to just three sources, that look to be the default from hostupdate.vmware.com and vapp-updates.vmware.com. None of the settings have been changed from the initial install and configuration that were working at one point in the last few months (when I last patched the hosts to 2456374).
    Looking through the vmware-vum-server-log4cpp.log I see these failures:
    [2015-05-06 16:17:33:039 'JobDispatcher' 6068 DEBUG]  [JobDispatcher, 405] The number of tasks: 11
    [2015-05-06 16:17:38:642 'DownloadMgr' 2448 DEBUG]  [downloadMgr, 545] Url: https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib, Download destination: C:/ProgramData/VMware/VMware Update Manager/Data/hostupdate/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib
    [2015-05-06 16:17:38:642 'DownloadMgr' 2448 DEBUG]  [downloadMgr, 396] Inserted download job {45798736} to queue
    [2015-05-06 16:17:38:642 'DownloadMgr' 2448 DEBUG]  [downloadMgr, 416] Current download count: 0
    [2015-05-06 16:17:38:642 'DownloadMgr' 2448 DEBUG]  [downloadMgr, 432] Current download count: 1
    [2015-05-06 16:17:38:642 'DownloadMgr' 2448 DEBUG]  [downloadMgr, 438] Adding download job {45798736} to scheduler
    [2015-05-06 16:17:38:642 'DownloadMgr' 2448 DEBUG]  [downloadMgr, 458] Waiting for download job {45798736} to finish...
    [2015-05-06 16:17:38:643 'DownloadMgr' 6364 INFO]  [downloadMgr, 593] Executing download job {45798736}, url=https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib
    [2015-05-06 16:17:38:644 'httpDownload' 6364 INFO]  [httpDownload, 556] Downloading https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib
    [2015-05-06 16:17:39:501 'httpDownload' 6364 INFO]  [httpDownload, 791] Status code: 404
    [2015-05-06 16:17:39:501 'httpDownload' 6364 ERROR]  [httpDownload, 827] Error retrieving document 'https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib'. Status code: 404
    [2015-05-06 16:17:39:502 'httpDownload' 6364 WARN]  [httpDownload, 420] Download https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib failed: Error retrieving document 'https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib'. Status code: 404
    [2015-05-06 16:17:39:502 'httpDownload' 6364 ERROR]  [httpDownload, 435] Reached retry download limit
    [2015-05-06 16:17:39:503 'DownloadMgr' 6364 ERROR]  [downloadMgr, 618] Executing download job {45798736} throws error: Reached retry download limit
    [2015-05-06 16:17:39:503 'DownloadMgr' 6364 ERROR]  [downloadMgr, 705] Download failed for url: https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib
    [2015-05-06 16:17:39:503 'DownloadMgr' 6364 INFO]  [downloadMgr, 567] Download job {45798736} finished, bytes downloaded = 0
    [2015-05-06 16:17:39:503 'DownloadMgr' 2448 DEBUG]  [downloadMgr, 464] Download job {45798736} finished
    [2015-05-06 16:17:39:503 'DownloadMgr' 2448 DEBUG]  [downloadMgr, 477] Removing download job {45798736} in queue
    [2015-05-06 16:17:39:503 'DownloadMgr' 2448 DEBUG]  [downloadMgr, 496] Current download count: 0
    [2015-05-06 16:17:39:504 'HostUpdateDepotManager' 2448 ERROR]  [vibDownloaderImpl, 402] Error downloading vib file from https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib Error:downloading file: https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib failed, 0 bytes downloaded.
    [2015-05-06 16:17:39:504 'HostUpdateDepotManager' 2448 ERROR]  [vibDownloaderImpl, 418] Downloading file failed for: https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib
    [2015-05-06 16:17:39:504 'HostUpdateDepotManager' 2448 WARN]  [vibDownloaderImpl, 440] Failed to download 1 VIBs:
    https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib,
    [2015-05-06 16:17:39:504 'HostUpdateDepotManager' 2448 ERROR]  [patchDepotManager, 466] Failed to download the vibs: https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/esx-base/VMware_bootbank_esx-base_5.5.0-2.62.2702864.vib
    [2015-05-06 16:17:39:504 'HostUpdateDepotManager' 2448 ERROR]  [installController, 349] Install on host: <HOST FQDN REMOVED>(Entity: host-16) failed. Error: Failed to download Vibs
    [2015-05-06 16:17:39:548 'SingleHostRemediateTask.SingleHostRemediateTask{29}' 2448 ERROR]  [singleHostRemediateTask, 492] Remediation error: Failed to download Vibs
    [2015-05-06 16:17:39:571 'VciTaskBase.VciClusterJobDispatcherTask{25}' 2448 INFO]  [vciClusterJobSchedulerTask, 613] Remediation failed due to non mmode failure

    Well, apparently this patch / vib was pulled after release, based on issues with "VMware NSX for vSphere 6.x or Cisco Nexus 1000v" as seen in KB2116370: VMware KB: After upgrading to VMware ESXi 5.5 Patch Release ESXi550-201504002, virtual machines using VMware NSX for…
    Ok, that's cool. But here's my question then. Why is Update Manager still reporting that it's an available patch for our ESXi hosts? I'm new to this and am just trying to get an understanding to avoid confusion like this in the future.
    [UPDATE]
    Looks like this was the problem. VMwareCares Twitter account confirmed that Update Manager needed a new repository query to grab the new metadata. After rescanning the ESXi host again, the number of available patches dropped from 5 to 1. I'm now successfully patching the ESXi hosts through Update Manager once again. Crisis avoided.

  • Casting DataHandler to complex user type.

    Hi guys,
    I am beginner and I have met a problem during invoking my Web Service. To create and run it I have used Axis2 v 1.4, Eclipse tools and Tomcat 6. I found out the problem are complex invoking parameters because when I run simple WS with basic type parameter like String everything works fine.
    What is wrong with my implementation?
    Service class:
    public class AccessLevelService implements AccessLevelContract {
         private AccessLevelDAO accessLevelDAO;
         public AccessLevelService() {
              String [] path = {"com/applicationContext.xml"};
              ApplicationContext applicationContext = new ClassPathXmlApplicationContext(path);
              accessLevelDAO = (AccessLevelDAO) applicationContext.getBean("accessLevelDAO");
         @Override
         public void add(AccessLevel entity) {
              accessLevelDAO.add(entity);
         @Override
         public List<AccessLevel> getAll() {
              return accessLevelDAO.getList(new AccessLevel());
         @Override
         public void modify(AccessLevel entity) {
              accessLevelDAO.modify(entity);
         @Override
         public void remove(AccessLevel entity) {
              accessLevelDAO.remove(entity);
    }Here is my AccessLevel class:
    public class AccessLevel implements Serializable{
         private int id;
         private String level;
         public AccessLevel() {
         public AccessLevel(String level) {
              this.level = level;
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getLevel() {
              return level;
         public void setLevel(String level) {
              this.level = level;
    }Exception:
    [ERROR] javax.activation.DataHandler cannot be cast to com.rejkowicz.dataobject.AccessLevel
    java.lang.ClassCastException: javax.activation.DataHandler cannot be cast to com.rejkowicz.dataobject.AccessLevel
         at com.rejkowicz.ws.AccessLevelService.add(AccessLevelService.java:1)
         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.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
         at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:63)
         at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
         at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
         at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         at java.lang.Thread.run(Thread.java:619)
    [ERROR] org.apache.axis2.AxisFault: javax.activation.DataHandler cannot be cast to com.rejkowicz.dataobject.AccessLevelBy,
    Luke

    Matthew,
    Edward has the right approach, though somewhere you two mis-communicated.
    You can create either a dynamic or static LOV within HTML DB that is not part of the "database end".
    If I'm understanding what you are saying correctly, using a static LOV (where within HTML DB you define the 4='Temp" relationship), on the form itself you'd basically be saying:
    select temp display_field, type_code return_value from your_LOV.
    HTML DB's LOV will display pretty much whatever you want (the display_field), and then return pretty much whatever you want (the return_value). Sometime's it's a little limited, only showing the one display_field, but you can sometimes work around it with some decode and concatenation.
    So, if you define a static LOV where you define the display value 'Temp' returns the number 4, everything should work fine.
    Bill Ferguson

  • Install OCS 10.1.2 Infra DB failed with LDAP: error code 16 on Workspaces

    during install OCS Infrastructure DB OCS have error:
    ... processed key-value: logfile=/oracle/product/dbocs/workspaces/logs/cw_config_backend.log
    ... processed key-value: action=setup_backend
    ... processed key-value: oh=/oracle/product/dbocs
    ... processed key-value: oid=oid.domain
    ... processed key-value: oid_port=389
    ... processed key-value: oid_user_dn=cn=orcladmin
    ... processed key-value: oid_passwd=xxxxxx
    ... processed key-value: db_sn=ocs.domain
    ... processed key-value: dba_user=sys
    ... processed key-value: dba_passwd=xxxxxx
    ... processed key-value: cw_db_passwd=xxxxxx
    Attempting to set logfile to: /oracle/product/dbocs/workspaces/logs/cw_config_backend.log
    Processed oh=/oracle/product/dbocs
    BACKEND installation ...
    ... Trying to lookup database dn
    ... Obtain OID connection
    ...... Can not obtain OID ssl port.
    ...... OID port = "389"
    ...... Trying to establish a non-ssl connection. OID host "oid.domain", OID port "389", OID user dn "cn=orcladmin".
    ... OID connection created.
    ...... You must specify either db_dn or db_sn.
    ...... ldap search filter "(&(objectclass=orcldbserver)(orcldbglobalname=ocs.domain))"
    ...... Succesfully located database dn "cn=ocs,cn=OracleContext".
    ...... Database dn = "cn=ocs,cn=OracleContext"
    ... Validating existence and version of CW schema: "CWSYS" in database: "cn=ocs,cn=OracleContext".
    ... Obtain JDBC connect string
    ... JDBC connect string = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocsoas.domain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ocs.domain)))"
    ...derived: "jdbc_str=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocsoas.domain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ocs.domain)))".
    Opening JDBC connection: "jdbc:oracle:thin:sys/xxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocsoas.domain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ocs.domain)))"
    Opening JDBC connection: "jdbc:oracle:thin:sys/xxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocsoas.domain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ocs.domain)))"
    Unlocking schema and setting passwd: "CWSYS/xxxxxx".
    Opening JDBC connection: "jdbc:oracle:thin:sys/xxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocsoas.domain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ocs.domain)))"
    ... Checking Workspaces container.
    ... Container "cn=CollaborativeWorkspaces,cn=Products,cn=OracleContext" already exist.
    ... Finish checking Workspaces container.
    ... Trying to create backend application entity in OID
    ...... Database dn = "cn=ocs,cn=OracleContext"
    ...... Backend entity name = "ocs"
    ...... Backend entity dn = "orclApplicationCommonName=ocs,cn=Database Instances,cn=CollaborativeWorkspaces,cn=Products,cn=OracleContext"
    ... Backend entries already exist. Cleanup old entries.
    deregisterProvisioningListener ...
    app dn = orclApplicationCommonName=ocs,cn=Database Instances,cn=CollaborativeWorkspaces,cn=Products,cn=OracleContext
    subscriber = dc=domain,dc=com
    ... Trying to remove entity "orclApplicationCommonName=ocs,cn=Database Instances,cn=CollaborativeWorkspaces,cn=Products,cn=OracleContext".
    ... Deleting "orclApplicationCommonName=ocs,cn=Database Instances,cn=CollaborativeWorkspaces,cn=Products,cn=OracleContext"
    Adding Workspaces application entity to: cn=Service Registry Viewers,cn=Groups,cn=OracleContext
    Adding Workspaces application entity to: cn=Service Registry Admins,cn=Groups,cn=OracleContext
    ... Insufficient privilege to create application entity "orclApplicationCommonName=ocs,cn=Database Instances,cn=CollaborativeWorkspaces,cn=Products,cn=OracleContext". Please check the user DN and password.
    javax.naming.directory.NoSuchAttributeException: [LDAP: error code 16 - One or more values for attribute uniquemember does not exist]; remaining name 'cn=Service Registry Admins,cn=Groups,cn=OracleContext'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3009)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2934)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2740)
    at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1373)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:235)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:147)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:136)
    at javax.naming.directory.InitialDirContext.modifyAttributes(InitialDirContext.java:136)
    at oracle.workspaces.share.util.oid.OIDShareUtil.setEntryAttribute(OIDShareUtil.java:471)
    at oracle.workspaces.share.util.oid.OIDShareUtil.addMemberToGroup(OIDShareUtil.java:420)
    at oracle.workspaces.share.util.oid.OIDShareUtil.addMemberToGroupIgnoreDuplicateMember(OIDShareUtil.java:435)
    at oracle.workspaces.install.CwConfigOID.createBackendEntity(CwConfigOID.java:1205)
    at oracle.workspaces.install.CwConfigOID.registerBackend(CwConfigOID.java:449)
    at oracle.workspaces.install.CwConfig.regBackend(CwConfig.java:320)
    at oracle.workspaces.install.CwConfig.run(CwConfig.java:609)
    at oracle.workspaces.install.CwConfig.main(CwConfig.java:790)
    oracle.workspaces.install.CwCAException: Error while executing action: "setup_backend"
    Caused by: javax.naming.directory.NoSuchAttributeException: [LDAP: error code 16 - One or more values for attribute uniquemember does not exist]
    at oracle.workspaces.install.CwConfig.run(CwConfig.java:639)
    at oracle.workspaces.install.CwConfig.main(CwConfig.java:790)
    Caused by: javax.naming.directory.NoSuchAttributeException: [LDAP: error code 16 - One or more values for attribute uniquemember does not exist]; remaining name 'cn=Service Registry Admins,cn=Groups,cn=OracleContext'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3009)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2934)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2740)
    at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1373)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:235)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:147)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:136)
    at javax.naming.directory.InitialDirContext.modifyAttributes(InitialDirContext.java:136)
    at oracle.workspaces.share.util.oid.OIDShareUtil.setEntryAttribute(OIDShareUtil.java:471)
    at oracle.workspaces.share.util.oid.OIDShareUtil.addMemberToGroup(OIDShareUtil.java:420)
    at oracle.workspaces.share.util.oid.OIDShareUtil.addMemberToGroupIgnoreDuplicateMember(OIDShareUtil.java:435)
    at oracle.workspaces.install.CwConfigOID.createBackendEntity(CwConfigOID.java:1205)
    at oracle.workspaces.install.CwConfigOID.registerBackend(CwConfigOID.java:449)
    at oracle.workspaces.install.CwConfig.regBackend(CwConfig.java:320)
    at oracle.workspaces.install.CwConfig.run(CwConfig.java:609)
    ... 1 more
    javax.naming.directory.NoSuchAttributeException: [LDAP: error code 16 - One or more values for attribute uniquemember does not exist]; remaining name 'cn=Service Registry Admins,cn=Groups,cn=OracleContext'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3009)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2934)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2740)
    at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1373)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:235)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:147)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:136)
    at javax.naming.directory.InitialDirContext.modifyAttributes(InitialDirContext.java:136)
    at oracle.workspaces.share.util.oid.OIDShareUtil.setEntryAttribute(OIDShareUtil.java:471)
    at oracle.workspaces.share.util.oid.OIDShareUtil.addMemberToGroup(OIDShareUtil.java:420)
    at oracle.workspaces.share.util.oid.OIDShareUtil.addMemberToGroupIgnoreDuplicateMember(OIDShareUtil.java:435)
    at oracle.workspaces.install.CwConfigOID.createBackendEntity(CwConfigOID.java:1205)
    at oracle.workspaces.install.CwConfigOID.registerBackend(CwConfigOID.java:449)
    at oracle.workspaces.install.CwConfig.regBackend(CwConfig.java:320)
    at oracle.workspaces.install.CwConfig.run(CwConfig.java:609)
    at oracle.workspaces.install.CwConfig.main(CwConfig.java:790)
    What should i do?
    help.
    Thanks

    closed
    Re: Install OCS 10.1.2 Infra DB failed with LDAP: error code 16 on Workspac

  • Javax.jms.InvalidSelectorException occurs when upgrade to weblogic 12c

    Recently, our team upgrade weblogic server from 11g to 12c,  some errors occur when start web application in weblogic domain.
    The error is related to message driven bean,  below is the part of  ejb-jar.xml definition:
      <message-driven id="message-driven_1">
          <description>Message Driven Bean</description>
          <display-name>Message Configuration (MDB)</display-name>
          <ejb-name>Logger</ejb-name>
          <ejb-class>com.logging.mdb.Logger</ejb-class>
          <messaging-type>javax.jms.MessageListener</messaging-type>
          <transaction-type>Container</transaction-type>
          <message-destination-type>javax.jms.Queue</message-destination-type>
          <activation-config>
                <activation-config-property>
                    <activation-config-property-name>messageSelector</activation-config-property-name>
                    <activation-config-property-value>DELIVERY='IMMEDIATE'</activation-config-property-value>
                </activation-config-property>
                <activation-config-property>
                    <activation-config-property-name>acknowledgeMode</activation-config-property-name>
                    <activation-config-property-value>Auto-acknowledge</activation-config-property-value>
                </activation-config-property>
                <activation-config-property>
                     <activation-config-property-name>destinationType</activation-config-property-name>
                     <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
                </activation-config-property>
          </activation-config>
      </message-driven>
    When start application below errors show up:
    <Dec 18, 2013 6:24:05 AM PST> <Warning> <EJB> <SLC02PGO> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1387376645415> <BEA-010061> <The Message-Driven EJB Logger is unable to connect to the JMS destination edx/queue/logger. The Error was:
    javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    Nested exception: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    Nested exception: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    Nested exception: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    Nested exception: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "DELIVERY='IMMEDIATE'"
    ####<Dec 18, 2013 6:24:15 AM PST> <Warning> <EJB> <SLC02PGO> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1387376655414> <BEA-010096> <The Message-Driven EJB MessageDispatcher is unable to connect to the JMS destination or bind to JCA resource adapter edx.queue.outbound. The onnection failed after 124 attempts. The MDB will attempt to reconnect/rebind every 10 seconds. This log message will repeat every 600 seconds until the condition clears.>
    It works well in weblogic 11g,   not sure whether there's any changes in weblgic 12c.
    I'm appreciate if there's someone can help me on this issue.
        <message-driven id="message-driven_1">
          <description>Message Driven Bean</description>
          <display-name>Message Configuration (MDB)</display-name>
          <ejb-name>Logger</ejb-name>
          <ejb-class>com.edocs.fs.logging.mdb.Logger</ejb-class>
          <messaging-type>javax.jms.MessageListener</messaging-type>
          <transaction-type>Container</transaction-type>
          <message-destination-type>javax.jms.Queue</message-destination-type>
          <activation-config>
            <activation-config-property>
              <activation-config-property-name>messageSelector</activation-config-property-name>
              <activation-config-property-value>DELIVERY='IMMEDIATE'</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
              <activation-config-property-name>acknowledgeMode</activation-config-property-name>
              <activation-config-property-value>Auto-acknowledge</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
              <activation-config-property-name>destinationType</activation-config-property-name>
              <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
            </activation-config-property>
          </activation-config>
          <resource-ref id="ResRef_Logger_1">
            <res-ref-name>jdbc/LoggerDataSource</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
          </resource-ref>
        </message-driven>

    Hi,
    I debug the application, I found my @ViewScoped ManagedBeans, they're recreated after you click a button or select a item in combobox
    Here is a piece of code:
        @PostConstruct
        public void resolveEntity() {
            Object sEntity = FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("entity");
            entity = (BctTbOportunidade) sEntity;
             FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("entity");
            if (entity == null) {
                entity = new BctTbOportunidade();
    I use @postConstruct to get a entity from another page in sessionMap(I set a item from a table and use this method to modify a entity in a other page).
    When I click a button or select a item in combobox in same page @PostConstruct method is called but values are lost. No Exceptions are thrown by server.
    I found a artice written by BalluC that some versions of jsf 2.1 has this behavior The BalusC Code: The benefits and pitfalls of @ViewScoped
    I already configured my web.xml to set false javax.faces.PARTIAL_STATE_SAVING 
    But this behavior continues.
    The jsf version deployed in my weblogic 12c is 2.1.7.

  • Not updating database table after editing using theADFapplicationJdev10.1.3

    Hi
    I created the Sample Browse and Edit JSF JSP page oracle ADF application as explained in the cuecards in Jdev10.1.3.
    After editing the department table rows in browser i am checking the database tables for the changes.
    But my table are still with the old data.they are not updating with the values i changed in the browser.
    i followed the steps correctly as explained in cuecards.
    where i am going wrong.
    What i have to do to commit the changes in to database in my ADFApplication.Did i need anything to add my code.

    In Jdev 10.1.3,there is no operations folder directly under the Application data module control.
    there is only constructors,merge entity,persist entity,refresh entity,remove entity and findalldepartments(),findallemployeeas() nodes under the application data module control.
    In findalldepartments,findallemplloyees the operations node is there.under that i don't have the commit .i have only create,execute,first,previous,last,next,delete,removerowwithkey,setcurrentRowWithkey,setcurrentRowWithkeyValue under the operation node.
    so how can i commit the operations in database.
    Please help me.

Maybe you are looking for

  • Monitors adapters info needed

    I am switching from my old G4 to a new MacPro. On the G4, the kind of monitor connections (2) have like 30 pin holes (3 rows of 10) and some more on the side. The new MacPro only has a DVI port and a mini Display port. What kind of adapters do I need

  • Known as or nickname for employee

    We have employees who have a nickname and that is how they are known to others in our company.  i.e. First name is John, but they are known as Jack.  John is their name in HR.  When you search for an employee responsible, you can do by first and last

  • Instantiating

    Hello everybody! I have created a class(neither distributed nor shared) definition where there is only one attribute which is set to be private (to comply with good OOA&D rules) and its value gets set via constructor during creation. I am having prob

  • Can't pair Windows 7 PC with 6500 slide using blue...

    I am having problems connecting my Nokia 6500 slide to my new PC with Windows 7 using bluetooth. I am able to connect one time after installing Ovi Suite and sync with outlook, but when I try a second time, it can't connect to the phone. Reboot doesn

  • Help Me In this regard

    Hi all, I need to retrieve the selected value from drop down box in html page form, in JSP page and need to enter the value into database. for example: there are four values : in drop down box. if i selected one valuve from that that i should retriev