Results 1 to 4 of 4

Thread: HELP!! Problem creating a new IApplicationContext from XMLApplicationContext() method

  1. #1
    Join Date
    Jul 2012
    Posts
    3

    Default HELP!! Problem creating a new IApplicationContext from XMLApplicationContext() method

    Hi, I've been trying to figure out why i'm having an exception when i try to create an IApplicationContext from the =new XMLApplicaitonContext("xml1","xml2") the the second time. The first time it's okay and everything runs. The two xml definition files are passed okay and a new IApplicationContext is created.

    The second time running the application (without clearing the cache) it fails with the exception:

    2012-07-19 16:19:12,724 ERROR BiFiWeb.Run - A exception was cought when running the climate model. Exception: Cannot resolve type [BiFiModelSweden.BiFiModelSwedenClass] for object with name 'BiFiModelSweden' defined in file [C:\Users\s20892\BiFi\BiFiWeb\BiFiWeb\bin\BiFiConte xt.xml] line 8
    2012-07-19 16:19:12,726 ERROR BiFiWeb.Run - at Spring.Objects.Factory.Support.AbstractObjectFacto ry.ResolveObjectType(RootObjectDefinition rod, String objectName)
    at Spring.Objects.Factory.Support.DefaultListableObje ctFactory.PreInstantiateSingletons()
    at Spring.Context.Support.AbstractApplicationContext. Refresh()
    at Spring.Context.Support.XmlApplicationContext..ctor (XmlApplicationContextArgs args)
    at Spring.Context.Support.XmlApplicationContext..ctor (String[] configurationLocations)
    at BiFiWeb.Run.StartForecast(DateTime timeStamp, IApplicationContext cxt) in C:\Users\s20892\BiFi\BiFiWeb\BiFiWeb\Run.ashx.cs:l ine 158

  2. #2
    Join Date
    Jul 2010
    Posts
    245

    Default

    Can you explain further what's meant by "running the application a second time" and "without clearing the cache"? It looks from the paths to your source in your stacktrace as if the app in question is a web application(?). With IIS-hosted applications, there are of course many different levels of 'running the application a second time'. Do you mean:
    • the application is handling a second request?
    • the IIS AppPool has recycled?
    • other?


    Am I correct in guessing that since you mentioned this happens when you don't "clear the cache" that you've tested and its not an issue if you *do* "clear the cache"? If so, can you identify what technology, etc. is doing the caching in this case? Do you mean:
    • spring.net's caching advice?
    • some third-party caching at the IIS-level to which Spring.NET isn't aware?
    • other?


    If you can provide some additional info re: what you're trying to do and how we can possibly repro this issue on our side, we'd be happy to try to help you resolve it.

    Thanks,
    -Steve B.

  3. #3
    Join Date
    Jul 2012
    Posts
    3

    Default

    1) the second time means running the application on an IDE more than once. First time success. Second time fail -> fatal exception; cannot resolve object of type...

    2) IIS pool...
    the app is running locally on a development server and is continously monitored.

    3) third-party code in the software is just for algorithmic calculations.

    4) No third-party caching involved.
    Last edited by Israel; 08-27-2012 at 11:38 AM.

  4. #4
    Join Date
    Jul 2012
    Posts
    3

    Default

    After profiling the development webserver running the application, using ANTS memory profiler, we get an output:

    "Not all objects were deleted from the contextregistry. Did you forget to use base.Dispose()?".

    we've then tried all we can to use the dispose method using all sorts of ways. We cannot get to overcome this fatal crash of the applicaiton!

    extra observation: log4net keeps logging even if the application is stopped mid-way. Does this symbolise a zombie session? could this be the problem, that we never kill one session completely when we start a new applicaiton run/session? leading to the fatal exception? that the previous session is left hanging and holding on (locking) to resources?
    Last edited by Israel; 08-27-2012 at 11:42 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •