Problem with bean controller

i have an entity controller below.
i also have a jsp page. and an entity class called officer.
on the jsp, i have a link for creating a new officer which basically executes
the method createSetup() below and loads the new jsp for entering the new officer details. on this new jsp i have a link that actually persists the offficer and basically it calls the method create below. if you check at the method create
its is supposed to do some validation. if any ofthe fields is empty, it should not
persist the officer. but it still does even if all fields are empty. what is wrong with my code. flow control or?
* OfficerController.java
* Created on February 1, 2008, 6:43 AM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package entities;
import java.util.ArrayList;
import java.util.Collection;
import javax.annotation.Resource;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnit;
import javax.persistence.Query;
import javax.transaction.UserTransaction;
* @author user
public class OfficerController {
    /** Creates a new instance of OfficerController */
    public OfficerController() {
    private Officer officer;
    private DataModel model;
    private String searchStr;
    private boolean isSearch;
    private boolean isAdmin=true;
    public boolean isIsAdmin() {
        return isAdmin;
    public void setIsAdmin(boolean isAdmin) {
        this.isAdmin = isAdmin;
    public boolean isIsSearch() {
        return isSearch;
    public void setIsSearch(boolean isSearch) {
        this.isSearch = isSearch;
    public String getSearchStr() {
        return searchStr;
    public void setSearchStr(String searchStr) {
        this.searchStr = searchStr.toUpperCase();
    @Resource
    private UserTransaction utx;
    @PersistenceUnit(unitName = "GMODPU")
    private EntityManagerFactory emf;
    private EntityManager getEntityManager() {
        return emf.createEntityManager();
    private int batchSize = 20;
    private int firstItem = 0;
    public Officer getOfficer() {
        return officer;
    public void setOfficer(Officer officer) {
        this.officer = officer;
    public DataModel getDetailOfficers() {
        return model;
    public void setDetailOfficers(Collection<Officer> m) {
        model = new ListDataModel(new ArrayList(m));
    public String createSetup() {
        this.officer = new Officer();
        return "officer_create";
    public String create() {
        if(valid())
             EntityManager em = getEntityManager();
        try {
            utx.begin();
            em.persist(officer);
            utx.commit();
            addSuccessMessage("Officer was successfully created.");
        } catch (Exception ex) {
            try {
                addErrorMessage(ex.getLocalizedMessage());
                utx.rollback();
            } catch (Exception e) {
                addErrorMessage(e.getLocalizedMessage());
        } finally {
            em.close();
      else{
           addErrorMessage("not valid");
      return "officer_list";
    public String detailSetup() {
        setOfficerFromRequestParam();
        return "officer_detail";
    public String editSetup() {
        setOfficerFromRequestParam();
        return "officer_edit";
    public String edit() {
        EntityManager em = getEntityManager();
        try {
            utx.begin();
            officer = em.merge(officer);
            utx.commit();
            addSuccessMessage("Officer was successfully updated.");
        } catch (Exception ex) {
            try {
                addErrorMessage(ex.getLocalizedMessage());
                utx.rollback();
            } catch (Exception e) {
                addErrorMessage(e.getLocalizedMessage());
        } finally {
            em.close();
        return "officer_list";
    public String destroy() {
        EntityManager em = getEntityManager();
        try {
            utx.begin();
            Officer officer = getOfficerFromRequestParam();
            officer = em.merge(officer);
            em.remove(officer);
            utx.commit();
            addSuccessMessage("Officer was successfully deleted.");
        } catch (Exception ex) {
            try {
                addErrorMessage(ex.getLocalizedMessage());
                utx.rollback();
            } catch (Exception e) {
                addErrorMessage(e.getLocalizedMessage());
        } finally {
            em.close();
        return "officer_list";
    public Officer getOfficerFromRequestParam() {
        EntityManager em = getEntityManager();
        try{
            Officer o = (Officer) model.getRowData();
            o = em.merge(o);
            return o;
        } finally {
            em.close();
    public void setOfficerFromRequestParam() {
        Officer officer = getOfficerFromRequestParam();
        setOfficer(officer);
    public DataModel getOfficers() {
        EntityManager em = getEntityManager();
        try{
            Query q;
           if(!isSearch){
            q = em.createQuery("select object(o) from Officer as o order by o.fullName");
            else {
            q = em.createQuery("select object(o) from Officer as o where (o.fullName like '%"+searchStr+"%' or o.extension like '%"+searchStr+"%' or o.room like '%"+searchStr+"%' or o.designation like '%"+searchStr+"%' or o.department like '%"+searchStr+"%') order by o.fullName");
            q.setMaxResults(batchSize);
            q.setFirstResult(firstItem);
            model = new ListDataModel(q.getResultList());
            return model;
        } finally {
            em.close();
    public static void addErrorMessage(String msg) {
        FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg);
        FacesContext fc = FacesContext.getCurrentInstance();
        fc.addMessage(null, facesMsg);
    public static void addSuccessMessage(String msg) {
        FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
        FacesContext fc = FacesContext.getCurrentInstance();
        fc.addMessage("successInfo", facesMsg);
    public Officer findOfficer(Integer id) {
        EntityManager em = getEntityManager();
        try{
            Officer o = (Officer) em.find(Officer.class, id);
            return o;
        } finally {
            em.close();
    public String searchOfficer() {
        isSearch=true;
        firstItem = 0;
        return "search_list";
    public String showOfficers() {
        isSearch=false;
        firstItem = 0;
        return "officer_list";
    public int getItemCount() {
        EntityManager em = getEntityManager();
        try{
             int count=0;
             if(!isSearch){
                count = ((Long) em.createQuery("select count(o) from Officer as o").getSingleResult()).intValue();
            else {
             count = ((Long) em.createQuery("select count(o) from Officer as o where (o.fullName like '%"+searchStr+"%' or o.extension like '%"+searchStr+"%' or o.room like '%"+searchStr+"%' or o.designation like '%"+searchStr+"%' or o.department like '%"+searchStr+"%')").getSingleResult()).intValue();
            return count;
        } finally {
            em.close();
    public int getFirstItem() {
        return firstItem;
    public int getLastItem() {
        int size = getItemCount();
        return firstItem + batchSize > size ? size : firstItem + batchSize;
    public int getBatchSize() {
        return batchSize;
    public String next() {
        if (firstItem + batchSize < getItemCount()) {
            firstItem += batchSize;
        if(!isSearch)
            return "officer_list";
        else
            return "search_list";
    public String prev() {
        firstItem -= batchSize;
        if (firstItem < 0) {
            firstItem = 0;
        if(!isSearch)
            return "officer_list";
        else
            return "search_list";
    private boolean valid()
          if(this.officer.getFullName()==null)
          addErrorMessage("fullName is empty");
          return false;
          else if(this.officer.getExtension()==null){
          addErrorMessage("extension is empty");
          return false;     
          else if(this.officer.getRoom()==null){
          addErrorMessage("room is empty");
          return false;
          else if(this.officer.getDesignation()==null){
          addErrorMessage("designation is empty");
          return false;
          else if(this.officer.getDepartment()==null){
          addErrorMessage("department is empty");
          return false;
          else if(this.officer.getEmail()==null){
          addErrorMessage("email is empty");
          return false;
          else
             return true;
}

Hendrik-Jan,
This is fixed in R11 release.
You could try making a sublass and implement serializable in the subclass.
Steven Davelaar,
Jheadstart team.

Similar Messages

  • Remote Delta link setup problem with Bean / Access Service

    Hello,
    I am trying to setup Remote Delta Link (RDL) between two portals. (Both portals same version - EP 7.0 EHP1 SP 05 - are in the same domain)
    I already have the Remote Role Assignment working without any issues.
    The following have been done successfully:
    1. Same user repository has been setup for both the portals
    2. Setup trust between producer and consumer (SSO working fine)
    3. Producer added and registered succesfully on consumer
    4. Permissions setup on producer and consumer
    4. pcd_service user with required UME actions setup
    I am able to see all the remote content in the Consumer portal.
    When I try to copy the remote content and paste it as local content, I am getting the following error:
    Could not create remote delta link to object 'page id'. Could not connect to the remote portal. The remote portal may be down, there may be a network problem, or your connection settings to the remote portal may be configured incorrectly.
    After increasing the log severity, I am able to see the following in Default Trace:
    com.sap.portal.fpn.transport.Trying to lookup access service (P4-RMI) for connecting to producer 'ess_int' with information: com.sap.portal.fpn.remote.AccessServiceInformation@31c92207[connectionURL=hostname.mycompany.com:50004, shouldUseSSL=false, RemoteName=AccessService]
    com.sap.portal.fpn.transport.Unable to lookup access service (P4-RMI) with information: com.sap.portal.fpn.remote.AccessServiceInformation@31c92207[connectionURL=hostname.mycompany.com:50004, shouldUseSSL=false, RemoteName=AccessService]
    AbstractAdvancedOperation.handleDirOperationException
    [EXCEPTION]
    com.sap.portal.pcm.admin.exceptions.DirOperationFailedException: Could not retrieve the bean / access service to connect with producer
    Could not retrieve the bean / access service to connect with producer
    Like you can see above, there is some bean / access service which is not retrieved successfully. I am not sure if this is a permission problem on the consumer.
    I have checked that the P4 ports are configured correctly (standard - not changed) and I am able to telnet from producer to consumer (and vice versa) on the P4 port.
    I am stuck at this point and am not able to find any information on this.
    I would really appreciate if some one can point me in the right direction.
    Thank you for reading.
    - Raj

    Hi Raj,
    Please check your config of the P4 port on the producer.  Is it really 50004 (check SystemInfo of the producer)?
    I do think there's a problem with the P4 communication since RDL requires P4 connection.
    Do you have load balanced consumer-producer connection? Please refer to this blog for further details
    Little known ways to create a load balanced Consumer – Producer connection in a FPN scenario
    Regards,
    Dao

  • Problems with Ethernet controller and PCI device driver on Satellite L30-10X

    Hellow!
    Sorry for my bad English, I'm from Russia.
    Just few days ago I bought Satellite L30-10X with W Vista on board. My opinion, that this OS does't very good on this computer, so I install W XP.
    I have some problems with drivers. At first, I dont know what model I have:PSL30 or PSL33? I download all drivers for both models. But, after installation, computer doen't find drivers for Ethernet controller and PCI device...

    Hi
    Satellite L30-10X belongs to the PSL33E series. This number can be found on the label placed on the bottom of the unit!
    You have to choose this number from the driver download form to get the compatible XP drivers.
    I dont know why you are not able to install the LAN driver. Ive got the same notebook with Vista and Ive installed the XP and all drivers run fine.
    I assume you have installed the drivers in wrong order. Please take the look in the Toshiba installation instruction txt file. In this order you have to install the driver! Its important.
    I think you should install the XP again to ensure the clean registry and then download and install the compatible XP drivers like mentioned in the installation instruction file.
    Good luck

  • 6147 problem with AGP controller

    I have loaded W2000 onto a packard bell club 70 which has a MSI-6147 motherboard.
    Device manager is reporting a problem with the PCI to AGP controller, error 12, not enough resources.
    Have tried a number of forums for help (Microsoft, Packard Bell) and have been advised to update bios. I believe my current bios is V2.0, dated 08/30/1999, and cannot find a newer one available.
    Any advice on bios would help. Any advice on AGP controller problem would make my xmas.
    Thanks

    I've checked the PB site and they have a number of bios listed for club range but none match what my m/c is telling me, which is
    08/30/1999;440BX-W977-2A69KM4EC-00
    Award Modular Bios v4.51PG
    W6147P2 v2.0 083099
    Looking on the link you left me the latest bios listed is v1.8.
    Would you also recommend a bios upgrade as the likely solution to my problem or are there other known problems with W2000 on this M'board?
    Thanks

  • Problem with beans in session scope

    Hello,
    I developped a website using JSP/Tomcat and I can't figure out how to fix this problem.
    I am using beans in session scope to know when a user is actualy logged in or not and to make some basic informations about him avaible to the pages. I then add those beans to an application scope bean that manages the users, letting me know how many are logged in, etc... I store the user beans in a Vector list.
    The problem is that the session beans never seem to be destroyed. I made a logout page which use <jsp:remove/> but all it does is to remove the bean from the scope and not actualy destroying it. I have to notify the application bean that the session is terminated so I manualy remove it from its vector list.
    But when a user just leave the site without using the logout option, it becomes a problem. Is there a way to actualy tell when a session bean is being destroyed ? I tried to check with my application bean if there are null beans in the list but it never happens, the user bean always stays in memory.
    Is there actualy a way for me to notify the application bean when the user quits the website without using the logout link ? Or is the whole design flawed ?
    Thanks in advance.
    Nicolas Jaccard

    I understand I could create a listener even with my current setup Correct, you configure listeners in web.xml and they are applicable to a whole web application irrespective of whether you use jsp or servlets or both. SessionListeners would fire when a session was created or when a session is about to be dropped.
    but I do not know how I could get a reference of the application bean in >question. Any hint ?From your earlier post, I understand that you add a UserBean to a session and then the UserBean to a vector stoed in application scope.
    Something like below,
    UserBean user = new UserBean();
    //set  bean in session scope.
    session.setAttribute("user", user);
    //add bean to a Vector stored in application scope.
    Vector v = (Vector)(getServletContext().getAttribute("userList"));
    v.add(user);If you have done it in the above fashion, you realize, dont you, that its the same object that's added to both the session and to the vector stored in application scope.
    So in your sessionDestroyed() method of your HttpSessionListener implementation,
    void sessionDestroyed(HttpSessionEvent event){
         //get a handle to the session
         HttpSession session = event.getSession();
          //get a handle to the user object
          UserBean user = (UserBean)session.getAttribute("user");
           //get a handle to the application object
          ServletContext ctx = session.getServletContext();
           //get a handle to the Vector storing the user objs in application scope
            Vector v = (Vector)ctx.getAttribute("userList");
           //now remove the object from the Vector passing in the reference to the object retrieved from the Session.
            v.removeElement(user);
    }That's it.
    Another approach would be to remove the User based on a unique identifier. Let's assume each User has a unique id (If your User has no such feature, you could still add one and set the user id to the session id that the user is associated with)
    void sessionDestroyed(HttpSessionEvent event){
         //get a handle to the session
         HttpSession session = event.getSession();
          //get a handle to the user object
          UserBean user = (UserBean)session.getAttribute("user");
           //get the unique id of the user object
           String id = user.getId();
           //get a handle to the application object
          ServletContext ctx = session.getServletContext();
           //get a handle to the Vector storing the user objs in application scope
            Vector v = (Vector)ctx.getAttribute("userList");
           //now iterate all user objects in the Vector
           for(Iterator itr = v.iterator(); itr.hasNext()) {
                   User user = (User)itr.next();               
                    if(user.getId().equals(id)) {
                           //if user's id is same as id of user retrieved from session
                           //remove the object
                           itr.remove();
    }Hope that helps,
    ram.

  • Problems with the Controller in WebDynpro

    Hello, I have a question: I am trying to do create files to my project in WebDynpro and it gives errors me, one of the so many errors that leave to me is: wdContext cannot be resolved, this to that it must? Another one is: IPrivateComponent cannot be resolved. I have already reimport the model and e I did rebuild to the project, no longer that but to do, hopefully they can help me.
    Thanks!!!
    Daniela

    Hello T
    he problem I am solved but I solve another problem that tapeworm with a mapping in the model and when resolve this problem, once more appear the error in the controller: wdContext cannot be you solve like the other errors. Volvi to make Repair and Rebuild but is not solved now, not that it can be
    Thanks
    Daniela

  • Need Help!! Problem with Bean Serializer in SOAP

    Hi.
    I have a webservice develope in Jdeveloper 9.0.3. The webservice is deploy in a 9ias 9.0.3. When a invoke a method with a complex type parameter i get this error:
    [SOAPException: faultCode=SOAP-ENV:Client; msg=No Deserializer found to deserialize a &apos;http://xml.apache.org/xml-soap:datPerWS_Tdatper&apos; using encoding style &apos;http://schemas.xmlsoap.org/soap/encoding/&apos;. [java.lang.IllegalArgumentException]]
    Please.SomeBody knows like resolve this problem?
    Thanks.

    Could you post your code, particularly the bean that you are passing? This code sample here gives some of the key rules including having an implementation of java.io.Serializable and setters/getters for each item:
    http://otn.oracle.com/tech/webservices/htdocs/samples/customtype/content.html
    Mike.

  • RAID problems with ICH5R controller

    I am trying to reconfigure (after my ATA133 RAID0 broke) my Neo FIS2R board with the following:
    1 x SATA150 Disk on SER1 (Raid-ready configuration)
    Optical Drives (DVD Pri Master, CD Pri Slave) on Primary IDE
    Backup IDE drive (ATA133) on Secondary IDE.
    I have checked the excellent sticky on RAID setup by vango44 and appear to have everything correct for the 'Raid Ready' arrangement, booting from the SATA disk and with both PATA channels enabled.
    During POST, all the devices are reported (if you spot them flying past). Windows XP installed successfully onto the SATA drive (PATA drive disconnected at this point) and boots normally. But once booted, nothing on the Primary IDE channel appears in Windows. (I've tried swapping the Optical and PATA drives and its always the Primary channel missing).
    In Windows Device Manager I have no problem devices. Both the Primary and Secondary IDE channels appear under IDE and ATAPI controllers (as does the Intel 82801EB). But any devices connected on Pri IDE are missing.
    Any ideas?
    thanks folks,
    Keith

    The SATA is 'Native' as opposed to 'Legacy' - I think that is the setting you are referring to?
    I could quite happily throw this **** motherboard out the window. I have always found it unbelievably temperamental and awkward to configure.
    I just had it booting quite happily from the SATA drive on the Intel controller (albeit with the Primary IDE devices missing), and I just discovered that I could access my two ATA133 drives by attaching them to the Promise Controller with the latter set as S-ATA.
    As soon as I do that, the system will not boot. If I disable the Promise controller or disconnect the ATA133 drives the system boots off the SATA drive as before.  WHY???
    Lessons learnt:
    1) Be more disciplined about backup
    2) Avoid Maxtor drives. (I have run our office network of 10 PC's for over a decade and had two hard drive failures: both in the last 2 years and both Maxtor)
    3) Ditto MSI motherboards. I think they try to do too much for too little.
    thanks for trying to help anyway.

  • Problem with bean in a JSP page

    I have developped a JSP pages in wich I call a bean with
    <jsp:useBean id="db" scope="request" class="SQLBean.class" />
    The bean SQLBean.class is in the same directory as the JSP page.
    When I execute the JSP, I have the following error:
    SQLBean.class db = (SQLBean.class) JSPRuntime.instantiateBean("db", "SQLBean.class", "request", __db_was_created, pageContext, request, session, application);
    Syntax error: [expected after this token
    Syntax error: "]" inserted to complete ArrayAccess
    Syntax error: "AssignmentOperator AssignmentExpression" inserted to complete StatementExpression
    I use JRUN with IIS
    Thanks for the help

    I am assuming your class name is SQLBean.
    use:
    <jsp:useBean id="db" scope="request" class="SQLBean" />
    instead of:
    <jsp:useBean id="db" scope="request" class="SQLBean.class" />

  • MS 694D Pro - problem with ata100 controller

    Hi,
    I bought a new hard drive (Ibm 60GB, 7200rpm), and have a  serious problem. This new drive is intended to be a system drive ( master ) and off course I plugged it in the ata 100 /raid controller (on board promise fast trak 100) . I've installed msi promise driver from the floppy ( the only one that worked ), and set up win xp .
    The problem is that now I have blue screens every time I try to read/write to hard drive ( the other words every 2 minutes)  X(
    I think it is a controller issue, because when I plug the drive into the primary ide channel, everything works fine ( but much slower ).
    Any help would be much appreciated ....
    Dare
    config:
    MSI 6321 - 694DPro ver 1.0
    Intel PIII 866 MHz (single)
    512 MB RAM
    IBM 60GB 7200rpm
    MSI GeForce 4 MX440  

    http://www.msi.com.tw/program/products/mainboard/mbd/pro_mbd_detail.php?UID=83&MODEL=MS-6321
    reading bios link the intergrated raid bios has been updated several times,3.4 and 3.6 both mention it
    you must all ways use the raid driver that relates to the bios
    any raid bios upgrade means updating the driver

  • 945GCM7 problems with USB

    Hi all,
    I seem to be having problems with my USB and for what i can tell it is my mobo thats the problem.
    The problem is that i can plug in my USB pendrives and they are recongnised perfectly fine, and are readable fine but when i try to write files to them they are quickly disconnected and then reconnected, inturupting the transfer.
    I know its not my windows because i have just done a fresh install and still have the same problem. Its also not the pendrive beacuse its the same on all pendrives i use and the pen drives work fine on others pcs. It was working fine up untill about 4 days ago.
    It be really cool if i could get some help, any ideas?
    # Pentium(R) Dual-Core CPU E5200 @ 2.50GHz (2 CPUs)
    # MSI 945GCM7 MS-7507
    # 2x2GB crucial DDR2
    # BFG NVIDIA GeForce 8800 GT 512MB PCI-E
    # MAXTOR, 250GB, SATA
    # Western Digital, 250GB, SATA
    # Stock Sound card
    # Windows XP Home Edition / Service Pack 2
    # sumevision P4 550W 35A

    Quote from: nightmare99 on 04-March-09, 16:48:43
    Are you using front USB ports? If so disconnect them and use the back ones for testing purposes.
    i have done, still know success, im starting to think that theres a problem with the controller so i am gonna buy a pci card with usbs and try that.

  • Problem with NEO2 and sata controller card

    1.Product Type: MSI K8N Neo2 Platinum (MS-7025)
    and the controller card is a InnoVision DM-8301 and the hard drive is a Seagate ST3320620AS
    2.BIOS version: The newest one, 1C0 or something.
    3.External VGA Type: Geforce 6800 GT
    4.CPU Type: AMD 64 3500+
    5.Memory Type: G Skill ZX 2048mb.
    6.Power Supply Type:
    7.Operating System: Xp Pro
    8.Problem Description:
    Hello. I have a strange problem with my controllercard. I wrote this text to InnoVision suport and they send me files and bios updates for a whole week and it was still the same problem. And then i tried the card in an older computer and everything worked fine.
    I wrote
    "Hello. I got some problems with my new controller card. I can find my new harddrive ,that's conected to the controller card, when iam inside windows and it's seems to be no problem. I can look on every seting on it and everywhere i look i can read "No problem". I Also did some test with the seatools programe and everything was fine. But when i schould copy files to it the coumputer start lagging after a few seconds and i cant do anything. After a while i can move the mouse around but the it laggs again. My computer is overclocked at the time but i have tried to use the harddrive when it's not clocked also. Also when im goin in to teh controlpanel and starts the setings for Sillicon Images sata controll and have music on my computer, the music laggs for a very very short moment. Something must be wrong and i can not find it."
    It's still the same problem in my computer. The older computer had a MSI moderboard with a VIA chip and i have a nForce 3. InnoVison said i should talk to you about this problem. I have 3 harddrives but i use this controllercard because i want to have my computer overclocked and then i can't use 2 of the sata ports as i think you know.
    I would be very thankful if you could help me with this problem.
    //Martin

    I've used a noname SATA pci card (non raid) with SIL3112 on my neo2 without problems with 1C bios.
    Think you may try with a disk lower than 48bitLBA need (137GB barrier), eg a 120GB disk
    Quote:
     have the InnoVision EIO DM-8301 and had alot of problems using it with WD 160MB SATA drive.
    I am using Intel 865 based MB with 2 original SATA channels. The original SATA channels are bootable.
    I could not used the EIO card with 160G HDD. The whole setup is working only after I connected oine of my 120G Segate SATA HDD to the EIO Sata card.
    I think this card do not properly support HDD above 120G.
    Please respond to: [email protected]
    http://www.devhardware.com/forums/storage-devices-80/sata-as-boot-20080-2.html
    Btw: you have xp sp2 ?
    48bitLBA is not enabled in the first version.
    http://www.48bitlba.com/winxp.htm
    Edit:
    Here's another with complete different setup and same problems
    http://forum.tweakxp.com/forum/Topic212148-4-1.aspx
    I doubt it has anything to do with your motherboard and/or bios.
    Btw: I looked at innovision and their drivers in download area are very old.
    Get the latest SIL3112 drivers for XP here:
    http://www.siliconimage.com/support/supportsearchresults.aspx?pid=63&cid=3&ctid=2&osid=4&
    And remember 3112 is sata150 only , so it's not sure it will work with your drive at all .
    Anyway it should be set to fixed sata1.5G with jumper - not certain the controller can autonegotiate
    without trouble. You cannot have command queing enabled either , disk support only NCQ and controller TCQ
    so having command queing set ON will cause major conflicts in data transfers.

  • Problem with java beans and jsp on web logic 6.0 sp1

              HI ,
              I am using weblogic6.0 sp1.
              i have problem with jsp and java beans.
              i am using very simple java bean which stores name and email
              from a html form.
              but i am getting following errors:
              Full compiler error(s):
              D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              cannot resolve symbol
              symbol : class userbn
              location: class jsp_servlet._savename2
              userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              ^
              D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              cannot resolve symbol
              symbol : class userbn
              location: class jsp_servlet._savename2
              userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              ^
              D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:94:
              cannot resolve symbol
              symbol : class userbn
              location: class jsp_servlet._savename2
              ud = (userbn) java.beans.Beans.instantiate(getClass().getClassLoader(),
              "userbn"); //[ /SaveName2.jsp; Line: 7]
              ^
              3 errors
              in which directory should i place java bean source file(.java file)
              here is my jsp file:
              <%@ page language = "java" contentType = "text/html" %>
              <html>
              <head>
              <title>bean2</title>
              </head>
              <body>
              <jsp:usebean id = "ud" class = "userbn" >
              <jsp:setProperty name = "ud" property = "*" />
              </jsp:usebean>
              <ul>
              <li> name: <jsp:getProperty name = "ud" property = "name" />
              <li> email : <jsp:getProperty name = "ud" property = "email" />
              </ul>
              </body>
              <html>
              here is my bean :
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              import java.io.*;
              public class userbn implements Serializable
                   private String name ;
                   private String email;
                   public void setName(String n)
                        name = n;
                   public void setEmail(String e)
                        email = e;
                   public String getName()
                        return name;
                   public String getEmail()
                        return email;
                   public userbn(){}
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              pls help me.
              Thanks
              sravana.
              

              You realy can do it like Xiang says, but the better way is to use packages. That's
              the way BEA is designed for. If you use packages you can but your bean classes
              in every subfolder beneath Classes. Here for example we have the subfolders test
              and beans:
              You have to declare the package on top of your Bean Source Code:
              package test.beans;
              In your JSP you don't need the import code of Xiang. You only have to refer the
              path of your bean class:
              <jsp:useBean id="testBean" scope="session" class="test.beans.TestBean" />
              There are some other AppServers that only can deploy Java Beans in packages. So
              if you use packages you are always on the right side.
              ciao bernd
              "sravana" <[email protected]> wrote:
              >
              >Thank you very much Xiang Rao, It worked fine.
              >Thanks again
              >sravana.
              >
              >"Xiang Rao" <[email protected]> wrote:
              >>
              >><%@ page import="userbn" language = "java" contentType = "text/html"
              >>%> should
              >>work for you.
              >>
              >>
              >>"sravana" <[email protected]> wrote:
              >>>
              >>>HI ,
              >>>
              >>>I am using weblogic6.0 sp1.
              >>>
              >>>i have problem with jsp and java beans.
              >>>
              >>>i am using very simple java bean which stores name and email
              >>>
              >>>from a html form.
              >>>
              >>>but i am getting following errors:
              >>>
              >>>________________________________________________________________
              >>>
              >>>Full compiler error(s):
              >>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              >>>cannot resolve symbol
              >>>symbol : class userbn
              >>>location: class jsp_servlet._savename2
              >>> userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              >>> ^
              >>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              >>>cannot resolve symbol
              >>>symbol : class userbn
              >>>location: class jsp_servlet._savename2
              >>> userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              >>> ^
              >>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:94:
              >>>cannot resolve symbol
              >>>symbol : class userbn
              >>>location: class jsp_servlet._savename2
              >>> ud = (userbn) java.beans.Beans.instantiate(getClass().getClassLoader(),
              >>>"userbn"); //[ /SaveName2.jsp; Line: 7]
              >>> ^
              >>>3 errors
              >>>
              >>>____________________________________________________________
              >>>
              >>>in which directory should i place java bean source file(.java file)
              >>>
              >>>here is my jsp file:
              >>>--------------------------------------------------------
              >>>
              >>><%@ page language = "java" contentType = "text/html" %>
              >>><html>
              >>><head>
              >>><title>bean2</title>
              >>></head>
              >>><body>
              >>><jsp:usebean id = "ud" class = "userbn" >
              >>><jsp:setProperty name = "ud" property = "*" />
              >>></jsp:usebean>
              >>><ul>
              >>><li> name: <jsp:getProperty name = "ud" property = "name" />
              >>><li> email : <jsp:getProperty name = "ud" property = "email" />
              >>></ul>
              >>></body>
              >>><html>
              >>>
              >>>-------------------------------------------------------------
              >>>
              >>>here is my bean :
              >>>
              >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              >>>
              >>>import java.io.*;
              >>>
              >>>public class userbn implements Serializable
              >>>{
              >>>
              >>>     private String name ;
              >>>
              >>>     private String email;
              >>>
              >>>     public void setName(String n)
              >>>     {
              >>>
              >>>          name = n;
              >>>     }
              >>>
              >>>     public void setEmail(String e)
              >>>     {
              >>>
              >>>          email = e;
              >>>     }
              >>>
              >>>     public String getName()
              >>>     {
              >>>
              >>>          return name;
              >>>     }
              >>>
              >>>     public String getEmail()
              >>>     {
              >>>
              >>>          return email;
              >>>     }
              >>>
              >>>     public userbn(){}
              >>>}
              >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              >>>
              >>>pls help me.
              >>>Thanks
              >>>sravana.
              >>>
              >>
              >
              

  • Problem with cascade delete and remove bean

    I am working with two entity beans that map to two tables that have a foreign key relationship. Table B has a foreign key to A and in the database that foreign key is set for cascaded updates and cascaded deletes.
    The problem occurs when the the sytem first tries to remove bean 1 (mapped to table A) and then remove bean 2 (mapped to B) where bean 2 is associated with bean 1 with a foreign key relationship. The first remove works but then when it tries to remove bean 2 it throws a very ugly "CORBA TRANSACTION_ROLLEDBACK 9998" Maybe exception. My guess is that the reason is because bean 2's reocrd in the database was deleted when bean 1 was removed but the 'bean object' was not removed from the container.
    When I go into our Application Server and look at how it see's the tables, it show the wrong relationship. It shows a restrict delete and a restrict update realationship.
    My question is, am I wrong to think that this is a application server problem or a configuration problem? It seems to me that attempting to remove a non-existant record should not cause an error. It won't cause any SQL exceptions. Is this a flawed viewpoint? As a work around I made sure that the dependent records are deleted first but it kind of defeats the point of cascaded deletes.
    We have a limited number of support calls, should I use one or am I at fault here?

    If the database removes the record from the second
    table, why is the system trying to remove it once
    again? You should try to remove an entity from a
    single place, should it be the database or the
    application. Don't try to remove it twice.
    Regards,
    DimitarI could do this but it is a huge pain in my ass. The problem is that you might want to remove the dependent bean without removing it's parent. The object structure is a little questionable, I'll admit that. It is, as they say, the eleventh hour and I can't really change that now.
    The way this work is that the server gets a list of objects marked either as new, modified, or deleted. It then relates those changes back to the database.
    In this case we have two lists(which makes me realize where the class structure sucks.) In order to do what you suggest I would have to get all the deleted parent objects and then search all the deleted child objects for ones that have the parent's key in them.
    It would be prefferable to fix the class structure but again this is not an option.
    Anyone want to answer the question I asked?

  • A simple problem with sateful Session beans

    Hi,
    I have a really novice problem with stateful session bean in Java EE 5.
    I have written a simple session bean which has a counter inside it and every time a client call this bean it must increment the count value and return it back.
    I have also created a simple servlet to call this session bean.
    Everything seemed fine I opened a firefox window and tried to load the page, the counter incremented from 1 to 3 for the 3 times that I reloaded the page then I opened an IE window (which I think is actually a new client) but the page counter started from 4 not 1 for the new client and it means that the new client has access to the old client session bean.
    Am I missing anything here???
    Isn�t it the way that a stateful session bean must react?
    This is my stateful session bean source.
    package test;
    import javax.ejb.Stateful;
    @Stateful
    public class SecondSessionBean implements SecondSessionRemote
    private int cnt;
    /** Creates a new instance of SecondSessionBean */
    public SecondSessionBean ()
    cnt=1;
    public int getCnt()
    return cnt++;
    And this is my simple client site servlet
    package rezaServlets;
    import java.io.*;
    import java.net.*;
    import javax.ejb.EJB;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import test.SecondSessionRemote;
    public class main extends HttpServlet
    @EJB
    private SecondSessionRemote secondSessionBean;
    protected void processRequest (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType ("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter ();
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Servlet main</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Our count is " + Integer.toString (secondSessionBean.getCnt ()) + "</h1>");
    out.println("</body>");
    out.println("</html>");
    out.close ();
    protected void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    processRequest (request, response);
    protected void doPost (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    processRequest (request, response);
    }

    You are injecting a reference to a stateful session bean to an instance variable in the servlet. This bean instance is shared by all servlet request, and that's why you are seeing this odd behavior.
    You can use type-leve injection for the stateful bean, and then lookup the bean inside your request-processing method. You may also save this bean ref in HttpSession.
    @EJB(name="ejb/foo", beanName="SecondBean", beanInterface="com.foo.foo.SecondBeanRemote")
    public MyServlet extends HttpServlet {
    ic.lookup("java:comp/env/ejb/foo");
    }

Maybe you are looking for

  • How can I print a pdf in the actual size with a page border?

    How can I print a pdf in the actual size with a page border? (2 pages per sheet preferred) I usually print pdfs of books at a copy shop and they turn out fine. The problem comes when I try to print the same books at home. I use Adobe Acrobat X with t

  • Error while creating database using DBCA

    Hi, I installed Oracle10gR2 on my windows machine.Now am creating a database with dbca but just after i click the finish button it gives me the error - Cannot create directory "F:\oracle\cfgtoollogs\dbca\ora10g" where F:\oracle is the directory where

  • F4 programming

    Dear All, I am trying to give the list of numbers as the F4 option. But nothing is displaying for me. Please check my code and let me know the problem. Helpful answers will be appreciated. AT SELECTION-SCREEN ON VALUE-REQUEST FOR debtact.   DATA  : 

  • Zoom factor less than 1 = distortion​s

    I am reading live image data from a firewire camera and displaying using the picture display. I change binning on my camera, therefor the resolution changes. I want to programmaticlly scale the image to a set picture display size so that when the res

  • Odd Files in Hard Drive

    I performed a clean install of Leopard on two Intel macs today. One of the macs has some odd files named bin, cores, etc, mach_kernel, private, sbin, tmp, usr, var and Volumes in the hard drive window along with application and system folders that wo