Accessing an ejb statful session from webserivce   problem need help

hi guys am working on simple example here is creating an entity bean that reference to table on my database and then create my session bean from that entity bean and am when am trying to access this stateful session bean from web service at the beginning it runs and when i click on any of the function i got the same exception am sorry for my lack of knowledge but i just don`t know what wrong here are my code
entity bean :/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
package doc;
import java.io.Serializable;
import java.math.BigInteger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.transaction.UserTransaction;
* @author kriem
@Entity
@Table(name = "DOCTOR")
@NamedQueries({@NamedQuery(name = "Doctor.findByDocFname",
query = "SELECT d FROM Doctor d WHERE d.docFname = :docFname"),
        @NamedQuery(name = "Doctor.findByDocId",
        query = "SELECT d FROM Doctor d WHERE d.docId = :docId"),
        @NamedQuery(name = "Doctor.findByDocLname",
        query = "SELECT d FROM Doctor d WHERE d.docLname = :docLname"),
        @NamedQuery(name = "Doctor.findByDocPhone",
        query = "SELECT d FROM Doctor d WHERE d.docPhone = :docPhone"),
        @NamedQuery(name = "Doctor.findByDocAddress",
        query = "SELECT d FROM Doctor d WHERE d.docAddress = :docAddress"),
        @NamedQuery(name = "Doctor.findByDocMobileNo",
        query = "SELECT d FROM Doctor d WHERE d.docMobileNo = :docMobileNo"),
        @NamedQuery(name = "Doctor.findByDocSpecialty",
        query = "SELECT d FROM Doctor d WHERE d.docSpecialty = :docSpecialty"),
        @NamedQuery(name = "Doctor.findByDocTitle",
        query = "SELECT d FROM Doctor d WHERE d.docTitle = :docTitle")})
public class Doctor implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "DOC_FNAME", nullable = false)
    private String docFname;
    @Id
    @Column(name = "DOC_ID", nullable = false)
    private String docId;
    @Column(name = "DOC_LNAME", nullable = false)
    private String docLname;
    @Column(name = "DOC_PHONE", nullable = false)
    private BigInteger docPhone;
    @Column(name = "DOC_ADDRESS", nullable = false)
    private String docAddress;
    @Column(name = "DOC_MOBILE_NO", nullable = false)
    private BigInteger docMobileNo;
    @Column(name = "DOC_SPECIALTY", nullable = false)
    private String docSpecialty;
    @Column(name = "DOC_TITLE", nullable = false)
    private String docTitle;
    public Doctor() {
    public Doctor(String docId) {
        this.docId = docId;
    public Doctor(String docId, String docFname, String docLname, BigInteger docPhone, String docAddress, BigInteger docMobileNo, String docSpecialty, String docTitle) {
        this.docId = docId;
        this.docFname = docFname;
        this.docLname = docLname;
        this.docPhone = docPhone;
        this.docAddress = docAddress;
        this.docMobileNo = docMobileNo;
        this.docSpecialty = docSpecialty;
        this.docTitle = docTitle;
    public String getDocFname() {
        return docFname;
    public void setDocFname(String docFname) {
        this.docFname = docFname;
    public String getDocId() {
        return docId;
    public void setDocId(String docId) {
        this.docId = docId;
    public String getDocLname() {
        return docLname;
    public void setDocLname(String docLname) {
        this.docLname = docLname;
    public BigInteger getDocPhone() {
        return docPhone;
    public void setDocPhone(BigInteger docPhone) {
        this.docPhone = docPhone;
    public String getDocAddress() {
        return docAddress;
    public void setDocAddress(String docAddress) {
        this.docAddress = docAddress;
    public BigInteger getDocMobileNo() {
        return docMobileNo;
    public void setDocMobileNo(BigInteger docMobileNo) {
        this.docMobileNo = docMobileNo;
    public String getDocSpecialty() {
        return docSpecialty;
    public void setDocSpecialty(String docSpecialty) {
        this.docSpecialty = docSpecialty;
    public String getDocTitle() {
        return docTitle;
    public void setDocTitle(String docTitle) {
        this.docTitle = docTitle;
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (docId != null ? docId.hashCode() : 0);
        return hash;
    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Doctor)) {
            return false;
        Doctor other = (Doctor) object;
        if ((this.docId == null && other.docId != null) || (this.docId != null && !this.docId.equals(other.docId))) {
            return false;
        return true;
    @Override
    public String toString() {
        return "doc.Doctor[docId=" + docId + "]";
    public void persist(Object object) {
        /* Add this to the deployment descriptor of this module (e.g. web.xml, ejb-jar.xml):
         * <persistence-context-ref>
         * <persistence-context-ref-name>persistence/LogicalName</persistence-context-ref-name>
         * <persistence-unit-name>task-ejbPU</persistence-unit-name>
         * </persistence-context-ref>
         * <resource-ref>
         * <res-ref-name>UserTransaction</res-ref-name>
         * <res-type>javax.transaction.UserTransaction</res-type>
         * <res-auth>Container</res-auth>
         * </resource-ref> */
        try {
            Context ctx = new InitialContext();
            UserTransaction utx = (UserTransaction) ctx.lookup("java:comp/env/UserTransaction");
            utx.begin();
            EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/LogicalName");
            em.persist(object);
            utx.commit();
        } catch (Exception e) {
            java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE, "exception caught", e);
            throw new RuntimeException(e);
}doctor session bean code
* To change this template, choose Tools | Templates
* and open the template in the editor.
package doc;
import java.util.List;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
* @author kriem
@Stateful
public class DoctorFacade implements DoctorFacadeRemote {
    @PersistenceContext
    private EntityManager em;
    public void create(Doctor doctor) {
        em.persist(doctor);
    public void edit(Doctor doctor) {
        em.merge(doctor);
    public void remove(Doctor doctor) {
        em.remove(em.merge(doctor));
    public Doctor find(Object id) {
        return em.find(doc.Doctor.class, id);
    public List<Doctor> findAll() {
    return em.createQuery("select object(o) from Doctor as o").getResultList();
    public void persist(Object object) {
        em.persist(object);
}doctor remote interface :
* To change this template, choose Tools | Templates
* and open the template in the editor.
package doc;
import java.util.List;
import javax.ejb.Remote;
* @author kriem
@Remote
public interface DoctorFacadeRemote {
    void create(Doctor doctor);
    void edit(Doctor doctor);
    void remove(Doctor doctor);
    Doctor find(Object id);
    List<Doctor> findAll();
    public void persist(java.lang.Object object);
doctor web service code :
* To change this template, choose Tools | Templates
* and open the template in the editor.
package task;
import doc.Doctor;
import doc.DoctorFacadeRemote;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateful;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebService;
* @author kriem
@WebService(serviceName = "taskService")
@Stateful()
public class task {
    @EJB
    private DoctorFacadeRemote ejbRef;
    // Add business logic below. (Right-click in editor and choose
    // "Web Service > Add Operation"
    @WebMethod(operationName = "create")
    @Oneway
    public void create(Doctor doctor) {
        ejbRef.create(doctor);
    @WebMethod(operationName = "edit")
    @Oneway
    public void edit(Doctor doctor) {
        ejbRef.edit(doctor);
    @WebMethod(operationName = "remove")
    @Oneway
    public void remove(Doctor doctor) {
        ejbRef.remove(doctor);
    @WebMethod(operationName = "find")
    public Doctor find(Object id) {
        return ejbRef.find(id);
    @WebMethod(operationName = "findAll")
    public List<Doctor> findAll() {
        return ejbRef.findAll();
.............................and when i try to run for example findall method i got this
findAll  Method invocation
Method parameter(s)
Type     Value
Service invocation threw an exception with message : null; Refer to the server log for more details
Exceptions details : java.lang.reflect.InvocationTargetException
javax.servlet.ServletException: java.lang.reflect.InvocationTargetException at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:345) at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:121) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: java.lang.reflect.InvocationTargetException 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.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:316) ... 35 more Caused by: javax.xml.ws.soap.SOAPFaultException: WSTX-SERVICE-5008: Ignoring exception raised while committing transaction at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:187) at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:116) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:254) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117) at $Proxy129.findAll(Unknown Source) ... 40 more Caused by: javax.xml.ws.WebServiceException: WSTX-SERVICE-5008: Ignoring exception raised while committing transaction at com.sun.xml.ws.tx.service.TxServerPipe.commitTransaction(TxServerPipe.java:440) at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:325) at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218) at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380) ... 2 more Caused by: javax.transaction.RollbackException: Transaction marked for rollback. at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:413) at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371) at com.sun.enterprise.distributedtx.UserTransactionImpl.commit(UserTransactionImpl.java:197) at com.sun.xml.ws.tx.service.TxServerPipe.commitTransaction(TxServerPipe.java:436) ... 47 more knowing that this error appears to me when i try any method
am working on netbean6 and glassfishV2 for my db its oracle
guys i need any kind of help plzz...........
Edited by: marwacs on May 18, 2008 1:02 AM
Edited by: marwacs on May 18, 2008 1:04 AM

hi guys am working on simple example here is creating an entity bean that reference to table on my database and then create my session bean from that entity bean and am when am trying to access this stateful session bean from web service at the beginning it runs and when i click on any of the function i got the same exception am sorry for my lack of knowledge but i just don`t know what wrong here are my code
entity bean :/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
package doc;
import java.io.Serializable;
import java.math.BigInteger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.transaction.UserTransaction;
* @author kriem
@Entity
@Table(name = "DOCTOR")
@NamedQueries({@NamedQuery(name = "Doctor.findByDocFname",
query = "SELECT d FROM Doctor d WHERE d.docFname = :docFname"),
        @NamedQuery(name = "Doctor.findByDocId",
        query = "SELECT d FROM Doctor d WHERE d.docId = :docId"),
        @NamedQuery(name = "Doctor.findByDocLname",
        query = "SELECT d FROM Doctor d WHERE d.docLname = :docLname"),
        @NamedQuery(name = "Doctor.findByDocPhone",
        query = "SELECT d FROM Doctor d WHERE d.docPhone = :docPhone"),
        @NamedQuery(name = "Doctor.findByDocAddress",
        query = "SELECT d FROM Doctor d WHERE d.docAddress = :docAddress"),
        @NamedQuery(name = "Doctor.findByDocMobileNo",
        query = "SELECT d FROM Doctor d WHERE d.docMobileNo = :docMobileNo"),
        @NamedQuery(name = "Doctor.findByDocSpecialty",
        query = "SELECT d FROM Doctor d WHERE d.docSpecialty = :docSpecialty"),
        @NamedQuery(name = "Doctor.findByDocTitle",
        query = "SELECT d FROM Doctor d WHERE d.docTitle = :docTitle")})
public class Doctor implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "DOC_FNAME", nullable = false)
    private String docFname;
    @Id
    @Column(name = "DOC_ID", nullable = false)
    private String docId;
    @Column(name = "DOC_LNAME", nullable = false)
    private String docLname;
    @Column(name = "DOC_PHONE", nullable = false)
    private BigInteger docPhone;
    @Column(name = "DOC_ADDRESS", nullable = false)
    private String docAddress;
    @Column(name = "DOC_MOBILE_NO", nullable = false)
    private BigInteger docMobileNo;
    @Column(name = "DOC_SPECIALTY", nullable = false)
    private String docSpecialty;
    @Column(name = "DOC_TITLE", nullable = false)
    private String docTitle;
    public Doctor() {
    public Doctor(String docId) {
        this.docId = docId;
    public Doctor(String docId, String docFname, String docLname, BigInteger docPhone, String docAddress, BigInteger docMobileNo, String docSpecialty, String docTitle) {
        this.docId = docId;
        this.docFname = docFname;
        this.docLname = docLname;
        this.docPhone = docPhone;
        this.docAddress = docAddress;
        this.docMobileNo = docMobileNo;
        this.docSpecialty = docSpecialty;
        this.docTitle = docTitle;
    public String getDocFname() {
        return docFname;
    public void setDocFname(String docFname) {
        this.docFname = docFname;
    public String getDocId() {
        return docId;
    public void setDocId(String docId) {
        this.docId = docId;
    public String getDocLname() {
        return docLname;
    public void setDocLname(String docLname) {
        this.docLname = docLname;
    public BigInteger getDocPhone() {
        return docPhone;
    public void setDocPhone(BigInteger docPhone) {
        this.docPhone = docPhone;
    public String getDocAddress() {
        return docAddress;
    public void setDocAddress(String docAddress) {
        this.docAddress = docAddress;
    public BigInteger getDocMobileNo() {
        return docMobileNo;
    public void setDocMobileNo(BigInteger docMobileNo) {
        this.docMobileNo = docMobileNo;
    public String getDocSpecialty() {
        return docSpecialty;
    public void setDocSpecialty(String docSpecialty) {
        this.docSpecialty = docSpecialty;
    public String getDocTitle() {
        return docTitle;
    public void setDocTitle(String docTitle) {
        this.docTitle = docTitle;
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (docId != null ? docId.hashCode() : 0);
        return hash;
    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Doctor)) {
            return false;
        Doctor other = (Doctor) object;
        if ((this.docId == null && other.docId != null) || (this.docId != null && !this.docId.equals(other.docId))) {
            return false;
        return true;
    @Override
    public String toString() {
        return "doc.Doctor[docId=" + docId + "]";
    public void persist(Object object) {
        /* Add this to the deployment descriptor of this module (e.g. web.xml, ejb-jar.xml):
         * <persistence-context-ref>
         * <persistence-context-ref-name>persistence/LogicalName</persistence-context-ref-name>
         * <persistence-unit-name>task-ejbPU</persistence-unit-name>
         * </persistence-context-ref>
         * <resource-ref>
         * <res-ref-name>UserTransaction</res-ref-name>
         * <res-type>javax.transaction.UserTransaction</res-type>
         * <res-auth>Container</res-auth>
         * </resource-ref> */
        try {
            Context ctx = new InitialContext();
            UserTransaction utx = (UserTransaction) ctx.lookup("java:comp/env/UserTransaction");
            utx.begin();
            EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/LogicalName");
            em.persist(object);
            utx.commit();
        } catch (Exception e) {
            java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE, "exception caught", e);
            throw new RuntimeException(e);
}doctor session bean code
* To change this template, choose Tools | Templates
* and open the template in the editor.
package doc;
import java.util.List;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
* @author kriem
@Stateful
public class DoctorFacade implements DoctorFacadeRemote {
    @PersistenceContext
    private EntityManager em;
    public void create(Doctor doctor) {
        em.persist(doctor);
    public void edit(Doctor doctor) {
        em.merge(doctor);
    public void remove(Doctor doctor) {
        em.remove(em.merge(doctor));
    public Doctor find(Object id) {
        return em.find(doc.Doctor.class, id);
    public List<Doctor> findAll() {
    return em.createQuery("select object(o) from Doctor as o").getResultList();
    public void persist(Object object) {
        em.persist(object);
}doctor remote interface :
* To change this template, choose Tools | Templates
* and open the template in the editor.
package doc;
import java.util.List;
import javax.ejb.Remote;
* @author kriem
@Remote
public interface DoctorFacadeRemote {
    void create(Doctor doctor);
    void edit(Doctor doctor);
    void remove(Doctor doctor);
    Doctor find(Object id);
    List<Doctor> findAll();
    public void persist(java.lang.Object object);
doctor web service code :
* To change this template, choose Tools | Templates
* and open the template in the editor.
package task;
import doc.Doctor;
import doc.DoctorFacadeRemote;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateful;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebService;
* @author kriem
@WebService(serviceName = "taskService")
@Stateful()
public class task {
    @EJB
    private DoctorFacadeRemote ejbRef;
    // Add business logic below. (Right-click in editor and choose
    // "Web Service > Add Operation"
    @WebMethod(operationName = "create")
    @Oneway
    public void create(Doctor doctor) {
        ejbRef.create(doctor);
    @WebMethod(operationName = "edit")
    @Oneway
    public void edit(Doctor doctor) {
        ejbRef.edit(doctor);
    @WebMethod(operationName = "remove")
    @Oneway
    public void remove(Doctor doctor) {
        ejbRef.remove(doctor);
    @WebMethod(operationName = "find")
    public Doctor find(Object id) {
        return ejbRef.find(id);
    @WebMethod(operationName = "findAll")
    public List<Doctor> findAll() {
        return ejbRef.findAll();
.............................and when i try to run for example findall method i got this
findAll  Method invocation
Method parameter(s)
Type     Value
Service invocation threw an exception with message : null; Refer to the server log for more details
Exceptions details : java.lang.reflect.InvocationTargetException
javax.servlet.ServletException: java.lang.reflect.InvocationTargetException at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:345) at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:121) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: java.lang.reflect.InvocationTargetException 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.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:316) ... 35 more Caused by: javax.xml.ws.soap.SOAPFaultException: WSTX-SERVICE-5008: Ignoring exception raised while committing transaction at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:187) at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:116) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:254) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117) at $Proxy129.findAll(Unknown Source) ... 40 more Caused by: javax.xml.ws.WebServiceException: WSTX-SERVICE-5008: Ignoring exception raised while committing transaction at com.sun.xml.ws.tx.service.TxServerPipe.commitTransaction(TxServerPipe.java:440) at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:325) at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218) at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380) ... 2 more Caused by: javax.transaction.RollbackException: Transaction marked for rollback. at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:413) at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371) at com.sun.enterprise.distributedtx.UserTransactionImpl.commit(UserTransactionImpl.java:197) at com.sun.xml.ws.tx.service.TxServerPipe.commitTransaction(TxServerPipe.java:436) ... 47 more knowing that this error appears to me when i try any method
am working on netbean6 and glassfishV2 for my db its oracle
guys i need any kind of help plzz...........
Edited by: marwacs on May 18, 2008 1:02 AM
Edited by: marwacs on May 18, 2008 1:04 AM

Similar Messages

  • Error at new statement on extended program check need help

    Hi all ,
                       This is the code :
    LOOP AT i_stocks INTO wa_stocks WHERE NOT pulkt IS INITIAL AND
                             NOT bstkt IS INITIAL AND
                             NOT fprctr IS INITIAL AND
                             ( write_off_fix <> 0 OR
                               write_off_pup <> 0 ).
        AT NEW fprctr.
          CLEAR: l_prctrsum_fix, l_prctrsum_pup.
        ENDAT.
        IF wa_stocks-bukrs <> lastbukrs.
          lastbukrs = wa_stocks-bukrs.
          PERFORM document_header USING xreversal.
          i_counter = 1.
          CLEAR lastkostl.
        ENDIF.
        ADD wa_stocks-write_off_pup TO l_prctrsum_pup.
    ENDLOOP
    On Extended program check its says :
    The LOOP statement processing will be limited
    (FROM, TO and WHERE additions in LOOP)
    Interaction with group change processing (AT NEW, ...) is undefined
    (The message can be hidden with "#EC *)
    It means at statement   AT NEW fprctr .
    Need help , How can i resolve this error ?
    Regards .
    Edited by: ujjwal dharmak on Feb 19, 2010 9:55 AM
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on Feb 19, 2010 9:04 AM

    Since you are using where condition in loop statement and also using the control break statement thats why it is showing the error for you.
    So if you want you can do like this
    loop at itab into wa.
    if not  wa-f1 is initial ....<and other conditions>.
    continue.
    endif.
    at new   f1.
    endat.
    endloop.
    It will resolve your problem but I am having the doubt how the at new will work properly...
    Regards
    Shiba Prasad Dutta

  • Hello, I'm using the same apple id on my Ipad and Iphone, and anything i do and my ipad reflects on my iphone. if i download an app on my iphone it also downloads on my ipad. Can i stop this from happening. i need help. thank you.

    hello, I'm using the same apple id on my Ipad and Iphone, and anything i do and my ipad reflects on my iphone. if i download an app on my iphone it also downloads on my ipad. Can i stop this from happening. i need help. thank you.

    Yes, under the Settings for the store, you can turn off the auto download for purchases, that way if you purchase an app on another device it will not automatically download on that device.  You would need to do this on both your iPad and iPhone.

  • New iPad 3 will not charge from a mac. need help on that

    my new ipad 3 will not charge from a mac. need help why if any one knows? thk

    The quickest way (and really the only way) to charge your iPad is with the included 10W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
    At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
    Also, if you have a 3rd generation iPad, look at Apple: iPad Battery Nothing to Get Charged Up About
    http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
    Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
    http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
     Cheers, Tom

  • My MBP didn't recognise my password, started it in safe mode, I can see my files, but I don't know what to do next, as the image of reset password isn't selectable. I just moved from PC. Need help please...

    My MBP didn't recognise my password, started it in safe mode, I can see my files, but I don't know what to do next, as the image of reset password isn't selectable. I just moved from PC. Need help please...

    Safe mode is not what you want in this case. Reboot to recovery mode - hold down cmd-R as the Mac reboots. Go past the language-selection screen, click the Utilities menu, then Terminal. Type:
    resetpassword
    Followed by the return key, and follow the prompts. Reboot normally when done.
    Matt

  • UNABLE TO ACCESS SECURED EJB USING IIOP FROM JSP

    Following codes does not work with IIOP when called from jsp returns an
    com.sap.engine.services.iiop.CORBA.CORBAObject:com.sap.engine.services.iiop.server.portable.Delegate_1_1@8312b1 step2 RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: com.sap.engine.services.ejb.exceptions.BaseRemoteException: User Guest does not have access to method create(). at
    Following codes does not work with IIOP when called from a fat client returns an
    org.omg.CORBA.UNKNOWN:   vmcid: 0x0  minor code: 0 completed: Maybe
            at com.sun.corba.se.internal.core.UEInfoServiceContext.<init>(UEInfoServ
    iceContext.java:33)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
            at com.sun.corba.se.internal.core.ServiceContextData.makeServiceContext(
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.cosnaming.CNCtxFactory");
    p.put(Context.PROVIDER_URL, "iiop://hostname:50007");
    p.put(Context.SECURITY_PRINCIPAL, "User");
    p.put(Context.SECURITY_CREDENTIALS, "pass");
    I have add java option to add IIOP filer
    -Dorg.omg.PortableInterceptor.ORBInitializerClass.com.sap.engine.services.iiop.csiv2.interceptors.SecurityInitializer
    Solution Required: Could you please detail me what steps in need to perform in order for me to access secure ejb using iiop protocol.
    FYI -- How ever ejb security works with P4 protocol, If required i can send you the test case ear.
    Thanks
    Vijay
    Following are the server side logs
    java.rmi.RemoteException: com.sap.engine.services.ejb.exceptions.BaseRemoteException: User Guest does not have access to method create().
         at test.TestEJBHomeImpl0.create(TestEJBHomeImpl0.java:91)
         at test._TestEJBHome_Stub.create(_TestEJBHome_Stub.java:214)
         at jsp_testIIOP1199698887113._jspService(jsp_testIIOP1199698887113.java:33)
         at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:186)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.security.exceptions.BaseSecurityException: Caller not authorized.
         at com.sap.engine.services.security.resource.ResourceHandleImpl.checkPermission(ResourceHandleImpl.java:608)
         at com.sap.engine.services.security.resource.ResourceHandleImpl.checkPermission(ResourceHandleImpl.java:505)
         at com.sap.engine.services.security.resource.ResourceContextImpl.checkPermission(ResourceContextImpl.java:45)
         at test.TestEJBHomeImpl0.create(TestEJBHomeImpl0.java:89)
         ... 20 more
    ; nested exception is:
         java.lang.SecurityException: com.sap.engine.services.security.exceptions.BaseSecurityException: Caller not authorized.
         at com.sap.engine.services.security.resource.ResourceHandleImpl.checkPermission(ResourceHandleImpl.java:608)
         at com.sap.engine.services.security.resource.ResourceHandleImpl.checkPermission(ResourceHandleImpl.java:505)
         at com.sap.engine.services.security.resource.ResourceContextImpl.checkPermission(ResourceContextImpl.java:45)
         at test.TestEJBHomeImpl0.create(TestEJBHomeImpl0.java:89)
         at test._TestEJBHome_Stub.create(_TestEJBHome_Stub.java:214)
         at jsp_testIIOP1199698887113._jspService(jsp_testIIOP1199698887113.java:33)
         at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:186)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    That's the code that you need to execute but you should
    probably encapsulate that code in Custom Action.
    Orion has a EJB Tag Library that is free to distribute that
    does all that stuff you just set some attributes.
    Go to their site and look at their Tag Libraries.
    Also look for other Tag Libraries Freely Available for EJB Access.

  • Select Query Problem-need help

    hi,
    Help me out from this problem.
    Actually i have a table and the data in it as follows:
    Department Name Job Name
    Accounts Sr. Accountant
    Accounts Jr. Accountant
    Accounts Cleark
    But i dont want the repeated Department Name.. and i want the same output as follows.
    Department Name Job Name
    Accounts Sr. Accountant
    Jr. Accountant
    Cleark
    Without using sql reports and Sql Plus additional commands.
    The same output should come from a sql query only.
    Thanks in Advance
    Md Anwer Ali

    I shouldn't try to code before I have had at least three cups of coffee. The actual answer is:
    select decode(department,lag(department) over (order by department),null,department)
    , job
    from departments
    order by department.
    I ran this:
    select decode(job,lag(job) over (order by job),null,job)
    , ename
    from emp
    order by job
    and got this result:
    SQL> /
    DECODE(JO ENAME
    ANALYST SCOTT
    FORD
    CLERK SMITH
    ADAMS
    MILLER
    JAMES
    MANAGER JONES
    CLARK
    BLAKE
    PRESIDENT KING
    SALESMAN ALLEN
    MARTIN
    TURNER
    WARD
    14 rows selected.

  • Still stuck with the same old producer consumer weight problem need help

    Hello All,
    This is the problem I am stuck with right now.
    I have two array lists one producer array list and one consumer array list denoted by a and b
    P1 P2 P3 P4 P5
    5 6 7 8 9
    C1 C2 C3 C4 C5
    2 3 4 5 6
    Now we find all those producer consumer pairs which satisfy the criteria Pi>=Ci
    We have the following sets
    (5,2)(6,2)(7,2),(8,2),(9,2)
    (5,3)(6,3)(7,3),(8,3),(9,3)
    (5,4)(6,4)(7,4),(8,4),(9,4)
    (5,5)(6,5)(7,5),(8,5),(9,5)
    (6,6)(7,6)(8,6),(9,6)
    Let us done each of them with Si
    so we have S1,S2,S3,S4,S5
    we assign a third parameter called weight to each element in Si which has satisfied the condition Pi>=Ci;
    so we we will have
    (5,2,ai),(6,2,bi),(7,2,ci)....etc for S1
    similarly for S2 and so on.
    We need to find in each set Si the the pair which has the smallest weight.
    if we have (5,2,3) and (6,2,4) then 5,2,3 should be chosen.We should make sure that there is only one pair in every set which is finally chosen on the basis of weight.
    Suppose we get a pair (5,2,3) in S1 and (5,2,3) in S2 we should see that (5,2,3) is not used to compare to compare with any other elements in the same set S2,
    Finally we should arrive at the best element pair in each set.They should be non repeating in other sets.
    Given a problem
    P0 P1 P2 P3 P4
    9 5 2 2 8
    6 5 4 5 3
    C0 C1 C2 C3 C4
    we have So as (P0,C0) and (P4,C0)
    assuming that the one with the smaller index has lesser weight PO is selected.In the program I have used random weights.from set S1 we select the pair PO,CO
    S1 =(P0,C1),(P1,C1) and (P4,C1)
    since P0 and P4 are already used in previous set we dont use them for checking in S1 so we have (P1,C1) as best.
    S2=(P0,C2),(P1,C2) and (P4,C2) so we dont use P0,C2 and P1 and C2 because PO and P1 are already used in S1.
    So we choose P4,C2
    in S3 and S4 ae have (P0,C3),(P1,C3),(P4,C3) so we dont choose anything
    and same in S4 also.
    So answer is
    (P0,C0),(P1,C1) and (P4,C2).
    My program is trying to assign weights and I am trying to print the weights along with the sets.It doesnt work fine.I need help to write this program to do this.
    Thanks.
    Regards.
    NP
    What I have tried till now.
    I have one more question could you help me with this.
    I have an array list of this form.
    package mypackage1;
    import java.util.*;
    public class DD
    private  int P;
    private  int C;
    private int weight;
    public void set_p(int P1)
    P=P1;
    public void set_c(int C1)
    C=C1;
    public void set_weight(int W1)
    weight=W1;
    public int get_p()
    return P;
    public int get_c()
    return C;
    public int get_x()
    return weight;
    public static void main(String args[])
    ArrayList a=new ArrayList();
    ArrayList min_weights_int=new ArrayList();
    ArrayList rows=new ArrayList();
    ArrayList temp=new ArrayList();
    Hashtable h=new Hashtable();
    String v;
    int o=0;
    DD[] d=new DD[5];
    for(int i=0;i<4;i++)
    d=new DD();
    for(int i=0;i<4;i++)
    d[i].set_p(((int)(StrictMath.random()*10 + 1)));
    d[i].set_c((int)(StrictMath.random()*10 + 1));
    d[i].set_weight(0);
    System.out.println("Producers");
    for(int i=0;i<4;i++)
    System.out.println(d[i].get_p());
    System.out.println("Consumers");
    for(int i=0;i<4;i++)
    System.out.println(d[i].get_c());
    System.out.println("Weights");
    for(int i=0;i<4;i++)
    System.out.println(d[i].get_x());
    for(int i=0;i<4;i++ )
    int bi =d[i].get_c();
    ArrayList row=new ArrayList();
    for(int j=0;j<4;j++)
    if( d[j].get_p() >=bi)
    d[j].set_weight((int)(StrictMath.random()*10 + 1));
    row.add("(" + bi + "," + d[j].get_p() + "," +d[j].get_x() + ")");
    else
    d[j].set_weight(0);
    row.add("null");
    rows.add(row);
    System.out.println(rows);
    int f=0;
    for(Iterator p=rows.iterator();p.hasNext();)
    temp=(ArrayList)p.next();
    String S="S" +f;
    h.put(S,temp);
    String tt=new String();
    for(int j=0;j<4;j++)
    if(temp.get(j).toString() !="null")
    // System.out.println("In if loop");
    //System.out.println(temp.get(j).toString());
    String l=temp.get(j).toString();
    System.out.println(l);
    //System.out.println("Comma matches" + l.lastIndexOf(","));
    //System.out.println(min_weights);
    f++;
    for(Enumeration e=h.keys();e.hasMoreElements();)
    //System.out.println("I am here");
    int ii=0;
    int smallest=0;
    String key=(String)e.nextElement();
    System.out.println("key=" + key);
    temp=(ArrayList)h.get(key);
    System.out.println("Array List" + temp);
    for( int j=0;j<4;j++)
    String l=(temp.get(j).toString());
    if(l!="null")
    System.out.println("l=" +l);
    [\code]

    In your example you selected the pair with the greatest
    distance from the first set, and the pair with the least
    distance from the second. I don't see how the distance
    function was used.
    Also it's not clear to me that there is always a solution,
    and, if there is, whether consistently choosing the
    furthest or the closest pairs will always work.
    The most obvious approach is to systematically try
    all possibilities until the answer is reached, or there
    are no possibilities left. This means backtracking whenever
    a point is reached where you cannot continue. In this case
    backtrack one step and try another possibility at this
    step. After all possible choices of the previous step,
    backtrack one more step and so on.
    This seems rather involved, and it probably is.
    Interestingly, if you know Prolog, it is ridiculously
    easy because Prolog does all the backtracking for you.
    In Java, you can implement the algorithm in much the same
    way as Prolog implementations do it--keep a list of all the
    choice points and work through them until success or there
    are none left.
    If you do know Prolog, you could generate lots of random
    problems and see if there is always a solution.

  • Portege M900 cannot detect/read from DVD drive - Need help badly!

    I have this problem with Portege M900. My laptop cannot read from the DVD drive.
    Does any one has similar problem? Need help badly as I cannot play my game from the CD.

    Test if the dvd drive is seated correctly in the compuer, I had a computer the dvd drive did not work until I removed one of the on back of the laptop (machine was a Toshiba different model) and then I was able to seat the dvd drive correctly.

  • HT4865 I just bought this ipad and cannot log out from icloud because i dont have the password.how can i log out from icloud?need help

    I just bought this ipad and cannot log out from icloud because i dont have the password.how can i log out from icloud?need help

    You need to return it to the seller and get your money back.  You cannot reset or use the device with another AppleID installed unless you know the password for that ID.
    If the device has been jailbroken, no one on here can give you any further help...the Terms of Use prohibit us from doing so.

  • Zen Vision:M problem, NEED HELP!

    My zen vision:m is starting to run slowly. It started right after my player froze and i reset it.Now its really slow and barely even switches screens sometimes.Right now its just a black screen with the keypad lit up.Whats wrong with it'sI NEED HELP!

    johnnnyp wrote:
    hi, i have a problem with my creative vision m. i wanted to watch a movie and it froze. i tried to shut it down but it wouldnt respond, and now is frozen. please help me if you can!
    You know its kinda rude to derail XBenzinoFla thread with your own problems, make your own thread next time.
    But to the both of you especially XBenzinoFla, try putting your ZVM in rescue mode and run scan disk to see if it hel
    ps.

  • Zen Micro problem need help

    Today i was listening to music and my zen micro just froze while playing and no buttons could be pressed and the lock button wasnt on. So i took the battery out and rebooted the player but it froze at the creative screen. I went home and i went to recovery mode and tried to reload the firmware but it said erasing firmware for more than 2 hours. So then i tried a format but it said formating for the same amount of time. I need help please. Also, recently i've had problems witht the headphone jack. When ever i would stick it in it would sound distorted and i would have to move it around until i got it to a certain spot to hear it good again. If anyone else has this problem please tell me. One more thing i had returned my other micro zen in for hard dri've probems and this was my new one do u think if i have to return in (hopefully not) that they would accept it.

    If the functions in Rescue Mode aren't working properly then you need to contact Creative Support.

  • Can't activate iPad after getting it from repair. Need help quick!

    I recently broke the screen of my iPad but the hardware was working very well. Today I got it back from the repair service I gave it to (not Apple store), and when I turn on the iPad, it tells me to activate the iPad using my Apple ID, I enter all my info correctly, but it doesn't unlock. Did they give me a wrong iPad, did I get scammed? Please I need help quickly since I will be leaving the town after 3 days. Thanks for any help

    Do you have the serial number of the iPad you purchased & sent in for repair? If so, look on the back/bottom of the iPad to see the serial number of the iPad you have. Does it match?
     Cheers, Tom

  • Ipod problem NEED HELP ASAP

    Hello guys,my ipod touch has battery problems and internal speaker are not working and will apple replace me a new one,i even have 1 year warranty and i want a new ipod touch white instead of black<<<plz plz plz reply ASAP plz really need HELP!THANK YOU

    If you iPod is defective, in warranty and not abused Apple will replace it with a refurbished one.  They may or may not replace it with the white one.  You will have to ask.
    Other users have asked the same question but I hav never heard them come back with whether or not they go the color changed.

  • My MacBookPro can't find my buetooth device from my speakers need help

    My MacBookPro can't find my buetooth device from my speakers need help

    Hi there nellyfau,
    You may find the troubleshooting steps in the article below helpful.
    Bluetooth Quick Assist
    http://support.apple.com/kb/ht1153
    -Griff W. 

Maybe you are looking for

  • Purchase Order resent when Confirmation

    Hello Gurus, I have an issue regarding sending of Purchase Orders. We use program RSPPFPROCESS to send Purchase Orders which are in stauts "Ordered". Problem is that when a user creates a Confirmation on this Purchase Order, PO is resent to supplier.

  • Infinite Loop Question - should be simple

    Ok I think I have a simple question to ask here. I am attempting to create a program that creates an infinite loop for multiples of two... ex: 2, 4, 8, 16, etc... The math behind it is simple, x^2 when x = 2. I then want the result of each equation t

  • Car kit cradle-adaptor for 6230

    please can someone tell me what i need for my car kit at the moment i have a 3310 system but have bought a 6230 and need some sort of adaptor for the cradle that is in the car as it is a different plug ect can you let me know where i can buy ect

  • MBAM 2.5 Client disk partition prerequisites

    Hello, I'm working on MBAM 2.5 and I can't information about the disk partition prerequisites. On the technet we need 2 partition but we don't have informations about the minimum size of the BDE partition. MBAM 2.5 Agent is capable to use the BdeHDcf

  • Tuxedo Migration - Memory issues

    Dear All, We recently migrated our application as below Old Environment:      32 bit Tuxedo 8.1 on HPUX, Patch Level 371 New Environment:      64 bit Tuxedo 11.1.1.3.0 on Linux, Patch Level 006 After this migration our C++ Corba servers are leaking m