Thrown Exceptions

I tangled accross a code today that did the following:
try
Vector result = someclass.retrieveList();
System.out.println(result.size());
catch (Exception e)
System.err.println(e);
the retrieveList function calls another function, which
eventually throws an exception. this exception is caught inside
retrieveList() and is re-thrown to the above code.
The exception does not reach the catch statement. it prints the
result.size() value, which is zero because nothing was retrieved.
why isn't the exception caught ?
is there something I am missing in my understanding ?
Appreciate the help,
Thank you in advance.

warnerja,
First of all thank you for the effort.
Yes, you are right. I do have a finally block - I didn't think that
was the cause... now that you mention it, I have to re-think.
So what good is the exception if the finally eats it up ?
I thought the finally was ment for a clean exit...
The retrieveList() by decleration has to return a Vector value,
and also throws an Exception.
catch(Exception e)
System.out.println(e);
throw e;
finally
return result; // result is of type Vector
If I don't do this, the compiler screams that I must return a value.
Is there an elegant way of throwing and returning a result when all
is fine ?
the solution I implemented checked if the return value is not null
or if the Vector is empty - but thats not elegant !
Appreciate the comments.
Thanks in advance.

Similar Messages

  • Thrown exception Starting NodeManager

    Hi all,
    I have read through the documentation serveral times on how to
    properly setup the NodeManager without any success. Does anybody
    know to solve my problem?
    Configuration Info:
    OS: Windows 2000
    nodemanager.hosts has a single entry - localhost 127.0.0.1
    command line arg:
    set JAVA_OPTIONS=-Dweblogic.nodemanger.keyFile=%WL_HOME%\user_projects\administration\demokey.pem
    -Dweblogic.security.SSL.trustedCAKeyStore=%WL_HOME%\server\lib\cacerts -Dweblogic.nodemanager.certificateFile=%WL_HOME%\user_projects\administration\democert.pem
    -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy
    Here is the thrown exception:
    <Nov 4, 2002 6:44:06 PM CST> <Info> <NodeManager> <NodeManager: for information
    on command line options, try "java weblogic.nodemanager.NodeManager help">
    <Nov 4, 2002 6:44:06 PM CST> <Info> <NodeManager> <Starting NodeManager >
    SecureSocketListener: Could not setup context and create a secure socket on localhost:5555
    : java.lang.RuntimeException: SSL/Export: license error, Invalid host IP.
    java.lang.RuntimeException: SSL/Export: license error, Invalid host IP
    at weblogic.security.utils.SSLSetup.getLicenseLevel(SSLSetup.java:135)
    at weblogic.security.utils.SSLSetup.getWrapperClass(SSLSetup.java:187)
    at weblogic.security.utils.SSLContextWrapper.getInstance(SSLContextWrapp
    er.java:24)
    at weblogic.nodemanager.SecureSocketListener.run(SecureSocketListener.java:48)
    at weblogic.nodemanager.GenericListener.startListener(GenericListener.java:16)
    at weblogic.nodemanager.NodeManager.startSecureSocketListener(NodeManager.java:565)
    at weblogic.nodemanager.NodeManager.init(NodeManager.java:434)
    at weblogic.nodemanager.NodeManager.main(NodeManager.java:649
    any and all help is appreciated. Thank you in advance!
    Charles Jean-Baptiste
    [email protected]

    Simple classpath problem.
    "Charles Jean-Baptiste" <[email protected]> wrote:
    >
    Hi all,
    I have read through the documentation serveral times on how to
    properly setup the NodeManager without any success. Does anybody
    know to solve my problem?
    Configuration Info:
    OS: Windows 2000
    nodemanager.hosts has a single entry - localhost 127.0.0.1
    command line arg:
    set JAVA_OPTIONS=-Dweblogic.nodemanger.keyFile=%WL_HOME%\user_projects\administration\demokey.pem
    -Dweblogic.security.SSL.trustedCAKeyStore=%WL_HOME%\server\lib\cacerts
    -Dweblogic.nodemanager.certificateFile=%WL_HOME%\user_projects\administration\democert.pem
    -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy
    Here is the thrown exception:
    <Nov 4, 2002 6:44:06 PM CST> <Info> <NodeManager> <NodeManager: for information
    on command line options, try "java weblogic.nodemanager.NodeManager
    help">
    <Nov 4, 2002 6:44:06 PM CST> <Info> <NodeManager> <Starting NodeManager
    >
    SecureSocketListener: Could not setup context and create a secure socket
    on localhost:5555
    : java.lang.RuntimeException: SSL/Export: license error, Invalid host
    IP.
    java.lang.RuntimeException: SSL/Export: license error, Invalid host IP
    at weblogic.security.utils.SSLSetup.getLicenseLevel(SSLSetup.java:135)
    at weblogic.security.utils.SSLSetup.getWrapperClass(SSLSetup.java:187)
    at weblogic.security.utils.SSLContextWrapper.getInstance(SSLContextWrapp
    er.java:24)
    at weblogic.nodemanager.SecureSocketListener.run(SecureSocketListener.java:48)
    at weblogic.nodemanager.GenericListener.startListener(GenericListener.java:16)
    at weblogic.nodemanager.NodeManager.startSecureSocketListener(NodeManager.java:565)
    at weblogic.nodemanager.NodeManager.init(NodeManager.java:434)
    at weblogic.nodemanager.NodeManager.main(NodeManager.java:649
    any and all help is appreciated. Thank you in advance!
    Charles Jean-Baptiste
    [email protected]

  • Using Linq Query in our program error is thrown :Exception has been thrown by the target of an invocation.

    Hi All,
      I am writing the below linq query to fetch the record from the database ,
    var individualres = (from c in orgContext.CreateQuery("contact")
                                                 join a in orgContext.CreateQuery("annotation")
                                                      on c["contactid"] equals a["objectid"]
                                                 where (bool)a["isdocument"] == true && a["objectid"] == r.GUID &&
    a["filename"] != null
                                                 select new
                                                     FirstName = c["firstname"],
                                                     LastName = c["lastname"],              
                                                     CreatedDate=a["createdon"],
                                                     DocumentBody = (a["documentbody"] == null) ? "" : a["documentbody"],
                                                     GUID = c["contactid"],
                                                     FileName = a["filename"],
                                                     WorkStatus = (c["new_workstatus"] == null) ? "" : c["new_workstatus"],
                                                     Rank = (c["new_rank"] == null) ? "" : c["new_rank"],
                                                     State = (c["address1_stateorprovince"] == null) ? "" : c["address1_stateorprovince"],
                                                     City = (c["address1_city"] == null) ? "" : c["address1_city"]
    But it is throwing the error   Exception has been thrown by the target of an invocation.
    if this error is related to null values into the columns , then i am handling those by using the 
    ternary operator.
    Can anybody help me out for this issue.
    thanks in advance.

    Hello EmpAnsar,
    >>But it is throwing the error   Exception has been thrown by the target of an invocation.
    From your LINQ query, it is hard to tell what the caused reason is since we do not have your exact tables and data. My suggestion is that you could narrow this issue by reducing items you want to fetch, for example, you could firstly write a sample query
    without where clause and select new syntax as:
    var individualres = (from c in orgContext.CreateQuery("contact")
    join a in orgContext.CreateQuery("annotation")
    on c["contactid"] equals a["objectid"]
    select c).ToList();
    To check if it would work, if so, you could add these filters and items you want step by step until reproducing this issue, this would help locate the root reason.
    Update:
    For this exception, i found some related threads which might be helpful to you:
    http://stackoverflow.com/questions/11809530/linq-and-exception-has-been-thrown-by-the-target-of-an-invocation
    http://stackoverflow.com/questions/4074058/exception-raised-when-using-a-linq-query-with-entity-framework
    http://stackoverflow.com/questions/7674105/linq-aggregate-produces-error-exception-has-been-thrown-by-the-target-of-an-in
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I need to peek inside the JVM for thrown exceptions but how?

    I have recently inherited 5 petabytes of Java code with other 86 quadrillion lines of code.
    There is an exception being thrown somewhere while this is running (under tomcat in a big loop) and I need to find out exactly where.
    The exception being thrown is not being displayed in any log file.
    Because of the multi-threaded nature of the running code, I have difficulty tracing through it with the most advanced and technically superior Java IDE on the planet.
    I was wondering if there is a way to attach some sort of monitor or debug tool to the running JVM and see if exceptions are being thrown anywhere at all during runtime and to capture them or log them - or at least see them.
    I will not be able to discover this through the code. If there is any product or utility that will allow me to debug the problem, please let me know.
    your help is greatly appreciated
    PurpleTek

    If an uncaught exception occurs, the jdk normally stops and prints out a stack trace on stderr, eg:
        Exception in thread "main" java.lang.NullPointerException
         at exception.blow(exception.java:11)
         at exception.main(exception.java:6)It sounds like this doesn't happen for you. If not, and the exception isn't displayed in any log file,
    how do you know an exception occurred? Does your app just stop? Maybe the output shown above is
    lost because of the way your app is started - ie, stderr is lost.
    Can you just run your app under jdb? jdb automatically catches uncaught exceptions. You can also use the jdb 'catch' command to catch caught exceptions. If you catch 'caught' exceptions, you will probably find that your app generates lots of them. You might want to specify which exceptions to catch and which to ignore.
    - jjh

  • Redirecting thrown exceptions away from WLS .out file

    I am running WLS 10.0 on Linux.
    The application running within WLS generates a ton of Exceptions that fill up logs(<server>.out) at the rate of 160MB/day. The application needs to throw this exception so that the client can retry the transaction. But is there a way to avoid these exceptions from filling the WLS stdout logs?
    Thanks
    Ramdas

    lol
    on the transport bar if you hover over the recording button and hold the btn down there is a option to save your target recording to a perticular area. For some strange reason my settings where altured and the normal area of where i save my audio recordings moved to a different location.
    G5   Mac OS X (10.4)  

  • Thrown validation exception not being showed in jspx page

    Hi,
    I have a page with af:table which uses one view object.That view object is using one entity object. In one of the method of the EntityImpl class of my entity object i throw ValidationException.I debugged the application and i saw that it is throwing the exception.But it is not being shown in the page. What might be wrong here?
    try{
    setAttributeInternal(BANKTYPE, value);
    catch(TooManyObjectsException e) {
    e.printStackTrace();
    throw new ValidationException ("You are trying to add existing record");
    My jspx page is having *<af:messages id="m1"/>*
    Does the jspx page need any configuration to show the thrown exception in a popup?
    Regards,
    Priya.

    Hi vinod,
    I tried it and it worked.Thanks a lot :). Can you please tell me why it was not happening with the ValidationException?
    Regards,
    Priya.

  • Know Exceptions thrown in Java Finalizer thread...

    Hello,
    I have one question regarding java finalizer thread.
    How can i know about exceptions thrown by finalize method which has been called from the finalizer thread of JVM?.
    Any help would be appreciated?
    Thanks and Regards

    vinodpatel2006 wrote:
    Hello,
    Thanks for reply...
    But why i can't? There must be some mechanisum using i can know thrown exception.No
    >
    Because, in my application, i am writing finalize methods for each and every object to null out the member variable. I want to make sure that each of those methods work perfactly. I mean, does any of them throws exception OR not.What? Why are you doing that? That sounds pretty stupid. The GC will take care of those objects.
    Kaj

  • Exception thrown when start OC4J

    Sometimes, I got the folloowing exceptions when I started OC4J.
    Exception Description: Several [9] SessionLoaderExceptions were thrown:
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    Exception [TOPLINK-9005] (OracleAS TopLink - 10g (9.0.4.7) (Build 050405)): orac
    le.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> f
    ile [config/toplink.xml].
    Internal Exception: Exception [TOPLINK-98] (OracleAS TopLink - 10g (9.0.4.7) (Bu
    ild 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [applyAmendment
    Method], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [TOPLINK-165] (OracleAS TopLink - 10g (9.
    0.4.7) (Build 050405)): oracle.toplink.exceptions.DescriptorException
    Exception Description: This descriptor's amendment method triggered an exception
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:
    Descriptor: Descriptor(com.celeres.pago.valueobject.royalties.RoyaltyRate --> [D
    atabaseTable(ROYALTY_RATES)])
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.Descriptor --> [Databas
    eTable(descriptor)])
    at oracle.toplink.exceptions.SessionLoaderException.finalException(Sessi
    onLoaderException.java:89)
    at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(XMLLoader.ja
    va:156)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Sess
    ionManager.java:219)
    at org.springframework.orm.toplink.LocalSessionFactory.loadDatabaseSessi
    on(LocalSessionFactory.java:320)
    at org.springframework.orm.toplink.LocalSessionFactory.createSessionFact
    ory(LocalSessionFactory.java:258)
    at org.springframework.orm.toplink.LocalSessionFactoryBean.afterProperti
    esSet(LocalSessionFactoryBean.java:51)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:937)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:334)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:146)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver
    .resolveReference(BeanDefinitionValueResolver.java:176)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver
    .resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:891)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.populateBean(AbstractAutowireCapableBeanFactory.java:707)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:316)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:146)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver
    .resolveReference(BeanDefinitionValueResolver.java:176)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver
    .resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:891)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.populateBean(AbstractAutowireCapableBeanFactory.java:707)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:316)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:146)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.
    preInstantiateSingletons(DefaultListableBeanFactory.java:277)
    at org.springframework.context.support.AbstractApplicationContext.refres
    h(AbstractApplicationContext.java:310)
    at org.springframework.web.context.support.AbstractRefreshableWebApplica
    tionContext.refresh(AbstractRefreshableWebApplicationContext.java:133)
    at org.springframework.web.context.ContextLoader.createWebApplicationCon
    text(ContextLoader.java:230)
    at org.springframework.web.context.ContextLoader.initWebApplicationConte
    xt(ContextLoader.java:156)
    at org.springframework.web.context.ContextLoaderListener.contextInitiali
    zed(ContextLoaderListener.java:48)
    at com.celeres.pago.presentation.servlet.SpringContainerLoaderListener.c
    ontextInitialized(SpringContainerLoaderListener.java:33)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.
    java:668)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:
    435)
    at com.evermind.server.Application.getHttpApplication(Application.java:6
    95)
    at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.jav
    a:676)
    at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:528)
    at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:231)
    at com.evermind.server.http.HttpServer.setSites(HttpServer.java:247)
    at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:150)
    at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServe
    r.java:1959)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.jav
    a:1294)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLa
    uncher.java:93)
    at java.lang.Thread.run(Thread.java:534)
    SessionLoaderExceptions:

    Target Invocation Exception: java.lang.Error: Unresolved compilation problem:Looks like your VM is throwing the following Error. Most likely you have not compiled your classes correctly, possibly the class that defines your Mapping Workbench amendment methods. If the print the stack trace on one of the exceptions nested in the SessionLoaderException, it would probably show the class with issues in the caused by stack.

  • Connection pool not re-establishing connections, throwing exception instead

    Hello,
    I've just set up a connection pool on the sun java system application server 8 for a MySQL database using the official mysql-connector/j 5.0. Everything is working great, except when the connections timeout (or i kill them all manually from the database server) and then request a page that needs to use the DataSource object, the following exception is thrown:
    Exception thrown: com.mysql.jdbc.CommunicationsException -- Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.io.EOFException
    STACKTRACE:
    java.io.EOFException
         at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913)
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2304)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2803)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3047)
         at com.mysql.jdbc.Statement.executeQuery(Statement.java:1166)
         at com.mysql.jdbc.jdbc2.optional.StatementWrapper.executeQuery(StatementWrapper.java:705)
         at beans.MySessionBean.businessMethod(MySessionBean.java:73)
         at org.apache.jsp.index_jsp._jspService(index_jsp.java:70)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 16 ms ago.What could be wrong?
    Thank you.

    The code is here:
        public String businessMethod() {
            //TODO implement businessMethod
            try
                InitialContext ic = new InitialContext();
                Object obj = ic.lookup("jdbc/MyDS");
                System.out.println("Object is: " + obj + " | Class is: " + obj.getClass().getName());
                DataSource ds = (DataSource)obj;
                Connection conn = ds.getConnection();
                Statement stmt = conn.createStatement();
                ResultSet rs = stmt.executeQuery("SELECT a,b FROM test");
                String ret = "";
                while(rs.next())
                    ret += rs.getString(1) + " - " + rs.getString(2) + "<br/>";
                conn.close();
                return ret;
            catch(Exception e)
                return "Exception thrown: " + e.getClass().getName() + " -- " + e.getMessage();
        }On the server, it is set up as XADataSource. I don't really have a big need for distributed transactions, but does it hurt badly to use it anyways? Could it be causing this problem?

  • Need help ASAP : Exception with EJB 3.0 while session.xml

    Hi,
    Kindly help on below exception, which i am getting the exception while changing the mine EJB 2.1 to 3.0.
    Exception raised while loading the session.xml, which is reffering to map file which is used by Toplink.
    **Mine EJB:**
    public class CaseSessionEJBBean implements CaseSessionEJB {
    String inBean="[CaseSessionEJBBean] ";
    private SessionFactory sessionFactory;
    public CaseSessionEJBBean() {
    this.sessionFactory =new SessionFactory("META-INF/sessions.xml", "moj");
    *private SessionFactory getSessionFactory() {*
    return this.sessionFactory;
    *}* public PagedResultList<CasedetailsDTO> searchPayment(SearchCriteriaDTO searchCriteriaDTO,Integer startIndex,Integer endIndex) throws MOJException{
    String inMethod="[searchPayment] ";
    PagedResultList pagedCaseDetailsDTOList=null;
    try{
    System.out.println("[CaseSessionEJBBean] !!!! ENTERED !!!!!");
    Session session = getSessionFactory().acquireSession();
    CaseFacade caseFacade = new CaseFacade();
    pagedCaseDetailsDTOList=caseFacade.searchPayment(session, searchCriteriaDTO,startIndex,endIndex);
    System.out.println("pagedCaseDetailsDTOList.size()="+pagedCaseDetailsDTOList.size());
    }catch(Exception e){
    e.printStackTrace();
    System.out.println("[Exception] While getting payment details:"+e);
    throw new MOJException("1001", e.getMessage(),
    "Exception occured",
    "Exception in searchPayment()",
    "searchPayment", "CaseSessionEJBBean",
    "searchPayment", e);
    return pagedCaseDetailsDTOList;
    Exception:
    Exception Description: Several [1] SessionLoaderExceptions were thrown:
    Exception [TOPLINK-9005] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.SessionLoaderException
    Exception Description: *An exception was thrown while loading the <project-xml> file [META-INF/MOJMap.xml].*
    Internal Exception: oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: oracle/toplink/indirection/IndirectList
    Invalid class: oracle.toplink.indirection.IndirectList
    Loader: current-workspace-app.root:0.0.0
    Code-Source: /D:/MOJ_SVN/Lib/toplink.jar
    Configuration: <library> in /D:/Temp/MOJ_EJB_3.0/CMS-oc4j-app.xml
    Dependent class: oracle.toplink.internal.helper.ConversionManager
    Loader: oracle.toplink:10.1.3
    Code-Source: /D:/jdevstudio/toplink/jlib/toplink.jar
    Configuration: <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\jdevstudio\j2ee\home\oc4j.jar
    The original class instance was also defined in oracle.toplink:10.1.3.
    Thanks in Advance:
    Need in urgent
    Edited by: user636100 on Feb 6, 2009 7:44 AM

    You have two copies of toplink.jar visible to the application classloader - D:/MOJ_SVN/Lib/toplink.jar should be removed.
    For compilation of the application use toplink.jar provided by the server: D:/jdevstudio/toplink/jlib/toplink.jar

  • How to throw exception in run() method of Runnable?

    Hi, everyone:
    I want to know how to throw exception in run() method of interface Runnable. Since there is no throwable exception declared in run() method of interface Runnable in Java API specification.
    Thanks in advance,
    George

    Thanks, jfbriere.
    I must add though that if your run() methodis
    executed after a call to Thread.start(), then
    it is not a good choice to throw anyRuntimeException
    from the run() method.
    The reason is that the thrown exception won't be
    handled appropriately by a try-catch block.Why do you say that "the thrown exception won't be
    handled appropriately by a try-catch block"? Can you
    explain it in more detail?
    regards,
    George
    Because the other thread runs concurrently with and independently of the parent thread, there's no way you can write a try/catch that will handle the new thread's exception: try {
        myThread.start();
    catch (TheExceptionYouWantToThrowFromRun exc) {
        handle it
    do the next thing This won't work because the parent thread just continues on after myThread.start(). Start() doesn't throw the exception--run() does. And our parent thread here has lost touch with the child thread--it just moves on to "do the next thing."
    Now, you can do some exception handling with ThreadGroup and uncaughtException(), but make sure you understand why the above won't work, in case that was what you were planning to do.

  • Exception while importing/converting 9.0.3 MWP file to 10g

    Hi,
    Using Toplink 10.0.3 (Preview) I am trying to import an existing 9.0.3 Toplink Mapping Workbench Project. It throws the following exception:
    Exception Description: The method [isStub] on the object [oracle.toplink.workbench.model.meta.MWClass] triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[stub-->class.stub]
    Descriptor: XMLDescriptor(oracle.toplink.workbench.model.meta.MWClass --> [DatabaseTable(class)])
    Stack trace:
    Local Exception Stack:
    Exception [TOPLINK-99] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [isStub] on the object [oracle.toplink.workbench.model.meta.MWClass] triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[stub-->class.stub]
    Descriptor: XMLDescriptor(oracle.toplink.workbench.model.meta.MWClass --> [DatabaseTable(class)])
         at oracle.toplink.exceptions.DescriptorException.targetInvocationWhileGettingValueThruMethodAccessor(DescriptorException.java:1420)
         at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:45)
         at oracle.toplink.mappings.DatabaseMapping.getAttributeValueFromObject(DatabaseMapping.java:313)
         at oracle.toplink.mappings.DirectToFieldMapping.buildCloneValue(DirectToFieldMapping.java:97)
         at oracle.toplink.mappings.DirectToFieldMapping.buildClone(DirectToFieldMapping.java:82)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
         at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.mappings.CollectionMapping.buildElementClone(CollectionMapping.java:152)
         at oracle.toplink.mappings.CollectionMapping.buildCloneForPartObject(CollectionMapping.java:101)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
         at oracle.toplink.workbench.ui.WorkbenchSession.registerProject(WorkbenchSession.java:563)
         at oracle.toplink.workbench.ui.WorkbenchSession.addProject(WorkbenchSession.java:147)
         at oracle.toplink.workbench.ui.WorkbenchSession.addNewProject(WorkbenchSession.java:133)
         at oracle.toplink.workbench.ui.MainView.addNewProject(MainView.java:239)
         at oracle.toplink.workbench.filesystem.MWFileFactory.openImp(MWFileFactory.java:204)
         at oracle.toplink.workbench.filesystem.MWFileFactory.open(MWFileFactory.java:156)
         at oracle.toplink.tsceditor.persistence.PersistenceManager.open(PersistenceManager.java:747)
         at oracle.toplink.tsceditor.ui.persistence.DefaultUIPersistence.open(DefaultUIPersistence.java:181)
         at oracle.toplink.tsceditor.ui.persistence.UIPersistenceManager.open(UIPersistenceManager.java:625)
         at oracle.toplink.tsceditor.ui.persistence.UIPersistenceManager$OpenFile.execute(UIPersistenceManager.java:1095)
         at oracle.toplink.tsceditor.utility.Thread.run(Thread.java:114)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:39)
         ... 119 more
    Caused by: java.lang.NullPointerException
         at oracle.toplink.workbench.model.meta.MWClass.superclassIsDefaultValue(MWClass.java:1253)
         at oracle.toplink.workbench.model.meta.MWClass.isStub(MWClass.java:1214)
         ... 123 more
    Has anyone a clue where I should look? Are there features in the 9.0.3 Mapping Workbench not yet supported in 10.0.3?
    Do I need to make settings in 10g before attempting the import/conversion?
    Could there be a wrongly set Classpath?
    When attempting to have the 9.0.3 generated deployment-xml file for this application interpreted using the 10g toplink.jar, I receive the following error:
    Exception [TOPLINK-7094] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.ValidationException Exception Description: Local Exception Stack: Exception Description: Several [2] SessionLoaderExceptions were thrown: *** Exception [TOPLINK-9005] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.SessionLoaderException Exception Description: An exception was thrown while loading the file [UdoToplink.xml]. Internal Exception: java.lang.VerifyError: (class: oracle/toplink/tools/workbench/XMLProjectReader, method: read signature: (Ljava/lang/String;)Loracle/toplink/sessions/Project;) Incompatible argument to function *** Exception [TOPLINK-9001] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.SessionLoaderException Exception Description: Unknown tag name: [session] in XML node: [toplink-configuration]. Internal Exception: java.lang.reflect.InvocationTargetException Target Invocation Exception: java.lang.NullPointerException at oracle.toplink.exceptions.SessionLoaderException.finalException(SessionLoaderException.java:90) at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Source)
    *** Local Exception Stack: Exception [TOPLINK-9005] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.SessionLoaderException Exception Description: An exception was thrown while loading the file [UdoToplink.xml]. Internal Exception: java.lang.VerifyError: (class: oracle/toplink/tools/workbench/XMLProjectReader, method: read signature: (Ljava/lang/String;)Loracle/toplink/sessions/Project;) Incompatible argument to function at oracle.toplink.exceptions.SessionLoaderException.failedToLoadProjectXml(SessionLoaderException.java:75) at oracle.toplink.tools.sessionconfiguration.XMLLoader.process_project_xml_Tag(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at oracle.toplink.tools.sessionconfiguration.XMLLoader.process_session_Tag(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at oracle.toplink.tools.sessionconfiguration.XMLLoader.processRootTag(Unknown Source) at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at
    Local Exception Stack: Exception [TOPLINK-9001] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.SessionLoaderException Exception Description: Unknown tag name: [session] in XML node: [toplink-configuration]. Internal Exception: java.lang.reflect.InvocationTargetException Target Invocation Exception: java.lang.NullPointerException at oracle.toplink.exceptions.SessionLoaderException.unkownTagAtNode(SessionLoaderException.java:60) at oracle.toplink.tools.sessionconfiguration.XMLLoader.processRootTag(Unknown Source) at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at
    Thanks for any help you may provide.
    Lucas Jellema

    Lucas,
    I have not seen this issue before. We'll investigate and contact you directly for more info. I'll post the resolution back to this forum once available.
    Doug

  • How to handle the exception in AWT-EventQueue-0?

    This is my code:
    import javax.swing.JFrame;
    public class MainFrame extends JFrame {
         public MainFrame(){
              init();
         public void init(){
              setSize(100,100);
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    public class SubFrame extends MainFrame implements ActionListener{
         private JButton button1 = null;
         public SubFrame(){
              super();
         public void init(){
              super.init();
              button1 = new JButton("button1");
              add(button1);
              button1.addActionListener(this);
         public void actionPerformed(ActionEvent e) {
              // TODO Auto-generated method stub
              button1.setEnabled(false);
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              (new SubFrame()).setVisible(true);
    }When I click the button, this exception will be thrown:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at swing.SubFrame.actionPerformed(SubFrame.java:23)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6038)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         at java.awt.Component.processEvent(Component.java:5803)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4410)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2429)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

    Darryl.Burke wrote:
    Hmm. Interesting sequence of execution.
    +-- new SubFrame () calls the sub class constructor
    +----  which calls the super class constructor explicitly
    +------  which calls init () of the sub class
    +--------  which calls init () of the super class
    and only after all these calls return, the declaration-&#99;um-assignment of button1 is executed, which makes button1 null.
    (Discovered by putting a breakpoint on that line and debugging in NetBeans)
    With one change, button1 will not be null and the breakpont is not reached.private JButton button1;// = null;What's not clear is why the declaration-&#99;um-initialization takes place after the constructor code executes, shouldn't it run before the constructor?
    It does run before the SubFrame constructor, but it runs after the super class constructor, which is exactly how the language specification says it should be.
    There was a similar thread a while back:
    http://forum.java.sun.com/thread.jspa?threadID=5190252&messageID=9745092
    Note that there is another "bad" habit involved (other than explicitly initializing member variables to null): that an overridden method is called from the super class constructor. That means that the overridden method will be executed before the object it belongs to has been fully initialized, and that will often lead to confusing behavior like this.

  • Java Logging, problem recreating Thrown record from XML

    Ok, so I've got all these log files that are using the default java.util.logging.XMLFormatter so all the output is in XML. I'm writing a parser that reads the XML file and recreates LogRecord objects for each of the record entries. Everything works great until I come up to a logged exception. The entire stack trace information is stored in the XML file, but there doesnt seem to be any way to create new StackTraceElement objects. I can create a new Exception object and give it a message, and I could even set the stack trace if I could just generate some StackTraceElement objects. There are no public constructors for StackTraceElement and the class is final so I can't simply subclass it with my own. Basically I would like to be able to recreate the thrown Object so I can call record.setThrown(thrown); but so far it doesn't look like that is possible.
    I guess the other way to go is to just make my own data objects to represent the log record and the thrown exception, but I would really like to avoid that and just use the classes already available. Has anyone ever tried this before? I can't have been the only one.

    I'd like to recreate a LogRecord object simply because that is what is used to create the XML file and I guess I'm just trying to be consistent :)
    Here is the overall process:
    1. User selects which XML file to open
    2. Parse the log file generating LogRecord objects for each entry.
    3. Display a JTable to the user with rows for each LogRecord, columns for Logging Level, time, message etc.
    4. If the user double clicks on a row, open a dialog with more detailed info about the LogRecord, including a stack trace if it was included.
    Now see, I want to just be able to grab the Throwable object off the LogRecord in step 4 and call getStackTrace() to get an array of StackTraceElements so I can print those into a JTextArea to display to the user. However, if I gotta be able to set the damn stack trace elements of the Throwable object first. :(

  • How to access custom exception in client side in web services?

    I have an interface and implementation of a java web services. One method in it throws a custom exception indicating the error type (authrization fails, db connection lost, etc...). But in the generated proxy file, the catched exception for the correspondent method becames java.lang.Exception. I check the code and found the actual thrown exception is com.apache.soap.SOAPExcetion. In the client code, I printed out all the SOAPExcetion and related Fault messages but could not find my original custom exception info. I need this custom exception to be accessed to the client so the client knows what's wrong.

    for current user, SPGroup.ContainsCurrentUser
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spgroup.containscurrentuser.aspx
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

Maybe you are looking for

  • IMac is not bringing up websites/not air printing

    I'll start by saying I've turned everything off and on and restarted the router, printer, computer etc... Still having issues. With that being said here's what's going on: I have a 2009 iMac and I cannot connect to my wireless printer anymore and can

  • How configure Windows 8.1 Clients with IE11 for SSO with Kerberos SPNEGO

    We are using BI Publisher OBIEE 11.1.1.7 with SSO Kerberos SPNEGO. The Weblogic Server Version is WLS_PRODUCT_VERSION=10.3.5.0 The SSO is working very well with Clients that are Windows XP or Windows 2003 R2. We had testet wit IE7,IE8 Firefox. Now as

  • Macbook Pro blurry screen

    I was using my macbook pro and the screen went blurry for a split second, but quickly returned to its normal state. So far this has only happened once. Is this normal?

  • Tables in smartforms

    Hello Gurus, i am printing many tables in a smartform. The problem is that when the page changes i have half of a table o the first page and another half on the second page. Can i set the table to be unbreakable, i mean that if there is no space on t

  • Adobe After Effects cs4 Xenocode Virtual Desktop Error

    Error : Screenshot by Lightshot Help me please this error