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.

Similar Messages

  • Connect/Socket Timedout Exception is not thrown

    Hi,
    I am getting the following problem very often. when I tried to connect to some URLs I am not able to connect those URLs and they didnot thrown any exceptions also but the process will be running until we kill explictly. here is my code
    URL url = null;
                   String redirectUrl=null;
                   HttpURLConnection.setFollowRedirects(true);
                   URLConnection connection=null;
                   HttpURLConnection httpConnection=null;
                   String urlString = inpuUrl;
                   try {
                        url = new URL(urlString);
                        connection = url.openConnection();
                        connection.setConnectTimeout(30000);
                        if (connection instanceof HttpURLConnection) {
                             httpConnection = (HttpURLConnection) connection;
                             httpConnection.connect();
                             int response = httpConnection.getResponseCode();
                             url = httpConnection.getURL();
                             redirectUrl= url.getHost();          
                   } catch (UnknownHostException eh) {                    
                        log.error(eh.getMessage(), eh);
                   } catch (ConnectException e) {
                        log.error(e.getMessage(), e);
                   } catch (IOException e) {
                        log.error(e.getMessage(), e);
                   } catch (IllegalArgumentException e) {
                        log.error(e.getMessage(), e);
                   } catch (Exception e) {
                        log.error(e.getMessage(), e);
                   }please help me out how can I comeout from this, I want the redirected url of the input url. if it is not able to establish the connection then it shoud return null but the itis not return any thinn and the process is going to sleep mode
    wating for reply.
    Bhaskar

    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.

  • Exception message not thrown back to the page

    Hello All,
    I have a servlet that listens for some data. Everything works perfectly if the data is intact. I do a whole bunch of processing on the data and verify its integrity etc...
    HOwever if something is wrong, my app throws an exception and I could see from the system outs that the exception message I want to send back to the browser is being printed. But the browser does not completly load the page. In internet explorer, the page status still reads "opening page ........ "
    If I see the trace it is past the out.print) line where the error message has already been printed out.
    Is this a browser issue? Any suggestions are welcomed.
    Thanks,
    Praveen.

    The response of the servlet should go back to the mainframe system from which I receive the data. But for testing purposes I am sending the data through a url's get parameter. So I really do not want to make a error page.
    What is bothering me though is that the response gets printed in the command window and still not shown in the page giving you the impression that the request was never fully completed.
    Any ideas ?
    Thanks,
    Praveen.

  • Exception cx_os_object_existing not thrown by Create_Persistant

      DATA: lr_agent     TYPE REF TO zca_pers_rules,
            lr_pers_rule TYPE REF TO zcl_pers_rules.
      TRY.
          lr_agent = zca_pers_rules=>agent.
          lr_pers_rule = lr_agent->create_persistent( i_ruleid ).
    * Check if rule already exists
        CATCH cx_os_object_existing.
    * Rule exists
            RAISE EXCEPTION TYPE zcx_radm.
    Now, I can go into SE16, and SEE that there is a record with the key that's in "i_ruleid".  And the code I have with get_persistent works fine.
    I must confess to be rather baffled.  Any ideas?
    matt

    Hi Matt,
    If u look into the method CREATE_PERSISTENT, it s like below
    * * 1. Check if there is already an object with this key
      read table SPECIAL_BKEY_TAB into CURRENT_SPECIAL_OBJECT_INFO
           with table key BUSINESS_KEY = BUSINESS_KEY.
    It(table SPECIAL_BKEY_TAB ) is not getting filled even if there is a record for the same key in DB!!
    Alternatively we can use GET_PERSISTENT method to check if a record exists or not...
      TRY.
          transaction->start( ).
          agent    = zca_persistent_2108=>agent.
          TRY.
              employee = agent->get_persistent( gv_empno ).
            CATCH cx_os_object_not_found.
              employee = agent->create_persistent( gv_empno ).
          ENDTRY.
          employee->set_cname( fullname ).
          transaction->end( ).
        CATCH cx_root.
      ENDTRY.
    or
    [Generating a Persistent Object |http://help.sap.com/saphelp_nw70/helpdata/EN/b0/65094de89011d4b2eb0050dadfb92b/content.htm]
    Surprisingly once get_persistent method is called SPECIAL_BKEY_TAB is getting filled and thereafter CX_OS_OBJECT_EXISTING is raised if there is an already existing record !!!
    Cheers,
    Jose.

  • How to check that exception is not thrown for particular exception alone

    Hi,
    I want to check for Exception but I don't want it to throw exception when it is
    java.net.SocketException.
    I want to throw message for all other exception.
    Please let me know how to implement it.
    Thanks & Regards,
    Nasrin.N

    try {
    //some exception throwning code
    } catch (SocketException e) {
      //handle the exception
    } catch (Exception e) {
    //all other exceptions are handled here
    }

  • Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --- System.NullReferenceException: Object reference not set to an instance of an object

    Hi,
    (1) I am trying to get the data from a database table and import into a text file.
    (2) If the record set have the data then it runs ok
    (3) when the record set not having any data it is giving the below error
    Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
    Could you please let me know why this is happening?
    Any help would be appriciated
    Thanks,
    SIV

    You might ask them over here.
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral%2Ccsharpgeneral%2Cvcgeneral&filter=alltypes&sort=lastpostdesc
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Wait - interrupt  Why Exception not thrown?

    Hello. I expected that calling interrupt() on a waiting thread should result in InterruptedException thrown by wait(). Nevertheless, in the code below no Exception is thown as if there were no interrupt() call. Actually this snippet prints the same output irregardless of whether interrupt() is called.
    public class Runner {
        synchronized public void foo(){
            System.out.println("before wait in foo()");
            try {
                wait();
            } catch (InterruptedException e) {
                System.out.println("InterruptedException");
                e.printStackTrace();
            System.out.println("after wait in foo()");
        synchronized public void bar(){
            System.out.println("before sleep in bar()");
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            System.out.println("after sleep in bar()");
            notify();
            System.out.println("after notify in bar()");
        public static void main(String[] args) {
            final Runner runner = new Runner();
            Thread t1 = new Thread(new Runnable(){
                public void run() {
                    runner.foo();
            Thread t2 = new Thread(new Runnable(){
                public void run() {
                    runner.bar();
            t1.start();
            t2.start();
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            t1.interrupt();
            System.out.println("t1 interrupted");
    }

    Thanks for your response.
    Still the whole thing is not clear to me.
    Why InterruptedException is not deterministic in this
    case?
    Where is the ?non-deterministic? code in this
    example?The fact that t1.start() is written before t2.start() in you code does not guarantee that foo() method will always be called first. Either the bar() method or foo() method can be invoked firstly, because this is how threads work in Java. Try to invert: put t2.start() before t1.start(), and see what happens. Probably the exception will be thrown in this case, but this behaviour is still non deterministic.
    Please pay attention to timing -
    t1.interrupt() is called in about 5 seconds after
    both threads are started, at the time when one thread
    is in sleep(10000) and the other in wait(). I believe
    that above condition may be taken for granted taking
    in account 5 seconds interval between calls.You know that when you invoke the notify() method inside the bar method() you are making the foo() method not waiting anymore, don?t you? Therefore, if foo() method is called firstly, then the InterruptedException probably won?t be thrown. I said "probably" because the behaviour is non deterministic. Time is relative. If your processor is fast, then probably the exception will never be thrown, but you will never be completely sure. Maybe if there are other executions using your processor, then the processor might be slow for your program, and then the InterruptedException might be thrown. If you want to make your program have the same behaviour always, then you have to use semaphore variables, that indicate when exactly one thread is permitted to run.

  • 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.

  • Exception in ADEP Workbench 10.0 service not thrown to the dotnet application.

    Our dotnet application is consuming a service that workbench is exposing. The service creates a pdf and also issues a print command to the printer. Exceptions are handled as part of the workbench activity.
    However, the exceptions are not bubbled up to the dotnet layer. Oftentimes the print doesn't work, but the dotnet process continues as if everything went well.
    Is there a way for the exception to be thrown up to the dotnet layer?

    I am getting also that kind of exception when using the upgrade assistant to upgrade from 10.3.6 to 12.1.1.

  • 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

  • Exception has been thrown by the target of an invocation. Object reference not set to an instance of an object....when I do test map

    Hello
    I have a c# code in which I am calling a web service, and c# code returns a string value.
    I am calling that c# code from Biztalk Map script function as an external assembly
    but when I do test map I get the above above error...Can some one please answer...i m working on BTS2006R2 and i have also tried to test the c# code from a test windows applciation and where does return the values as expected..

    Hi,
    "Exception has been thrown by the target of an invocation" is a very generic exception. you need the inner exception to see the actual error. You can also try to test the map in the MapTester tool. It also shows also
    the inner exception. It's designed for BizTalk 2010 but with the .exe file you maybe also can test BizTalk 2006 maps,.
    http://code.msdn.microsoft.com/Execute-a-BizTalk-map-from-26166441
    Kind regards,
    Tomasso Groenendijk
    Blog 
    |  Twitter
    MCTS BizTalk Server 2006, 2010
    If this answers your question please mark it accordingly

  • Bind Exception must be thrown but not throwed

    opening a seversocket for a second time in the same program must throw bindException or IOException but either of them is not thrown .
    Its very Strange i need to know why this is not happening?

    Untrue. A BindException is only thrown if you specify a non-zero port number which is already in use by a listening socket anywhere in the same host. It has nothing to do with 'the second time' or 'in the same program'.

  • Bounded Taskflow Exception Handler not working with Page Fragements

    I have one bounded - taskflow task-flow-definition
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="task-flow-definition">
        <default-activity>view1</default-activity>
        <managed-bean>
          <managed-bean-name>backing_main</managed-bean-name>
          <managed-bean-class>view.backing.Main</managed-bean-class>
          <managed-bean-scope>pageFlow</managed-bean-scope>
        </managed-bean>
        <managed-bean>
          <managed-bean-name>backing_view1</managed-bean-name>
          <managed-bean-class>view.backing.View1</managed-bean-class>
          <managed-bean-scope>pageFlow</managed-bean-scope>
        </managed-bean>
        <managed-bean>
          <managed-bean-name>backing_view2</managed-bean-name>
          <managed-bean-class>view.backing.View2</managed-bean-class>
          <managed-bean-scope>pageFlow</managed-bean-scope>
        </managed-bean>
        <exception-handler>view2</exception-handler>
        <view id="view1">
          <page>/view1.jsff</page>
        </view>
        <view id="view2">
          <page>/view2.jsff</page>
        </view>
        <use-page-fragments/>
      </task-flow-definition>
    </adfc-config>view1.jsff contains one command button, which calls one ActionListener
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <af:commandButton text="commandButton 1" actionListener="#{pageFlowScope.backing_view1.callMyFunction}"
                        binding="#{pageFlowScope.backing_view1.commandButton1}"
                        id="commandButton1"/>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_view1-->
    </jsp:root>view1.java callMyFunction throws an Exception
        public void callMyFunction(ActionEvent event) throws Exception{
            throw new Exception();
        }view2.jsff is an exception handler
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <af:activeOutputText value="Exception Occured"
                           binding="#{pageFlowScope.backing_view2.activeOutputText1}"
                           id="activeOutputText1"
                           inlineStyle="font-size:xx-large; color:red;"/>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_view2-->
    </jsp:root>above taskflow is dragged-drop as a Region in one file main.jspx
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <af:document binding="#{pageFlowScope.backing_main.document1}"
                     id="document1">
          <af:form binding="#{pageFlowScope.backing_main.form1}" id="form1">
            <af:region value="#{bindings.taskflowdefinition1.regionModel}"
                       id="taskf1"
                       binding="#{pageFlowScope.backing_main.taskf1}"/>
          </af:form>
        </af:document>
      </f:view>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_main-->
    </jsp:root>*pressing a commandButton on view1.jsff throws an Exception as expected but does not go to exceptionHandler [view2.jsff]*
    However, this does work with Bounded Task-Flow without page fragments , view1.jspx contains one button, calling one method which throws an Exception,
    view2.jspx is an Exception Handler, and in this case it redirects to the view2.jspx [error page]
    any ideas?
    thanks

    Hi,
    Pretty much. However, you got the event part wrong, which is mostly my fault here. First, let put down some general JSF facts about event handling.
    1. http://java.sun.com/javaee/5/docs/api/javax/faces/component/UIComponent.html#queueEvent(javax.faces.event.FacesEvent)
    2. So, basically, queuing an event on a component means queuing it on its parent until you reach the UIViewRoot that will really actually queue it. That strategy allows iterating components to intercept event queued on their children to record the row index as well so that the data model can be synchronized correctly during the broadcast phase (see http://java.sun.com/javaee/5/docs/api/javax/faces/component/UIData.html#queueEvent(javax.faces.event.FacesEvent) and http://java.sun.com/javaee/5/docs/api/javax/faces/component/UIData.html#broadcast(javax.faces.event.FacesEvent))
    3. Exceptions that aren't handled by the exception handler are thrown during broadcast or various process* methods.
    So, the catch component must leverage these facts to intercept events queued on its children (by overriding queueEvent method) wrapping the original event in a custom on that flag the catch component itself as the source of the event. The result will be that the broadcast method of the catch component will be called to handle the event. The broadcast method must then unwrap the event (to get the original event), gets the original source, then call originalSource.broadcast(originalEvent) within a try-catch block.
    Does it make any more sense put that way? Note that it's an obscure part of JSF so I cannot make it incredibly simple either.
    Regards,
    ~ Simon

  • Java.sql.SQLException: Cannot obtain connection after 3600 seconds. , Exception = Access not allowed

    Using Weblogic Platform 7.0 (installed from platform700_win32.exe),
    Running a BPM Doamin(WLIDomain with BPM only).
    When I try to access my entity bean(CMP), the following exception is getting thrown.
    I have seen a similar post in here, but the answer to that post, which says to
    provide ACL. does not apply quite well my scenario.
    To do this, I right clicked on the connection pool and selected define Ploicy..
    It shows two options
    RealmAdapterAuthorizer and DefaultAuthorizer; On DefaultAuthroizer i specified
    role accessing the resource would be "everyone". - restarted the server - but
    still the same error.
    Please suggest a solution if any. Do i have to get some service pack for this?
    TIA
    Ranjith.

    We have never seen a case yet where this was not a permissions problem.
    Do you have a fileRealm.properties file as part of your configuration?
    "Ranjith" <[email protected]> wrote in message
    news:3f0fdeb3$[email protected]..
    >
    java.sql.SQLException: Cannot obtain connection after 3600 seconds. ,Exception
    = Access not allowed
    java.sql.SQLException: Cannot obtain connection after 3600 seconds. ,Exception
    = Access not allowed
    atweblogic.jdbc.jts.Connection.wrapAndThrowSQLException(Connection.java:701)
    atweblogic.jdbc.jts.Connection.getOrCreateConnection(Connection.java:623)
    atweblogic.jdbc.jts.Connection.prepareStatement(Connection.java:133)
    atweblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.ja
    va:139)
    atweblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:81
    atservice.samplemgt.v1_0.ejb.entity.BanksampletypeCMP_ckv0ao__WebLogic_CMP_RDB
    MS.ej
    bFindAll(BanksampletypeCMP_ckv0ao__WebLogic_CMP_RDBMS.java:873)
    at java.lang.reflect.Method.invoke(Native Method)
    atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMSPersi
    stenceManager
    java:300)
    atweblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.
    java:715)
    atweblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.
    java:688)
    atweblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:47
    6)
    at ...

  • 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.

Maybe you are looking for

  • How to get a Mad Catz R.A.T 3/5/7 to work on Arch Linux

    This post isn't about me asking for help.  Instead it is a post about how to get a Mad Catz R.A.T. 3/5/7 mouse working.  I'm posting this for future Archers who have bought one of these mice.  They're a good mouse product but unfortunately there is a

  • APC and 10.5

    What and how are you guys managing your battery backup with xserves running 10.5, specifically APC UPS's. Id like to hear the 1:1 ration, 1 server and 1 APC but specifically the 1: many or the 1 Apc and many server or the Many:Many with multiple APC'

  • Select by Location. Select Into.. No column was specified

    Hello.. I am starting out as a new user with Sql Server Express 2012. I'm using the information in the AdventureWorks2012 database and http://msdn.microsoft.com/en-us/library/ff929109.aspx  I can run a select by location from the Person.Address tabl

  • How to create objects in stack

    I am working on Weblogic 10 and JDK 1.5. In Java the objects are always created in heap. Can anybody tell me how to create objects in stack?

  • Database restore with just one backup set

    Hallo experts, I got a big problem with restoring my XE database. I have a newly created full backup from my XE. While saving the flashback_area I got a hard crash on my system but I saved the last backup set file on a server. Unfortunately I was not