Empty Stack Exception

I have got the following code to display a web page in a JScrollPane. It displays fine but i keep getting an empty stack exception(displayed at end) can anyone help?
package ACT;
import java.io.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.html.*;
public class Locate extends JEditorPane implements HyperlinkListener
private JEditorPane paneReference;
private static JScrollPane displayHolder;
public Locate(String URLString) throws IOException
super(URLString);
paneReference = this;
paneReference.setEditable(false);
displayHolder = new JScrollPane(paneReference);
displayHolder.setPreferredSize(new Dimension(740,465));
public void hyperlinkUpdate(HyperlinkEvent e)
try
if ( e.getEventType() == HyperlinkEvent.EventType.ACTIVATED )
paneReference.setPage(e.getURL());
catch (Exception ex)
ex.printStackTrace(System.err);
public JScrollPane getMap()
return displayHolder;
Error:
java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:82)
at javax.swing.text.DefaultStyledDocument$ElementBuffer.insertElement(DefaultStyledDocument.java:1623)
at javax.swing.text.DefaultStyledDocument$ElementBuffer.insertUpdate(DefaultStyledDocument.java:1361)
at javax.swing.text.DefaultStyledDocument$ElementBuffer.insert(DefaultStyledDocument.java:1231)
at javax.swing.text.DefaultStyledDocument.insert(DefaultStyledDocument.java:194)
at javax.swing.text.html.HTMLDocument.insert(HTMLDocument.java:212)
at javax.swing.text.html.HTMLDocument$HTMLReader.flushBuffer(HTMLDocument.java:3014)
at javax.swing.text.html.HTMLDocument$HTMLReader.flush(HTMLDocument.java:1921)
at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:240)
at javax.swing.JEditorPane.read(JEditorPane.java:421)
at javax.swing.JEditorPane$PageLoader.run(JEditorPane.java:468)

Is the HTML of the webpage well-formed?

Similar Messages

  • Error:Attemp to pop an empty stack

    Error:Attempt to pop an empty stack: I am working on this program for most of yesterday up this present moment and I can't figure out why I am getting this error. I canot understand why "top" is null after I have pushed the values on the stack which I was able to print and varify.
    1. The program compiles ok.
    2. I try hard not to put all my code, but to present the picture I have to.
    3. What I am doing I am reading in an expression, place it in a binaryTree and visit the nodes in post order(This I have done correctly)
    4. The problem is when I try to evaluate the expression (51 3 15 * - 9 65 13 / - +) which is the out put of the above.
    5. The problem is when I try to pop() values of the stack, it is indicating it is empty. I can't understand this when I have already push the values on the stack. There is something I am missing and I can't seem to figure appreciate your.
    code for part is correct except for the evaluation method. Your assistanc appreciated.
    public class Node {
         NodeDatas data;
         Node next;
        public Node(NodeDatas d) {
             data = d;
             next = null;
    }// end class Node
    public class NodeDatas {
         char c;
         int num;
        public NodeDatas(char c) {
             this.c = c;
        public NodeDatas (int n){
             num = n;
        public char getData(){
             return c;
        public int getIntData(){
             return num;
    public class Stack {
         Node top = null;
        public Stack() {
        public boolean empty(){
             return top == null;
        public void push(NodeDatas n){
             Node np = new Node(n);
             np.next = top;
             top = np;
        }// end push
        public NodeDatas pop(){
             if(this.empty()){
                  System.out.printf("\n Attempt to pop an empty stack \n");
                   System.exit(2);
             NodeDatas hold = top.data;
             top = top.next;
             return hold;
        }//end pop   
    import java.io.*;
    import java.util.*;
    class TreeNode{
         NodeData data;
         TreeNode left, right;
         TreeNode(NodeData d){
              data = d;
              left = right = null;
    }//end TreeNodeClass
    class NodeData{
         String word;
         public NodeData(String w){
              word = w;
         public void visit(){
         System.out.printf("%s",word);
         public void evaluate(){////////////////////////////////////////////here is where my evaluation of the expression starts.
              int j, a, b, c;
              Stack S = new Stack();
                   char p = word.charAt(0);//word is a string
                   if(Character.isDigit(p))//if p is a digit convert word sent to push()
                        S.push(new NodeDatas(Integer.parseInt(word)));//push values on stack
              else{
                        b = S.pop().getIntData();// when I try to pop, says stack is empty
                        a = S.pop().getIntData();//
                        if(p == '+')
                             c = a + b;
                        else
                        if(p == '-')
                             c = a - b;
                        else
                        if(p == '*')
                             c = a * b;
                        else
                             c = a/b;
                        S.push(new NodeDatas(c));          
                   }// end else
              //System.out.println(S.pop().getIntData());
    }//end NodeData1
    class BinaryTree{
         TreeNode root;
         BinaryTree(){
              root = null;
         public BinaryTree(Scanner in){
              root = buildTree(in);
         public static TreeNode buildTree(Scanner in){
              String str = in.next();
              if(str.equals("@"))return null;
              TreeNode p = new TreeNode(new NodeData(str));
              p.left =  buildTree(in);
              p.right = buildTree(in);
              return p;
         }//end buildTree
         public void postOrder(){
              postOrderTraversal(root);
         public void postOrderTraversal(TreeNode node){
              int i = 0;
              if(node!=null){
                   postOrderTraversal(node.left);
                   postOrderTraversal(node.right);
                   node.data.visit();
                   node.data.evaluate();/////////////////////////////Here I am sending each string one at a time
         }//end postOrder
    }//end BinaryTree
    class Nichole{
         public static void main(String[] args)throws IOException
              Scanner in  = new Scanner(new FileReader("zeth.txt"));
              BinaryTree bit = new BinaryTree(in);
              bit.postOrder();
         }//end main     
    }//end class

    Rather than ask people to read a whole lot of your code, how about adding debug statements to your code so you can fix it yourself?
    If you have a stack, and you're adding values to that stack, and you get an error when you try to pop the stack, a few possibilities come to mind:
    1) maybe you're not really adding values to the stack
    2) maybe you push values onto the stack after popping it.
    3) maybe you pushed values onto the stack, popped them all off, and then tried to pop again.

  • Process Empty file Exception

    hi guys,
    i faced a weired problem, i got this error in the monitoring it's about processing empty files,
    i have to process empty files but without having this exception
      <SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_R2_FILE_PROXY_: Parsing an empty source. Root element expected!</SAP:Stack>
    thank you.

    Hi
    -->In the Empty file handling we have different options as per your requirement you must and should select PROCESS EMPTY FILES options ignore the rest of the two options available.
    -->So i suggest you to bypass the IR and directly configure the ID and use dummy interface and dummy namespace so by configuring as mentioned above we can process the empty files.
    Thanks

  • A failure occured while importing Java SSO ticket certificate in ABAP stack Exception : FOREIGN_ENQUEUE_LOCK

    Dear All,
    We have completed the fresh installation of Soman7.1.
    Now , We are doing the "Configuration of the Solman" and we are in the Step "Basic configuration ".
    SID:        SMI
    Hostname: Solmantrg
    Solman version: 7.1
    The SSO Setup is failing with below error.
    Message :
    A failure occured while connecting to ABAP stack on solmantrg.thetimes.co.in sys=01 client=001 user=null. Details : 'user' missing
    Details of the Log
    Found SID for SSO ACL entry : SMI
    Found login.ticket_client for SSO ACL entry : 000
    The Read entry permission on TicketKeystore/SAPLogonTicketKeypair-cert was given to sap.com/tc~webadministrator~solmandiag/servlet_jsp/smd/root/WEB-INF/lib/SetupLib.jar
    The TicketKeystore/SAPLogonTicketKeypair-cert was succesfully read (619 bytes)
    ABAP SSO ticket certificate of SMI was imported in ABAP PSE of solmantrg.thetimes.co.in (client 001)
    The ABAP SSO ticket certificate was successfully imported in ABAP System PSE, and the ACL updated accordingly (SID=SMI LoginTicketClient=001)
    A failure occured while importing Java SSO ticket certificate in ABAP stack
    !! Exception : FOREIGN_ENQUEUE_LOCK(Abap cause=SOLMAN_ADMINE_TABLEE)
    The ABAP instance profile contains the parameter : login/accept_sso2_ticket=1
    The SSO ticket Certificate <CN=SMI> has been successfully imported into Java Keystore
    The com.sap.security.core.server.jaas.EvaluateTicketLoginModule already contained the entry : trustedsys=SMI, 001 trustediss=CN=SMI trusteddn=CN=SMI
    The Authentication template for component sap.com/SQLTrace*OpenSQLMonitors was already set to ticket
    The Authentication template for component sap.com/SQLTrace*SQLTrace was already set to ticket
    The Authentication template for component sap.com/tc~monitoring~systeminfo*monitoring was already set to ticket
    The Authentication template for component sap.com/tc~monitoring~systeminfo*sap_monitoring was already set to ticket
    The Authentication template for component sap.com/com.sap.security.core.admin*useradmin was already set to ticket
    The Authentication template for component sap.com/tc~webadministrator~solmandiag*smd was already set to ticket
    The Authentication template for component sap.com/tc~smd~e2etraceupload*E2EClientTraceUploadW was already set to ticket
    The com.sap.security.core.server.jaas.EvaluateAssertionTicketLoginModule already contained the entry : trustedsys=SMI, 001 trustediss=CN=SMI trusteddn=CN=SMI
    The Authentication template for component sap.com/tc~smd~EemAdminGateway*EemAdmin_Config1 has been set to evaluate_assertion_ticket
    The Login Module BasicPasswordLoginModule was added to the security component sap.com/tc~smd~EemAdminGateway*EemAdmin_Config1
    A failure occured while connecting to ABAP stack on solmantrg.thetimes.co.in sys=01 client=001 user=null
    !! Exception : 'user' missing
    The ABAP instance profile contains the parameter : login/create_sso2_ticket=2
      Exception
    com.sap.mw.jco.JCO$AbapException: (126) FOREIGN_ENQUEUE_LOCK: FOREIGN_ENQUEUE_LOCK
    at com.sap.mw.jco.MiddlewareJRfc$Client.execute(MiddlewareJRfc.java:1512)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3937)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3570)
    at com.sap.sup.admin.setup.AbapSysRfcAdapter.addTrustedIssuer(AbapSysRfcAdapter.java:276)
    at com.sap.sup.admin.setup.AbapSysRfcAdapter.addTrustedIssuer(AbapSysRfcAdapter.java:249)
    at com.sap.sup.admin.setup.ManagingServices.setupDualStackSSO(ManagingServices.java:752)
    at com.sap.sup.admin.setup.SetupStep.runExec(SetupStep.java:564)
    at com.sap.sup.admin.setup.SetupStep.execute(SetupStep.java:445)
    at com.sap.smd.agent.plugins.remotesetup.SapInstance.setup(SapInstance.java:674)
    at com.sap.sup.admin.setup.ws.SetupWrapper._diagSetup(SetupWrapper.java:279)
    at com.sap.sup.admin.setup.ws.SetupWrapper.diagSetup(SetupWrapper.java:21)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:331)
    at com.sap.engine.services.webservices.runtime.JavaClassImplementationContainer.invokeMethod(JavaClassImplementationContainer.java:76)
    at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:174)
    at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:81)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:90)
    at SoapServlet.doPost(SoapServlet.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1060)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    ========================
    com.sap.mw.jco.JCO$Exception: (101) RFC_ERROR_PROGRAM: 'user' missing
    at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:518)
    at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:1087)
    at com.sap.mw.jco.JCO$Client.connect(JCO.java:3310)
    at com.sap.sup.admin.setup.CommonServices.getJcoClient(CommonServices.java:773)
    at com.sap.sup.admin.setup.CommonServices.getJcoClient(CommonServices.java:722)
    at com.sap.sup.admin.setup.SolManRfcAdapter.getJ2eeSsoSettings(SolManRfcAdapter.java:649)
    at com.sap.sup.admin.setup.ManagingServices.updateSSOfromURLrepository(ManagingServices.java:790)
    at com.sap.sup.admin.setup.ManagingServices.setupDualStackSSO(ManagingServices.java:773)
    at com.sap.sup.admin.setup.SetupStep.runExec(SetupStep.java:564)
    at com.sap.sup.admin.setup.SetupStep.execute(SetupStep.java:445)
    at com.sap.smd.agent.plugins.remotesetup.SapInstance.setup(SapInstance.java:674)
    at com.sap.sup.admin.setup.ws.SetupWrapper._diagSetup(SetupWrapper.java:279)
    at com.sap.sup.admin.setup.ws.SetupWrapper.diagSetup(SetupWrapper.java:21)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:331)
    at com.sap.engine.services.webservices.runtime.JavaClassImplementationContainer.invokeMethod(JavaClassImplementationContainer.java:76)
    at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:174)
    at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:81)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:90)
    at SoapServlet.doPost(SoapServlet.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1060)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    In strustsso2, cerficate date is valid only.
    kindly help us to fix this SSO_Setup issue
    Thanks and Regards,
    Gayathri.K

    Hi ,
    Thanks for the above reply.
    I have executed the Step 2.3 AND 2.4 and i started the SSO Setup again. Still i am getting below error
    Message
    A failure occured while importing Java SSO ticket certificate in ABAP stack
    Details Of the Log
    Found SID for SSO ACL entry : SMI
    Found login.ticket_client for SSO ACL entry : 000
    The Read entry permission on TicketKeystore/SAPLogonTicketKeypair-cert was given to sap.com/tc~webadministrator~solmandiag/servlet_jsp/smd/root/WEB-INF/lib/SetupLib.jar
    The TicketKeystore/SAPLogonTicketKeypair-cert was succesfully read (619 bytes)
    ABAP SSO ticket certificate of SMI was imported in ABAP PSE of solmantrg (client 001)
    The ABAP SSO ticket certificate was successfully imported in ABAP System PSE, and the ACL updated accordingly (SID=SMI LoginTicketClient=001)
    A failure occured while importing Java SSO ticket certificate in ABAP stack
    !! Exception : FOREIGN_ENQUEUE_LOCK(Abap cause=SOLMAN_ADMINE_TABLEE)
    The ABAP instance profile contains the parameter : login/accept_sso2_ticket=1
    The SSO ticket Certificate <CN=SMI> has been successfully imported into Java Keystore
    The com.sap.security.core.server.jaas.EvaluateTicketLoginModule already contained the entry : trustedsys=SMI, 001 trustediss=CN=SMI trusteddn=CN=SMI
    The Authentication template for component sap.com/SQLTrace*OpenSQLMonitors was already set to ticket
    The Authentication template for component sap.com/SQLTrace*SQLTrace was already set to ticket
    The Authentication template for component sap.com/tc~monitoring~systeminfo*monitoring was already set to ticket
    The Authentication template for component sap.com/tc~monitoring~systeminfo*sap_monitoring was already set to ticket
    The Authentication template for component sap.com/com.sap.security.core.admin*useradmin was already set to ticket
    The Authentication template for component sap.com/tc~webadministrator~solmandiag*smd was already set to ticket
    The Authentication template for component sap.com/tc~smd~e2etraceupload*E2EClientTraceUploadW was already set to ticket
    The com.sap.security.core.server.jaas.EvaluateAssertionTicketLoginModule already contained the entry : trustedsys=SMI, 001 trustediss=CN=SMI trusteddn=CN=SMI
    The Authentication template for component sap.com/tc~smd~EemAdminGateway*EemAdmin_Config1 has been set to evaluate_assertion_ticket
    The Login Module BasicPasswordLoginModule was added to the security component sap.com/tc~smd~EemAdminGateway*EemAdmin_Config1
    The ABAP instance profile contains the parameter : login/create_sso2_ticket=2
    Exception
    com.sap.mw.jco.JCO$AbapException: (126) FOREIGN_ENQUEUE_LOCK: FOREIGN_ENQUEUE_LOCK
    at com.sap.mw.jco.MiddlewareJRfc$Client.execute(MiddlewareJRfc.java:1512)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3937)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3570)
    at com.sap.sup.admin.setup.AbapSysRfcAdapter.addTrustedIssuer(AbapSysRfcAdapter.java:276)
    at com.sap.sup.admin.setup.AbapSysRfcAdapter.addTrustedIssuer(AbapSysRfcAdapter.java:249)
    at com.sap.sup.admin.setup.ManagingServices.setupDualStackSSO(ManagingServices.java:752)
    at com.sap.sup.admin.setup.SetupStep.runExec(SetupStep.java:564)
    at com.sap.sup.admin.setup.SetupStep.execute(SetupStep.java:445)
    at com.sap.smd.agent.plugins.remotesetup.SapInstance.setup(SapInstance.java:674)
    at com.sap.sup.admin.setup.ws.SetupWrapper._diagSetup(SetupWrapper.java:279)
    at com.sap.sup.admin.setup.ws.SetupWrapper.diagSetup(SetupWrapper.java:21)
    at sun.reflect.GeneratedMethodAccessor2202.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:331)
    at com.sap.engine.services.webservices.runtime.JavaClassImplementationContainer.invokeMethod(JavaClassImplementationContainer.java:76)
    at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:174)
    at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:81)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:90)
    at SoapServlet.doPost(SoapServlet.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1060)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Also , i have checked the note # 1008474   Diagnostics Setup Wizard uses wrong ABAP client.
    As mentioned in above note, i have checked in visual admin all settings are maintained correctly.
    RFC destination WEBADMIN & SOLMANDIAG is also working fine.
    please tel why i am getting Foreign Enquelock
    Regards,
    Gayathri.K

  • How to automatically empty the exception queue?

    Hi.
    I have an exception queue that contains over 140000 messages. Is there some way of making Oracle empty this queue on a regular basis? I have set "dequeue" to "disabled" because I am not interested in this queue's messages, but the queue just continues to grow larger and larger...
    Any help would be very appreciated!
    Regards,
    -Christer

    Is this really not possible? Do I have to make a trigger on the table or manually delete it to stop growing?

  • Handling an empty table exception condition

    Hi,
    I am very new to java and i am using sysbase as my backend, where in i am executing a stored procedure. I have written a program to connect to sybase and execute my stored procedure which returns a result set. Can any body tell me how to handle an exception condition when the table is empty. Or any one please give me a refrence or a program which handles all the exception conditions. It will very helpfull for me. I hope some body helps me.
    Thanks & Regards
    -Sandeep

    Normally, people iterate over the ResutSet with ResultSet.next(); that method returns a boolean when there is no next, so many people design their code so that either it just does the right thing when iterating 0 times, or they count the number of iterations and do something special after iterating when the count is 0.
    I'm sure there's other ways to structure it, but that's what I see a lot.

  • Stack Exception

    Hi.,
    =>I am using jdev11.1.5
    =>I had created a view link between two tables fin_periods (EO) and apl_accts (VO)
    =>When i tried to navigate my page i am getting this exception
    Error:
    (oracle.jbo.TooManyObjectsException) JBO-25013: Too many objects match the primary key oracle.jbo.Key[MEL ].
    =>How could i fix this error.

    Hi,
    Most likely the primary you specified on:
    fin_periods
    Is not unique.
    Check the primary key on the entity/view
    You can execute a distinct query on the database to see if the column is unique or not.
    Although this should normally be a database constraint.
    -Anton

  • Problem with queues / stacks for a project

    I have to code a calculator that turns an infix expression, where the operator is in the middle, to a postfix expression, where the operators are at the end;
    so, for instance, 5 + 5 would really be 5 5 +, and 5 + 5 * 5 / 5 would be 5 5 5 5 + * /.
    I've gotten the addition and subtraction working fine, the only problem comes when I have to take into account order of operations (so far).
    So, that being said, here is the code:
    import java.util.*;
    public class iCalc {
          * @param args
         public static void main(String[] args) {
         //     Scanner scan = new Scanner(System.in);
         //     System.out.println("Equation:");
         //     String input = "55+5-10%16."; //might have to store each element in a linked list later
         //     evalExp(input);     //calls evalExp with the input
              String input2 = "55 + 5 * 10 + 16";//declare some dummy input
              //121
              String [] items = input2.split(" ");//split the string's elements into an array
              Queue<String> queue = new LinkedList<String>();//the queue
              Stack<String> stack = new Stack<String>();//make a new stack to store operators
              Stack<String> stackOutput = new Stack<String>();//output stack
              for (String s : items) {//scan the array
                  System.out.println("item : " + s);//print out what's being scanned
                  if(isNumber(s)) queue.add(s);//add it onto the queue
                  if(isOperator(s)) stack.push(s);//add it onto the stack
              //converts to postfix here
             while(!stack.isEmpty()) queue.add(stack.pop());
             evalExp(queue, stackOutput);
         public static void evalExp(Queue<String> exp, Stack<String> outputStack)
              System.out.println("Evaluating the expression...");
              int length = exp.size();
              int temp;
         while(length > 0)
              // 55 5 10 16 + * +
              // 55
              try{
                   length--;
                   System.out.println("Trying to see if the element is a number...");
                   if(isMultiplyOrDivide(exp))//is there a multiply or divide operator
                        int spot = findMultiplyOrDividePosition(exp);//if yes, finds its position in the operators and stores it as an int
                        temp = 0;
                        for(String s : exp)
                        {//PROBLEM: After the first iteration, it suddenly has an empty stack exception
                             temp++;//keeps track of how far you are into the queue
                             outputStack.push(exp.remove());//take the head of the queue, and push it onto the stack
                             if(temp == spot+1)
                                  break;     //(if there were enough elements in the queue popped, end this loop
                        outputStack.push(performMath(outputStack.pop(), outputStack.pop(), popTheOperator(exp)));
                   Double MyNum = Double.parseDouble(exp.remove());
                   String MyStackNum = "" + MyNum;
                   outputStack.push(MyStackNum);
                        if(outputStack.size() == 2)
                             length--;
                             String operator = popTheOperator(exp);
                             System.out.println("Two numbers have been popped, time to find the operator...");     
                             outputStack.push(performMath(outputStack.pop(), outputStack.pop(), operator));
                             for(String s : exp)
                                  if(s.equals(operator))
                                       exp.remove(s);
                                       break;
              }     catch(Exception ParseException){
                   outputStack.push(performMath(outputStack.pop(), outputStack.pop(), exp.remove()));               
              while(!outputStack.isEmpty()) System.out.println("The output stack is:" + outputStack.pop());     
         public static boolean isNumber(String s1)
              char[]arr2 = s1.toCharArray();
              for(int i = 0;i<s1.length();i++)
                   System.out.println("checking...." + s1);
                   if((!Character.isDigit(arr2))) return false;
              return true;
         public static boolean isOperator(String s2)
              char[]arr3 = s2.toCharArray();
              for(int i = 0;i<arr3.length;i++)
                   System.out.println("checking...." + arr3[i]);
                   if(findOperator(arr3[i])) return true;
              return false;
         public static boolean findOperator(char op)
                        if(op == '+' ||
                             op == '-' ||
                             op == '/' ||
                             op == '*' ||
                             op == '%' ||
                             op == '^' ||
                             op == '&' ||
                             op == '(' ||
                             op == ')' ||
                             op == '|' ||
                             op == '>' ||
                             op == '<' ||
                             op == '=' ||
                             op == '!' ) return true;          
              return false;          
         // 10 16 + + +
         public static String popTheOperator(Queue<String> myQueue)
              String current = "";
              for(String s: myQueue)
                   if(s.equals("*") || s.equals("/"))
                        current = s;
                   break;
              if(current == "")
                   for(String s: myQueue)
                        if(s.equals("+") || s.equals("-"))
                             current = s;
                             break;
         return current;     
         public static String performMath(String operand1, String operand2, String operator)
              String myString = "";
              double result = 0;
              double temp1 = Double.parseDouble(operand1);
              double temp2 = Double.parseDouble(operand2);
              if(operator.equals("+"))
                   result = temp1 + temp2;
              else if(operator.equals("-"))
                   result = temp2 - temp1;
              else if(operator.equals("/"))
                   result = temp1 / temp2;
              else if(operator.equals("*"))
                   result = temp1 * temp2;
              else if(operator.equals("%"))
                   result = temp1 % temp2;
              else if(operator.equals("^"))
                   result = Math.pow(temp1, temp2);
              else if(operator.equals("&"))
              else if(operator.equals("|"))
                   result = temp1 - temp2;
              else if(operator.equals(">"))
                   if(temp1 > temp2)
                        result = 1;
                   else result = 0;
              else if(operator.equals("<"))
                   if(temp1 < temp2)
                        result = 1;
                   else result = 0;
              else if(operator.equals("="))
                   if(temp1 == temp2)
                        result = 1;
                   else result = 0;
              else if(operator.equals("!"))
                   if(temp1 != temp2) result = 1;
                   else result = 0;
              myString = "" + result;
              return myString;
         public static boolean isMultiplyOrDivide(Queue<String> myQueue)
              for(String s : myQueue)//scan the queue
                   if(s.equals("*") || s.equals("/"))
                        return true;//it has found a multiply/divide operator!
              return false;
         public static int findMultiplyOrDividePosition(Queue<String> myQueue)
              int position = 0;
              for(String s: myQueue)
                   if(s.equals("+") ||
                                  s.equals("-") ||
                                  s.equals("%") ||
                                  s.equals("^") ||
                                  s.equals("&") ||
                                  s.equals("|") ||
                                  s.equals(">") ||
                                  s.equals("<") ||
                                  s.equals("=") ||
                                  s.equals("!")) position ++;
              return position;
    }I think that its trying to remove the head, but because the head was already removed, somehow its not letting it remove it; as if by removing the head, there is no new updated head.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

                   if(isMultiplyOrDivide(exp))//is there a multiply or divide operator
                        int spot = findMultiplyOrDividePosition(exp);//if yes, finds its position in the operators and stores it as an int
                        temp = 0;
                        for(String s : exp)
                        {//PROBLEM: After the first iteration, it suddenly has an empty stack exception
                             temp++;//keeps track of how far you are into the queue
                             outputStack.push(exp.remove());//take the head of the queue, and push it onto the stack
                             if(temp == spot+1)
                                  break;     //(if there were enough elements in the queue popped, end this loop
                        outputStack.push(performMath(outputStack.pop(), outputStack.pop(), popTheOperator(exp)));
                   }the problem is somewhere in here.

  • Stack traces mysteriously disappear from Exceptions

    I'm using Sun Java System Application Server Platform Edition 8.0.0_01 on Solaris 8 on a Sun-Fire machine. The problem is that some exceptions thrown in session beans make it to the presentation tier without their stack traces.
    Here is a session bean method:
    * @ejb.interface-method
    public void generateException() throws SbankInternalException
    try { System.exit(0); }
    catch (Exception e) {
    throw new SbankInternalException("Unexpected exception", e);
    SbankInternalException is a simple wrapper on Exception:
    public class SbankInternalException
    extends Exception
    public SbankInternalException() {}
    public SbankInternalException(String message)
    super(message);
    public SbankInternalException(String message, Throwable cause)
    super(message, cause);
    public SbankInternalException(Throwable cause)
    super(cause);
    Here is the code that triggers the problem:
    <h3>Exception testing:</h3>
    <%
    try {
    maintenanceServices.generateException();
    } catch (Exception E) {
    Throwable e = (Throwable) E;
    %>
    <h3>Caught exception <%=E%></h3>
    <pre>
    <%
    do {
    %>CLASS: <%=e.getClass().getName()%>
    MESSAGE: <%=e.getMessage()%><br><%
    StackTraceElement se[] = e.getStackTrace();
    if (se.length == 0) {
    %> EMPTY STACK TRACE<br><br><%
    } else {
    for (int i = 0; i < se.length; i++) {
    %> <%=se.toString()%><br><%
    %> <br><br><%
    e = e.getCause();
    } while (e != null);
    %>
    </pre>
    And here is what I get:
    <h3>Exception testing:</h3>
         <h3>Caught exception sbank.services.SbankInternalException: Unexpected exception</h3>
         <pre>
    CLASS: sbank.services.SbankInternalException
    MESSAGE: Unexpected exception<br>
    EMPTY STACK TRACE<br><br>
    CLASS: java.security.AccessControlException
    MESSAGE: access denied (java.lang.RuntimePermission exitVM)<br>
    EMPTY STACK TRACE<br><br>
         </pre>
    Server log does not contain any message about that.
    This only seems to be the problem for exceptions declared in bean interface. When a RuntimeException is thrown in the bean, then it is properly logged to the server log (with strack trace), and I catch a nice RemoteException in the presentation layer, as expected (also with stack trace, though the top frame is somewhere in the demarshalling code of application server guts, so it's not very useful).
    Is it my error, or a bug?
    regards
    Marcin

    I'm not complaining that the exceptions declared to be thrown from session bean interface are not logged. AFAIR that is OK with the EJB spec.
    I'm complaining that the stack traces are stripped from the exception on its way from the session bean to the client (presentation layer in this case).
    I know that I could log the error in the session bean, that is just a workaround. I still would like to know why my exceptions are being broken? After all the whole point of exceptions is that they can be generated in one place, and investigated/displayed in another.
    The only explanation I can think of that there is some silly optimization, that omits stack frames when serializing the exceptions, so that they propagate faster. If it is so, can I disable that?
    Marcin

  • Both the download and cookie exception dialogs are empty. I know there are entries there but I can't see them. This has been a problem since release 5.0 on Mac OSX.

    They're empty, no entries. When I download a file I can see the download progress but once the download is finished the entry disappears.
    The Cookie Exceptions list is always empty. But I know the list contains entries because I have Firefox configured to ask me about allowing cookies. So there should be many entries with sites either allowed, allowed for session, or denied.

    I had the same issue: Exception list empty, but exceptions still present.
    I've inspected my permissions.sqlite file and found an entry with permission set to -1. After changing this to 1, all exceptions were visible again.

  • Stack Size

    For an assignment I had to create a postfix calculator, and one of the errors we had to catch was:
    if there is more then one integer left in the stack when printing the final result, it needs
    to give an error message and exit.
    We were provided the implementation and interface for the Stack by our instructor and here is the method he used for toString.
        public String toString() {
         if (empty()) {
             return "Empty Stack";
         } else {
             return recursiveToString(top);
        /* recursive method to print a non-empty stack
         * @param     the starting index in the array
         * @return     a string representing the stack
        private String recursiveToString(IntNode start) {
         if (start == null) {
             return "";
         String separator = "";
         if (start != top) {
             separator = " :: ";
         return recursiveToString(start.getNext()) +
                    start.getValue() + separator;
        }Basically if there is more than one integer in the stack it will print it like so:
    1 :: 2 :: 3 :: 4
    This is what I used to tell if there was more than one integer left in the stack when printing the final results. I used this code:
    //Checking for the "::" that the toString method prints between integers
    //when there is more than one left in the stack. If there is more the one
    //integer left in the stack then give an error and exit.
    for(int i = 0; i < intStack.toString().length(); i++) { //looping through the toString
    //if there are two colons, consecutively, there is more than one integer in the stack
         if(intStack.toString().charAt(i) == ':' && intStack.toString().charAt(i+1) == ':') {
              System.out.println("Error:\tMore than one integer in final stack. Make sure equations\n\tin " + param[0] + " are valid. Exiting program...");
              System.exit(1);
    }Now my question is... is there a better way to do this? Ideally I would like this part to work regardless
    of how the toString method formats the integers. Because right now if the toString method was
    changed my little check would not work. So is there a way to determine the amount of items in a stack
    or a better way to do this.
    To give a better understanding of those snippets here is the code as a whole:
    import java.util.EmptyStackException;
    import java.util.Scanner;
    import java.io.File;
    public class KinseyAnthony4 {
         public static void main(String[] param) {
              /** Declare new IntLinkedStack Stack Object */
              IntLinkedStack intStack = new IntLinkedStack();
              //Make sure there is only one parameter entered.
              if(param.length == 1) {
                   //try to read the file
                   try {
                        /** declaring new file object */
                        File calcMe = new File(param[0]);
                        /** declaring new scanner object */
                        Scanner readIt = new Scanner(calcMe);
                        /** declaring int for line number */
                        int line = 1;
                        /** declaring int for first number popped from stack */
                        int top = 0;
                        /** declaring int for second number popped from stack */
                        int next = 0;
                        /** declaring int to hold the result of calculations */
                        int result = 0;
                        //Report current status
                        System.out.println("Reading through " + param[0] + ":");
                        //Use loop to view each line until there are none left
                        while(readIt.hasNextLine()) {
                            /** declaring string that holds current line's content */
                             String lineContent = readIt.nextLine();
                             //Report current line number and it's contents
                             System.out.println("\nLine " + line + ": " + lineContent);
                             //Use for loop to analyze each character in the line
                             for(int i=0; i < lineContent.length(); i++) {
                                  //Is it a digit?
                                  if(Character.isDigit(lineContent.charAt(i))) {
                                       /** declaring int that holds numeric value of the char */
                                       int pushMe = Character.getNumericValue(lineContent.charAt(i));
                                       //Report what's being pushed on stack
                                       System.out.println(">Pushing " + pushMe + " to stack.");
                                       //Push the value on the stack
                                       intStack.push(pushMe);
                                  //It's not a digit
                                  else {
                                       //Use a switch statement for computations
                                       switch(lineContent.charAt(i)) {
                                            //Multiplication
                                            case '*':
                                                 top = intStack.pop(); //Pop top number
                                                 System.out.println(">Popping " + top + " from stack."); //Status
                                                 next = intStack.pop(); //Pop next number
                                                 System.out.println(">Popping " + next + " from stack."); //Status
                                                 result = next * top; //Multiply them
                                                 System.out.println(">Calculating " + next + " * " + top); //Status
                                                 intStack.push(result); //Push result back onto stack
                                                 System.out.println(">Pushing result of " + result + " to stack."); //Status
                                                 break;
                                            //Division
                                            case '/':
                                                 top = intStack.pop(); //Pop top number
                                                 System.out.println(">Popping " + top + " from stack."); //Status
                                                 next = intStack.pop(); //Pop next number
                                                 System.out.println(">Popping " + next + " from stack."); //Status
                                                 result = next / top; //Divide them
                                                 System.out.println(">Calculating " + next + " / " + top); //Status
                                                 intStack.push(result); //Push result back onto stack
                                                 System.out.println(">Pushing result of " + result + " to stack."); //Status
                                                 break;
                                           //Addition
                                            case '+':
                                                 top = intStack.pop(); //Pop top number
                                                 System.out.println(">Popping " + top + " from stack."); //Status
                                                 next = intStack.pop(); //Pop next number
                                                 System.out.println(">Popping " + next + " from stack."); //Status
                                                 result = next + top; //Add them
                                                 System.out.println(">Calculating " + next + " + " + top); //Status
                                                 intStack.push(result); //Push result back onto stack
                                                 System.out.println(">Pushing result of " + result + " to stack."); //Status
                                                 break;     
                                            //Subtraction
                                            case '-':
                                                 top = intStack.pop(); //Pop top number
                                                 System.out.println(">Popping " + top + " from stack."); //Status
                                                 next = intStack.pop(); //Pop next number
                                                 System.out.println(">Popping " + next + " from stack."); //Status
                                                 result = next - top; //Subtract them
                                                 System.out.println(">Calculating " + next + " - " + top); //Status
                                                 intStack.push(result); //Push result back onto stack
                                                 System.out.println(">Pushing result of " + result + " to stack."); //Status
                                                 break;
                                            //Invalid Characters
                                            default:
                                                 //Ignore them if they're spaces
                                                 if(!Character.isSpaceChar(lineContent.charAt(i))) {
                                                      //So if they're not spaces give an error and exit
                                                      System.out.println("Error:\tInvalid character read. Exiting program...");
                                                      System.exit(1);
                                                      break;
                             //Checking for the "::" that the toString method prints between integers
                             //when there is more than one left in the stack. If there is more the one
                             //integer left in the stack then give an error and exit.
                             for(int i = 0; i < intStack.toString().length(); i++) { //looping through the toString
                                  //if there are two colons, consecutively, there is more than one integer in the stack
                                  if(intStack.toString().charAt(i) == ':' && intStack.toString().charAt(i+1) == ':') {
                                       System.out.println("Error:\tMore than one integer in final stack. Make sure equations\n\tin " + param[0] + " are valid. Exiting program...");
                                       System.exit(1);
                             //Once it passes that check, print the final calculation
                             System.out.println("***The final result is " + intStack.toString() + "***");
                             //Clear the stack for the following loop
                             while(!intStack.toString().equals("Empty Stack")) {
                                  intStack.pop();
                             //Increment the line number and loop back
                             line++;
                        //If it's the end of the file, exit
                        System.exit(1);
                   //catch invalid postfix equations
                   catch(Exception e) {
                        System.out.println("\nError:\tThe " + e + " occured while reading " + param[0] +".\n\tMake sure equations in " + param[0] + " are valid. Exiting program...");
                        System.exit(1);
              //The user entered more than one parameter
              else {
                   //Give the error and exit
                   System.out.println("Error:\tToo many parameters. One file name parameter is allowed. " + param.length + " were found. Exiting program...");
                   System.exit(1);
    /* a stack of ints implemented using a linked list of nodes
    * @author     Biagioni, Edoardo
    * @assignment     lecture 8 and homework 4
    * @date     February 6, 2008
    class IntLinkedStack implements IntStackInterface {
        /* only need to store a single pointer to the node holding
         * the top of the stack.
         * The pointer is null if the stack is empty.
        private IntNode top;
        /* no-arguments default constructor creates an empty stack */
        public IntLinkedStack() {
         top = null;          // start with an empty stack
        /* @return     whether the stack is empty */
        public boolean empty() {
         return (top == null);
        /* @param     int to push onto the stack */
        public void push(int value) {
         top = new IntNode(value, top);
        /* @return     the top int on the stack */
        public int pop() throws EmptyStackException {
         if (empty()) {
             throw new EmptyStackException();
         int result = top.getValue();
         top = top.getNext();
         return result;
        /* convert the stack to a printable string
         * @return     a string representing the stack
        public String toString() {
         if (empty()) {
             return "Empty Stack";
         } else {
             return recursiveToString(top);
        /* recursive method to print a non-empty stack
         * @param     the starting index in the array
         * @return     a string representing the stack
        private String recursiveToString(IntNode start) {
         if (start == null) {
             return "";
         String separator = "";
         if (start != top) {
             separator = " :: ";
         return recursiveToString(start.getNext()) +
                    start.getValue() + separator;
        // simple test
        public static void main(String[] args) {
         IntStackInterface s = new IntLinkedStack();
         System.out.println("before pushing anything, " + s);
         s.push(999);
         s.push(216);
         System.out.println("after pushing 999 and 216, " + s);
         System.out.println("pop returns " + s.pop());
         System.out.println("after popping, " + s);
         // push 100 values
         for (int i = 0; i < 100; i++) {
             s.push(i);
         // now pop them and make sure the same values are returned
         // in LIFO order
         for (int i = 99; i >= 0; i--) {
             int returned = s.pop();
             if (returned != i) {
              System.out.println("error: pop returns " + returned +
                           ", expected " + i);
         s.push(477);
         s.push(381);
         s.push(888);
         System.out.println("after pushing 477, 381, 888, " + s);
         System.out.println("pop returns " + s.pop());
         System.out.println("pop returns " + s.pop());
         System.out.println("pop returns " + s.pop());
         System.out.println("pop returns " + s.pop());
         System.out.println("after popping, " + s);
         /* expected output:
        private class IntNode {
            /* two fields, the first to store the item itself,
             * the second is a pointer to the next node in the linked list.
          * If there is no next node, the pointer is null.
         private int item;
         private IntNode nextNode;
         /* constructor:
          * @param     value, the value for the node
          * @param     next, the next node in the linked list
         public IntNode(int value, IntNode next) {
             item = value;
             nextNode = next;
         /* accessor methods -- since there are no mutator methods,
          * each node is immutable.
         public int getValue() {
             return item;
         public IntNode getNext() {
             return nextNode;
    /* an interface to a stack of ints
    * @author     Biagioni, Edoardo
    * @assignment     lecture 8 and assignment 4
    * @date     February 6, 2008
    * @inspiration     William Albritton's integer stack and Java's stack class,
    *http://www2.hawaii.edu/~walbritt/ics211/stackArray/IntegerStackInterface.java
    * http://java.sun.com/j2se/1.5.0/docs/api/java/util/Stack.html
    interface IntStackInterface {
        /* @param     string to push onto the stack */
        void push(int value);
        /* @return     the top string on the stack */
        int pop()
         throws java.util.EmptyStackException;
        /* @return     whether the stack is empty */
        boolean empty();
    }and this is the file i tested it on:
    98-
    1 1 +
    7 2 /
    8 1 1 + /
    2 3 * 1 -
    5 5 + 2 2 * -
    8 2 / 9 3 / +
    2 2 * 2 *
    1 2 3 1 + * +
    2 6 + 3 - 2 *The outcome should be 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
    Thanks in advance, any help would be appreciated!

    AnthonyJK wrote:
    Thanks, I'm working on breaking it into methods now.Good.
    I also whipped something up,but I currently don't have access to a compiler so there might be errors in it. It's basically the same as what your big main method does, but in a much more readable manner:
    public class KinseyAnthony4 {
         * @param a     the first number
         * @param op    the mathematical operator
         * @param b     the second number
         * @return      the outcome of the expression 'a <op> b'
        private static int evaluate(int a, char op, int b) {
            switch(op) {
            case '+': return a+b;
            case '-': return a-b;
            case '*': return a*b;
            case '/': return a/b;
            default: throw new RuntimeException("Unknown operator: "+op);
         * @param calcMe    the File in which the expressions are stored.
         * @return          the expressions as an array of Strings.
        private static String[] readLinesFrom(File calcMe) throws FileNotFoundException {
            List<String> lines = new ArrayList<String>();
            Scanner readIt = new Scanner(calcMe);
            while(readIt.hasNextLine()) {
                String line = readIt.nextLine();
                line = line.replace(" ", ""); // remove all white spaces
                lines.add(line);
            return lines.toArray(new String[]{});
         * @param param     one parameter needed: the file containing the expressions
        public static void main(String[] param) throws FileNotFoundException {
            if(param.length != 1) {
                System.out.println("usage: java KinseyAnthony4 FILENAME");
                System.exit(666);
            String[] expressions = readLinesFrom(new File(param[0]));
            for(String exp: expressions) {
                System.out.println("\nLINE = "+exp);
                IntLinkedStack stack = new IntLinkedStack();
                for(char ch: exp.toCharArray()) {
                    if(ch >= '0' && ch <= '9') {
                        int digit = Character.getNumericValue(ch);
                        System.out.println("push: "+digit);
                        stack.push(digit);
                    } else {
                        int b = stack.pop();
                        int a = stack.pop();
                        System.out.println("pop: "+a);
                        System.out.println("pop: "+b);
                        System.out.println("calculating: "+a+" "+ch+" "+b);
                        int temp = evaluate(a, ch, b);
                        System.out.println("push: "+temp);
                        stack.push(temp);
                int result = stack.pop();
                System.out.println("***The final result is "+result+"***");
    }Now as to your problem: you see that the pop() method throws an exception? You can wrap the necessary lines of code between *try { ... } catch(...) { ... }* statements to catch the exception when an expression in malformed. I hope that makes a bit sense to you, if not, post back.
    Good luck.

  • BPEL 2.0 throws some of the faults as exceptions.. how do i handle them

    hi All
    I am using Jdev 11.1.1.6
    There is something weird happening while i am trying to handle faults in BPEL 2.0..
    Scenario: I am simply transfering data from one table to another and there is mismatch of the length in two tables i.e. target table have column with 30 length and source system is sending data of 40 length..
    so i am expecting a BPEL Binding Fault for the same
    but I am getting an exception from BPEL 2.0 for the same.. and it is not thrown as a fault to catch block.. Project gets Rolledback without throwing Fault to catch Block..
    then i tried same with BPEL 1.1 and it gave me fault as expected in catch block which i could handle by sending fault notifications..
    but BPEL 2.0 does not give me option of sending notifications as i do not get fault in Catch block..
    Issue: How do i handle the fault in BPEL 2.0 when its throwing it as exception?????
    Below is the trace i get from my instance with BPEL 2.0 and BPEL 1.1..
    Getting Exception From BPEL 2.0 as below_: After throwing the exception process gets rolledback but instance is always in running mode
    Non Recoverable System Fault :
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception. merge failed. Descriptor name: [MergeItemDBAdapterV1.Item]. Caused by java.sql.BatchUpdateException: ORA-12899: value too large for column "ITEM"."ITEMNAME" (actual: 40, maximum: 30) . Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-12899" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    Exception i am getting in Invoke Activity but No Fault
    <fault>
    <exception class="com.collaxa.cube.engine.EngineException">
    JTA transaction is not in active state. The transaction became inactive when executing activity "" for instance "520,633", bpel engine can not proceed further without an active transaction. please debug the invoked subsystem on why the transaction is not in active status. the transaction status is "MARKED_ROLLBACK". The reason was The execution of this instance "520633" for process "BPELProcess2" is supposed to be in an active jta transaction, the current transaction status is "MARKED_ROLLBACK", the underlying exception is "BINDING.JCA-12563 Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception. merge failed. Descriptor name: [MergeItemDBAdapterV1.Item]. Caused by java.sql.BatchUpdateException: ORA-12899: value too large for column "ITEM"."ITEMNAME" (actual: 40, maximum: 30) . Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-12899" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. " . Consult the system administrator regarding this error.
    <stack>
    <f>com.oracle.bpel.client.util.TransactionUtils.throwExceptionIfTxnNotActive#107</f>
    <f>com.collaxa.cube.ws.WSInvocationManager.invoke#352</f>
    <f>com.collaxa.cube.engine.ext.common.InvokeHandler.__invoke#1070</f>
    <f>com.collaxa.cube.engine.ext.common.InvokeHandler.handleNormalInvoke#584</f>
    <f>com.collaxa.cube.engine.ext.common.InvokeHandler.handle#132</f>
    <f>com.collaxa.cube.engine.ext.bpel.common.wmp.BPELInvokeWMP.__executeStatements#74</f>
    <f>com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform#166</f>
    <f>com.collaxa.cube.engine.CubeEngine.performActivity#2687</f>
    <f>com.collaxa.cube.engine.CubeEngine._handleWorkItem#1190</f>
    <f>com.collaxa.cube.engine.CubeEngine.handleWorkItem#1093</f>
    <f>com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal#76</f>
    <f>com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage#218</f>
    <f>com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory#297</f>
    <f>com.collaxa.cube.engine.CubeEngine.endRequest#4609</f>
    <f>com.collaxa.cube.engine.CubeEngine.endRequest#4540</f>
    <f>com.collaxa.cube.engine.CubeEngine._createAndInvoke#713</f>
    <f>...</f>
    </stack>
    </exception>
    <root class="oracle.fabric.common.FabricInvocationException">
    BINDING.JCA-12563 Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception. merge failed. Descriptor name: [MergeItemDBAdapterV1.Item]. Caused by java.sql.BatchUpdateException: ORA-12899: value too large for column "ITEM"."ITEMNAME" (actual: 40, maximum: 30) . Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-12899" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    <stack>
    <f>oracle.integration.platform.blocks.adapter.fw.jca.cci.EndpointInteractionException.getFabricInvocationException#75</f>
    <f>oracle.integration.platform.blocks.adapter.AdapterReference.getFabricInvocationException#307</f>
    <f>oracle.integration.platform.blocks.adapter.AdapterReference.post#293</f>
    <f>oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost#142</f>
    <f>oracle.integration.platform.blocks.mesh.MessageRouter.post#197</f>
    <f>oracle.integration.platform.blocks.mesh.MeshImpl.post#215</f>
    <f>sun.reflect.GeneratedMethodAccessor1455.invoke</f>
    <f>sun.reflect.DelegatingMethodAccessorImpl.invoke#25</f>
    <f>java.lang.reflect.Method.invoke#597</f>
    <f>org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection#307</f>
    <f>org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint#182</f>
    <f>org.springframework.aop.framework.ReflectiveMethodInvocation.proceed#149</f>
    <f>oracle.integration.platform.metrics.PhaseEventAspect.invoke#71</f>
    <f>org.springframework.aop.framework.ReflectiveMethodInvocation.proceed#171</f>
    <f>org.springframework.aop.framework.JdkDynamicAopProxy.invoke#204</f>
    <f>$Proxy315.post</f>
    <f>...</f>
    </stack>
    </root>
    </fault>
    Getting Exception as well as Fault from BPEL 1.1 as below_
    ->Here i am getting exception as above
    Non Recoverable System Fault :
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception. merge failed. Descriptor name: [MergeItemDBAdapterV1.Item]. Caused by java.sql.BatchUpdateException: ORA-12899: value too large for column "ITEM"."ITEMNAME" (actual: 40, maximum: 30) . Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-12899" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    ->and here is the fault thrown by BPEL 1.1
    Non Recoverable System Fault :
    <bpelFault><faultType>0</faultType><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception. merge failed. Descriptor name: [MergeItemDBAdapterV1.Item]. Caused by java.sql.BatchUpdateException: ORA-12899: value too large for column "ITEM"."ITEMNAME" (actual: 40, maximum: 30) . Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-12899" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary></part><part name="detail"><detail>ORA-12899: value too large for column "ITEM"."ITEMNAME" (actual: 40, maximum: 30) </detail></part><part name="code"><code>12899</code></part></bindingFault></bpelFault>
    Fault i am getting in Invoke Activity
    <fault>
    <bpelFault>
    <faultType>0</faultType>
    <bindingFault>
    <part name="summary">
    <summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception. merge failed. Descriptor name: [MergeItemDBAdapterV1.Item]. Caused by java.sql.BatchUpdateException: ORA-12899: value too large for column "ITEM"."ITEMNAME" (actual: 40, maximum: 30) . Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-12899" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary>
    </part>
    <part name="detail">
    <detail>ORA-12899: value too large for column "ITEM"."ITEMNAME" (actual: 40, maximum: 30) </detail>
    </part>
    <part name="code">
    <code>12899</code>
    </part>
    </bindingFault>
    </bpelFault>
    </fault>
    Please suggest..

    I sorted out what is happening..
    When My Target DB is Empty and Merge operation is executed , Fault is thrown and catch block was able to catch it
    And When My Target DB is having Values, It is thrown as Exception.. i.e. no fault to Catch block :(
    Someone have any idea, hoe this can be resolved???
    Edited by: 910947 on Aug 31, 2012 1:43 AM

  • EXCEPTION [TOPLINK-116]

    Can anybody help me with the following error, what does it mean:
    2007-07-12 16:45:45,813 [ContentScheduler_Worker-2] ERROR (com.jcatalog.scheduling.quartz.Executer) - Unexpected error during execution of Job
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-116] (v2.5.1 GA May 11 2000): TOPLink.Public.Exceptions.DescriptorException
    EXCEPTION DESCRIPTION: No conversion value provided for the field ' '
    at TOPLink.Public.Exceptions.DescriptorException.noFieldValueConversionToAttributeValueProvided(DescriptorException.java:735)
    at TOPLink.Public.Mappings.ObjectTypeMapping.getAttributeValue(ObjectTypeMapping.java:96)
    at TOPLink.Public.Mappings.DirectToFieldMapping.valueFromRow(DirectToFieldMapping.java:327)
    at TOPLink.Public.Mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:721)
    at TOPLink.Private.Descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:195)
    at TOPLink.Private.Descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:295)
    at TOPLink.Public.QueryFramework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:170)
    at TOPLink.Public.QueryFramework.ReadObjectQuery.execute(ReadObjectQuery.java:267)
    at TOPLink.Public.QueryFramework.DatabaseQuery.execute(DatabaseQuery.java:363)
    at TOPLink.Public.QueryFramework.ReadQuery.execute(ReadQuery.java:95)
    at TOPLink.Public.PublicInterface.Session.internalExecuteQuery(Session.java:1342)
    at TOPLink.Public.ThreeTier.ServerSession.internalExecuteQuery(ServerSession.java:441)
    at TOPLink.Public.ThreeTier.ClientSession.internalExecuteQuery(ClientSession.java:255)
    at TOPLink.Public.PublicInterface.Session.executeQuery(Session.java:828)
    at TOPLink.Public.PublicInterface.Session.executeQuery(Session.java:785)
    at TOPLink.Public.PublicInterface.Session.readObject(Session.java:1694)
    at com.jcatalog.toplinkmapping.ObjProperty.findByPrimaryKey(ObjProperty.java:144)
    at com.jcatalog.rbe.customized.RBECustomExaminations.leverstatusFrsNo(RBECustomExaminations.java:2492)
    at com.jcatalog.rbe.customized.RBECustomExaminations.execute(RBECustomExaminations.java:391)
    at com.jcatalog.rbe.customized.RBECustomRuleExecutor.execute(RBECustomRuleExecutor.java:185)
    at com.jcatalog.rbe.RBERuleExecutor.execute(RBERuleExecutor.java:1815)
    at com.jcatalog.rbe.RBEJobWorker.execute(RBEJobWorker.java:54)
    at com.jcatalog.scheduling.quartz.Executer.execute(Executer.java:43)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:487)

    You have setup an Object Type Mapping or a direct to field mapping with an object-type converter. In this converter you specify a map of database to object values. At runtime your application is finding a value, empty string, which is not supported by your conversion map.
    Doug

  • Query is not defined Exception while Executing Finders

    Hi,
    We have used Toplink 2.5.1 & weblogic 5.1 for a year. All works great. Recently we are upgrading to Weblogic 7.01 and toplink 903. Inorder to make previous finder methods work, I created a Class DescriptorManager add a lot static methods each for one entitybean. In Mapping Workbench, I did:
    .Select Advanced Properties > After Load from the menu for the bean.
    .Enable the amendment method for the descriptor by specifying the class and name of the static method.
    The code which in the DescriptorManager.java is:
    public static void addDescriptorFinders(Descriptor descriptor)
         * Enumeration findDescriptorByServiceType(BigInteger stypeId)
    ReadAllQuery query1 = new ReadAllQuery();
    query1.setName("findDescriptorsBySrvcTypeId");
    query1.addArgument("lStypeId");
    query1.setReferenceClass(MeDescriptorBean.class);
    ExpressionBuilder builder = new ExpressionBuilder();
    query1.setSelectionCriteria(builder.get("serviceType").equal(builder.getParameter("lStypeId")));
    descriptor.getQueryManager().addQuery("findDescriptorsBySrvcTypeId", query1);
    In Here is MeDescriptorHome:
    public interface MeDescriptorHome extends EJBHome {
         public MeDescriptor findByPrimaryKey(MeDescriptorPK key) throws FinderException,RemoteException;
    public MeDescriptor findByGroupId( BigInteger groupId) throws FinderException, RemoteException;
         public MeDescriptor findOneByQuery(ReadObjectQuery query, Vector args) throws FinderException,RemoteException;
         public Collection findDescriptorsBySrvcTypeId(BigInteger serviceType) throws FinderException,RemoteException;
    I write a test client, which call
    findByPrimaryKey
    findOneByQuery
    findByGroupId
    findDescriptorsBySrvcTypeId
    The first two works.( which are toplink reserved query), the other two do not work. Can someone help me please? Thanks a lot!
    Here is the error message I got:
    Error during finders:
    javax.ejb.FinderException: EXCEPTION [EJB - 10005]: Cannot find bean using finder: [findDescriptorsBySrvcTypeId]. [EXCEPTION [TOPLINK-6026] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: Query is not defined.]
    server stacktrace is:
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-6026] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: Query is not defined.
    at oracle.toplink.exceptions.QueryException.queryNotDefined(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.internal.ejb.cmp.FinderManager.executeFinder(Unknown Source)
    at oracle.toplink.internal.ejb.cmp.FinderManager.findMany(Unknown Source)
    at oracle.toplink.internal.ejb.cmp.wls.WlsBeanManager.collectionFinder(Unknown Source)
    at weblogic.ejb20.internal.EntityEJBHome.finder(EntityEJBHome.java:560)
    at com.mslv.sla.dao.metric.MeDescriptorBean_onqudj_HomeImpl.findDescriptorsBySrvcTypeId(MeDescriptorBean_onqudj_HomeImpl.java:157)
    at com.mslv.sla.dao.metric.MeDescriptorBean_onqudj_HomeImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:785)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    javax.ejb.FinderException: EXCEPTION [EJB - 10005]: Cannot find bean using finder: [findDescriptorsBySrvcTypeId]. [EXCEPTION [TOPLINK-6026] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException

    You are on the right track for sure. You should make sure that the <ejb-ql> node in you ejb-jar.xml file is empty, and that the arguments for the finder are specified correctly.
    Next, I would make sure that the descriptor is, in fact, being amended. Maybe just throw a debug line into the descriptor amendment method for your MeDescriptorBean and make sure it is being called after you re-start the server.
    JIM
    Hi,
    We have used Toplink 2.5.1 & weblogic 5.1 for a year. All works great. Recently we are upgrading to Weblogic 7.01 and toplink 903. Inorder to make previous finder methods work, I created a Class DescriptorManager add a lot static methods each for one entitybean. In Mapping Workbench, I did:
    .Select Advanced Properties > After Load from the menu for the bean.
    .Enable the amendment method for the descriptor by specifying the class and name of the static method.
    The code which in the DescriptorManager.java is:
    public static void addDescriptorFinders(Descriptor descriptor)
         * Enumeration findDescriptorByServiceType(BigInteger stypeId)
    ReadAllQuery query1 = new ReadAllQuery();
    query1.setName("findDescriptorsBySrvcTypeId");
    query1.addArgument("lStypeId");
    query1.setReferenceClass(MeDescriptorBean.class);
    ExpressionBuilder builder = new ExpressionBuilder();
    query1.setSelectionCriteria(builder.get("serviceType").equal(builder.getParameter("lStypeId")));
    descriptor.getQueryManager().addQuery("findDescriptorsBySrvcTypeId", query1);
    In Here is MeDescriptorHome:
    public interface MeDescriptorHome extends EJBHome {
         public MeDescriptor findByPrimaryKey(MeDescriptorPK key) throws FinderException,RemoteException;
    public MeDescriptor findByGroupId( BigInteger groupId) throws FinderException, RemoteException;
         public MeDescriptor findOneByQuery(ReadObjectQuery query, Vector args) throws FinderException,RemoteException;
         public Collection findDescriptorsBySrvcTypeId(BigInteger serviceType) throws FinderException,RemoteException;
    I write a test client, which call
    findByPrimaryKey
    findOneByQuery
    findByGroupId
    findDescriptorsBySrvcTypeId
    The first two works.( which are toplink reserved query), the other two do not work. Can someone help me please? Thanks a lot!
    Here is the error message I got:
    Error during finders:
    javax.ejb.FinderException: EXCEPTION [EJB - 10005]: Cannot find bean using finder: [findDescriptorsBySrvcTypeId]. [EXCEPTION [TOPLINK-6026] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: Query is not defined.]
    server stacktrace is:
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-6026] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: Query is not defined.
    at oracle.toplink.exceptions.QueryException.queryNotDefined(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.internal.ejb.cmp.FinderManager.executeFinder(Unknown Source)
    at oracle.toplink.internal.ejb.cmp.FinderManager.findMany(Unknown Source)
    at oracle.toplink.internal.ejb.cmp.wls.WlsBeanManager.collectionFinder(Unknown Source)
    at weblogic.ejb20.internal.EntityEJBHome.finder(EntityEJBHome.java:560)
    at com.mslv.sla.dao.metric.MeDescriptorBean_onqudj_HomeImpl.findDescriptorsBySrvcTypeId(MeDescriptorBean_onqudj_HomeImpl.java:157)
    at com.mslv.sla.dao.metric.MeDescriptorBean_onqudj_HomeImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:785)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    javax.ejb.FinderException: EXCEPTION [EJB - 10005]: Cannot find bean using finder: [findDescriptorsBySrvcTypeId]. [EXCEPTION [TOPLINK-6026] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException

  • Exception [TOPLINK-6029] after upgrading from version 9.0.4.5 to 10.1.3.0.0

    In our project, we have made an upgrade to TopLink version 10.1.3.0.0. After replacing as much as possible deprecated Classes/methods, we get TopLink Exceptions when accessing attributes which are mapped via indirection. When TopLink tries to retrieve the reference records from the database, a [TOPLINK-6029] exception occurs. We do not execute a query with "readObject" but we only acces the attribute which is mapped via indirection.
    Exception-Stack:
    Exception [TOPLINK-6029] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.QueryException
    Exception-Beschreibung: Eine Referenzklasse muss angegeben werden.
    Abfrage: ReadObjectQuery()
         at oracle.toplink.exceptions.QueryException.referenceClassMissing(QueryException.java:858)
         at oracle.toplink.queryframework.ReadObjectQuery.checkDescriptor(ReadObjectQuery.java:198)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.checkPrePrepare(ObjectLevelReadQuery.java:562)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.isLockQuery(ObjectLevelReadQuery.java:1407)
         at oracle.toplink.internal.remote.RemoteValueHolder.isPessimisticLockingValueHolder(RemoteValueHolder.java:192)
         at oracle.toplink.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:133)
         at oracle.toplink.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:217)
         at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:61)
         at oracle.toplink.indirection.IndirectList.buildDelegate(IndirectList.java:184)
         at oracle.toplink.indirection.IndirectList.getDelegate(IndirectList.java:307)
         at oracle.toplink.indirection.IndirectList.toArray(IndirectList.java:646)
         at java.util.Collections.sort(Collections.java:158)
    With TopLink versio 9.0.4.5 everything works correctly.
    What could be the cause of this problem and what can we do to correct it.
    Regards,
    Hans.

    Hello James,
    Thanks for the quick answer!
    I have tested our program with the new TopLink version without making any change in the code, so definitely there a change in the behaviour in both TopLink versions. I have added the code where the descriptor and the onetomany mapping is created. I think the descriptor is ok, but the problem could have to do with the fact that in our program the business object is already registered in a unit of work.
    When I debug the situation in Eclipse and expand the IndirectList first on the original and afterwards on the clone, no exception occurs. When I directly expand the IndirectList in the clone the excpetion comes.
    // Descriptor creation
    private static Descriptor buildRentFunctionDescriptor()
    Descriptor desc = DescriptorLib.makeListDescriptor(RentFunction.class, RFU_TAB, RFU_TAB_KEY, RFU_PREFIX);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.KEY, RFU_TAB_KEY);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.NAME, RFU_TAB_NAME);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.ORDER, RFU_TAB_ORDER);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.RENT, RFU_TAB_RENT);
    DescriptorLib.addDirectToFieldMapping(desc, PropM.RentFun.ATYPE, RFU_TAB_ATYPE);
    DescriptorLib.addOneToManyMapping(desc, PropM.RentFun.HRENT, HistRent.class, HRE_TAB_LINK, true, true);
    DescriptorLib.addOneToOneMapping(desc, PropM.RentFun.PER, Period.class, RFU_TAB_PER, false, false);
    DescriptorLib.addOneToOneMapping(desc, PropM.RentFun.LEV, LocationLevel.class, RFU_TAB_LEV, false, false);
    DescriptorLib.addOneToOneMapping(desc, PropM.RentFun.ACC, Account.class, RFU_TAB_ACC, false, false);
    return desc;
    //Mapping creation
    public static OneToManyMapping addOneToManyMapping(Descriptor descriptor,
    String attributeName,
    Class referenceClass,
    String targetForeignKey,
    boolean useIndirection,
    boolean enableCascadingDelete)
    OneToManyMapping mapping = new OneToManyMapping();
    mapping.setAttributeName(attributeName);
    mapping.setReferenceClass(referenceClass);
    mapping.setTargetForeignKeyFieldName(targetForeignKey);
    if (useIndirection)
    mapping.useTransparentCollection();
    mapping.useCollectionClass(IndirectList.class);
    else
    mapping.dontUseIndirection();
    if (enableCascadingDelete)
    mapping.privateOwnedRelationship();
    descriptor.addMapping(mapping);
    return mapping;
    Maybe you could give some tips about how to deal with registering the business object in the unit of work in combination with attributes that use indirection.
    Regards,
    Hans
    Message was edited by:
    lammers1

Maybe you are looking for