Refresh applet sqlj NullPointerException URGENT!

I have the following sqlj code in an applet to retrive data from an oracle database. After this the code goes onto draw the data in the applet using AWT (that code isn't shown here). My trouble is that when I get to the following line Connection con = Oracle.connect("jdbc:oracle:thin:@ebalpha:1525:ORCL", "flowmanager", "xxxxx").getConnection(); I get a Null Pointer exception only after refreshing the page using F5.
So to overcap I get a NullPointerException only when I refresh the applet. It runs perfectly the first time. The applet need to be refreshed because the data in the table get updated and the applet need to be refreshed to show the data changes.
public void getFlowSpaceData() throws SQLException {
// MyIter iter;
String strUserName = getParameter("paramUserName");
String strFlowName = new String();
Connection con = Oracle.connect("jdbc:oracle:thin:@ebalpha:1525:ORCL", "flowmanager", "xxxxx").getConnection();
strQuery = "select FLOWNAME FROM FLOWMANAGER.TMP_FLOWNAMES WHERE USERNAME ='" + strUserName +"'";
PreparedStatement pstmt0 = con.prepareStatement(strQuery);
ResultSet rs0 = pstmt0.executeQuery();
while (rs0.next()) {
strFlowName = rs0.getString(1);
rs0.close();
pstmt0.close();
strQuery = "select FLOWNAME, USERNAME, PANELROW, PANELCOL, RELATEROW, RELATECOL, OBJTYPE, BASECODE, INDUSTRYID, PANELNUM, BUSINESSPROCESSID FROM flows WHERE flowname ='" + strFlowName + "' AND username ='" + strUserName +"' ORDER BY PANELNUM";
PreparedStatement pstmt1 = con.prepareStatement(strQuery);
ResultSet rs1 = pstmt1.executeQuery();
int r = 0;
int c = 0;
while (rs1.next()) {
intObjType[r][c]= rs1.getInt(7);
strID[r][c] = rs1.getString(11);
//strIDQuery = strIDQuery + 'or ID =' + strinID
intRowRelation[r][c] = rs1.getInt(5);
intColRelation[r][c] = rs1.getInt(6);
c++;
if(c > 4) {
r++;
c = 0;
rs1.close();
pstmt1.close();
PreparedStatement pstmt2 = con.prepareStatement(strQuery);
ResultSet rs2 = pstmt2.executeQuery();
r = 0;
c = 0;
int i = 0;
int intSTRLENGTH = 0;
while(i < 24){
strQuery = "select name, descr, role from BUSINESSPROCESS WHERE ID = '" + strID[r][c] + "'";
pstmt2 = con.prepareStatement(strQuery);
rs2 = pstmt2.executeQuery();
rs2.next();
intSTRLENGTH = rs2.getString(1).length();
if (intSTRLENGTH > 17){
strLabel1[r][c] = rs2.getString(1).substring(0,17);
strLabel2[r][c] = rs2.getString(1).substring(18,intSTRLENGTH);
}else {
strLabel1[r][c] = rs2.getString(1).substring(0,intSTRLENGTH);
strLabel2[r][c] = " ";
intSTRLENGTH = rs2.getString(2).length();
if (intSTRLENGTH > 17){
strDescr1[r][c] = rs2.getString(2).substring(0, 17);
strDescr2[r][c] = rs2.getString(2).substring(18,intSTRLENGTH);
}else{
strDescr1[r][c] = rs2.getString(1).substring(0,intSTRLENGTH);
strDescr2[r][c] = " ";
c++;
i++;
if(c > 4) {
r++;
c = 0;
rs2.close();
pstmt2.close();
con.close();
con = null;
Thanks for you Assistance! It's greatly appreciated!
Chris Wallace

After further research I notice that if I Clear classload cache after every load before I refresh the applet it works fine. I can't have the user brining up the the consule windows and pressing x to clear classloader. Just thought I would give this futher information to help limit what the problem could be.

Similar Messages

  • Help with refreshing applet

    If I recompile my applet and try to restart it in Netscape the changes do not take hold. I've tried refreshing and emptying the cache and even setting the cache to 0, but it won't run the new version of the program. The only way I can get it to work is to quit Netscape entirely, restart it, and start the Java program again. Why is this? And is there a way to get around this?
    And there is a a second related problem I have. My applet calls a CGI program and recieves html text in reply. This HTML text I display in a JEditorPane. The first time I run the program it displays it nicely, but everytime after that it displays the HTML commands mixed in with the text, i.e. "<TABLE><TR><TD>text" instead of a table.
    Does anyone know what causes this or how to prevent it?

    Thanks for the help again. I read the API myself and tried adding the new line, but it had no affect. I tried this:
    ResultsDisplay.getEditorKit().createDefaultDocument();
    ResultsDisplay.setContentType("text/html");               
    ResultsDisplay.setText(inputStore.toString());and even this:
    ResultsDisplay = new javax.swing.JEditorPane();
    ResultsDisplay.getEditorKit().createDefaultDocument();
    ResultsDisplay.setContentType("text/html");
    ResultsDisplay.setText(inputStore.toString());But neither solution fixed it.

  • Multithreaded graphics applet gets NullPointerException

    Hi!
    This is a complex issue and the code's big, so i'll try
    to explain the main part.
    I have five classes.
    AppletClass (this one extends Applet)
    GraphicItem (just a little sprite which can draw itself)
    Thread1 (draws a bunch of GraphicItems in background on a Graphics which is set by setg() in this class)
    Thread2 (draw a random clolor text line in background
    on a Graphics which is set by setg() in this class)
    Drawer (a thread that draws an image set in
    the constructor ona graphics which is set by setg() in this class)
    What is it for: Well, this is a dubble buffering example,
    where two threads draw into one image which works
    as a buffer and then another thread draw that image
    into the applet area.
    The problem is that when Thread1 in run() calls
    gitem.draw(g) where g is Graphics i sometimes
    get NullPointerException, also, it happenes in some
    other place but i cannot pinpoint it. Also,it happenes
    always when i restart applet w/o reloading in
    JBuilder (nor the browser).
    The thing is that i do not use synchronized or
    imageUpdate() in the Drawer (imageUpdates() does
    nothing), so it is possible for two or more object to
    have access to the same Graphics object at the same
    time. Also, while Drawer draws the image, the other
    thread are drawing onto the image. So, there might
    be a conflict, i think. The other other is that when
    i comment out all Thread.sleep() the image get
    clobbered. That is, the GraphicItem is a cross of
    random color, so i shoudl see thousands of crosses of
    random color, but i thousands of crosses of pretty
    much the same color as it seems like Random is not
    working or drawing is broken.
    Anyway, any idea how to properly implement such
    thing? What precautions shoudl i take and which
    conflicts and how should i resolve?
    And, of course, in what cases NullPointerException is
    generated? I mean, what exxctly does it mean and
    when usually occurs?
    PS: Don't you think it is weird to get such
    exception in a language which officially
    has no pointers? :)

    Why it SOUNDS like is the Image you are drawing may not be completly loaded yet.. so the first few times it's blitted ( and possibly if it gets bumped out of memory ) attempting to draw it will throw a null pointer.
    I solved that in my own code by using a MediaTracker on the image when it was created to make sure that it is loaded and ready to be draw immediatly.

  • ADF Faces refresh conditions cause NullPointerException

    We are developping an ADF faces web application. For the jspx pages we use EJB3 data controls to display data from the database and other legacy systems.
    Most values in our application are read-only and some take some time to be provided by the database. To increase performance of our web application we decided to change the refresh condition from Refresh="ifNeeded" to Refresh="renderModelIfNeeded". The parameters of the bindings should not change so this seemed to be o.k. for our needs. To avoid the call during postbacks we added RefreshCondition="${!adfFacesContext.postback}".
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="10.1.3.41.57" id="app_pagePageDef"
    Package="web.pageDefs"
    EnableTokenValidation="false">
    <methodIterator id="findSomething"
    Binds="findSomething.result"
    DataControl="GatewayLocal" RangeSize="-1"
    BeanClass="entities.MyObject"
    RefreshCondition="${!adfFacesContext.postback}"
    Refresh="renderModelIfNeeded"/>
    Performance is now really good and all data is displayed.
    On the other hand we now experience a strange behaviour and from time to time we get the following error message:
    07/10/30 14:02:37 java.lang.NullPointerException
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUCtrlListBinding.findListIndex(JUCtrlListBinding.java:1096)
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUCtrlListBinding.setValueAt(JUCtrlListBinding.java:1726)
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUCtrlListBinding.updateValuesFromRow(JUCtrlListBinding.java:1339)
    07/10/30 14:02:37 at oracle.jbo.uicli.binding.JUIteratorBinding.navigated(JUIteratorBinding.java:282)
    07/10/30 14:02:37 at oracle.jbo.common.RowSetHelper.fireNavigationEvent(RowSetHelper.java:261)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyNavigationEvent(DCRowSetIteratorImpl.java:1611)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCGenericRowSetIteratorImpl.notifyNavigationEvent(DCGenericRowSetIteratorImpl.java:313)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:258)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.first(DCRowSetIteratorImpl.java:653)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:649)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.rangeRefreshed(DCIteratorBinding.java:735)
    07/10/30 14:02:37 at oracle.jbo.common.RowSetHelper.fireRangeRefreshed(RowSetHelper.java:172)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyRangeRefreshed(DCRowSetIteratorImpl.java:1570)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.buildProviderIterator(DCRowSetIteratorImpl.java:465)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.fetchDataSource(DCRowSetIteratorImpl.java:394)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.getRowAtAbsoluteIndex(DCRowSetIteratorImpl.java:1008)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:225)
    07/10/30 14:02:37 at oracle.adf.model.generic.DCRowSetIteratorImpl.first(DCRowSetIteratorImpl.java:653)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.internalGetCurrentRowInBinding(DCIteratorBinding.java:1919)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.getCurrentRow(DCIteratorBinding.java:1866)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.prepareCurrentRow(DCIteratorBinding.java:548)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:683)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:3499)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCBindingContainer.refreshExecutables(DCBindingContainer.java:2637)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2568)
    07/10/30 14:02:37 at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2260)
    07/10/30 14:02:37 at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareRender(PageLifecycleImpl.java:534)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareRender(FacesPageLifecycle.java:99)
    07/10/30 14:02:37 at oracle.adf.controller.v2.lifecycle.Lifecycle$1.execute(Lifecycle.java:297)
    07/10/30 14:02:37 at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java:29)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.ADFPhaseListener$1.before(ADFPhaseListener.java:426)
    07/10/30 14:02:37 at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:77)
    07/10/30 14:02:37 at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:192)
    07/10/30 14:02:37 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    07/10/30 14:02:37 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    07/10/30 14:02:37 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
    07/10/30 14:02:37 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
    07/10/30 14:02:37 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
    07/10/30 14:02:37 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
    07/10/30 14:02:37 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
    07/10/30 14:02:37 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    07/10/30 14:02:37 at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
    07/10/30 14:02:37 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    07/10/30 14:02:37 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:436)
    07/10/30 14:02:37 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    07/10/30 14:02:37 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    07/10/30 14:02:37 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    07/10/30 14:02:37 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    07/10/30 14:02:37 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
    07/10/30 14:02:37 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
    07/10/30 14:02:37 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    07/10/30 14:02:37 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    07/10/30 14:02:37 at java.lang.Thread.run(Thread.java:595)
    Has anyone seen this error before or can anyone explain this error? This problem is mission criticle to us so any help is appreciated. Without the boost of performance and unnecessary callbacks the application is just unusable.
    Thanks in advance,
    Robert

    Hi Frank,
    it seems that this issue is dependent to the renderModelIfNeeded phase. I still have no explanation for this behaviour. For now I've changed our implementation to use the prepareModel phase but I'm still not happy with the ADF phase implementation and documentation. Some methods that we use in the backend are called many times.
    I'll keep on trying to find a solution...
    Thanks
    Robert

  • Is there method to refresh applet?

    I was wondering if theres a method to refresh an applet or refresh a panel in an applet. My problem is that at the click of a button i set a new content panel, but it appears as if nothing has happened, and i need to minimize and then restore the applet viewer and it changes.

    do you want to refresh component like button, label etc
    like
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class applet_component_refresh extends Applet implements ActionListener {
    Button[] button;
    Button changeButton;
    String[] buttonString= {"Normal Text ", "Changed Text"};
    int number = 260;
    int count;
    public void init()
         setBackground(new Color(225,225, 255));
         button = new Button[number];
         for (int i=0; i<number; i++)
              button[i] = new Button(buttonString[count%2]);
              add(button);
         changeButton = new Button("Change buttons label");
         changeButton.setBackground(new Color(150, 255, 150));
         add(changeButton);
         changeButton.addActionListener(this);
    public void actionPerformed(ActionEvent ae)
         if (ae.getSource() == changeButton)
              count++;
              for (int i=0; i<number; i++) button[i].setLabel(buttonString[count%2]);
              invalidate();
              validate();
    } // END OF Class component_refresh
    you cant use location.reload method of javascript to do this....

  • Refresh methodIterator cause NullPointerException

    HI Guys,
    I am using JDeveloper 10.1.3 and experiencing a strange problem with JSF Faces. I have a tree model defined in the pagedef.xml file. Every time I try to refresh the iterator binding, the NullPointerException occurs. It only happens when refreshing, not the first time. acccording to the trace stack, the exception occurs when ADF framework tries to refresh the iterator.
    Here is the code to refresh the iterator:
    DCIteratorBinding loansBinding = (DCIteratorBinding) bindings.get("findLoansIter");
    loansBinding.executeQuery();
    The following is the
    <methodIterator id="findLoansIter" Binds="findLoans.result"
    DataControl="PEPublicLocal" RangeSize="-1"
    BeanClass="pe.datamodule.beans.Loan" Refresh="renderModel"
    RefreshCondition="${adfFacesContext.postback}"/>
    <nodeDefinition DefName="pe.datamodule.beans.Loan" id="LoanNode">
    <AttrNames>
    <Item Value="dueDate"/>
    <Item Value="total"/>
    </AttrNames>
    <Accessors>
    <Item Value="loanextraCollection"/>
    </Accessors>
    </nodeDefinition>
    <nodeDefinition DefName="pe.datamodule.beans.Loanextra"
    id="LoanextraNode">
    <AttrNames>
    <Item Value="amount"/>
    <Item Value="loanExtraID"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    The exception is
    09/12/17 22:13:17 java.lang.NullPointerException
    09/12/17 22:13:17      at oracle.adf.model.generic.RowImpl.internalGetAttributeValue(RowImpl.java:154)
    09/12/17 22:13:17      at oracle.adf.model.generic.RowImpl.getAttribute(RowImpl.java:130)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGetAttributeValueFromRow(JUCtrlValueBinding.java:702)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeFromRow(JUCtrlValueBinding.java:470)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributes(JUCtrlValueBinding.java:901)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.refresh(JUCtrlHierNodeBinding.java:504)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.updateValuesFromRow(JUCtrlHierNodeBinding.java:523)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUIteratorBinding.updateValuesFromRows(JUIteratorBinding.java:315)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:695)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.rangeRefreshed(DCIteratorBinding.java:737)
    09/12/17 22:13:17      at oracle.jbo.common.RowSetHelper.fireRangeRefreshed(RowSetHelper.java:172)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyRangeRefreshed(DCRowSetIteratorImpl.java:1570)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.buildProviderIterator(DCRowSetIteratorImpl.java:465)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.fetchDataSource(DCRowSetIteratorImpl.java:394)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCGenericRowSetIteratorImpl.notifyNavigationEvent(DCGenericRowSetIteratorImpl.java:331)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:258)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.first(DCRowSetIteratorImpl.java:653)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:651)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.rangeRefreshed(DCIteratorBinding.java:737)
    09/12/17 22:13:17      at oracle.jbo.common.RowSetHelper.fireRangeRefreshed(RowSetHelper.java:172)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.notifyRangeRefreshed(DCRowSetIteratorImpl.java:1570)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.buildProviderIterator(DCRowSetIteratorImpl.java:465)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.fetchDataSource(DCRowSetIteratorImpl.java:394)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.getRowAtAbsoluteIndex(DCRowSetIteratorImpl.java:1008)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.syncIterator(DCRowSetIteratorImpl.java:225)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.restoreCurrency(DCRowSetIteratorImpl.java:1821)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCRowSetIteratorImpl.rebuildIteratorUpto(DCRowSetIteratorImpl.java:190)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCDataControl.rebuildIteratorIfNeeded(DCDataControl.java:1696)
    09/12/17 22:13:17      at oracle.adf.model.generic.DCGenericDataControl.executeIteratorBindingIfNeeded(DCGenericDataControl.java:581)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCIteratorBinding.executeQueryIfNeeded(DCIteratorBinding.java:1825)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding.executeQueryIfNeeded(JUMethodIteratorDef.java:289)
    09/12/17 22:13:17      at oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding$1.afterInvokeMethod(JUMethodIteratorDef.java:221)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCInvokeMethod.notifyAfterInvokeMethod(DCInvokeMethod.java:667)
    09/12/17 22:13:17      at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:228)
    Please help! This has bother me for more than a week!
    Thanks in advance

    Hi Juan,
    What do you mean by removing the query? I have the same idea like you do. I tried to close or clear or remove or release the previous query result and it did not work. I did not know whether I did not close the result properly or the refresh did not go properly. Anyway, the exception still show up. I even tried to release the rowSetIterator behind the IteratorBinding, not working.
    ( this is another question I have. I don't know how to release the query result for a page. I don't want to have the previous page query result show up when I navigate back to the same page. any idea?)
    I think the problem is where the framework tries to apply the new query result on the top of the old result and that's why it called refreshControl. The whole problem happend during that refresh control.
    If I switch the tree to table, it works immediately. If I adjust the tree to one level, it works immediately. If I only put one attribute at the first level, it works immediately.
    Also, I am using JSF/ADF with Toplink and web service. I don't know how to verify whether the model lay works or not. but like I said, the first time work always. or if I intentionally make the query result to be no record, then trying it again always works.
    Please help!
    thanks
    Steven

  • Refresh applet display in browser.

    I have a JSP file which has an applet in it. The applet displays the correct text when the JSP is loaded from the server onto the client.
    public void paint(Graphics g) {
    g.drawString("Hello blimp ! ", 15, 15);
    When the screen loads in browser I see "Hello blimp" in the applet window.
    Now I have a public method callMeSucker() in the applet which is called by a javascript function depending on certain action by user.
    public void callMeSucker()
    this.getGraphics().drawString("applet refreshed! ", 15, 15);
    this.validate();
    After the user action I dont see the applet window refreshed with this message "applet refreshed! " . I have alerts around this method call to the applet and they get displayed. This shows that the applet method call is withour error but why is the display not getting refreshed.
    Thx

    This is just a guess, but maybe it is working -- but then the GUI threads call paint() again, immediately overwriting the "applet refreshed!" message so fast that you can't see it. I guess you could call this a conflict between active and passive rendering.
    If this is the case, you could fix it by having a field in the applet, say:
    private String message = "Hello blimp ! ";
    public void paint(Graphics g) {
      g.drawString(message, 15, 15);
    public void callMeSucker() {
      message = "applet refreshed! ";
      repaint();

  • Applet - JNLP2Manager NullPointerException bail out

    All,
    when trying to run my applet I get the following error in the Java console.
    java.lang.NullPointerException
         at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
         at sun.plugin2.main.client.PluginMain$StartAppletRunner.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Error while initializing manager: java.lang.NullPointerException, bail outAnyone knows what the problem is here?
    The applet is packaged within a war and deployed on a Weblogic AS.
    I use Java 1.6.0_14 to compile and launch the applet.
    The applet is started with the following code:
        <script src="http://www.java.com/js/deployJava.js"></script>
        <script>
            var attributes = { code:'test.MyApplet',  width:600, height:910} ;
            var parameters = {jnlp_href: '/jnlp/my-applet.jnlp'} ;
            deployJava.runApplet(attributes, parameters, '1.6');
        </script>Thanks in advance.

    All,
    when trying to run my applet I get the following error in the Java console.
    java.lang.NullPointerException
         at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
         at sun.plugin2.main.client.PluginMain$StartAppletRunner.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Error while initializing manager: java.lang.NullPointerException, bail outAnyone knows what the problem is here?
    The applet is packaged within a war and deployed on a Weblogic AS.
    I use Java 1.6.0_14 to compile and launch the applet.
    The applet is started with the following code:
        <script src="http://www.java.com/js/deployJava.js"></script>
        <script>
            var attributes = { code:'test.MyApplet',  width:600, height:910} ;
            var parameters = {jnlp_href: '/jnlp/my-applet.jnlp'} ;
            deployJava.runApplet(attributes, parameters, '1.6');
        </script>Thanks in advance.

  • How can i add applet in application urgent

    Sir
    i design some buttons in cofeecup applet button factory
    it gives me an applet code.i design all drop down menus
    now i want to and it in my application.
    thanks in advance

    A few pointers for using these forums:
    * Once you post a question, don't create a new thread on the same subject--when you do that, you are spamming the forum and people don't like that.
    * Remember that there are a lot of people asking for help and a much smaller number giving it. Note for example that in the last 24 hours alone, there were over 200 active threads in the general Java Programming forum.
    * If you have to follow up on something you posted earlier, just reply to your own post.
    * People in this forum are generally happy to answer specific questions about Swing components but you have essentially asked someone to write your application for you. You probably need to work through some of the Java tutorials:
    http://java.sun.com/docs/books/tutorial/uiswing/

  • Applet in Tomcat-Urgent

    hai to everybody,
    i am using tomcat-4.1.27 and j2sdk-1.4.0_01 and i have
    been trying to load simple applet in HTML page by running tomcat server
    but it is displaying at the status bar as class not found, but it is
    showing the message Loading applet in my HTML page but the content in applet is not getting displayed.Please help me.
    reg,
    arvind

    hi,
    i have attached code below
    i am having a frame divided into two columns one is for html
    one is for JSP
    /*Frame.html */
    <html>
    <frameset cols="25% ,75%">
    <frame src="App.html">
    <frame src="Design.jsp">
    </frameset>
    </html>
    In Design.jsp i am trying to display simple applet with a string message
    the code is below
    /*Design.jsp*/
    <html>
    <body>
    Below it shows a simple applet
    <h1>
    <p align="center">
    <center>
    <jsp:plugin type="applet" code="SimpleBanner.class" width="300" height="150" codebase="arv/" jreversion="1.4">
    </jsp:plugin>
    </center>
    </body>
    </html>
    In the above code the applet class file SimpleBanner is under the directory c:/arv/SimpleBanner and i am using tomcat 4.1.27 and j2sdk 1.4.0_01
    /*SimpleBanner.java"*/
    import java.applet.*;
    import java.awt.*;
    public class SimpleBanner extends Applet
    public void init()
    setBackground(Color.cyan);
    setForeground(Color.red);
    public void paint(Graphics g)
    g.drawString("Henkel Spic",50,30);
    when i try to run by giving url-http://localhost:8080/Frame.html
    the page displays with applet size but not the string displaying inside
    i don't know where the prob is.In the status bar it is showing
    SimpleBanner.class not found.
    help me.
    reg arvind

  • TextFields / labels in Applet...Urgent help needed please!!

    I have been trying for days to add labels and textFields to my applet and can only manage to display one.
    My assignment instructions suggest I use makeTextField method and call the setEditable method from the makeTextField method to avoid repetition of code.
    The following is my code...I must have this done in the next couple of days so if someone could please please give me some assistance it would be really appreciated....also, thoughts on my layout would be great as well...i cant seem to set up my buttons in the correct order.
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.Applet;
    public class Registry4b extends Applet implements ActionListener {
    public void init() {
    backgroundColor = new Color(200,255,255);
    this.setLayout(new FlowLayout(FlowLayout.CENTER,4,1));
    makeButtons();
    row1 = makePanel(new FlowLayout(FlowLayout.LEFT,4,2),backgroundColor);
    row1.add(clearB);
    row1.add(studFindB);
    row1.add(studForB);
    row1.add(courB);
    row2 = makePanel(new FlowLayout(FlowLayout.LEFT,4,2),backgroundColor);
    row2.add(studBackB);
    row2.add(courFindB);
    row2.add(courForB);
    row2.add(studB);
    row3 = makePanel(new FlowLayout(FlowLayout.LEFT,4,2),backgroundColor);
    row3.add(courBackB);
    add(row1);
    add(row2);
    add(row3);
    Panel p = new Panel(new BorderLayout());
    Label studID = new Label("STUDENT ID");
    TextField entry = new TextField(" ");
    p.add(studID,BorderLayout.WEST);
    p.add(entry,BorderLayout.CENTER);
    Label firstTF = new Label("FIRST NAME");
    makePanel(new BorderLayout(2,2),backgroundColor);
    add("West",courBackB);
    add("East",studB);
    makePanel(new BorderLayout(2,2),backgroundColor);
    add("North",p);
    add("South",courForB);
    makePanel(new BorderLayout(2,2),backgroundColor);
    add("North",courFindB);
    add("South",studBackB);
    makePanel(new BorderLayout(2,2),backgroundColor);
    add("West",p);
    add("East",studForB);
    setBackground(backgroundColor);
    clearB.addActionListener(this);
    courBackB.addActionListener(this);
    studB.addActionListener(this);
    courForB.addActionListener(this);
    courFindB.addActionListener(this);
    studBackB.addActionListener(this);
    courB.addActionListener(this);
    studForB.addActionListener(this);
    studFindB.addActionListener(this);
    private Label makeLabel(String label) {
    Label label1 = new Label(label,Label.RIGHT);
    label1.setFont(new Font("Courier",Font.BOLD,10));
    return label1;
    public void start() {
    appletWidth = 8*4+row1.getSize().width;
    appletHeight = 8*(2+courBackB.getSize().height);
    public void paint(Graphics g) {
    setSize(appletWidth,appletHeight);
    validate();
    public void actionPerformed(ActionEvent e) {
    String s = (String)e.getActionCommand();
    private Button makeButton(String label, Color color, Font font) {
    Button b = new Button(label);
    b.setBackground(color);
    b.setFont(font);
    return b;
    private Panel makePanel(LayoutManager lm, Color c) {
    Panel p = new Panel();
    p.setLayout(lm);
    p.setBackground(c);
    return p;
    private void makeButtons() {
    Font f = new Font("Courier", Font.BOLD, 10);
    Color grey = new Color(255,100,100);
    clearB = makeButton("CLEAR",grey,f);
    studB = makeButton(" STUDENTS ",grey,f);
    studForB = makeButton("->",grey,f);
    studFindB = makeButton("FIND",grey,f);
    courFindB = makeButton("FIND",grey,f);
    studBackB = makeButton("<-",grey,f);
    courB = makeButton(" COURSES ",grey,f);
    courBackB = makeButton("<-",grey,f);
    courForB = makeButton("->",grey,f);
    TextField addressTF = new TextField("ADDRESS", 10);
    static final String initialString = " ";
    String Filler = " ";
    Panel row1, row2, row3, p1;
    int appletWidth, appletHeight;
    Button clearB, studForB, studFindB, courFindB,
    studBackB,courB, courBackB, studB, courForB;
    Color backgroundColor;
    the buttons currently dont do anything. this is stage 1 of 3 for my 3 part assignment. for now i am just supposed to get the format right and show sample text in the textfields.
    the format is supposed to look something like the following (cant copy existing as it is protected)
    <- STUDENTS -> CLEAR <- COURSES ->
    student id FIND course id FIND
    last name_________first name______course name_____
    address________________________________________
    city______province___________p.code______________
    phone__________e-mail_______coordinator___________
    #of courses completed_____ #of students passed______
    student's average grade___ students grade ave grade___
    messages______________________________________
    the ones in caps are buttons and the rest are labels with text fields beside most of the labels.
    i apologize for the extremely long question but i hope this is what you were looking for to give me some help...anything would be greatly appreciated!!
    thanks in advance for anything someone can do for me

    hi,
    may this helps to solve your problem
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.Applet;
    public class Registry4b extends Applet implements ActionListener {
    TextField sid;
    TextField cid;
    public void init() {
    backgroundColor = new Color(200,255,255);
    setLayout(new GridLayout(2,1)); // 2 rows, one column, first row for search, the second for output
    Panel up=new Panel(new GridLayout(3,1)); // search panel
    Panel down=new Panel(new GridLayout(1,1)); //output panel
    down.add(new Label("Just for the output"));
    Panel p1=makePanel(new GridLayout(1,7),backgroundColor);
    makeButtons();
    p1.add(studBackB);
    p1.add(studB);
    p1.add(studForB);
    p1.add(clearB);
    p1.add(courBackB);
    p1.add(courB);
    p1.add(courForB);
    up.add(p1);
    Panel p2=makePanel(new GridLayout(1,3),backgroundColor);
    p2.add(makeLabel("Student ID"));
    sid=new TextField("");
    p2.add(sid);
    p2.add(studFindB);
    up.add(p2);
    Panel p3=makePanel(new GridLayout(1,3),backgroundColor);
    cid=new TextField("");
    p3.add(makeLabel("Course ID"));
    p3.add(cid);
    p3.add(courFindB);
    up.add(p3);
    add(up);
    add(down);
    private Label makeLabel(String label) {
    Label label1 = new Label(label,Label.RIGHT);
    label1.setFont(new Font("Courier",Font.BOLD,10));
    return label1;
    public void start() {
    //appletWidth = 8*4+120;//row1.getSize().width;
    //appletHeight = 8*(2+courBackB.getSize().height);
    appletWidth=200;
    appletHeight=90;
    public void paint(Graphics g) {
    setSize(appletWidth,appletHeight);
    validate();
    public void actionPerformed(ActionEvent e) {
    String s = (String)e.getActionCommand();
    private Button makeButton(String label, Color color, Font font) {
    Button b = new Button(label);
    b.setBackground(color);
    b.setFont(font);
    return b;
    private Panel makePanel(LayoutManager lm, Color c) {
    Panel p = new Panel();
    p.setLayout(lm);
    p.setBackground(c);
    return p;
    private void makeButtons() {
    Font f = new Font("Courier", Font.BOLD, 10);
    Color grey = new Color(255,100,100);
    clearB = makeButton("CLEAR",grey,f);
    studB = makeButton(" STUDENTS ",grey,f);
    studForB = makeButton("->",grey,f);
    studFindB = makeButton("FIND",grey,f);
    courFindB = makeButton("FIND",grey,f);
    studBackB = makeButton("<-",grey,f);
    courB = makeButton(" COURSES ",grey,f);
    courBackB = makeButton("<-",grey,f);
    courForB = makeButton("->",grey,f);
    TextField addressTF = new TextField("ADDRESS", 10);
    static final String initialString = " ";
    String Filler = " ";
    Panel row1, row2, row3, p1;
    int appletWidth, appletHeight;
    Button clearB, studForB, studFindB, courFindB, studBackB,courB, courBackB, studB, courForB;
    Color backgroundColor;
    }interesting for you is only the init()
    regards

  • Applet Servlet communication (urgent)

    Hi,
    I m using Netscape Enterrpise server 4.0 as my web server. I am passing data from applet to servlet using BufferedInputStream(). But it takes about 30 seconds to send the data. If i don't use it, the data is not being read by the servlet. Is there any alternative to this ? Please help.
    Thanks

    It's only the primary key field that i am passing to the servlet from applet .. For this particular process, it takes 30 seconds + other things like loading the applet, etc. so in all, it takes about 1 minute just to fetch the data from servlet which is not reasonable. We have monitored the whole process. We found that other things like query, etc. does not take much time, but BufferedInputStream() itself takes 30 seconds. Regarding communication line, it is quite fast. We are a corporate sector, so no doubt about the speed of the communication line ...
    Thanks for help.

  • Problem with refreshing jtable. help please urgent.

    hi there
    i can refresh the table now, but the problem is that every time it refreshes, it adds the same data to the freshed table. i just need the table to display what was displayed few seconds ago unless there is change in the datasource. here is my code:
    public void run()
    String selectSQL = "select * from buyerordertable";
    int rowCounter = 1;
    boolean okay = true;
    ResultSet rs;
    Vector rowdata = new Vector();
    Vector columNames = new Vector();
    columNames.add("order Id");
    columNames.add("suplier name");
    columNames.add("item name");
    columNames.add("model");
    columNames.add("quantity");
    columNames.add("price");
    columNames.add("description");
    columNames.add("job Id");
    columNames.add("order confirm Id");
    while (okay)
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:wgclientdatabase", "admin", "");
    PreparedStatement ps = con.prepareStatement(selectSQL);
    rs = null;
    rs = ps.executeQuery();
    while(rs.next())
    Vector temp =new Vector();
    String orderid = rs.getString("OrderID");
    temp.add(orderid);
    String supplier =rs.getString("supplierName");
    temp.add(supplier);
    String item = rs.getString("ItemName");
    temp.add(item);
    String model = rs.getString("Model");
    temp.add(model);
    String quantity = rs.getString("Quantity");
    temp.add(quantity);
    String price = rs.getString("Price");
    temp.add(price);
    String description = rs.getString("Description");
    temp.add(description);
    String jobid = rs.getString("JobID");
    temp.add(jobid);
    String confirmid = rs.getString("OrderConfirmID");
    temp.add(confirmid);
    rowdata.add(temp);
    }catch (SQLException sqle)
    catch(ClassNotFoundException ce)
    try
    /*the table keeps adding old data to the refreshed table. i start with one row of data, after every second, a new row of same data is added to the table. i don't know why.*/
    DefaultTableModel newmodel =(DefaultTableModel)jTable.getModel();
    newmodel.setDataVector(rowdata, columNames);
    jScrollPane.repaint();
    Thread.sleep(1000);
    catch (InterruptedException e)
    okay = false;
    }

    hi there
    thank you for your reply
    doesn't the tablemodel keep one set of data? every time i refresh the table, the table model should only provide same data over and over unless it is reset again? in my program, the result seems like the table model is cumulating data every time it refreshes. and the display is growing with the same data. i already use the
    newmodel.setDataVector(rowdata, columNames);
    to reset the data. ideally the table should only display rowdata. some people say that just using table model will solve the refreshing task. i am not sure if they have my kind of problem.

  • Deploying Applets on OAS (urgent help needed)

    I have installed and Configured OAS 4.0.7.1 on Win Nt Server ( SP5)
    I have created a very simple Java Applet using JDeveloper 1.1 and followed the deployment method as specified in the Work book (Student Work book).
    I have modified the source to add the ARCHIVE line.Using the Deployment Wizard I have created the archive file (.jar).
    I have the Java class files and the archive file in the same directory.
    I have added a HTTP Listener with port 90 and set the Directory for Virtual path corresponding to the directory where the java class files and archive files are available.
    Now when I enter the URL for the invoking HTML file from the Browser the Applet seems to be loading but it doesn't. The error message at the bottom of the Applet(looks like the Applet Window):
    load: <packagename>.<classname> cannot be instaniated.
    Please help me to resolve the problem at the earliest.
    Thanks
    Thiru

    Marcosk2,
    I am still having problems.
    kindly tell me the steps in detail.
    what i have done is:
    1.i have a simple applet (with frame) with a button.
    2. I have edited the html file and included the following:
    CODEBASE="imtac" -the virtual directory name
    ARCHIVE = "carclas.zip"
    3.with Deployment Wizard I have created the zip file (carclass.zip);
    Whe I run the Applet (in JD1.1) it is not running as it is looking for the path (imtac) but if i remove the virtual path (imtac) then the applet runs. You asked me to include the virtual path name in the CODEBASE parameter.
    Please do let me know in steps so that i too can deploy the applets in the WEB.
    It will be of great help even if u give me your telephone no with country code and area code so that I could talk to u and make things workable here. ( i am in Oman).
    I have to give a demo tomorrow.
    Thanks

  • Refresh Applet On Button Click

    Hello everyone, I wanted to know what would be the easiest way to "reload" an Applet on a button click. I have a reset button in an actionPerformed method and I wanted to just run the constructor again for the applet if the reset button was pressed, or anther method. How can I run anther actionPerformed from within an actionPerformed?
    Sorry a bit confused about this.

    If your applet is named "MyApplet" (via the <applet name=....> tag), from within Javascript, you can call
    document.MyApplet.init() ;

Maybe you are looking for