1 Reply Latest reply on Dec 30, 2005 9:25 PM by Emmanuel Bernard

    Possible problem with mysql configuration

    Bogdan Bogucki Newbie

      Hi,
      When I use remote mysql database on hosting site (connection through ADSL modem) I couldn't retrive some data. I can only execute simple queries (ie. "from customer"), but not queries with where clause or fetch objects with relationships to another. SQL queries on remote mysql database generated by hibernate are corectly executed using query browser. Also if I connect other mysql database server with the same data through LAN intranet I can fetch all data.

      First problem occurs if use objects with relations. I have following exceptions:


      18:04:30,546 INFO [DefaultLoadEventListener] Error performing load command
      org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [autolider.par.estoredb.Customer#1]
      at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
      at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:128)
      at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
      at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
      at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:781)
      at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:753)
      at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
      at org.hibernate.type.EntityType.resolve(EntityType.java:303)
      at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
      at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
      at org.hibernate.loader.Loader.doQuery(Loader.java:717)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
      at org.hibernate.loader.Loader.doList(Loader.java:2147)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
      at org.hibernate.loader.Loader.list(Loader.java:2021)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:296)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:992)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
      at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:38)
      at autolider.ejb3.applicationservices.OrdersAppService.getAllAddressBook(OrdersAppService.java:192)
      at autolider.ejb3.sessionfacades.WebStoreManagerFacadeBean.getAllAddressBook(WebStoreManagerFacadeBean.java:61)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:32)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:32)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:189)
      at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
      at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:69)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:566)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:436)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:247)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:285)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:169)


      Second problem if I dont't use relations, but EBQL queries with where clause. I have following exceptions:

      javax.ejb.EJBException: null; CausedByException is:
      No entity found for query
      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:46)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:70)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:32)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:189)
      at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
      at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:69)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:566)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:436)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:247)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:299)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:169)
      javax.persistence.EntityNotFoundException: No entity found for query
      at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:46)
      at autolider.ejb3.applicationservices.OrdersAppService.findCustomer(OrdersAppService.java:202)
      at autolider.ejb3.sessionfacades.WebStoreManagerFacadeBean.findCustomer(WebStoreManagerFacadeBean.java:66)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:32)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:32)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:189)
      at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
      at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:69)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:566)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:436)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:247)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:299)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:169)
      javax.persistence.EntityNotFoundException: No entity found for query
      at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:46)
      at autolider.ejb3.applicationservices.OrdersAppService.findCustomer(OrdersAppService.java:202)
      at autolider.ejb3.sessionfacades.WebStoreManagerFacadeBean.findCustomer(WebStoreManagerFacadeBean.java:66)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:32)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:32)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:189)client end ...

      at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
      at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:69)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:566)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:436)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:247)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:299)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:169)



      Rows or entities reported in given exceptions as not existing of course exists in database. The same application executed using mysql database via intranet runs correctly. Is it possible that such a problem is connected with mysql server configuration? If so, what configuration options I have to set?