My first roadblocks in bean culture

I was trying to follow the how to make a bean instructions
http://sheikyerbouti.developpez.com/forms-pjc-bean/first-bean/first_bean.pdf
but I got bogged down here:
A Javabean source code ‘s skeleton (bean_template.txt) is provided with the samples to help you to quickly start
a new PJC/Javabean class.
• Open the bean_template.txt file provided with the samples, then copy the content in the new
GetCanvasProp.java window
What samples?
I think the url was supposed to be this but that no longer exists
http://www.oracle.com/us/technology/sample_code/products/forms/index.html
BTW I note that jdeveloper 11.1.1.2 uses weblogic 10.3.5 in case anyone was harboring wishes of less weblogic's on their system. Afraid not!
This discussion of bean construction doesn't address the samples, and uses eclipse but brings up the question of "compiler compliance
level". How do we find out the compiler compliance level of any forms version? (I'm trying to use 11.1.1.4)
http://devtalks.blogspot.com/2008/07/creating-and-using-java-beans-in-oracle.html

Hello,
You can download the zip file from the link at the end of the article (PDF).
Francois

Similar Messages

  • Can I first new a bean and then use setProperty?

    I want to use javaBean in my jsp ,but my jsp need additional method which do not be GET and SET.So I must new a javabean,but whether the container will also new a javabean when I use jsp:setProperty.

    HI
    Your question is not so understandable!
    If you want some other functions in Bean(not get and set) simply write it in source and compile it.Everytime that you compile your bean,you get new version in your package,so you dont need to do anything else,just connect to bean in JSP file and all the function can be used.
    Be more specific next time,may be you will get better answer
    Have a nice day
    Yulian

  • First use of jsp and java bean and "Unable to compile class for JSP" error

    Hi,
    I am trying to create my first jsp + java bean and I get a basic error (but I have no clue what it depends on exactly). Tomcat seems to cannot find my class file in the path. Maybe it is because I did not create a web.xml file. Did I forgot to put a line in my jsp file to import my bean?
    Thank you very much for your help.
    Here is my error:
    An error occurred at line: 2 in the jsp file: /login.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /usr/local/tomcat/jakarta-tomcat-5/build/work/Catalina/localhost/test/org/apache/jsp/login_jsp.java:43: cannot resolve symbol
    symbol : class CMBConnect
    location: class org.apache.jsp.login_jsp
    CMBConnect test = null;
    I only have this in my directory:
    test/login.jsp
    test/WEB-INF/classes/CMBConnect.java
    test/WEB-INF/classes/CMBConnect.class
    Do I need to declare another directory in classes to put my class file in it and package my bean differently?
    Here is my login.jsp:
    <%@ page errorPage="error.jsp" %>
    <jsp:useBean id="test" type="CMBConnect" scope="session" />
    <html>
    <head>
    <title>my test</title>
    </head>
    <body>
    <h3>Login information</h3>
    <b><%=session.getValue("customerinfo.message")%></b>
    <form> ....... </form>
    </body>
    </html>
    and here is my CMBConnect.java:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class CMBConnect
    public CMBConnect () { }
    public String openConnection(String id, String password) {
    String returnText = "";
    try {
    Connection con = null;
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection("jdbc:oracle:thin:@myserver.abc.com:1521:TEST", id, password);
    if(con.isClosed())
    returnText = "Cannot connect to Oracle server using TCP/IP...";
    else
    returnText = "Connection successful";
    } catch (Exception e) { returnText = returnText + e; }
    return returnText;
    Thanks again!

    Thanks for you help
    I created the package and I get this error this time:
    javax.servlet.ServletException: bean test not found within scope
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:822)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:755)
         org.apache.jsp.login_jsp._jspService(login_jsp.java:68)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:268)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:277)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:223)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

  • Validation error while trying to change a value in a request scope bean

    - JBoss 4.2.3.GA
    - JSF 1.2_09-b01-BETA1 (Mojarra)
    - Java 5 Update 17
    Hello, everybody!
    I'm having the following problem in my JSF web application:
    I have a request scope backing bean. The first time this bean is loaded (I check
    this with the ResponseStateManager.isPostBack() method) I fill a list of SelectItem
    instances that are to be displayed in the JSF page in a +<h:selectOneMenu>+ component.
    The list goes, of course, to the +<h:selectOneMenu>+'s +<f:selectItems>+ facet child
    component. In the constructor I also define the value that goes to the value property
    of the +<h:selectOneMenu>+ component. This value is a property in the backing bean, as
    is the list of SelectItem instances. Until now we have something like this:
    The backing bean declaration in faces-config.xml:
    <managed-bean>
        <managed-bean-name>solicitacaoGeral</managed-bean-name>
        <managed-bean-class>br.urca.solicitacoes.web.PaginaSolicitacaoGeral</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    The relevant parts of the JSF page:
    <h:form id="form">
        <h:selectOneMenu value="#{solicitacaoGeral.setorOrigem}" id="foco">
            <f:selectItems value="#{solicitacaoGeral.setoresOrigem}" />
        </h:selectOneMenu>
    </h:form>
    The relevant parts of the backing bean class:
    public class PaginaSolicitacaoGeral
        private final List<SelectItem> fSetoresOrigem = new ArrayList<SelectItem>();
        private Setor fSetorOrigem;
        public PaginaSolicitacaoGeral()
            if (primeiraExibicao()) // First load (!ResponseStateManager.isPostBack())
                // Fill fSetoresOrigem...
                fSetorOrigem = ...
            else // Page submitted
                // Read below...
        public List<SelectItem> getSetoresOrigem()
            return fSetoresOrigem;
        public Setor getSetorOrigem()
            return fSetorOrigem;
        public void setSetorOrigem(Setor setorOrigem)
            fSetorOrigem = setorOrigem;
        private boolean primeiraExibicao()
            String idFerramentaExibicao =
                FacesContext.getCurrentInstance().getViewRoot().getRenderKitId();
            ResponseStateManager gerenciadorEstadoResposta =
                RenderKitUtils.getResponseStateManager(
                FacesContext.getCurrentInstance(), idFerramentaExibicao);
            return !gerenciadorEstadoResposta.isPostback(
                FacesContext.getCurrentInstance());
    }But when the user submits the form and the bean constructor is called again
    (this time the method ResponseStateManager.isPostBack() returns true ),
    in the else block in the constructor above, I need to fill fSetoresOrigem with
    other values and also the fSetorOrigem field because, of course, the fSetorOrigem
    field has to be a valid value that exists in the new fSetoresOrigem list.
    JSF is not complaining about the change to the list items, but it is complaining
    to the change to the fSetorOrigem field (the list value), even though it is a
    valid value present in the list. So I'm getting this error message:
    08:23:54,312 INFO  [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
    sourceId=form:foco[severity=(ERROR 2), summary=(form:foco: Validation Error: Value is not valid), detail=(form:foco: Validation Error: Value is not valid)]I suppose that JSF is comparing the new value of the field fSetorOrigem with the value
    it has in the view state. As the value is different it is raising the error. That's
    what I suppose. But am I not able the change the value in the postback? I've already
    checked and the value is valid. It corresponds to a value that exists in the list.
    I really need a solution to this problem as I'm stuck with this and can't proceed until
    I find a solution to this. What I am doing wrong and how can I solve this?
    Thank you very much.
    Marcos

    BalusC wrote:
    It is comparing the selected value against the List<SelectItem> returned by getSetoresOrigem() as it is during the apply request values phase of the form submit request.Ok. That's what I supposed JSF was doing.
    BalusC wrote:
    If the selected value isn't in there, then you will get this error.I can understand this, but is this right? As I said, the old value isn't really there because I changed the list values to new ones. But the new value (the value of fSetorOrigem ) corresponds to a value that exist in the new list items, so a valid value. So JSF is not considering that I also changed the list, not just the value. It is comparing the new value with the old list, not the new one. Acting like this JSF is making the page looks like a static HTML page, not a dynamic one. If I can't change the list and the value, what's the point of that? In my point of view I'm not doing anything wrong, I'm not violating any JSF rules.
    Marcos

  • Binding stateful EJB bean

    Hi,
    I have a problem binding EJB bean (Stateful bean). Bean have two business methods:
    SendPacketToTRSM and GetData
    When I invoke SendPacketToTRSM method from process, application server create first instance of bean and invoke method SendPacketToTRSM
    Next I invoke GetData method in process, application server create second instance of bean and invoke method GetData.
    Every time, when I invoke method, application server create new instance of bean and don't remove it.
    Application server after passivation remove instance of bean from container.
    Environment: BPEL 10.0.2(OC4J), patch 4369818, 4406640, 4496111
    EJB bean on JBoss 4.0.2
    The following wsdl EJB binding:
    <?xml version="1.0" ?>
    <definitions targetNamespace="http://xmlns.unizeto.pl/TRSMBPEL"
    xmlns:tns="http://xmlns.unizeto.pl/TRSMBPEL"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
    xmlns:ejb="http://schemas.xmlsoap.org/wsdl/ejb/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <!-- message declns -->
    <message name="SendPacketToTRSMRequestMessage">
    <part name="sender" type="xsd:int"/>
    <part name="bufferToTRSM" type="xsd:string"/>
    </message>
    <message name="SendPacketToTRSMResponseMessage">
    <part name="result" type="xsd:int"/>
    </message>
    <message name="GetDataRequestMessage">
    </message>
    <message name="GetDataResponseMessage">
    <part name="result" type="xsd:string"/>
    </message>
    <message name="RemoveRequestMessage">
    </message>
    <message name="RemoveResponseMessage">
    </message>
    <message name="CreateRequestMessage">
    </message>
    <message name="CreateResponseMessage">
    </message>
    <!-- port type declns -->
    <portType name="TRSMService">
    <operation name="SendPacketToTRSM">
    <input name="SendPacketToTRSMRequest" message="tns:SendPacketToTRSMRequestMessage"/>
    <output name="SendPacketToTRSMResponse" message="tns:SendPacketToTRSMResponseMessage"/>
    </operation>
    <operation name="GetData">
    <input name="GetDataRequest" message="tns:GetDataRequestMessage"/>
    <output name="GetDataResponse" message="tns:GetDataResponseMessage"/>
    </operation>
    <operation name="Remove">
    <input name="RemoveRequest" message="tns:RemoveRequestMessage"/>
    <output name="RemoveResponse" message="tns:RemoveResponseMessage"/>
    </operation>
    <operation name="Create">
    <input name="CreateRequest" message="tns:CreateRequestMessage"/>
    <output name="CreateResponse" message="tns:CreateResponseMessage"/>
    </operation>
    <operation name="SSCDAuthorizedForget">
    </portType>
    <!-- binding declns -->
    <binding name="EJBBinding" type="tns:TRSMService">
    <ejb:binding/>
    <format:typeMapping encoding="Java" style="Java">
    <format:typeMap typeName="xsd:int" formatType="int"/>
    <format:typeMap typeName="xsd:string" formatType="java.lang.String"/>
    </format:typeMapping>
    <operation name="SendPacketToTRSM">
    <ejb:operation
    methodName="SendBase64PacketToTRSM"
    parameterOrder="sender bufferToTRSM"
    interface="remote"
    returnPart="result"/>
    <input name="SendPacketToTRSMRequest"/>
    <output name="SendPacketToTRSMResponse"/>
    </operation>
    <operation name="GetData">
    <ejb:operation
    methodName="GetBase64Data"
    parameterOrder=""
    interface="remote"
    returnPart="result"/>
    <input name="GetDataRequest"/>
    <output name="GetDataResponse"/>
    </operation>
    <operation name="Remove">
    <ejb:operation
    methodName="remove"
    interface="remote"/>
    </operation>
    <operation name="Create">
    <ejb:operation
    methodName="create"
    interface="home"/>
    </operation>
    </binding>
    <!-- service decln -->
    <service name="TRSMService">
    <port name="EJBPort" binding="tns:EJBBinding">
    <ejb:address className="pl.unizeto.pki.des.ssp.trsmd.TRSMDRemoteHome"
    jndiName="pl.unizeto.pki.des.ssp.trsmd.TRSMDBean"
    initialContextFactory="org.jnp.interfaces.NamingContextFactory"
         jndiProviderURL="192.168.129.202:1999"/>
    </port>
    </service>
    <!-- partner links -->
    <plnk:partnerLinkType name="TRSMService">
    <plnk:role name="TRSMServiceProvider">
    <plnk:portType name="tns:TRSMService"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    and bpel source
    <process name="TRSMBPEL" targetNamespace="http://xmlns.unizeto.pl/TRSMBPEL" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:tns="http://xmlns.unizeto.pl/TRSMBPEL" xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:trsm="http://xmlns.unizeto.pl/TRSMBPEL" xmlns:ctask="http://services.oracle.com/bpel/task" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:taskMgr="http://services.oracle.com/bpel/task" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"><!-- ================================================================= --><!-- PARTNERLINKS --><!-- List of services participating in this BPEL process --><!-- ================================================================= -->
    <partnerLinks><!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="tns:TRSMBPEL" myRole="TRSMBPELProvider"/>
    <partnerLink name="TRSMService" partnerRole="TRSMServiceProvider" partnerLinkType="tns:TRSMService"/>
    <partnerLink myRole="TaskManagerRequester" name="userTask" partnerRole="TaskManager" partnerLinkType="taskMgr:TaskManager"/>
    </partnerLinks><!-- ================================================================= --><!-- VARIABLES --><!-- List of messages and XML documents used within this BPEL process --><!-- ================================================================= -->
    <variables><!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="tns:TRSMBPELRequestMessage"/>
    <variable name="outputVariable" messageType="tns:TRSMBPELResponseMessage"/>
    <variable name="SendPacketToTRSM_SendPacketToTRSM_InputVariable" messageType="tns:SendPacketToTRSMRequestMessage"/>
    <variable name="SendPacketToTRSM_SendPacketToTRSM_OutputVariable" messageType="tns:SendPacketToTRSMResponseMessage"/>
    <variable name="GetData_GetData_InputVariable" messageType="tns:GetDataRequestMessage"/>
    <variable name="GetData_GetData_OutputVariable" messageType="tns:GetDataResponseMessage"/>
    <variable name="UserTask2.0Var1" element="ctask:task"/>
    <variable name="Invoke_1_Create_InputVariable" messageType="tns:CreateRequestMessage"/>
    <variable name="Invoke_1_Create_OutputVariable" messageType="tns:CreateResponseMessage"/>
    <variable name="removeTRSMD_Remove_InputVariable" messageType="tns:RemoveRequestMessage"/>
    <variable name="removeTRSMD_Remove_OutputVariable" messageType="tns:RemoveResponseMessage"/>
    </variables><!-- ================================================================= --><!-- ORCHESTRATION LOGIC --><!-- Set of activities coordinating the flow of messages across the --><!-- services integrated within this business process --><!-- ================================================================= -->
    <sequence name="main"><!-- Receive input from requestor.
    Note: This maps to operation defined in TRSMBPEL.wsdl
    -->
    <receive name="receiveInput" partnerLink="client" portType="tns:TRSMBPEL" operation="process" variable="inputVariable" createInstance="yes"/>
    <scope name="Scope_1">
    <variables>
    <variable name="Invoke_3_Create_InputVariable" messageType="tns:CreateRequestMessage"/>
    <variable name="Invoke_3_Create_OutputVariable" messageType="tns:CreateResponseMessage"/>
    <variable name="Invoke_1_Remove_InputVariable" messageType="tns:RemoveRequestMessage"/>
    </variables>
    <sequence name="Sequence_1">
    <assign name="Init">
    <copy>
    <from variable="inputVariable" part="payload" query="/tns:TRSMBPELProcessRequest/tns:sender"/>
    <to variable="SendPacketToTRSM_SendPacketToTRSM_InputVariable" part="sender"/>
    </copy>
    <copy>
    <from variable="inputVariable" part="payload" query="/tns:TRSMBPELProcessRequest/tns:buffer"/>
    <to variable="SendPacketToTRSM_SendPacketToTRSM_InputVariable" part="bufferToTRSM"/>
    </copy>
    </assign>
    <invoke name="create" partnerLink="TRSMService" portType="tns:TRSMService" operation="Create" inputVariable="Invoke_3_Create_InputVariable" outputVariable="Invoke_3_Create_OutputVariable"/>
    <invoke name="SendPacketToTRSM" partnerLink="TRSMService" portType="tns:TRSMService" operation="SendPacketToTRSM" inputVariable="SendPacketToTRSM_SendPacketToTRSM_InputVariable" outputVariable="SendPacketToTRSM_SendPacketToTRSM_OutputVariable"/>
    <invoke name="GetData" partnerLink="TRSMService" portType="tns:TRSMService" operation="GetData" inputVariable="GetData_GetData_InputVariable" outputVariable="GetData_GetData_OutputVariable"/>
    <invoke name="Remove" partnerLink="TRSMService" portType="tns:TRSMService" operation="Remove" inputVariable="Invoke_1_Remove_InputVariable"/>
    </sequence>
    </scope><!-- Generate reply to synchronous request -->
    <assign name="Result">
    <copy>
    <from variable="GetData_GetData_OutputVariable" part="result"/>
    <to variable="outputVariable" part="payload" query="/tns:TRSMBPELProcessResponse/tns:data"/>
    </copy>
    </assign>
    <reply name="replyOutput" partnerLink="client" portType="tns:TRSMBPEL" operation="process" variable="outputVariable"/>
    </sequence>
    </process>
    Could anyone explain, is it possible to binding stateful bean to process?
    Thanks
    Norbert

    Did some additional investigations and concluded"
    The (embedded) OTC uses default the empty to obtain the reference to a Session Bean (EJB). In my case I was using the Remote Interface and my Context was empty { }:
    Hashtable ht = ic.getEnvironment();
    System.out.println(ht.toString());
    When I supply the missing information, obtained via the Test Client that functions correctly, a new Bean instance was created for each Client. My getInitialContext() method looks like the example below.
    public InitialContext getInitialContext() throws NamingException {
    Properties p =new Properties();
    p.setProperty( "java.naming.factory.initial", "com.evermind.server.rmi.RMIInitialContextFactory");
    p.setProperty( "java.naming.provider.url", "ormi://localhost:23892/current-workspace-app" );
    I tried the ApplicationInitialContextFactory and again the same Bean instance was shared among all Clients. I did not try ApplicationClientInitialContextFactory, but I expect that the Remote interface will be used!
    Is it a Bug that ApplicationInitialContextFactory does not create a new instance for my Stateful Session Bean? I can use the Remote interface, but that would decrease the performance and it is less elegant...
    Michael

  • Problem in using java bean with jsp

    Hi,
    This is my code and i get this error. Not able to trace the mistake.
    bean.html
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Fname</title>
    </head>
    <body>
    <form method="POST" action="http://localhost:8080/beanjsp.jsp">
         <p>Fname: <input type="text" name="T1" size="20"></p>
         <p>Lname: <input type="text" name="T2" size="20"></p>
         <p> </p>
         <p> </p>
         <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
    </form>
    </body>
    </html>
    beanjsp.jsp
    <jsp:useBean id="bean" class="beans.FirstBean" scope="application" />
    <jsp:setProperty name="bean" property="fname" param="T1" />
    <jsp:setProperty name="bean" property="lname" param="T2" />
    THE FIRST NAME IS <%=bean.getFname() %>
    THE LAST NAME IS <%=bean.getLname() %>
    FirstBean.java
    //CREATING A BEAN
    package beans;
    import java.io.*;
    public class FirstBean
         private String fname;
         private String lname;
         FirstBean()
              fname="";
              lname="";
         public void setFname(String fn)
              fname=fn;
         public void setLname(String ln)
              lname=ln;
         public String getFname()
              return fname;
    public String getLname()
              return lname;
    error report
    org.apache.jasper.JasperException: /beanjsp.jsp(2,0) The value for the useBean class attribute beans.FirstBean is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)I have placed the beans package folder containing FirstBean.class inside classes folder of ROOT directory.
    I don't know what s wrong with my code :( ... Plz help asap.
    Thanks,
    Akshatha

    I have placed the beans package folder containing FirstBean.class >inside classes folder of ROOT directory.Place it in the WEB-INF/classes folder
    ram.

  • NON-transactional session bean access entity bean

    We are currently profiling our product using Borland OptmizeIt tool, and we
    found some interesting issues. Due to our design, we have many session beans which
    are non transactional, and these session beans will access entity beans to do
    the reading operations, such as getWeight, getRate, since it's read only, there
    is no need to do transaction commit stuff which really takes time, this could
    be seen through the profile. I know weblogic support readonly entity bean, but
    it seems that it only has benefit on ejbLoad call, my test program shows that
    weblogic still creates local transaction even I specified it as transaction not
    supported, and Transaction.commit() will always be called in postInvoke(), from
    the profile, we got that for a single method call, such as getRate(), 80% time
    spent on postInvoke(), any suggestion on this? BTW, most of our entity beans are
    using Exclusive lock, that's the reason that we use non-transactional session
    bean to avoid dead lock problem.
    Thanks

    Slava,
    Thanks for the link, actually I read it before, and following is what I extracted
    it from the doc:
    <weblogic-doc>
    Do not set db-is-shared to "false" if you set the entity bean's concurrency
    strategy to the "Database" option. If you do, WebLogic Server will ignore the
    db-is-shared setting.
    </weblogic-doc>
    Thanks
    "Slava Imeshev" <[email protected]> wrote:
    Hi Jinsong,
    You may want to read this to get more detailed explanation
    on db-is-shared (cache-between-transactions for 7.0):
    http://e-docs.bea.com/wls/docs61/ejb/EJB_environment.html#1127563
    Let me know if you have any questions.
    Regards,
    Slava Imeshev
    "Jinsong HU" <[email protected]> wrote in message
    news:[email protected]...
    Thanks.
    But it's still not clear to me in db-is-shared setting, if I specifiedentity
    lock as database lock, I assumed db-is-shared is useless, because foreach
    new
    transaction, entity bean will reload data anyway. Correct me if I amwrong.
    Jinsong
    "Slava Imeshev" <[email protected]> wrote:
    Jinsong,
    See my answers inline.
    "Jinsong Hu" <[email protected]> wrote in message
    news:[email protected]...
    Hi Slava,
    Thanks for your reply, actually, I agree with you, we need to
    review
    our db
    schema and seperate business logic to avoid db lock. I can not say,guys,
    we need
    to change this and that, since it's a big application and developedsince
    EJB1.0
    spec, I think they are afraid to do such a big change.Total rewrite is the worst thing that can happen to an app. The
    better aproach would be identifying the most critical piece and
    make a surgery on it.
    Following are questions in my mind:
    (1) I think there should be many companies using weblogic serverto
    develop
    large enterprise applications, I am just wondering what's the maintransaction/lock
    mechanism that is used? Transional session / database lock,
    db-is-shared
    entity
    I can't say for the whole community, as for my experience the standard
    usage patthern is session fasades calling Entity EJBs while having
    Required TX attribute plus plain transacted JDBC calls for bulk
    reads or inserts.
    is the dominant one? It seems that if you speficy database lock,
    the
    db-is-shared
    should be true, right?Basically it's not true. One will need db-is-shared only if thereare
    changes
    to the database done from outside of the app server.
    (2) For RO bean, if I specify read-idle-timeout to 0, it shouldonly
    load
    once at the first use time, right?I assume read-timeout-seconds was meant. That's right, but if
    an application constantly reads new RO data, RO beans will be
    constantly dropped from cache and new ones will be loaded.
    You may want to looks at server console to see if there's a lot
    of passivation for RO beans.
    (3) For clustering part, have anyone use it in real enterpriseapplication?
    My concern, since database lock is the only way to choose, how aboutthe
    affect
    of ejbLoad to performance, since most transactions are short live,if high
    volume
    transactions are in processing, I am just scared to death about
    the
    ejbLoad overhead.
    ejbLoad is a part of bean's lifecycle, how would you be scared ofit?
    If ejbLoads take too much time, it could be a good idea to profile
    used SQLs. Right index optimization can make huge difference.
    Also you may want cosider using CMP beans to let weblogic
    take care about load optimization.
    (4) If using Optimization lock, all the ejbStore need to do
    version
    check
    or timestamp check, right? How about this overhead?As for optimistic concurrency, it performs quite well as you can
    use lighter isolation levels.
    HTH,
    Slava Imeshev
    "Jinsong Hu" <[email protected]> wrote in message
    news:[email protected]...
    We are using Exclusive Lock for entity bean, because of we do
    not
    want
    to
    load
    data in each new transaction. If we use Database lock, that means
    we
    dedicate
    data access calls to database, if database deadlock happens,
    it's
    hard
    to
    detect,
    while using Exclusive lock, we could detect this dead lock in
    container
    level.
    The problem is, using Exclusive concurrency mode you serialize
    access to data represented by the bean. This aproach has negative
    effect on ablity of application to process concurrent requests.As
    a
    result the app may have performance problems under load.
    Actually, at the beginnning, we did use database lock and usingtransactional
    The fact that you had database deadlocking issues tells that
    application logic / database schema may need some review.
    Normally to avoid deadlocking it's good to group database
    operations mixing in updattes and inserts into one place so
    that db locking sequence is not spreaded in time. Moving to
    forced serialized data access just hides design/implementation
    problems.
    session bean, but the database dead lock and frequent ejbLoad
    really
    kill
    us,
    so we decided to move to use Exclusive lock and to avoid dead
    lock,
    we
    change
    some session bean to non-transactional.Making session beans non-transactions makes container
    creating short-living transactions for each call to entity bean
    methods. It's a costly process and it puts additional load to
    both container and database.
    We could use ReadOnly lock for some entity beans, but since weblogicserver will
    always create local transaction for entity bean, and we found
    transaction
    commit
    is expensive, I am arguing why do we need create container leveltransaction for
    read only bean.First, read-only beans still need to load data. Also, you may seeRO
    beans
    contanly loading data if db-is-shared set to true. Other reason
    can
    be
    that
    RO semantics is not applicable the data presented by RO bean (forinstance,
    you have a reporting engine that constantly produces "RO" data,
    while
    application-consumer of that data retrieves only new data and neverasks
    for "old" data). RO beans are good when there is a relatively stable
    data
    accessed repeatedly for read only access.
    You may want to tell us more about your app, we may be of help.
    Regards,
    Slava Imeshev
    I will post the performance data, let's see how costful
    transaction.commit
    is.
    "Cameron Purdy" <[email protected]> wrote:
    We are currently profiling our product using Borland
    OptmizeIt
    tool,
    and we
    found some interesting issues. Due to our design, we have
    many
    session
    beans which
    are non transactional, and these session beans will access
    entity
    beans
    to
    do
    the reading operations, such as getWeight, getRate, since
    it's
    read
    only,
    there
    is no need to do transaction commit stuff which really takes
    time,
    this
    could
    be seen through the profile. I know weblogic support readonly
    entity
    bean,
    but
    it seems that it only has benefit on ejbLoad call, my test
    program
    shows
    that
    weblogic still creates local transaction even I specified
    it
    as
    transaction not
    supported, and Transaction.commit() will always be called
    in
    postInvoke(),
    from
    the profile, we got that for a single method call, such as
    getRate(),
    80%
    time
    spent on postInvoke(), any suggestion on this? BTW, most of
    our
    entity
    beans are
    using Exclusive lock, that's the reason that we use
    non-transactional
    session
    bean to avoid dead lock problem.I am worried that you have made some decisions based on an improper
    understand of what WebLogic is doing.
    First, you say "non transactional", but from your description
    you
    should
    have those marked as tx REQUIRED to avoid multiple transactions
    (since
    non-transactional just means that the database operation becomesits
    own
    little transaction).
    Second, you say you are using exclusive lock, which you shouldonly
    use
    if
    you are absolutely sure that you need it, (and note that it
    does
    not
    work in
    a cluster).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Jinsong Hu" <[email protected]> wrote in message
    news:[email protected]...
    >

  • Do all JSP/Java bean webapps need an xml file?

    Hi all,
    I have a jsp/ java bean webb application. This is being run on Resin at
    Lunarpages.
    The site has been shut down due to 'class-loader' not found. I was told it
    was causing problems for other java users on the server.
    I realise this is limited information but any insight would be welcome.
    This is our first JSP / java bean web app.
    Also if anyone could tell me briefly the purpose of an xml document in a JSP/Java bean webapplication I would greatly appreciate it.
    Thanks in advance
    Regards
    Jim

    Hi there,
    Thanks for the reply.
    Our application allows people to purchase wedding pictures online. It ran locally on resin we then had to change all the relative file paths in order to deploy it on lunarpages.
    Lunarpages use resin also.
    We had the application tested and working on Lunarpages for the last week .This morning they sent us a message saying they had shut our JSP pages down as our application was causing problems for other java users. errant code unknown element ' class-loader' .
    Not too much help from lunarpages...
    thanks

  • Java Beans and EJBs

    Hi friends,
    I am quite new to Java and am interested in understanding EJBs and their use in deploying distributed applications.
    I am not sure if I am supposed to first understand Java Beans before jumping to EJBs. I did read some of the messages under the Java Beans forum page but am confused..please help!!!
    Regards,
    Ritu

    if I am supposed to first understand Java Beans before jumping to EJBsYes! Even before understanding objects and inheritence and so on.

  • Caching CMP Entity Beans with 9.0.2

    Hi,
    my CMP Entity Bean is accessed from a JSP-Page through a Stateless Session Bean. The Session-Bean executes findAll() on the Entity-Bean and the JSP-Page iterates over the Collection and displays the Fields through their getter-Methods. It turns out that every getXXX Methods results in a complete load of the Bean from the Database, so for 3 database-records with 4 attributes i get 12 SELECT - statements and 12 Activate/Load/Passivate cycles of the Entity Bean!!!!
    I tried to setup the attributes in orion-ejb-jar.xml correctly, but that didn't show a difference:
    -) exclusive-write-access="true" does only work in "read-only" mode (see oc4j_ejb_guide_r2.pdf)
    -) setting timeouts didnt work
    My Entity Bean settings are:
    exclusive-write-access="true"
    instance-cache-timeout="60"
    max-instances="100"
    max-tx-retries="0"
    pool-cache-timeout="100"
    The EJB-Callbacks are:
    first the Session-Bean is created, and findAll() is executed - then all Entity-Beans are passivated again:
    TestManBean Constructor called 1
    TestManBean.setSessionContext() 1
    TestManBean.ejbCreate() 1
    PersonBean Constructor called 1
    PersonBean.setEntityContext() 1
    PersonBean.ejbActivate() 1
    PersonBean.ejbLoad() 1
    PersonBean Constructor called 2
    PersonBean.setEntityContext() 2
    PersonBean.ejbActivate() 2
    PersonBean.ejbLoad() 2
    PersonBean Constructor called 3
    PersonBean.setEntityContext() 3
    PersonBean.ejbActivate() 3
    PersonBean.ejbLoad() 3
    PersonBean.ejbPassivate() 1
    PersonBean.ejbPassivate() 2
    PersonBean.ejbPassivate() 3
    now for every getXXX-Methods the following occurs:
    PersonBean.ejbActivate() 3
    PersonBean.ejbLoad() 3
    PersonBean.ejbPassivate() 3
    I user OC4J 9.0.2 Production with Oracle 8.1.6.
    How can I turn on Entity-Bean Caching?
    Thanks,
    Gilbert

    Hi Gilbert,
    Someone recently asked a similar question to yours. Perhaps that thread will
    be helpful to you?
    Author: Valeri Kireitchik
    Subject: how to set exclusive-write-access="true"
    Date: May 17, 2002 10:18 PT
    URL:
    Re: Get the Table name by providing the Sequence name
    The same person (Valeri) also asked his question on two other forums:
    http://www.elephantwalker.com/rfa?id=549
    http://www.mail-archive.com/orion-interest%40orionserver.com/msg19037.html
    Good Luck,
    Avi.

  • Scope of managed bean for a modifiable list

    I have a business entity set stored in database. I want to show them with JSF as elements of a list with each element having a delete button. If the database changes in the background because entitites are removed or inserted, the delete function certainly must work well.
    I'm clear of the key stuff I have to use:
    -a managed bean, probably containing some list coming from database through dao or o/r mapper.
    -some iterator, e.g. t:dataList (using Tomahawk)
    -h:commandButton with action referring to methods in the managed-bean's elements.
    The question is, what usually would be the scope of the managed-bean.
    If the scope is "request", delete function may work wrong when database changes between the first and the "delete" request.
    -First request: managed-bean created with ids and event handlers.
    -Database changes: new entity is inserted.
    -Secont request: managed-bean created with id-s and event handlers according to the new database content. id-s have been shifted.
    It may help if I override somehow the default id generation of the JSF, by using directly id-s of business entities but I think it's an unproposed hack.
    If the scope of the managed bean is "session", the delete function works well, however we've a lot of stuff to store in the session.
    So, what would be the scope of the managed-bean?
    Or a completely different approach should be used?

    hi,
    faces-config:---------
    <faces-config version="1.2"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
    <!-- ***************Country************-->
    <managed-bean>
    <managed-bean-name>countryMBean</managed-bean-name>
    <managed-bean-class>com.tnhsp.mbeans.CountryMBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <!-- ***************country************-->
    <navigation-case> <!-- DEfault mode - Fetches all data in datatable -->
    <from-outcome>fetch_country</from-outcome>
    <to-view-id>/hospitalAdmin/country/countryDisplayContent.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    <navigation-case> <!-- Displayes the screen to add data -->
    <from-outcome>add_country</from-outcome>
    <to-view-id>/hospitalAdmin/country/countryCreateContent.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    </faces-config>
    MBEAN:-----
    public class CountryMBean {
    @EJB
    CountrySRemote countrySRemote;
    private Country country = new Country();
    public CountryMBean() {
    System.out.println("countryMBean.countryMBean()");
    country = new Country();
    fc = FacesContext.getCurrentInstance();
    public String actionAdd() {
    renderFlag = 1;
    errorStatus = "";
    System.out.println("countryMBean. - actionadd");
    retValue = "add_country";
    setLinkMode(ADD_MODE");
    setDisableCodeField("false");
    saveStatus = "false";
    listEmptyStatus = "false";
    country = new Country();
    Date dt = new Date();
    country.setEffectFromDt(dt);
    country.setCreatedDate(dt);
    country.setLastUpdatedDate(dt);
    country.setCreatedUser("user");
    country.setLastUpdatedUser("user");
    System.out.print("returning from actionadd");
    return retValue;
    Please help.

  • Using an attribute set in a servlet as a bean in a JSP

    Say, I have saved an attribute in any scope in a servlet or its helper class using setAttribute("xyz", someObject).
    * Would I be able to access this attribute in a subsequent JSP using <jsp:getProperty name="xyz" property"someProperty" /> *
    The reverse works true ie. setting the attribute first as a bean in a jsp and den accessing it using getAttribut

    Lakshminarayanan,
    Actually, there are 2 ways to share data between WD components:
    1. Context mapping
    2. Combo of parameters to methods / parameters in events.
    Say, you want to synchronize your 2 toolbars. You may declare some method(s) to alter state in "toolbar" component interface and some event(s) about state update. Now main component has to subscribe to this event from every component usage and invoke method in other component usage to synchronize state.
    With context mapping you may achieve state synchronization automatically. Also method/event pair will look plain ugly if you have a lot of parameters or complex structures.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Entity beans not understood

    hello,
    I am new to ejb. I know that I have come to the right technology and now to the right forum. I have got quite a good grasp on session beans but I don't understand the entity beans.
    I have a couple of questions.
    Firstly if every bean represents a single record in a database then what's th logic behind having these beans in the first place. suppose I have about 10 milion records in one of my table then does that mean I have 10000000 instences of that entity bean? and what will be the advantage of such an arrangement.
    secondly, do I always need entity beans to manage data from a database? I mean what is wrong if I do all that in a session bean? I do connect to a database with jdbc in servlets and jsp, so what is the problem in doing same in a session bean.
    and one general question, how heavy is the remote object on the client machine, what I am asking is, if when I locate the bean using the home interface or home object if you like it, I get access to the remote object. so how heavy is the remote object when I download it on my client machine?
    thanks
    Krishnakant.

    Hi,
    If you want to have 10 million records it is not necessarily 10 million Entity Beans will be instatiated. EJB container pools the EntityBeans and uses then accordingly.
    Writing DataBase code in Servlets/JSP is not a good idea. If you want to get the benefits of layered Architecture we have to follow certain design patterns. DB operations can be handled trhu EntityBeans are DAO factories.

  • Lookup (2 Beans on diffrent applications)

    Hi
    Programs: J-Developer902, Oracle9i AS
    The Proplem : I have 2 beans on 2 different .ear applications, one bean on each .ear .
    I'm trying to do Lookup from Bean 1 on the first application, to Bean 2
    on the second application, without any success!!! What am I doing wrong?
    The intialcontext I'm using is com.evermind.server.rmi.RMIInitialContextFactory
    wich is the one to use when having 2 different applications (.EAR), which is my case.
    Deployment : Bean 1 : myFirst.deploy, myFirst.jar, myFirst.ear
    Bean 2 : mySecond.deploy, mySecond.jar, mySecond.ear
    Here is how my Lookup looks like in my code.
    _________ Clinet doing Lookup on Bean 1 ___________(It works without any problem)
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "admin");
    env.put(Context.PROVIDER_URL, "ormi://IS002/myFirst");
    Context ctx = new InitialContext(env);
    MyFirstEJBHome myFirstEJBHome = (MyFirstEJBHome)ctx.lookup("MyFirstEJB");
    MyFirstEJB myFirstEJB;
    __________ Bean 1 doning Lookup on Bean 2 _______________
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "admin");
    env.put(Context.PROVIDER_URL, "ormi://IS002/mySecond");
    Context ctx = new InitialContext(env);
    Object boundObject = ctx.lookup("MySecondEJB");
    MySecondEJBHome mySecondEJBHome =
    (MySecondEJBHome) PortableRemoteObject.narrow( boundObject, MySecondEJBHome.class);
    ________ ERROR _________
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at mypackage1.MyFirstEJBBean.callSecond(MyFirstEJBBean.java:47)
    at MyFirstEJB_StatelessSessionBeanWrapper10.callSecond
    (MyFirstEJB_StatelessSessionBeanWrapper10.java:79)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:118)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    What am I doing wrong??? Why can't my first Bean find the second Bean ?
    I'll be thankful if somebody could help me!!
    /Azam Roomi
    Integration Strategies & Solutions

    Azam,
    You are hitting a classloader problem. I suggest you upgrade to
    the latest JDeveloper version (9.0.3 -- available for download
    from Oracle's "Technet" website). Then read the following:
    http://otn.oracle.com/products/ias/tech_tips/oc4jTech_tip_0218.html
    http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/a97677/advanced.htm#1004903
    http://kb.atlassian.com/content/atlassian/howto/classloaders.jsp
    http://kb.atlassian.com/content/orion/docs/remote-access/remote-access.html
    http://www2.theserverside.com/resources/article.jsp?l=AdvancedClassLoading
    http://www2.theserverside.com/resources/article.jsp?l=ClassLoading
    (Of-course, I'm assuming you haven't already read the above.)
    Hope this helps you.
    Good Luck,
    Avi.

  • My G4 is making me sad. Please unsad us.

    I was given two Power Mac G4 computers to attempt to sell. My friend's office was throwing them out and I thought I could get some money for food by fixing them up and selling them off. (When you're a poor student you take work where you can find it). The machines came without hard-drives. "No problem", I thought. "How hard can installing an operating system on these be?"
    My first roadblock came in the form of the subtle product updates Apple had pushed in the early noughts. It turns out now, on reflection, that I have a Power Mac G4 FW800 and an MDD model from 2002. On first attempt, however, this completely foxed me. Not only are the two machines COMPLETELY INDISTINGUISHABLE FROM ONE ANOTHER save for a port on the back of one that I had to strain to notice, but one will refuse to boot OS 9 (apparently) and one will take it and run with it (apparently.)
    After a few hours of navigating Apple's delightfully vague, mostly-pictureless instruction manuals and eventually figuring out my model dilemma, I set to work putting an operating system on them. "OS X will do", I thought and, taking out my OS 10.4.0 DVDs that had served me well thus far, I attempted to get the CD drive open. No such luck.
    It turns out that Apple are a little picky on what keyboards you use to get them to access the boot menu, and none of the keyboards I had were trendy enough for it to talk to. After a few days of attempting to coerce it to work like a normal computer should, I eventually realised I was dealing with a Macintosh and went out and bought an official Apple graphite Pro keyboard. £20 lighter, but hey; it's an investment, right?
    So, after plugging it in and holding down the 'alt' key for five minutes while it decided whether or not it wanted to boot, I was eventually greeted by a blue screen with two arrows on it. Nothing more. I placed the OS X DVD in the tray (now I had a keyboard cool enough to have an Eject key) and hit the button that looked like it might be a refresher. Wait a few minutes. Nothing.
    I spent another few days trying to figure out what was going on until I downloaded an OS 9 DMG to a CD and managed to boot from that. (Piracy? Shock horror! But don't rage-quit quite yet, it gets even better!) I EVENTUALLY got to a rather promising looking OS 9 desktop, where I was told I was running a Power Mac G4 installer CD. Result! And I wasn't even paying attention.
    Somewhere in the mess of folders I managed to find a system analysis tool that informed me that my Macintosh has CD drives instead of DVD drives. And before you start getting ideas, they're Apple official. I just wish it had said on the side of the bay or something, since I distinctly remember seeing that these G4s had SuperDrives. Oh well, now I know, at least. May as well try to install to the hard-drive I clicked in a while ago. Oh wait, what's this?
    "This software will not run on your computer."
    And you thought my happy story was over! Turns out you need to have pretty much the exact CD that came with the system to install anything close to an operating system on them. I am aware of no other solution to get a computer in my situation to work as it was intended to by Apple. Well, I didn't figure I'd get very far with a pirated OS 9 CD, so, my tail between my legs, I did what any computer technician worth their salt does in times of trouble and called Apple technical support.
    After a few hours of being told how important my call was I was directed to a very nice Scot called Andrew, who immediately asked me my name in return. After making something up (Podmen or something) I informed him of my predicament in my puppy-dog voice. His words:
    "Yeah, see, mate, we have these listed as Vintage here, so, uh, I don't know... you might try eBay, I suppose?"
    eBay?
    Seriously.... eBay?
    Well, I suppose Andrew isn't to be blamed. And he did have a point- eBay has long provided solace for customers left in the rain by careless company standards and practices. So, like a good little consumer I jetted off back to eBay to make a few more hurried purchases.
    My first purchase was of a FireWire 400 DVD enclosure so I could slot in a drive and use DVDs. I'd love to have used one of the nine USB enclosures I have at home, but due to astoundingly poor product design it turns out G4s won't boot from USB devices- only firewire! Boy, was my face red after figuring that one out. The day it arrived I tore the packaging off like a child at christmas and hooked it up, OS X DVD inside, fingers growing into the ALT key. After many years I was treated with a blue screen with two arrows and- is that..? Yes! I'm getting something to boot! Or....
    http://img24.imageshack.us/img24/7815/dsc00590a.jpg
    (No lower resolution? NO WAY! You must feel my pain in FULL SIZE.)
    Oh no, they're hanging! That means I am hanging also! These discs have never failed me before.. I wonder what the problem is?
    After spending a few hours (seriously) on IRC and Google, it turns out the discs I was using were Intel only, thanks to Apple's truly exemplary support during their painful PowerPC-Intel switchover. Well, thanks for the informative kernel panic. Really. God knows what I would have done if you hadn't spelled it out for me there, in amongst the zeroes.
    So, back on eBay, I bought an OS X 10.0.3 CD. This one looked perfect. It's an early version, so it'd work for multi-platform, and it'd probably work for my early model. What could possibly go wrong?!
    http://img24.imageshack.us/img24/9948/dsc00596h.jpg
    (Just as a quick note, if you're not loading these images you're missing out. Only with my shaky photos can you see the full extent of my CAPS LOCK RAGE.)
    What could go wrong, indeed.
    Another example of careless and abysmal software design from our good friends at Infinite Loop. Put yourself in my shoes for a minute here. You spend £30 on an OS X CD and place it in, and this is the error you receive. What do you think?
    a) The disc is damaged.
    b) The disc cannot find a startup drive.
    c) The disc is not designed for this system.
    d) The disc has been loaded at the wrong time.
    e) NOTHING, because all you're being shown is a STILL IMAGE, as opposed to something USEFUL like an ERROR CODE or SYNOPSIS or a CORE DUMP. Are these words greek to Apple? Or did they just think cluttering up their system with something fleeting like INFORMATION would ruin the simple, streamlined macintosh image? I'm veering towards the latter at the moment. Thanks, Apple, for making my errors pretty. Those google-able blue screens were ugly anyway.
    Before someone who's only read half the thread dives in with useful information, I'm able to look up errors myself. Turns out this is the definitive, no-frills cause:
    http://support.apple.com/kb/TS1892
    This was the closest I could find, and it isn't useful. I'm getting these errors from a CD I'm attempting to boot from. These machines have hard-drives, formatted in FAT32, connected up. Obviously Mac OS X cannot read from them if it's reading from anything (in which case I need a way to format the drive so the installer will accept it and boot its LiveCD operating system) and if it isn't, then what's wrong? I don't know. All of Apple's support items revolve around reinstalling (useful!) or resetting the PRAM, which I've done about a billion times. I don't know why I bother closing those obscenely heavy doors anymore, I really don't.
    Back to eBay, then? Any other ideas? Anyone? Apple? Ha ha ha ha! eBay, you're up.
    My next purchase- can you see a pattern here yet?- was a set of OS 9 CDs. They say "Power Mac G4" on them! How can these be bad? I still have a good feeling about these CDs. (I still have a good feeling about the OS X CD I was robbed for.) So, after removing them from the trendy Apple paper folder (top marks for presentation, Apple, really) and placing the disc marked "Install Disc" into the CD drive and rebooting with a weight on the ALT key, I sat and waited.
    Nothing.
    I am presented with a blue boot screen and the machine does not even have the common courtesy to show me the content of the CD I just spent a lot of money on. I don't even know if the disc works. Apple software is not telling me ANYTHING. As per flaming usual I am left to fend for myself.
    I try with the CD marked 'Software repair', and the CD drive just spits that back out. It leaves a bad taste in your mouth, G4? Imagine how I feel having paid for the thing!
    I'm not beaten yet. I am Iron Man. I am unbeatable.
    I boot from my pirated OS 9 CD (in the firewire drive) with the Genuine OS 9 CD in the G4's host drive and boot. Or at least, try to.
    Half of the time all I receive is a picture of a floppy disk with a flashing question mark on it. Once again, thanks very much Apple, this looks gorgeous, but what does it mean? WHY DON'T YOU TELL ME?
    I reboot, and I receive the 'Welcome to Mac OS' CD boot I've become accustomed to seeing- but wait, what's this?
    Sorry, a serious error has occurred.
    unimplemented trap
    http://img19.imageshack.us/img19/4779/dsc00601v.jpg
    Unimplemented what?
    I googled the error (SEE HOW EASY THINGS CAN BE IF YOU PROVIDE TEXT) and it seems to be something banal about calling a process that isn't there. Maybe the CD is dirty. Maybe all the CDs I've bought so far have resisted my attempts at cleaning them before use and maybe every hard drive I've clicked into the G4 has contained the exact code to turn it into a brick. It's possible. I don't know and nobody seems to want to tell me.
    So that's my current situation. I have official OS 9 and 10 CDs, and the only one that'll get me anywhere away from bland, useless icon screens is one I got from the Pirate Bay. Irony much? I don't know any more.
    Here is the current haul of Macintosh Discs I have thrown my money away for:
    http://img18.imageshack.us/img18/5458/dsc00602l.jpg
    If you know someone I can throw money at to get a working fix, please, god, tell me. If you do, in fact, know ANY way I can get these machines to work having considered everything I've told you in this thread, then please, PLEASE, tell me. I don't want these machines to go to waste. I just don't want to see folders and question marks any more either. Is that too much to ask?
    (On the other foot, I do really feel like part of the Mac community now I've spent a few hundred pounds on complete wastes of money. It feels so good to belong, you guys. So good. Keep in touch.)
    Message was edited by: Moderator

    Okay...I feel some of your pain and frustration,but maybe finding a Mac site, either here at Apple's or other Mac troubleshooting forums could've help you right at the beginning of all this.
    Ranting doesn't help your cause, either...
    But, Oh well...
    Let's start from the beginning. One of the things you may need to get both of these machines running is a new PRAM battery. Depending how long these machines had been lying around (unpowered), these maybe dead or low on voltage power,
    If you open both Macs, look for a half/size AA battery. I would recommend trying a local electronics dealer, Apple store/online, or Apple reseller/online or where you live to get 2 fresh batteries and when you get them install them in both machines.
    Now, OS CD's, the "official" OS 9 CD's should have a white background w/orange"9" on them. The OS X Panther CD's should have a black background with large silver/chrome "X" on them. The OS X Tiger DVD is similar, but is a DVD. You might be able to call and ask Apple if they have any Tiger CD's left as these were only available upon request and I believe proof of purchase of OS X 10.4 discs and I believe also there was a charge for the CD's also.
    There are "gray" discs out there that are only Mac "machine specific" discs.
    If you have these they do not work w/ your Macs. However, if you have or know of "gray-colored" discs that came with your two Macs, you should be able to use these. Obviously, from your post, you do not have these or know what may have come of them. So, you need the "official" Mac "Retail" versions of the OS install discs.
    Yes, G4's came with options for drives and as you have discovered, you only have drives with CD-RW/DVD-R (read-only)drives. You still be able to use DVD install discs, but you cannot "burn" or make custom DVD's with these drives.
    The official OS X 10.3 Panther discs should work on the G4 FW800 model Mac.
    The hard drives you installed need to be reformatted to Mac OS extended format.
    We need to start with the G4 w/FW800, first.
    Install the OS10.3 Panther CD or OS 10.4 Tiger DVD into the Mac. Hold the "C" key down until you see the gray Apple screen and a spinning gear. Once the gear starts spinning, let go of "C" key and let the Mac boot to the CD. If you make it to the blue desktop with menus, dock, folders and icons, you need to go to the utilities menu at the top of the main menu, look for an app called Disk Utility and launch it. A screen appears with 2 windows in it. Select the drive/s that appear in the 1st window and in the second pick the erase button.
    Once the drive is erased, there should be an area that says format and it's here you can reformat the drive as Mac OS extended and a partition button if you decide you want to partition the drive. Proceed to do this and your Mac's HD's will be properly formatted to accept OS X. Quit Disk Utility by going up to where the name of the application is in the top menu, click on its name and select quit from the drop down menu.
    Then continue with the installation of Mac OS X until complete.
    Hopefully when done, OS X will be installed on the Mac and there will be a welcome screen and a series of things you need to do to get up and running.
    Once back to the desktop, go down to the dock and pick your home icon. Look for an icon/folder that says Applications. In that folder look for a folder called Utilities. Look for Disk Utillity app and launch it.
    Pick the drive you are booted to in the 1st column and in the second column run fix disk permissions.
    You are, basically, at this point, done with the installation and ready to use this Mac.
    For the 2002 G4 MDD, things are a little different, you'll need to run OS 9 (9.2 or later) on this machine, first before updating to OS X. These G4's needed a firmware updater, before using OS X and you'll need to check for this to see if the updater has been done or not before you can proceed with an OS X install.
    To install OS 9, you'll need to put the disk in the drive and hold down the "C" key to get the CD to boot.
    If you make to the install screen you need to look for a folder that Has OS 9 utilities and look for a program called drive setup. Dble click to launch this and pick the drives you wish to format and pick Mac OS extended from the list of options. Once formatted, quit Drive setup and proceed with the install.
    If installation was successful, you should be able to boot the computer normally and it should come up with the OS 9 desktop. If the OS 9 install is of an older version of OS 9, you'll need to update to at least OS 9.2 before attempting an install of OS X.
    Once updated to 9.2, you'll need to download this firmware updater and run it.
    http://docs.info.apple.com/article.html?artnum=120171
    If you run this and a message says that your firmware is up to date, do not continue to run this program.
    If it dosen't appear, ten let this run until completed and follow its instructions, if any.
    Once this is done, NOW you can follow my previous instructions for installing OS X (minus having to format the drive again as you've already did this in OS 9) on the G4 FW800 Mac.
    Hope this is a help to you.
    Good Luck!!

Maybe you are looking for

  • IN Portal BSP Blank page is comming

    Hi All, I am facing problem in Production portal . its calling BSP application and its showing Blank page. i have checked in backedn its working..... and portal the iview also working fine.. can any body suggest what would be the case. point will be

  • Satellite C850-1G2 can't upgrade Win 8 to 8.1

    When I try to upgrade Win 8 to 8.1 I get a message that says update Win 8 first. When I try to update Win 8 I get 132 updates. I have spent many hours trying to perform this task but the updates are not installed. I tried using the troubleshooting to

  • ISE 1.2 rejects RADIUS messages from 5508 WLC

    The setup in ref is: WLC 5508 HA pair running 7.6 talking to ISE 1.2 patch 7 (was 6). Wireless users are authenticated fine, so the 5508 is a valid NAD in ISE, but... When I setup active RADIUS fallback, so that the WLC can poll the ISE servers I get

  • Parameter is not being applied

    Hey all i have the parameter in one of my reports, but when i change the value of the parameter the output or the result is not being changed. no matter what i do it will keep on showing me the same data any suggestions ?

  • ITunes not accepting my Visa!

    So I decided to start using my Visa instead of always buying cards. I have a CIBC Aero Classic Visa (I am in Canada). I go to enter this information in account changes section and iTunes says my credit card number is not valid for Canada?? my address