4 Replies Latest reply on Jan 9, 2013 5:28 AM by Nicklas Karlsson

    How to configure my ejb project to use persistence.xml for hibernate lecene search?

    Sam W Expert

      Hi, I use hibernate lucene search in my ejb project.

      I put hibernate confniguration in my persistence.xml file, but when the search is executed in run time, it thrown the following exception:

       

       

      14:14:48,495 INFO  [org.hibernate.cfg.Configuration] (http--192.168.1.20-8080-8) HHH000043: Configuring from resource: /hibernate.cfg.xml

      14:14:48,495 INFO  [org.hibernate.cfg.Configuration] (http--192.168.1.20-8080-8) HHH000040: Configuration resource: /hibernate.cfg.xml

      14:14:48,497 ERROR [org.jboss.ejb3.invocation] (http--192.168.1.20-8080-8) JBAS014134: EJB Invocation failed on component MyisamProductArticleFacade for method public abstract java.util.List ForestSurf.entity.facade.MyisamProductArticleFacadeLocal.search(java.lang.String): javax.ejb.EJBException: Unexpected Error

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:163) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterc

       

       

      where it is looking for hibernate.cfg.xml file, however all hibernate configration is written to my peristence.xml file which is shown below:

       

       

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

        <persistence-unit name="ForestSurfPU" transaction-type="JTA">

          <provider>org.hibernate.ejb.HibernatePersistence</provider>

          <jta-data-source>java:jboss/datasources/ForestSurf</jta-data-source>

          <exclude-unlisted-classes>false</exclude-unlisted-classes>

          <properties>

            <property name="hibernate.hbm2ddl.auto" value="update"/>

            <property name="hibernate.show_sql" value="true"/>

            <property name="hibernate.format_sql" value="true"/>

            <property name="hibernate.max_fetch_depth" value="4"/>

            <property name="hibernate.default_batch_fetch_size" value="365"/>

            

            <property name="hibernate.search.default.directory_provider" value="filesystem"/>

            <property name="hibernate.search.default.indexBase" value="./lucene/indexes"/>

            <property name="hibernate.search.default.batch.merge_factor" value="10"/>

            <property name="hibernate.search.default.batch.max_buffered_docs" value="10"/>

       

       

       

          </properties>

        </persistence-unit>

      </persistence>

       

       

      I know there is something missing in my ejb project. But I am not sure how to 'redirect' the search go and seek its configuration in the persistence.xml rather than hibernate.cfg.xml file.

      Any suggestion is very appreciated.

      Thanks

      Sam

        • 1. Re: How to configure my ejb project to use persistence.xml for hibernate lecene search?
          Nicklas Karlsson Master

          Is that the complete stack trace? There might be some other error and the xml file references are just where it looks for an (optional) config file.

          • 2. Re: How to configure my ejb project to use persistence.xml for hibernate lecene search?
            Sam W Expert

            Hi Nick,

            Thank you for a fast response.

            Here is more for the trace:

             

             

                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                    at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]

            Caused by: java.lang.ExceptionInInitializerError

                    at ForestSurf.entity.facade.MyisamProductArticleFacade.search(MyisamProductArticleFacade.java:54) [ForestSurf-ejb-1.0.jar:]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    ... 60 more

            Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found

                    at org.hibernate.internal.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1940) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.configure(Configuration.java:1921) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.configure(Configuration.java:1901) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at ForestSurf.utils.HibernateUtil.configureSessionFactory(HibernateUtil.java:26) [ForestSurf-ejb-1.0.jar:]

                    at ForestSurf.utils.HibernateUtil.<clinit>(HibernateUtil.java:39) [ForestSurf-ejb-1.0.jar:]

                    ... 80 more

             

             

            14:14:48,530 ERROR [org.jboss.ws.common.invocation.InvocationHandlerJAXWS] (http--192.168.1.20-8080-8) Method invocation failed with exception: null: java.lang.reflect.InvocationTargetException

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)

            ...

                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                    at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]

            Caused by: java.lang.ExceptionInInitializerError

                    at ForestSurf.entity.facade.MyisamProductArticleFacade.search(MyisamProductArticleFacade.java:54) [ForestSurf-ejb-1.0.jar:]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    ... 60 more

            Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found

                    at org.hibernate.internal.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1940) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.configure(Configuration.java:1921) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.configure(Configuration.java:1901) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at ForestSurf.utils.HibernateUtil.configureSessionFactory(HibernateUtil.java:26) [ForestSurf-ejb-1.0.jar:]

                    at ForestSurf.utils.HibernateUtil.<clinit>(HibernateUtil.java:39) [ForestSurf-ejb-1.0.jar:]

                    ... 80 more

             

             

            14:14:48,530 ERROR [org.jboss.ws.common.invocation.InvocationHandlerJAXWS] (http--192.168.1.20-8080-8) Method invocation failed with exception: null: java.lang.reflect.InvocationTargetException

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)

                    at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)

                    at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)

            ......

                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

                    at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]

            Caused by: java.lang.RuntimeException: javax.ejb.EJBException: Unexpected Error

                    at ForestSurf.product.service.myisamproductarticle.MyisamProductArticleServiceImpl.search(MyisamProductArticleServiceImpl.java:81) [classes:]

                    ... 39 more

            Caused by: javax.ejb.EJBException: Unexpected Error

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:163) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at ForestSurf.entity.facade.MyisamProductArticleFacadeLocal$$$view1.search(Unknown Source) [ForestSurf-ejb-1.0.jar:]

                    at ForestSurf.product.service.myisamproductarticle.MyisamProductArticleServiceImpl.search(MyisamProductArticleServiceImpl.java:79) [classes:]

                    ... 39 more

            Caused by: java.lang.ExceptionInInitializerError

                    at ForestSurf.entity.facade.MyisamProductArticleFacade.search(MyisamProductArticleFacade.java:54) [ForestSurf-ejb-1.0.jar:]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

             

            ....

                    ... 39 more

            Caused by: java.lang.ExceptionInInitializerError

                    at ForestSurf.entity.facade.MyisamProductArticleFacade.search(MyisamProductArticleFacade.java:54) [ForestSurf-ejb-1.0.jar:]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    ... 60 more

            Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found

                    at org.hibernate.internal.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1940) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.configure(Configuration.java:1921) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.configure(Configuration.java:1901) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at ForestSurf.utils.HibernateUtil.configureSessionFactory(HibernateUtil.java:26) [ForestSurf-ejb-1.0.jar:]

                    at ForestSurf.utils.HibernateUtil.<clinit>(HibernateUtil.java:39) [ForestSurf-ejb-1.0.jar:]

                    ... 80 more

             

             

            14:14:48,564 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@70258e5

            14:14:48,564 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.jaxws.interceptors.HolderInInterceptor@1ad4bd6

            14:14:48,565 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.jaxws.interceptors.SwAInInterceptor@184dcf76

            14:14:48,565 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor@75b6079a

            14:14:48,566 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.interceptor.OneWayProcessorInterceptor@41b397d8

            14:14:48,566 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.jboss.wsf.stack.cxf.interceptor.NsCtxSelectorStoreInterceptor@1234ae9e

            14:14:48,567 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor@11597ac4

            14:14:48,567 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.interceptor.DocLiteralInInterceptor@181133b4

            14:14:48,568 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.interceptor.URIMappingInterceptor@5ef4b9e0

            14:14:48,568 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.jaxb.attachment.JAXBAttachmentSchemaValidationHack@6c2c5188

            14:14:48,569 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor@228cc192

            14:14:48,569 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor@46f869f6

            14:14:48,570 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.jboss.wsf.stack.cxf.interceptor.EnableOneWayDecoupledFaultIn:

            ........

            or@1df3b58e

            14:14:48,575 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Invoking handleFault on interceptor org.apache.cxf.ws.policy.PolicyInInterceptor@11fb491

            14:14:48,576 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http--192.168.1.20-8080-8) Application {http://myisamproductarticle.service.product.ForestSurf/}MyisamProductArticleServiceImplService#{http://myisamproductarticle.service.product.ForestSurf/}search has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: javax.ejb.EJBException: Unexpected Error

                    at org.jboss.wsf.stack.cxf.JBossWSInvoker.createFault(JBossWSInvoker.java:246)

                    at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:201)

                    at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)

                    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)

                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_07]

                    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_07]

                    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_07]

                    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

                    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)

                    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

                    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

                    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)

                    at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)

                    at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)

                    at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)

                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                    at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)

                    at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.3.GA.jar:2.0.3.GA]

                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

            :

            .........

                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

                    at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]

            Caused by: java.lang.RuntimeException: javax.ejb.EJBException: Unexpected Error

                    at ForestSurf.product.service.myisamproductarticle.MyisamProductArticleServiceImpl.search(MyisamProductArticleServiceImpl.java:81) [classes:]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)

                    at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)

                    ... 33 more

            Caused by: javax.ejb.EJBException: Unexpected Error

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:163) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at ForestSurf.entity.facade.MyisamProductArticleFacadeLocal$$$view1.search(Unknown Source) [ForestSurf-ejb-1.0.jar:]

                    at ForestSurf.product.service.myisamproductarticle.MyisamProductArticleServiceImpl.search(MyisamProductArticleServiceImpl.java:79) [classes:]

                    ... 39 more

            Caused by: java.lang.ExceptionInInitializerError

                    at ForestSurf.entity.facade.MyisamProductArticleFacade.search(MyisamProductArticleFacade.java:54) [ForestSurf-ejb-1.0.jar:]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

            ........

             

                  at ForestSurf.entity.facade.MyisamProductArticleFacadeLocal$$$view1.search(Unknown Source) [ForestSurf-ejb-1.0.jar:]

                    at ForestSurf.product.service.myisamproductarticle.MyisamProductArticleServiceImpl.search(MyisamProductArticleServiceImpl.java:79) [classes:]

                    ... 39 more

            Caused by: java.lang.ExceptionInInitializerError

                    at ForestSurf.entity.facade.MyisamProductArticleFacade.search(MyisamProductArticleFacade.java:54) [ForestSurf-ejb-1.0.jar:]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    ... 60 more

            Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found

                    at org.hibernate.internal.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                    at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1940) [hibernate-core-4.0.1.Final.jar:4.0.1.Final

            ...............

             

                    at ForestsurfClient.manager.MyisamProductArticleManagerLocal$$$view77.search(Unknown Source) [ForestsurfClient-ejb-1.0.jar:]

                    at ForestsurfClient.manager.service.MyisamProductArticleServiceImpl.search(MyisamProductArticleServiceImpl.java:76) [classes:]

                    ... 59 more

            Caused by: java.lang.RuntimeException: javax.xml.ws.soap.SOAPFaultException: javax.ejb.EJBException: Unexpected Error

                    at ForestsurfClient.manager.MyisamProductArticleManagerBean.search(MyisamProductArticleManagerBean.java:78) [ForestsurfClient-ejb-1.0.jar:]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee

            -7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                    ... 80 more

            Caused by: javax.xml.ws.soap.SOAPFaultException: javax.ejb.EJBException: Unexpected Error

                    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)

                    at $Proxy190.search(Unknown Source)     at ForestsurfClient.manager.MyisamProductArticleManagerBean.search(MyisamProductArticleManagerBean.java:76) [ForestsurfClient-ejb-1.0.jar:]

                    ... 99 more

            Caused by: org.apache.cxf.binding.soap.SoapFault: javax.ejb.EJBException: Unexpected Error

                    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)

                    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)

            ...........

             

                at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:364)

                    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:317)

                    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)

                    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)

                    ... 101 more

             

             

            14:14:48,959 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] (http--192.168.1.20-8080-6) SecurityContextHolder now cleared, as request processing completed

            14:14:48,960 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ForestsurfClient-web].[dispatcherServlet]] (http--192.168.1.20-8080-6) Servlet.service() for servlet dispatcherServlet threw exception: org.apache.cxf.binding.soap.SoapFault: javax.ejb.EJBException: Unexpected Error

                    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)

                    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)

                    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)

                    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

                    at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:111)

                    at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)

                    at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)

                    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

                    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:795)

                    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1626)

                    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1493)

                    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1401)

                    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)

                    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:648)

                    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)

                    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

                    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)

                    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:461)

                    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:364)

                    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:317)

                    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)

                    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)

                    at $Proxy190.search(Unknown Source)     at ForestsurfClient.manager.MyisamProductArticleManagerBean.search(MyisamProductArticleManagerBean.java:76) [ForestsurfClient-ejb-1.0.jar:]

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

                    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

                    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final

            ...........

             

             

             

             

             

             

             

             

             

             

             

            Thanks

            Sam

            • 3. Re: How to configure my ejb project to use persistence.xml for hibernate lecene search?
              Sam W Expert

              Here is where it causes error in the Facade code:

               

               

              public List<MyisamProductArticle> search(String queryString) {

                      Session session = HibernateUtil.getSession();    // here is line# 54 where it causes error.

                      FullTextSession fullTextSession = Search.getFullTextSession(session);

                      

                      QueryBuilder queryBuilder = fullTextSession.getSearchFactory().buildQueryBuilder().forEntity(MyisamProductArticle.class).get();

                      org.apache.lucene.search.Query luceneQuery = queryBuilder.keyword().onFields("header","a_desc").matching(queryString).createQuery();

               

                      // wrap Lucene query in a javax.persistence.Query

                      org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery(luceneQuery, MyisamProductArticle.class);

                      

                      List<MyisamProductArticle> articleList = fullTextQuery.list();

                      

                      fullTextSession.close();

                      

                      return articleList;

                  }

               

               

              HibernateUtil.java class:

               

              public class HibernateUtil {

                  

                  private static SessionFactory sessionFactory = null; 

                  private static ServiceRegistry serviceRegistry = null; 

                    

                  private static SessionFactory configureSessionFactory() throws HibernateException { 

                      Configuration configuration = new Configuration(); 

                      configuration.configure(); 

                      

                      Properties properties = configuration.getProperties();

                      

                      serviceRegistry = new ServiceRegistryBuilder().applySettings(properties).buildServiceRegistry();         

                      sessionFactory = configuration.buildSessionFactory(serviceRegistry); 

                      

                      return sessionFactory; 

                  }

                  

                  // We need to configure session factory once.

                  // Rest of the time we will get session using the same.

                  static {

                      configureSessionFactory();

                  }

                  

                  private HibernateUtil() {}

                  

                  public static Session getSession() {

                      return sessionFactory.openSession();

                  }

              }

               

               

              If I want to use the configuration from persistence.xml file, how to get my Facade class to invoke Hibernate search?

              Thanks

              sam

              • 4. Re: How to configure my ejb project to use persistence.xml for hibernate lecene search?
                Nicklas Karlsson Master

                persistence.xml is used when Hibernate is used as a JPA persistence provider. You are using Hibernate in "native" mode (which uses hibernate.cfg.xml).

                 

                I don't know if it's possible to bootstrap native Hibernate from persistence.xml