Stumped:  NPE being thrown in Tomcat Classloader

All,
This problem has been vexing me all morning. We have two identically set-up Unix boxes (well, probably not identically set-up as you will see). There is identical code running on both (this I can guarantee). Whenever, we view some JSP's on one box, we get the following exception:
java.lang.NullPointerException at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:179)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141
Now, the same JSP works totally fine on the other box. Both JSP's compiled and produced identical class files. I did a lot of Google searching, and most of the pages refered to SecurityManager errors.
Both machines are running Tomcat 4.1. I verified that java.policy and security.policy are identical on both machines. I also verified that catalina.policy and all the Tomcat startup scripts are the same. Finally, all environment variables match and the JDK versions are the same.
I'm at the end of my sane reasoning process. At some point, I'll just start chucking servers that don't work off the second floor. Any one have any idea what might be causing this (and ideally how to fix it)?
Many thanks in advance,
Saish

No ideas wht could cause this, but here are the
standard troubleshooting ideas.
Does this happen with all JSPs or just one in
particular? - ie is it something in the code or
something in the Tomcat setup?Happens to multiple JSP's, but not all JSP's. It happens to the same JSP's every time though.
I would try just with a minimal "Hello World" JSP.
If that works, start building up the JSP bit by bit
until it breaks.
I'm not sure, but we recently added weblogic-client.jar to our application's WEB-INF/lib directory. There were one or two posts mentioning that RMI clients that override or set SecurityManager may cause issues with Tomcat's class loader. (That's my leading theory). But if that were the case, why would the two boxes exhibit different behavior?
Here is my current theory about the class loader. The class loader uses the native O/S to get a listing of JAR and CLASS files within WEB-INF. (Assumption). So, could the O/S return the files in different order? Meaning that for one application a given JAR is found before another JAR with the same method signature but on the other server, the reverse is true.
What version(s) of Tomcat are you working with
exactly?
4.1.27. On a Solaris box.
If you do end up chucking the server out the window,
will you let us know how high it bounces? I always
wanted to find out for myself ;-)I'm hoping it scatters more than it bounces. :^)
- Saish

Similar Messages

  • Exception is being thrown

    I tried out this small code for using hashset but it gives exceptions. I have no idea why is it so?
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.Set;
    class Students implements Comparable
         private String name;
         private float gpa = 0.0F;
         Students(String n, float g)
              name = n;
              gpa = g;
         Students(){}
         public String getName() {
              return name;
         public float getGpa() {
              return gpa;
         @Override
         public int compareTo(Object o) {
              // TODO Auto-generated method stub
              if(this.getGpa() > ((Students)o).getGpa())
                   return 1;
              else if(this.getGpa() < ((Students)o).getGpa())
                   return -1;
              else
                   return 0;
         public boolean equals(Object o){
              if(this.getGpa() == ((Students)o).getGpa())
                   return true;
              else
                   return false;
         public int hashCode(){
              return (int)(10*gpa);
    public class HashFunction {
         public static void main(String args[]){
              Students s1= new Students("Fred", 3.0F);
              Students s2 = new Students("Sam", 3.1F);
              Students s3 = new Students("Steve", 3.5F);
              Set s = new HashSet();
              s.add(s1);
              s.add(s2);
              s.add(s3);
              Iterator i = s.iterator();
              while(i.hasNext())
                   System.out.println(((Students)i.next()).getName() + " " + ((Students)i.next()).getGpa());
    }The exception trace that is generated is as follows:
    Exception in thread "main" java.util.NoSuchElementException
         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)
         at java.util.HashMap$KeyIterator.next(HashMap.java:828)
         at HashFunction.main(HashFunction.java:68)

    roaan wrote:
    I had one more question. I am reading from the file like this
              String word;
              word = file.nextWord();
              try{
                   while(word != null)
                        word = word.toLowerCase();
                        wf.put(word);
                        word = file.nextWord();
              catch(Exception e){
                   e.printStackTrace();
         }Now when the end of the file is reached word contains null and throws a nullpointer exception. I am catching that exception but is there a way out that when my word is null i should simply exit out of the loop (i check that word is not equal to null in my while loop but still it throws an excpetion).Nothing there can throw NPE from word being null. The only possibilities of NPE in the code you posted are
    1. if file is null
    2. if wf is null
    3. if NPE is being thrown inside nextWord(), which has nothing to do with word being null.
    Once you make sure that the above are not happening, that code will be fine and you won't need to catch NPE. And in fact, catching NPE like that is bad practice anyway.

  • Exception not being thrown

    I added code to throw an exception when a user-initiated search returned no rows, but for some reason, the exception isn't being raised on the browser. Code:
    mnVo.setWhereClause(queryparams);
    mnVo.executeQuery();
    if(mnVo.first() == null)
    throw new oracle.jbo.JboException("No records on file");
    If I step through the code, I see the throw statement executing, but it is never surfaced. What does get raised is:
    JBO-29000: Unexpected exception caught: java.lang.ArrayIndexOutOfBoundsException, msg=0
    This gets raised (apprently) outside of my code, and the debugger can't find it. What do I need to have in place in order to handle this condition?

    I'm a java newby, so I 'think' I understand what you mean, and I 'think' I already did? Here's the code now:
    if(mnVo.first() == null)
    throw new oracle.jbo.JboException("No records on file");
    catch (Exception e)
    { throw new oracle.jbo.JboException("No Records Found");}
    This behaves identically as it did before...I can see it being thrown in the debugger, but the browser never gets it, and it gets the other error which is pretty non-sensical to a user.
    I failed to mention earlier that this code is in the Application Module in the Client Interface, in case that makes a difference?

  • Exception not being thrown in try statement

    I am trying to write a small program to handle exceptions. However, the program will not compile because it is giving me an error saying the exception InvalidDocumentCodeException will never be thrown in body of coresponding try statement. Here are the two programs:
    public class InvalidDocumentCodeException extends Exception {
    InvalidDocumentCodeException (String message) {
    super(message);
    and
    import java.util.Scanner;
    public class Main2 {
    // Creates an exception object and possibly throws it.
    public static void main (String[] args) {
    char designation;
    String input = null;
    int valid = 0;
    Scanner scan = new Scanner (System.in);
    System.out.print ("Enter a 2-digit designation starting " + "\n" +
    "with U, C, or P, standing for unclassified, " + "\n" +
    "confidential, or proprietary: ");
    input = scan.nextLine();
    try {
    designation = input.charAt(0);
    if(designation == 'U')
    valid++;
    else if(designation == 'C')
    valid++;
    else if(designation == 'P')
    valid++;
    else if(designation == 'u')
    valid++;
    else if(designation == 'c')
    valid++;
    else if(designation == 'p')
    valid++;
    catch (InvalidDocumentCodeException problem) {
    System.out.println("Invalid designation entered " +
    problem);
    System.out.println ("End of main method.");
    can anyone tell me what I am doing wrong here?

    kenporic wrote:
    Forgive me, This is the first time I have used this sight and I should have been more precise. Thanks for all the help, but this is an excercise in how to handle exceptions in Java. One way is to "throw" the exception to another class to be handled. The other is to handle the exception within the running class. The throws program That I have works. The problem that I am having is handling the exception within the class without coding the "throws" statement. I am supposed to use the try-catch method in doing this. In the example I was given to follow, the code did not specifically throw the exception. If the input was not handled in the processing code then the catch statement is supposed to call to the exception class somehow?Okay, there are two families of exceptions--checked and unchecked.
    Checked: These are for things that are not part of the "happy path" of your code, but that your code may reasonably be expected to deal with. They're not necessarily signs of a bug in your code, nor do they indicate a problem in the JVM that's beyond your control. They're for things like when a file you're looking for doesn't exist (so maybe you handle it by asking the user to pick a different file), or a network connection being lost (so maybe you handle it by waiting a few seconds and trying again).
    When a checked exception occurs, since it's an expected and recoverable occurrence, you're expected to deal with it. So, when one of these exceptions can occur in your method, your method is required to either a) handle it (with catch) or b) let the caller know that HE might be asked to deal with it.
    We must either handle it:
    void doFileStuff(String path) {
      try {
        do file stuff
      catch (IOException exc) {
        retry--which means the whole try catch would be in a loop
        or maybe just substitute some default values that don't have to come from a file
    }Or let our caller know that he's going to have to handle it (or pass it on to his own caller):
    void doFileStuff(String path) throws IOException) {
      // this might throw an exception, but it's not this method's job to handle is, so it bubbles up to our caller
      do file stuff;
    Unchecked: These are things that are either bugs in your code (like a NullPointerException) or serious problems with the JVM that are beyond our control (like OutOfMemoryEror). These can occur anywhere, and it's not generally our code's job or our caller's job to deal with them, so they don't need to be caught or declared like checked exceptions do. You can catch them, and there are some places where it's appropriate to do so, but leave that aside for now.
    Unchecked exceptions are RuntimeException, Error, and every class that descends from them. Checked exceptions are everything else under Throwable, and Throwable itself.
    Now, when you do
    void foo() throws SomeException {You're telling the compiler that this method might throw that exception.\
    If SomeException is a checked exception, the compiler is able to tell whether your claim that you might throw it is true. Since it's checked, every method that might throw it must declare it. So the compiler can look at all the methods you call and see if they throw SomeException. If none of them do, and you don't explicitly put throw new SomeException(...); in your foo() method, then the compiler can be absolutely sure that there's no way foo() will throw SomeException. So it won't let you claim to throw it.
    On the other hand, is SomeException is unchecked, then since methods aren't required to report the unchecked exceptions they can throw, the compiler has no way of knowing whether some method you call might throw SomeException, so it always lets you declare it (and never requries you to).

  • Ncremental flushing that could result in incorrect OptimisticLockExceptions being thrown

    Hi,
    I am using kodo 2.5.3 which claims having this bug in the subject being
    fixed.
    however, one of action in our apps keep running into this, when I
    comment out the "com.solarmetric.kodo.FlushBeforeQueries=true" property
    in jdo.properties, I get following exception:
    [java] javax.jdo.JDOFatalDataStoreException: Exceptions were
    thrown while performing a database flush. Because the current store
    manager does not handle marking fields as flushed on a fine-grained
    basis, it is not possible to know the correct current state of the
    flushed objects. So, the current transaction has been rolled back, and
    the system is in a state equivalent to a datastore-initiated rollback
    caused during a regular commit.
    [java] NestedThrowables:
    [java] com.solarmetric.kodo.runtime.OptimisticLockException: An
    instance was concurrently modified in another transaction (optimistic
    lock #: 1).
    [java]
    FailedObject:com.cloverworxs.impl.base.ke.model.MutableKObjectBase-158
    [java]      at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.java:710)
    [java]      at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:666)
    [java]      at
    com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:666)
    [java]      at
    com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:545)
    [java]      at
    com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:531)
    [java]      at
    com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:501)
    [java]      at
    com.solarmetric.kodo.runtime.datacache.query.CacheAwareQuery.execute(CacheAwareQuery.java:287)
    [java]      at
    com.cloverworxs.impl.jdo.MutableModelManagerImpl.findByURI(MutableModelManagerImpl.java:170)
    [java]      at
    com.cloverworxs.app.logic.DefaultContextHelper.getDefaultKitem(DefaultContextHelper.java:118)
    [java]      at
    com.cloverworxs.app.logic.DefaultContextHelper.getDefaultContext(DefaultContextHelper.java:52)
    [java]      at
    com.cloverworxs.app.logic.pattern.CompositeKnowledgeHelper.getAttachedComplexObject(CompositeKnowledgeHelper.java:115)
    [java]      at
    com.cloverworxs.app.logic.EzioTestConfig.configEzioTest(EzioTestConfig.java:97)
    [java]      at
    com.cloverworxs.app.logic.EzioTestConfig.main(EzioTestConfig.java:65)
    [java] NestedThrowablesStackTrace:
    [java] com.solarmetric.kodo.runtime.OptimisticLockException: An
    instance was concurrently modified in another transaction (optimistic
    lock #: 1).
    [java]
    FailedObject:com.cloverworxs.impl.base.ke.model.MutableKObjectBase-158
    [java]      at
    com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping$2.afterUpdate(ClassMapping.java:584)
    [java]      at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:474)
    [java]      at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:423)
    [java]      at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:381)
    [java]      at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:255)
    [java]      at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:554)
    [java]      at
    com.solarmetric.kodo.runtime.datacache.DataCacheStoreManager.flush(DataCacheStoreManager.java:695)
    [java]      at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.java:697)
    [java]      at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:666)
    [java]      at
    com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:666)
    [java]      at
    com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:545)
    [java]      at
    com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:531)
    [java]      at
    com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:501)
    [java]      at
    com.solarmetric.kodo.runtime.datacache.query.CacheAwareQuery.execute(CacheAwareQuery.java:287)
    [java]      at
    com.cloverworxs.impl.jdo.MutableModelManagerImpl.findByURI(MutableModelManagerImpl.java:170)
    [java]      at
    com.cloverworxs.app.logic.DefaultContextHelper.getDefaultKitem(DefaultContextHelper.java:118)
    [java]      at
    com.cloverworxs.app.logic.DefaultContextHelper.getDefaultContext(DefaultContextHelper.java:52)
    [java]      at
    com.cloverworxs.app.logic.pattern.CompositeKnowledgeHelper.getAttachedComplexObject(CompositeKnowledgeHelper.java:115)
    [java]      at
    com.cloverworxs.app.logic.EzioTestConfig.configEzioTest(EzioTestConfig.java:97)
    [java]      at
    com.cloverworxs.app.logic.EzioTestConfig.main(EzioTestConfig.java:65)
    if I add that property back in, then I get this as I would expected (and
    of course this result is what we are trying to avoid):
    [java] 10968 [main] DEBUG solarmetric.kodo.Performance - A query
    has been executed in such a manner that the entire candidate class must
    be loaded into memory and the query will be evaluated in-memory. This
    will very likely be quite slow. This has happened because the
    PersistenceManager is configured to require queries to take into account
    changes that were made in the current transaction, and there have been
    changes in this transaction that may be relevant to this query.
    Additionally, given the current configuration of the PersistenceManager,
    it was not possible to automatically perform an incremental flush to the
    database.Either setting the javax.jdo.option.IgnoreCache or the
    com.solarmetric.kodo.FlushBeforeQueries property to true will resolve
    this issue.
    Do I miss something obvious here? Please help me.
    Thanks a lot!
    Tao
    BTW: in the attachment is my jdo properties file.

    Tao-
    We will follow-up with you via e-mail support about this.
    In article <[email protected]>, Tao Yang wrote:
    Abe White wrote:
    Optimistic lock exceptions can occur on flush just as they can occur on
    commit, so I'm not sure what the bug is. Are you saying that if you
    comment out FlushBeforeQueries the query succeeds and the commit
    later succeeds as well?yes, that is the case. but I also sent this to the support email address
    and am trying to craft a small test case to reproduce this bug and sent
    back. Thanks a lot for taking a look.
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • To the Tomcat classloader experts outthere !!

    Hi,
    I currently work on a Tomcat application and it's classloader is not destroyed when the application is reloaded using the manager. (or ant)
    I profile my application, and each time it is reloaded, it creates an additionnal classloader. Which leads to out of memory errors.
    I suspect that my Persistence Framework (Versant OpenAccess JDO) is causing this problem. The loaders are filled with instances of cache object, identity objects and other JDO stuff.
    Is there from a web application to force the destruction of a class loader on context destroyed?
    Thank you

    you can't force destruction of a classlaoder just like that. the classloader will go away once all of classes it manages get gc'ed.
    Now consider this:
    <tomcat>/common/lib
    versant_jdo.jar
    <tomcat>/webapps/
    YourApp/
    So if you reload your app, but Versant still holds references to classes loaded by the old YourApp classloader, what should happen to those references if you obliterate the classes?

  • Wrong exception being thrown on CMP bean error

    In OC4J Release 2 I'm getting the wrong exception thrown from a CMP bean error.
    Situation:
    Servlet calls an update method on a stateless session bean with trans-attribute of Required. This update method finds 2 entity beans by primary key and updates both of them (all with trans-attribute of Supports). When an error is thrown in the second entity bean (by trying to set a value to something that breaks a constraint), I get the following error:
    com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Error preparing bean instance: com.evermind.transaction.MarshallingXAException
    at TestSession_StatefulSessionBeanWrapper3.updatebothtests(TestSession_StatefulSessionBeanWrapper3.java:1164)
    at __jspPage1_insertEntityTest_jsp._jspService(__jspPage1_insertEntityTest_jsp.java:224)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at com.evermind.server.http.HttpApplication.serviceJSP(HttpApplication.java:5680)
    at com.evermind.server.http.JSPServlet.service(JSPServlet.java:31)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    Nested exception is:
    com.evermind.transaction.MarshallingXAException
    at com.evermind.server.ejb.EntityEJBObject.prepare(EntityEJBObject.java:70)
    at com.evermind.server.ApplicationServerTransactionSynchronization.prepareComponentsSuccess(ApplicationServerTransactionSynchronization.java:403)
    at com.evermind.server.ApplicationServerTransactionSynchronization.beforeCompletion(ApplicationServerTransactionSynchronization.java:565)
    at com.evermind.server.ApplicationServerTransaction.beforeCompletion(ApplicationServerTransaction.java:1063)
    at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:552)
    at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:834)
    at TestSession_StatefulSessionBeanWrapper3.updatebothtests(TestSession_StatefulSessionBeanWrapper3.java:1160)
    at __jspPage1_insertEntityTest_jsp._jspService(__jspPage1_insertEntityTest_jsp.java:224)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at com.evermind.server.http.HttpApplication.serviceJSP(HttpApplication.java:5680)
    at com.evermind.server.http.JSPServlet.service(JSPServlet.java:31)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    Nested exception is:
    java.lang.InternalError: Werent current caller, server stacktrace (to disable this message, use -Dejb.assert=false at startup): java.lang.Throwable: Werent current caller
    at Test2_EntityBeanWrapper5.setEntityBean(Test2_EntityBeanWrapper5.java:1496)
    at com.evermind.server.ejb.EntityEJBHome.passivateAndRelease(EntityEJBHome.java:344)
    at com.evermind.server.ejb.EntityEJBObject.releaseContext(EntityEJBObject.java:378)
    at Test2_EntityBeanWrapper5.saveState(Test2_EntityBeanWrapper5.java:1442)
    at com.evermind.server.ejb.EntityEJBObject.prepare(EntityEJBObject.java:39)
    at com.evermind.server.ApplicationServerTransactionSynchronization.prepareComponentsSuccess(ApplicationServerTransactionSynchronization.java:403)
    at com.evermind.server.ApplicationServerTransactionSynchronization.beforeCompletion(ApplicationServerTransactionSynchronization.java:565)
    at com.evermind.server.ApplicationServerTransaction.beforeCompletion(ApplicationServerTransaction.java:1063)
    at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:552)
    at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:834)
    at TestSession_StatefulSessionBeanWrapper3.updatebothtests(TestSession_StatefulSessionBeanWrapper3.java:1160)
    at __jspPage1_insertEntityTest_jsp._jspService(__jspPage1_insertEntityTest_jsp.java:224)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at com.evermind.server.http.HttpApplication.serviceJSP(HttpApplication.java:5680)
    at com.evermind.server.http.JSPServlet.service(JSPServlet.java:31)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62) at Test2_EntityBeanWrapper5.setEntityBean(Test2_EntityBeanWrapper5.java:1496)
    at com.evermind.server.ejb.EntityEJBHome.passivateAndRelease(EntityEJBHome.java:344)
    at com.evermind.server.ejb.EntityEJBObject.releaseContext(EntityEJBObject.java:378)
    at Test2_EntityBeanWrapper5.saveState(Test2_EntityBeanWrapper5.java:1442)
    at com.evermind.server.ejb.EntityEJBObject.prepare(EntityEJBObject.java:39)
    at com.evermind.server.ApplicationServerTransactionSynchronization.prepareComponentsSuccess(ApplicationServerTransactionSynchronization.java:403)
    at com.evermind.server.ApplicationServerTransactionSynchronization.beforeCompletion(ApplicationServerTransactionSynchronization.java:565)
    at com.evermind.server.ApplicationServerTransaction.beforeCompletion(ApplicationServerTransaction.java:1063)
    at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:552)
    at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:834)
    at TestSession_StatefulSessionBeanWrapper3.updatebothtests(TestSession_StatefulSessionBeanWrapper3.java:1160)
    at __jspPage1_insertEntityTest_jsp._jspService(__jspPage1_insertEntityTest_jsp.java:224)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at com.evermind.server.http.HttpApplication.serviceJSP(HttpApplication.java:5680)
    at com.evermind.server.http.JSPServlet.service(JSPServlet.java:31)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    Why am I getting a MarshallingXAException instead of a SQLException? In the old OC4J, I got a SQLException wrapped in an OrionRemoteException, with the details of what constraint was broken, instead of this.
    I've also duplicated this by doing the entity bean updates directly from the servlet wrapped in a UserTransaction.
    Jeff.

    Tell me whether your transaction has been rolled back or not....If it has been rolled back, then those messages, printed on your server console are debug messages...just ignore them...
    After this exception, can u able to execute other applications in OC4J?
    --Venky                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Why is this exception being thrown

    Everytime this piece of code is run we get this Exception. Is there a way to avoid that at all. Though it is being handled properly but it would still be better if this could be avoided. Any ideas
    JavaDeveloper mspete = JavaDeveloper().getInstance();
    try{
    mspete.setJob(new Job(goodWages));
    mspete.setHouse(new House(4BDRM));
    mspete.getHouse.add(Wife);
    mspete.getHouse.add(Kids);
    mspete.setMood(Feelin.GOOD);
    catch(LayedOffDueToOffShoreDevelopmentException){
    RepoMan reaper = new RepoMan();
    reaper.take(mspete.getHouse());
    mspete.setHouse(new House(BOX));
    mspete.lose(Wife,Kids);
    mspete.get(Shotgun);
    mspete.shoot(mspete);

    Try mspete.clone() cus that almost equals me, my error handling weren't quite as extreme though. Mine was more like
    if(mspete.clone() instanceof Rob) {
      Rob rob = (Rob)mspete.clone();
      pub.go();
      rob.drink(pub.buyLotsOfBeer());
      rob.fallOverDrunk();
    }Rob.

  • Modifying runtime fault before being thrown by the system

    Hi,
    I have a requirement, where i need to find out the spot, from where system throws the runtime faults(specifically RemoteFault and BindingFault) in BPEL, and somehow modify the data coming in the rumtime fault (IFaultRecoveryContext object).
    Please let me know whether this is possible or not.
    I am using SOA 10.1.3.3.
    Thanks in advance.

    Try the first two steps in this article.
    Battery not charging, not being recognized, or losing charge
    If that doesn't help, I'd recommend replacing the AC adapter. If it has a problem after that, it would sound like hardware failure in the laptop.
    - Peter

  • Cant exit private chat without being thrown out of game.

    whenever im in private chat and try to return to main chat in any game, im thrown out of pogo and have to re-enter again .

    can you tell me how to fix this problem ?

  • InstantiationException, why being thrown?

    I have several very hierarchical class (JavaBean) with a no-arg constructor. I am erring here:
    // Foo extends Bar1..N all compile fine
    // Foo implemnts Tee1..N
    // Foo is NOT abstract NOR is declared abstract.
    Object o = Foo.class.newInstance();  // throws InstantiationException
    o = new Foo();  // no problem
    o = new Foo().getClass().newInstance() // throws Instantiaton ExceptionI thought an Instantiation exception was thrown when attempting to instantiate an abstract class or an interface. Foo is neither. What am I missing here?

    Very possibly... Thus by default upon compilation a
    non-static inner class CAN be new'ed, but at runtime
    of course can't be newInstance()?Lunchtime, and I tried it out ... this does seem to be your problem:
    import java.lang.reflect.*;
    public class NewInstanceTest
        public static void main( String argv[] )
        throws Exception
            // this fails with InstantiationException
            // Object x = Inner.class.newInstance();
            Object me = new NewInstanceTest();
            Class inner = Inner.class;
            Constructor ctor = inner.getConstructor(new Class[] {me.getClass()});
            Object y = ctor.newInstance(new Object[] {me});
        public class Inner
    }To do this, you have to get the appropriate constructor. Note that if you define "inner" as a static class, the direct call to newInstance() works.

  • Running out of memory but no OOM error being thrown

    I have a Berkeley JE application running which is doing an initial load with about 30mill records. I'm starting the JVM with a max of 1G of memeory
    java -Xmx1024m
    However, as I monitor the process (using top on a 4 core 64 bit, 8G mem) I notice that the VIRT value exceeds the heap size. I assume this is from memory needed by the VM itself
    Mem: 8175120k total, 7002748k used, 1172372k free, 24464k buffers
    Swap: 2031608k total, 1015804k used, 1015804k free, 760124k cached
    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1982 crossref 25 10 2030m 737m 12m S 67.8 9.2 2:29.18 java
    After running for 10 minutes or so the process consumes more and more memory until the machine starts thrashing swap, eventually the Linux OOM killer comes along and will kill this process (note: my Java code never sees an OOM exception even though the VIRT and RES values displayed in TOP far exceeds the Xmx setting)
    After a bit of trial and error I found that using envmnt.evictMemory(); seems to help, I'm calling this function after each 1000 writes to the Berkeley DB.
    Any help in understanding any of this behavior would be appreciated.
    Thanks
    Chuck

    My guess is that something else is going on with this process or your system. We don't know of memory leaks in JE, but even if there were it would certainly be a slow leak. I don't recall hearing anything reported that is similar to what you're describing.
    I think the reason your JE cache is still so small is that very little JE activity has occurred -- the cache hasn't filled yet.
    Sorry this may not be of much help.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • REST Services - Permission exceptions being thrown

    In setting up a mobile site which will make use of REST services we have started to see exceptions in the log file. These exceptions do not happen all the time - that is they are random in nature. We may see them for about an hour or so and then not see them for a day.
    We are seeing the same exceptions as identified in this Re: REST secureProductCatalog exception and I used the following [Not able to invoke ATG Rest services thread|https://forums.oracle.com/forums/thread.jspa?messageID=10615221&#10615221] as a reference as well.
    Working through the ATG10 document, have set up the restSecurityConfiguration.xml which identifies the beans with a secure setting of false, have set up the secureCustomCatalog.xml which identifies each of the item descriptors and the acl that is to be applied.
    Have created an external user as well.
    I created a simple unit test class - outside of my development environment - to simulate the remote call to the ATG server to verify the behavior. Everything passed.
    Now I was able to reproduce the issue if after I establish the session (LogIn) , I log out before the call to the repository.
    What I am wondering is -
    1. Is there any other way in which this kind of error can be created/occurred?
    2. Is there any other configuration that needs to happen?
    As a side note, is there any way in which to configure REST so that it does not dump a stack trace to the log file in the event of this error - possible to create a more meaningful shorter message? When the issue happens, it just fills up the log files.

    The issue turned out to be centered around the amount of connections from the mobile site to the REST service. This was verified via a load test.
    Solution was to modify the mobile logic that would check if a connection/session was already open/available and use it, otherwise create a new one.
    This seems to have addressed the issue

  • SQLException(original cause) in throw new EJBException(SQLException) is being lost, when the remote exception is being thrown by the container (ejbStore()) in IPlanet. Works in WL and WS

    (IPlanet 6 - SP4)
    we have something like this in the EntityBean :
    ejbstore()
    try {
    myDAO.Update();
    catch(SQLException se)
    throw new EJBException(se);
    But in the SessionBean, where we set the detail (which
    causes ejbStore() to fire), I'm seeing a TransactionRolledBack exception with no trace of the
    original exception within it (The "detail" attribute
    too is null ). The same thing works in WL and WS.
    Any suggestions appreciated.

    Turn your checked exceptions into unchecked exceptions and retrieve the cause later:
    RuntimeException unchecked = new RuntimeException(checked);
    Throwable t = unchecked.getCause();Stephen

  • IllegalStateException being thrown every time by timer.schedule.

    Any ideas on this ?
    try
    timer.schedule(new RemindTask(), 1000,2000000000 );
    catch(IllegalStateException e)
    timer.cancel();
    JOptionPane.showMessageDialog(this,"You lost. It escaped!");
    setVisible(false);
    }

    Any ideas on this ?
    try
    timer.schedule(new RemindTask(), 1000,2000000000 );
    catch(IllegalStateException e)
    timer.cancel();
    JOptionPane.showMessageDialog(this,"You lost. It escaped!");
    setVisible(false);
    }

Maybe you are looking for

  • How do I get more than 10 Y axis chart labels on a line chart

    I cannot find a way to get more than 10 y axis labels on a line chart. In AppleWorks you set your step size so a size of "10" which in my case equates to labels of 10, 20, 30, ..., 80, 90 and so on up to the MAX value. I would often have 20 or more l

  • Reader 6.0 won't load PDF's stalls on updater.api

    I have a CDROm that I have loaded many times but no w when I try to view the PDF files it stalls on: loading & certifying updater.api it freezes and doesn;t move I have to restart my PC when I do that the END PROGRAM window make sme close FONT CAPTUR

  • Issues changing DAQ name in Measurement and Automation.

    I am currently using LabVIEW 8.2 w/Measurement & Automation 4.4.1 with Drivers 8.7. I am having using four USB6008s and cannot change the resource name in M&A. It seems to crash this application. Any ideas?

  • Custom grid spread in Hyperion Planning v 11.1.2.3

    Hello In Hyperion Planning version 11.1.2.0 one could add custom grid spread methods to be used in planning forms. To add methods one had to add entries to the HSP_SPREAD_PATTERN table On migrating to version 11.1.2.3 the values still exist in the ab

  • Increasing length of number column in oracle 8.1.6

    Hi, i have a need to increase one columns in a table that we have that is fairly large and has about millions rows. I have 1 of the columns in the table that have been created originally as number(3). Well i now need to store a 6 digit number in thes