Exceptions from nested includes not thrown to errorPage

In our application a central dispatcher servlet includes JSPs.
          These JSPs include other JSPs. When an Exception is thrown from one of these
          pages it is not thrown, even when the error page is indicated in the
          included JSP with the page directive and the Exception is explicitly thrown
          from a catch block.
          I apprciate any thoughts.
          Thanks.
          -mc
          

can u send the code snippet?
"Abhishek" <[email protected]> wrote in message
news:[email protected]..
Hi
I am having a stateless session bean(SLBean) which uses a singleton
class(Single1). Both the SLBean and the Single1 are in the same jar
file. Single1 contains a static method called getInstance() which
returns the instance of the Single1(if not already existing).
The probelm is that when I try to do the "Single1.getInstance()" from
the stateless bean, then some exception( java.rmi.RemoteException:
EJBException: ;nested Exception is: Java.lang.NullPointerException) is
thrown.and getInstance() method of Single1 class in never invoked.
What might be the problem? why am I not able to call my singleton
class from the staless bean.
Thanks in advance.
Abhishek

Similar Messages

  • Nested exception from ejbStore

    I am throwing applicaton exceptions (subclasses of RuntimeException) from ejbStore - in case an update to the database fails because a unique constraint was violated. I get a weblogic.transaction.RollbackException back. I tried to use the getNested()method, but my import of the RollbackException class failed in compilation, even though the compilation classpath includes weblogic.jar. Also, I'd prefer not to use a vendor-specific exception if possible. When throwing the same application exceptions from ejbCreate, it was possible to catch a RemoteException and get the nested exception out of it. Thanks for any help!

    First, an application exception is hardly a subclass of
    RuntimeException. Application exceptions should derive from
    java.lang.Exception and for those the container would just throw the
    application exception to the caller. If you want to rollback the
    transaction you can do so by doing EjbContext.setRollbackOnly() and then
    throw the exception.
    Having said that you should still be able to extract the underlying
    exception from the javax.transaction.TransactionRolledbackException the
    container throws (I haven't heard of
    weblogic.transaction.RollbackException and even if such exists it should
    be a subclass of TransactionRolledbackException) by doing exception.detail .
    I've had some problems in 6.0 as in some cases it does not include the
    underlying exception but in 6.1 and probably in 7.0 (haven't used it a
    lot) it work fine.
    Regards,
    Dejan
    Paul Bennett wrote:
    I am throwing applicaton exceptions (subclasses of RuntimeException) from ejbStore - in case an update to the database fails because a unique constraint was violated. I get a weblogic.transaction.RollbackException back. I tried to use the getNested()method, but my import of the RollbackException class failed in compilation, even though the compilation classpath includes weblogic.jar. Also, I'd prefer not to use a vendor-specific exception if possible. When throwing the same application exceptions from ejbCreate, it was possible to catch a RemoteException and get the nested exception out of it. Thanks for any help!

  • System.DllNotFoundException: Unable to load DLL 'OraOps10.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    Hi,
    I have a asp.net web application running on windows server 2008 with oracle server 10g installed.
    now we are planning to run application on another server with same server as database server. but when the deployed on new server the login page comes up and after login System.DllNotFoundException: Unable to load DLL 'OraOps10.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) exception is thrown. any help would highly be appreciated.

    Did you run the ODAC installer, OUI or xcopy, or did you just copy over Oracle.DataAccess.dll to the new machine? If the latter, then you need to run the installer to put in all the necessary Oracle DLLs ODP.NET references.

  • Could not load file or assembly 'Microsoft.ReportingServices.SharePoint.ObjectModel' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Could not load file or assembly 'Microsoft.ReportingServices.SharePoint.ObjectModel' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    ===========================================================
    This is a SQL Server 2012 Developer Edition of SSRS.
    I am getting this error when navigating to http://servername/Reports. The reports site was working fine, until I installed a SQL 2014 Developer instance (including SSRS) on the same server.
    I can still get to the http://servername/ReportServer site.
    Neither of these are using Sharepoint.
    Any help resolving this issue would be greatly appreciated.
    Below is the stack trace.
    ===========================================================
    [FileLoadException: Could not load file or assembly 'Microsoft.ReportingServices.SharePoint.ObjectModel' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Reflection.Assembly._nLoad(AssemblyName
    fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity,
    StackCrawlMark& stackMark, Boolean forIntrospection) +416 System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166 System.Reflection.Assembly.Load(String
    assemblyString) +35 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190 [ConfigurationErrorsException: Could not load file or assembly 'Microsoft.ReportingServices.SharePoint.ObjectModel'
    or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +1149
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +323 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +116 System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +36 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection
    compConfig) +212 System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +174 System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +57 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
    virtualPath) +295 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +482 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
    context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +108 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean
    noAssert) +171 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +52 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext
    context, String requestType, VirtualPath virtualPath, String physicalPath) +53 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +519 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    +176 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +274
    ===========================================================

    Hi Glen,
    "The located assembly's manifest definition does not match the assembly reference." is generally caused by the loaded assembly's version is different than the expected version application refers to.
    In this case, it should be caused by:
    While starting Report Manager, the backend process ReportingServiceService need to load assemblies it refers to
    ReportingServiceService reads the compilation/assemblies element from web.config(under Report Manager virtual patch)
    If the compilation/assemblies is not existing, ReportingServiceService loads all assemblies from Bin folder. It can be verified from call stack System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory(). ReportingServiceService
    uses System.Reflection.Assembly.Load with the assemblies' name only to load assemblies.
    The Assembly.Load tries to load from the specify assembly by name from GAC at first. If it is found from GAC, it won't be loaded from Bin folder any more.
    Since Reporting Service SharePoint Integration mode is installed, a same assembly of 'Microsoft.ReportingServices.SharePoint.ObjectModel' with different version might be installed to the GAC. That causes the error "The located assembly's manifest definition
    does not match the assembly reference."
    For more information about the error message and the loading process, please see:
    http://blogs.msdn.com/b/junfeng/archive/2004/03/25/95826.aspx
    https://msdn.microsoft.com/en-us/library/yx7xezcf(v=vs.100).aspx
    Thanks,
    Jinchun Chen

  • Model - level exceptions not thrown (EJB, 11.1.1.3)

    Hi,
    We noticed that with the latest jdev version (11.1.1.3) exceptions from model layer are not thrown or logged anywhere. Steps to reproduce (HR schema):
    - create a new Application (J2EE template, add ADF Faces and Page Flow to view project)
    - create Entities from tables (Department and Employee)
    - create a session bean
    - add this method
        public void test() {
            Employee emp = null;
            emp.getDepartment();
            System.out.println("test");
        }- expose it through local interface
    - create a data control from the session bean
    - create a new jspx page, and drag&drop the test() method as a button
    - run the project and click the button.
    No exceptions in the console, the only thing I was able to find is this Info in DefaultServer.log
    ####<May 27, 2010 12:02:03 PM CEST> <Info> <EJB> <myMachine> <DefaultServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-0004EFF816A89E472B1E> <583c10bfdbd326ba:-226d29eb:128d928460d:-7ffd-00000000000000a0> <1274954523439> <BEA-010227> <EJB Exception occurred during invocation from home or business: [email protected]1 threw exception: java.lang.NullPointerException> This is a MAJOR issue, it makes development practically impossible. If there isn't any workaround, we are going back to 11.1.1.2 until next release.
    I can send a test case if anyone is interested.
    Pedja

    We have identified the problem, but right now the fix is planned for a later release.
    If this is an urgent/important problem for you, I would suggest that you open a service request with Oracle support and see if you can get a patch for this, or provide a higher priority for this issue.

  • A nested exception occurred. Could not execute the function

    Hi Experts,
    Post upgrade of SAP Portal from 7.0 to 7.31, and when we click any application related to visual composer it shows the below error.
    and the default trace shows
    #2.0 #2014 07 22 02:34:11:243#0-700#Error#visualComposer_NWBIKit_logger#
    #EP-PIN-PRT#tc~epbc~prtc~core#C000A7EEAF63014200000002000019B9#11738650000000004#sap.com/com.sap.visualcomposer.BIKit#visualComposer_NWBIKit_logger#C921154#36##E220BC96117411E4C8F2000000B31E1A#519cf5b0118311e48b43000000b31e1a#519cf5b0118311e48b43000000b31e1a#0#Thread[HTTP Worker [@2079636611],5,Dedicated_Application_Thread]#Plain##
    A nested exception occurredCould not execute the function
    [EXCEPTION]
    com.sapportals.connector.execution.ExecutionException: A nested exception occurred. Could not execute the function.
    at com.sapportals.connectors.SAPCFConnector.SAPConnectorException.getNewExecutionLocalizedException(SAPConnectorException.java:193)
    at com.sapportals.connectors.SAPCFConnector.execution.functions.SAPCFConnectorInteraction.execute(SAPCFConnectorInteraction.java:617)
    at com.sap.portal.guimachine.bikit.query.bw.QueryViewFlatRfc.execute(QueryViewFlatRfc.java:209)
    at com.sap.portal.guimachine.bikit.designtime.bw.BWResultsetProcessor$ExecuteHandler.execute(BWResultsetProcessor.java:399)
    Please give us your valuable inputs to solve this.
    Thanks in advace!!
    Regards,
    Preetha Balan

    Hi Colin,
    Sorry for the delay in response!!
    Yes SAP gave patch VC70RUNTIME file to apply to get rid of this error.
    Even asked us to follow the sap note
    1532050 - Disabling error messages that pop up at runtime
    Hope this helps you
    Thanks,
    Preetha Balan

  • Could not load file or assembly 'Microsoft.QualityTools.Testing.Fakes' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

    hi
    what the cause of this error?
    Could not load file or assembly 'Microsoft.QualityTools.Testing.Fakes' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

    Hi,
    Please try below methods:
    1.remove all references ending with .FAKES (including the Microsoft.QualityTools.Testing.Fakes.dll reference).
    2.removed the FAKES folder
    3.Cleaned solution
    4.Then readded all references back in.
    Here are some similar threads,you could refer to :
    http://stackoverflow.com/questions/26934260/ms-fakes-unit-tests-failing-after-visual-studio-2013-update-4
    http://stackoverflow.com/questions/18337736/add-fakes-assembly-option-missing
    Best 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.

  • The version of OLE on the client and server machines does not match. (Exception from HRESULT: 0x80010110)

    Hi,
    I have installed FIM CM Client on one machine and FIM CM update service on another machine. Both are windows server 2008 r2 machines.
    When i try to enroll a permanent smart card for a user, its shows me the following error:-
    The version of OLE on the client and server machines does not match. (Exception from HRESULT: 0x80010110)
    Also there is no logging done for the particular event.
    I am able to change my smart card pin and view my smart card info. through the FIM CM client. 
    Is there a compatibility issue of FIM CM 2010 with Windows server 2008 r2?
    Thanks

    Hi,
    Sorry for the delay in reply.
    Please try the following steps first:
    Open Powershell as Administrator
    Go to Start--> Run and type wbemtest.exe.
    •Click Connect. 
    •In the namespace text box type "root" (without quotes).
    •Click Connect.
    •Click Enum Instances…
    •In the Class Info dialog box enter Superclass Name as "__ProviderHostQuotaConfiguration" (without quotes) and press OK. Note: the Superclass name includes a double underscore at the front.
    •In the Query Result window, double-click "__ProviderHostQuotaConfiguration=@"
    •In the Object Editor window, double-click HandlesPerHost.
    •In the Value dialog, type in 8192
    •Click Save Property.
    •Click Save Object.
    Under properties find the property "MemoryPerHost" or any other ones you need to modify  and double click it
    Change the value from 512 MB which is 536870912 to 1GB which is 1073741824
    Click Save Property
    Click Save Object.
    •Close Wbemtest.
    •Restart the computer.
    And if all nodes are Windows server 2012, install the following update rollup as well:
    Windows RT, Windows 8, and Windows Server 2012 update rollup: August 2013
    http://support.microsoft.com/KB/2862768
    If you have any feedback on our support, please send to [email protected]

  • Not able to spy objects in ie9 using coded UI Test Builder Spy, giving exception -Interface not registered(Exception from HRESULT:0X....

    Not able to spy objects in ie9 using coded UI Test Builder Spy, giving exception - "Interface not registered(Exception from HRESULT:0X...."
    I am not able to capture any objects of my web application using coded ui recorder. Even though it is a simple html page, coded ui is showing a message  -"Interface not registered(Exception from HRESULT:0X...."
    Please give me solution , why this is hapening. I am having problem with object identification. Even I am not able to identify any object in google.com.
    swapnanil sengupta

    TechnologyName is displaying as "MSAA" . But my application is a Webapplication.If I try to spy the google .com's search field then also TechnologyName is displaying as "MSAA". Is it any configuration issue of vsts codedui.
    swapnanil sengupta

  • Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040

    Please assist I am on a Windows 7 64 bit machine I have VS 2010 and have been fighting with this new program that I was brought on to help with - Issue is that I am unable to get rid of this issue. There is so many solutions but none have worked. If someone can give me some help with what has worked for you.
    The error is Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    This is with CR installed on 64 bit.
    Thank you very much for any assistance with this problem,
    Kris

    Hi Vittorio
    Please enter the search string 'log4net crystal net' into the search box in the top right corner. When the results come up, click on the Support Notes link. That will filter for the KBAs that you want to have a look at.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • [Solved] The requested object does not exist. (Exception from HRESULT: 0x80010114)

    I have a 8 node cluster with Hyper-V, which will be 10 nodes when it's finally done.
    Recently I've been try to add nodes and though that went fine, after about a week I could not open the Failover Cluster Manager anymore.
    After some checking I found out that the latest added node was giving problems.
    VM's on the node still run and function properly, but most Powershell commands result in a "The requested object does not exist. (Exception from HRESULT: 0x80010114)".
    I can suspend the node with Suspend-ClusterNode, but draining roles was unsuccesful in one case.
    In the other there were no VM's on the node so suspending went fine.
    What I did find out was that when I tried to ping the node from another, proper functioning node, it took a while before the pinging started. It felt like the interface had to come back online on the problem node.
    After that, I could add the cluster to the Failover Cluster Manager. However, Powershell commands still give a 0x80010114 error or a CIM error for when I use Get-NetAdapter.
    A reboot resolves the problem, but only for about a week.
    I know there is a topic with the same title already, but the wbemtest en rollup update "answer" is totally unclear to me why I should change something with wbemtest, or why to install updates that to me have nothing to do with this problem.
    Before I did the ping test from a functioning node I pinged my DC and another node from the problem node just fine.
    No waiting at all.
    The cluster has three networks. Management (host only), Live Migration and iSCSI (also a VMSwitch for certain VM's).
    I have no idea where to look. Evenviewer doesn't give me anything I can work with that I can find...

    Hi,
    Are you using the HP servers? It seems is the HP Nic team service was causing the issue, please try to
     disabled the HP NIC team service from services and restarted the WMI service.
    The related third party information:
    Advisory: (Revision) HP ProLiant Servers - Systems Running Microsoft Windows Server 2012 or 2012 R2 May Experience a Memory Leak Up To 5 Mb/ Hour for Some NIC Teaming Configurations
    http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/kb/docDisplay/?javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken&javax.portlet.prp_ba847bafb2a2d782fcbb0710b053ce01=wsrp-navigationalState%3DdocId%253Demr_na-c04209163-2%257CdocLocale%253D%257CcalledBy%253D&javax.portlet.tpst=ba847bafb2a2d782fcbb0710b053ce01&ac.admitted=1401176219136.876444892.199480143
    Hope this helps.
    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.

  • The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    Hi,
    We have an exisiting .NET MVC project which uses crystal reports versions 2008 (dlls of version 12.0.). No we have Crystal Reports 2011 for.NET SDK is installed and I've updated all the crystal related dlls (Enterprise.Framework.dll, CrystalDecisions.Chared, CrystalDecisions.Web ...) to newer version which is 14.0. After this upgrade, when I run application, I am getting the following error:
    The specified module could not be found. (Exception from HRESULT: 0x8007007E)
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
    Source Error: 
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
       System.Reflection.Assembly._nGetModules(Boolean loadIfNotFound, Boolean getResourceModules) +0
       System.Reflection.Assembly.nGetModules(Boolean loadIfNotFound, Boolean getResourceModules) +40
       System.Reflection.Assembly.GetTypes() +28
       System.Web.Mvc.TypeCacheUtil.FilterTypesInAssemblies(IBuildManager buildManager, Predicate`1 predicate) +161
       System.Web.Mvc.TypeCacheUtil.GetFilteredTypesFromAssemblies(String cacheName, Predicate`1 predicate, IBuildManager buildManager) +63
       System.Web.Mvc.ControllerTypeCache.EnsureInitialized(IBuildManager buildManager) +115
       System.Web.Mvc.DefaultControllerFactory.GetControllerTypeWithinNamespaces(RouteBase route, String controllerName, HashSet`1 namespaces) +58
       System.Web.Mvc.DefaultControllerFactory.GetControllerType(RequestContext requestContext, String controllerName) +634
       System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +58
       System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +118
       System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +46
       System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +63
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +13
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8770194
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    We have another ASP.Net project, which is working fine after I update older crystal dlls to newer ones. This project is working fine.
    Thanks in advance

    This error I am getting, after I update the "CrystalDesicions.Web.dll" from version 12 to 14.0. Any I dea on this?
    After, I verified with fusin log and ProcessMonitor, they are reporting on this:
    path to BusinessObjects.Licensing.KeyCode.Decoder.dll  is not found. Does this dll is used by CrystalDecisions.Web.dll?
    and I don't have any mixed reference.
    Any help?

  • For the last year, I have to refresh my browser to load certain normal pages...IE opens them, but not Firefox. I also have extreme difficulties loading video from sites including YouTube, Yahoo, etc. I open them in IE just fine. I update all the time.

    For the last year, I have to refresh my browser to load certain normal pages...IE opens them, but not Firefox. I also have extreme difficulties loading video from sites including YouTube, Yahoo, etc. I open them in IE just fine. I update all the time.

    "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"<br />
    "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"<br />
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    Your plugins list shows outdated plugin(s) with known security and stability risks.
    *Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)

  • Exception is not thrown immediately in Hibernate 3.  Why??

    I am using Hibernate 3.
    If I execute "session.update" and the update is not successful (e.g. value too large), the exception is not thrown immediately.
    For example,
    System.out.println ("pass 1");
    session.update(dataBean) ;
    System.out.println ("pass 2");
    session.getTransaction().commit();
    System.out.println ("pass 3");
    I find if session.update(dataBean) fails, "pass 1" and "pass 2" are printed but "pass 3" is not printed. That meams Hibernate will not throw exception until I execute "commit". Can I force it to throw immediately (i.e. only "pass 1" will be printed) ?
    Thanks in advance.

    O/R mappers such as Hibernate and JDO generally defer communications with the database for as long as possible; for an insert or update transaction that will be until commit().
    This is for several reasons:
    1) general efficiency - a series of update() calls may modify the same attribute of an object multiple times; it's substantially more efficient to update the database just once
    2) database efficiency - when a transaction is in progress, even when nothing is occuring in that transaction, more resources are consumed inthe database than when no transaction is active. For example, if a transaction updates a row and then 10 minutes later commits, then during that interval the database has to keep track of 2 different versions of that row and know which connections see which version of the row.
    3) connection management - DB connections are expensive resources and once a transaction has started updating the DB, it has to tie up a connection for the duration.
    In other words, no matter how long it takes to set up your transaction in Java, a good O/R mapper is not going to begin a database transaction until the last possible moment, which is at commit().
    Can I force it to throw immediatelyYou can call commit() any time you want.
    It sounds like you want the database to do your input data validation for you. That's wrong. You need to validate input (for size, length, whatever) before you attempt to put it in the database.

  • Exchange 2010 Free busy not working from remote site to main site "exception message is: Could not find a base address"

    Hi all , I have an exchange 2010 SP 2 environment with 2 sites , the remote site FL free busy has NEVER worked and I get this error on the remote site , is this related ?
    thanks 
    Log Name:      Application
    Source:        System.ServiceModel 3.0.0.0
    Date:         :
    Event ID:      3
    Task Category: WebHost
    Level:         Error
    Keywords:      Classic
    User:          SYSTEM
    Computer:      FL-CAS1.WOMBAT.LOCAL
    free bust works from WITHIN the remote (FL ) site , but NEVER to the main (WASH) site , it has Never worked ,I am thing that this error is related
    thanks I have no idea how to fix 
    Description:
    WebHost failed to process a request.
    Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/17256489
    Exception: System.ServiceModel.ServiceActivationException:
    The service '/EWS/exchange.asmx' cannot be activated due to an exception during compilation.  The exception message is: Could not find a base address that matches scheme http for the endpoint with binding CustomBinding. Registered base address schemes
    are [https].. ---> System.InvalidOperationException:
    Could not find a base address that matches scheme http for the endpoint with binding
    ++++

    Hi 
    This issue could be with corruption in  Autodiscover and web services virtual directory 
    Replace Web.config file for Autodiscover and web services virtual directory from the other working site
    Delete and Recreate  Autodiscover and web services virtual directory 
    Do this only  on the affected site 
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
    (MVP)

Maybe you are looking for