deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 十三郎 <mihaish...@163.com>
Subject Re:Re: Re: Unsatisfied dependencies for type TransactionStrategy error on tomcat8
Date Tue, 29 Oct 2013 11:02:08 GMT
Rodrigo:thanks!!!
if i remove this block from bean.xml
------

<interceptors>
        <class>org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor</class>
</interceptors>
------
the error message occured.
-----
29-Oct-2013 18:57:40.366 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart
Exception sending context initialized event to listener instance of class org.jboss.weld.environment.servlet.Listener
 org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type
TransactionStrategy with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject private org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor.transactionStrategy
  at org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor.transactionStrategy(TransactionalInterceptor.java:0)

    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:405)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:327)
    at org.jboss.weld.bootstrap.Validator.validateInterceptor(Validator.java:565)
    at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:88)
    at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:86)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

29-Oct-2013 18:57:41.237 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStop
Exception sending context destroyed event to listener instance of class org.jboss.weld.environment.servlet.Listener
 java.lang.NullPointerException
    at org.jboss.weld.servlet.WeldInitialListener.contextDestroyed(WeldInitialListener.java:76)
    at org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextDestroyed(ForwardingServletListener.java:30)
    at org.jboss.weld.environment.servlet.Listener.contextDestroyed(Listener.java:86)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4871)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5499)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:698)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:968)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1742)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
----











At 2013-10-29 18:38:11,"Rodrigo Mesquita" <rodrigo.mesquita@tre-se.jus.br> wrote:
>Try to remove of your beans.xml
>
>  <interceptors>
>        <class>org.apache.deltaspike.jpa.impl.transaction.
>TransactionalInterceptor</class>
>    </interceptors>
>
>Don't know if 0.5 version of jpa module need this configuration, because it
>has an already configured beans.xml
>
>
>--
>
>Rodrigo Cardoso Mesquita
>
>Tel.: (79) 2106-8703
>Seção de Desenvolvimento de Sistemas
>Tribunal Regional Eleitoral de Sergipe
>SEDES / COSIS / STI / TRE-SE
>
>
>
>2013/10/29 十三郎 <mihaisheng@163.com>
>
>> Rodrigo:thanks very much!!!
>>
>>    i change my code to use @Transactional annotation instead of a
>>  BMT(manual) way.
>>    i want  to test if code work fine in a CMT way.
>>
>> 1.EntityManagerProducer
>> ---
>> public class EntityManagerProducer
>> {
>>         @PersistenceContext(unitName = "persistence0")
>>     private EntityManager entityManager;
>>     @Produces
>>     @SessionScoped
>>     protected EntityManager createEntityManager()
>>     {
>>         return this.entityManager;
>>     }
>>     protected void closeEntityManager(@Disposes EntityManager
>> entityManager)
>>     {
>>         if (entityManager.isOpen())
>>         {
>>            entityManager.close();
>>         }
>>     }
>> }
>> ---
>> 2.do some database transactional work in a CMT way
>> ---
>> import java.io.Serializable;
>> import javax.enterprise.context.SessionScoped;
>> import javax.inject.Inject;
>> import javax.inject.Named;
>> import javax.persistence.EntityManager;
>> import javax.persistence.Query;
>> import org.apache.deltaspike.core.api.provider.BeanProvider;
>> import org.apache.deltaspike.jpa.api.transaction.Transactional;
>>
>> @Named
>> @SessionScoped
>> @Transactional
>> public class Test implements Serializable
>> {
>>         private static final long serialVersionUID = -1231439157655757940L;
>>         @Inject CurrentUser currentUser;
>>         @Transactional
>>     public String test1(){
>>         EntityManager
>> entityManager0=BeanProvider.getContextualReference(EntityManager.class,false);
>>                 //just fill some test data to database
>>                 String sql="insert into grandscape_user
>> (user_name,user_password) values (:u,:p)";
>>                 Query query=entityManager0.createNativeQuery(sql);
>>                         query.setParameter("u", "Jason Porter");
>>                         query.setParameter("p", "secrete");
>>                         query.executeUpdate();
>>                         return "success";
>>     }
>> }
>> ---
>>
>> 3.persistence.xml
>> ---
>> <?xml version="1.0" encoding="UTF-8"?>
>> <persistence 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_2_0.xsd"
>>     version="2.0">
>>         <persistence-unit name="persistence0"
>> transaction-type="RESOURCE_LOCAL">
>>         <provider>org.hibernate.ejb.HibernatePersistence</provider>
>>         <properties>
>>                 <property name="hibernate.connection.driver_class"
>> value="com.mysql.jdbc.Driver"/>
>>                 <property name="hibernate.connection.url"
>> value="jdbc:mysql://localhost:3306/grandscape_websit/"></property>
>>                         <property name="hibernate.connection.username"
>> value="root" />
>>                         <property name="hibernate.connection.password"
>> value="root" />
>>             <property name="hibernate.dialect"
>> value="org.hibernate.dialect.MySQLInnoDBDialect"/>
>>             <property name="hibernate.connection.autocommit" value="true"
>> />
>>             <property name="hibernate.hbm2ddl.auto" value="validate"/>
>>             <property name="hibernate.show_sql" value="false"/>
>>             <property name="hibernate.cache.use_second_level_cache"
>> value="true"/>
>>             <property name="hibernate.cache.provider_class"
>> value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"/>
>>             <property name="hibernate.search.default.directory_provider"
>> value="org.hibernate.search.store.FSDirectoryProvider"/>
>>             <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>
>> ---
>>
>> 4.bean.xml
>> ---
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
>>     <interceptors>
>>
>> <class>org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor</class>
>>     </interceptors>
>> </beans>
>> ---
>>
>> when i deployed the program to tomcat,the error occured.
>> -----
>> 29-Oct-2013 18:05:16.536 SEVERE [localhost-startStop-1]
>> org.apache.catalina.core.StandardContext.listenerStart Exception sending
>> context initialized event to listener instance of class
>> org.jboss.weld.environment.servlet.Listener
>>  org.jboss.weld.exceptions.DeploymentException: WELD-001416 Enabled
>> interceptor class
>> org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor
>> specified twice:
>>   -
>> <class>org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor</class>
>> in
>> jar:file:/D:/Tomcat%208.0rc5/temp/0-prog_tomcat/WEB-INF/lib/deltaspike-jpa-module-impl-0.5.jar!/META-INF/beans.xml@24
>> ,
>>   -
>> <class>org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor</class>
>> in file:/d:/Tomcat%208.0rc5/temp/0-prog_tomcat/WEB-INF/beans.xml@5
>>         at
>> org.jboss.weld.bootstrap.enablement.GlobalEnablementBuilder.checkForDuplicates(GlobalEnablementBuilder.java:249)
>>         at
>> org.jboss.weld.bootstrap.enablement.GlobalEnablementBuilder.createModuleEnablement(GlobalEnablementBuilder.java:226)
>>         at
>> org.jboss.weld.bootstrap.BeanDeployment.createEnabled(BeanDeployment.java:221)
>>         at
>> org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:488)
>>         at
>> org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:141)
>>         at
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4830)
>>         at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5276)
>>         at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>         at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
>>         at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
>>         at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:698)
>>         at
>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:968)
>>         at
>> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1742)
>>         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
>> Source)
>>         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>         at java.util.concurrent.FutureTask.run(Unknown Source)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
>> Source)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>> Source)
>>         at java.lang.Thread.run(Unknown Source)
>>
>> 29-Oct-2013 18:05:17.174 SEVERE [localhost-startStop-1]
>> org.apache.catalina.core.StandardContext.listenerStop Exception sending
>> context destroyed event to listener instance of class
>> org.jboss.weld.environment.servlet.Listener
>>  java.lang.NullPointerException
>>         at
>> org.jboss.weld.servlet.WeldInitialListener.contextDestroyed(WeldInitialListener.java:76)
>>         at
>> org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextDestroyed(ForwardingServletListener.java:30)
>>         at
>> org.jboss.weld.environment.servlet.Listener.contextDestroyed(Listener.java:86)
>>         at
>> org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4871)
>>         at
>> org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5499)
>>         at
>> org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
>>         at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
>>         at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
>>         at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
>>         at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:698)
>>         at
>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:968)
>>         at
>> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1742)
>>         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
>> Source)
>>         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>         at java.util.concurrent.FutureTask.run(Unknown Source)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
>> Source)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>> Source)
>>         at java.lang.Thread.run(Unknown Source)
>> -----
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> At 2013-10-27 17:10:34,Rodrigo <rcardosom@gmail.com> wrote:
>> >I think the problem is the use of PersistenceContext annotation on
>> Resource_local entityManager. If you want to manage the transactions, dont
>> use this annotation, because it indicates container responsability of
>> entity managers.
>> >
>> >You must have a static EntityManagerFactory created and the producer
>> method must create the entitymanager from factory.
>> >
>> >Rodrigo
>> >
>> >
>> >
>> >
>> >Enviado via iPhone
>> >
>> >Em 26/10/2013, às 23:50, 十三郎 <mihaisheng@163.com> escreveu:
>> >
>> >>
>> >> hi everyone:
>> >>
>> >> i write a simple apache deltaspike jpa demo,run to error on tomcat8.0.
>> >> (i use tomcat8.0rc5 ; jdk1.7 ,deltaspike0.5)
>> >>
>> >> 1,first,i define a EntityManagerProducer
>> >> public class EntityManagerProducer
>> >> {
>> >>    @PersistenceContext(unitName = "persistence0")
>> >>    private EntityManager entityManager;
>> >>    @Produces
>> >>    @RequestScoped
>> >>    protected EntityManager createEntityManager()
>> >>    {
>> >>        return this.entityManager;
>> >>    }
>> >>    protected void closeEntityManager(@Disposes EntityManager
>> entityManager)
>> >>    {
>> >>        if (entityManager.isOpen())
>> >>        {
>> >>            entityManager.close();
>> >>        }
>> >>    }
>> >> }
>> >>
>> >>
>> >> 2,and i want do some database transactional work manually(i wanna a
>> manual way).
>> >> ---------------------------
>> >> @Named
>> >> @SessionScoped
>> >> public class Test implements Serializable
>> >> {
>> >>    private static final long serialVersionUID = -1231439157655757940L;
>> >>    public String test1(){
>> >>        EntityManager
>> entityManager0=BeanProvider.getContextualReference(EntityManager.class,false);
>> >>        entityManager0.getTransaction().begin();
>> >>        try{
>> >>            //just fill some test data to database
>> >>            String sql="insert into grandscape_user
>> (user_name,user_password) values (:u,:p)";
>> >>            Query query=entityManager0.createNativeQuery(sql);
>> >>            query.setParameter("u", "Jason Porter");
>> >>            query.setParameter("p", "secrete");
>> >>            query.executeUpdate();
>> >>            entityManager0.getTransaction().commit();
>> >>            return "success";
>> >>        }catch(Exception ex){
>> >>            entityManager0.getTransaction().rollback();
>> >>            return ex.getMessage();
>> >>        }
>> >>    }
>> >> }
>> >> -------------------
>> >>
>> >>
>> >> 3,and persistence.xml.
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> <persistence 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_2_0.xsd"
>> >>    version="2.0">
>> >>    <persistence-unit name="persistence0"
>> transaction-type="RESOURCE_LOCAL">
>> >>        <provider>org.hibernate.ejb.HibernatePersistence</provider>
>> >>        <properties>
>> >>            <property name="hibernate.connection.driver_class"
>> value="com.mysql.jdbc.Driver"/>
>> >>            <property name="hibernate.connection.url"
>> value="jdbc:mysql://localhost:3306/grandscape_websit/"></property>
>> >>            <property name="hibernate.connection.username" value="root"
>> />
>> >>            <property name="hibernate.connection.password" value="root"
>> />
>> >>            <property name="hibernate.dialect"
>> value="org.hibernate.dialect.MySQLInnoDBDialect"/>
>> >>            <property name="hibernate.connection.autocommit"
>> value="true" />
>> >>            <property name="hibernate.hbm2ddl.auto" value="validate"/>
>> >>            <property name="hibernate.show_sql" value="false"/>
>> >>            <property name="hibernate.cache.use_second_level_cache"
>> value="true"/>
>> >>            <property name="hibernate.cache.provider_class"
>> value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"/>
>> >>            <property name="hibernate.search.default.directory_provider"
>> value="org.hibernate.search.store.FSDirectoryProvider"/>
>> >>            <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>
>> >> ------------
>> >>
>> >>
>> >> 4,finally,when i deployed the program to tomcat,the error occured:
>> >> ----------
>> >> 26-Oct-2013 12:04:51.642 SEVERE [http-nio-8080-exec-6]
>> org.apache.catalina.core.StandardContext.listenerStart Exception sending
>> context initialized event to listener instance of class
>> org.jboss.weld.environment.servlet.Listener
>> >> org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied
>> dependencies for type TransactionStrategy with qualifiers @Default
>> >>  at injection point [BackedAnnotatedField] @Inject private
>> org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor.transactionStrategy
>> >>  at
>> org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor.transactionStrategy(TransactionalInterceptor.java:0)
>> >>
>> >>    at
>> org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:405)
>> >>    at
>> org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:327)
>> >>    at
>> org.jboss.weld.bootstrap.Validator.validateInterceptor(Validator.java:565)
>> >>    at
>> org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:88)
>> >>    at
>> org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:86)
>> >>    at
>> org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
>> >>    at
>> org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
>> >>    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>> >>    at java.util.concurrent.FutureTask.run(Unknown Source)
>> >>    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>> >>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> >>    at java.lang.Thread.run(Unknown Source)
>> >>
>> >> 26-Oct-2013 12:04:52.161 SEVERE [http-nio-8080-exec-6]
>> org.apache.catalina.core.StandardContext.listenerStop Exception sending
>> context destroyed event to listener instance of class
>> org.jboss.weld.environment.servlet.Listener
>> >> java.lang.NullPointerException
>> >>    at
>> org.jboss.weld.servlet.WeldInitialListener.contextDestroyed(WeldInitialListener.java:76)
>> >>    at
>> org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextDestroyed(ForwardingServletListener.java:30)
>> >>    at
>> org.jboss.weld.environment.servlet.Listener.contextDestroyed(Listener.java:86)
>> >>    at
>> org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4871)
>> >>    at
>> org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5499)
>> >>    at
>> org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
>> >>    at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
>> >>    at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
>> >>    at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
>> >>    at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:698)
>> >>    at
>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:968)
>> >>    at
>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:456)
>> >>    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1534)
>> >>    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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
>> >>    at
>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
>> >>    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
>> >>    at
>> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1430)
>> >>    at
>> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:704)
>> >>    at
>> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:430)
>> >>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
>> >>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>> >>    at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>> >>    at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> >>    at
>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
>> >>    at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>> >>    at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> >>    at
>> org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
>> >>    at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>> >>    at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> >>    at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221)
>> >>    at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:107)
>> >>    at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:616)
>> >>    at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
>> >>    at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:76)
>> >>    at
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:934)
>> >>    at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:90)
>> >>    at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:515)
>> >>    at
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1012)
>> >>    at
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:642)
>> >>    at
>> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
>> >>    at
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597)
>> >>    at
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1555)
>> >>    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>> >>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> >>    at java.lang.Thread.run(Unknown Source)
>> >> --------
>> >>
>> >> 5.the pom.xml
>> >> ------
>> >> <?xml version="1.0"?>
>> >> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="
>> http://maven.apache.org/POM/4.0.0"
>> >>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> >>  <modelVersion>4.0.0</modelVersion>
>> >>  <groupId>grandscape</groupId>
>> >>  <artifactId>prog_tomcat</artifactId>
>> >>  <version>0.0.1-SNAPSHOT</version>
>> >>  <packaging>war</packaging>
>> >>  <name>prog_tomcat Maven Webapp</name>
>> >>  <url>http://maven.apache.org</url>
>> >>
>> >>  <properties>
>> >>
>>  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>> >>        <deltaspike.version>0.5</deltaspike.version>
>> >>        <picketlink.version>2.5.2.Final</picketlink.version>
>> >>  </properties>
>> >>  <dependencies>
>> >>        <dependency>
>> >>            <groupId>junit</groupId>
>> >>            <artifactId>junit</artifactId>
>> >>            <version>4.11</version>
>> >>            <scope>test</scope>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>com.sun.faces</groupId>
>> >>            <artifactId>jsf-api</artifactId>
>> >>            <version>2.2.4</version>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>com.sun.faces</groupId>
>> >>            <artifactId>jsf-impl</artifactId>
>> >>            <version>2.2.4</version>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>javax.enterprise</groupId>
>> >>            <artifactId>cdi-api</artifactId>
>> >>            <version>1.1</version>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>org.jboss.weld.servlet</groupId>
>> >>            <artifactId>weld-servlet</artifactId>
>> >>            <version>2.0.4.Final</version>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>log4j</groupId>
>> >>            <artifactId>log4j</artifactId>
>> >>            <version>1.2.17</version>
>> >>            <scope>compile</scope>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>org.slf4j</groupId>
>> >>            <artifactId>slf4j-api</artifactId>
>> >>            <version>1.7.5</version>
>> >>            <scope>compile</scope>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>org.slf4j</groupId>
>> >>            <artifactId>slf4j-log4j12</artifactId>
>> >>            <version>1.7.5</version>
>> >>            <scope>compile</scope>
>> >>        </dependency>
>> >>
>> >>          <dependency>
>> >>            <groupId>commons-logging</groupId>
>> >>            <artifactId>commons-logging</artifactId>
>> >>            <version>1.1.3</version>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>org.apache.deltaspike.core</groupId>
>> >>            <artifactId>deltaspike-core-api</artifactId>
>> >>            <version>${deltaspike.version}</version>
>> >>            <scope>compile</scope>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>org.apache.deltaspike.core</groupId>
>> >>            <artifactId>deltaspike-core-impl</artifactId>
>> >>            <version>${deltaspike.version}</version>
>> >>            <scope>runtime</scope>
>> >>        </dependency>
>> >>         <dependency>
>> >>            <version>1.0.1.Final</version>
>> >>            <groupId>org.hibernate.javax.persistence</groupId>
>> >>            <artifactId>hibernate-jpa-2.0-api</artifactId>
>> >>            <scope>provided</scope>
>> >>        </dependency>
>> >>
>> >>        <dependency>
>> >>            <groupId>org.hibernate</groupId>
>> >>            <artifactId>hibernate-core</artifactId>
>> >>            <version>4.2.6.Final</version>
>> >>        </dependency>
>> >>
>> >>        <dependency>
>> >>            <groupId>org.apache.deltaspike.modules</groupId>
>> >>            <artifactId>deltaspike-jpa-module-api</artifactId>
>> >>            <version>${deltaspike.version}</version>
>> >>            <scope>compile</scope>
>> >>        </dependency>
>> >>        <dependency>
>> >>            <groupId>org.apache.deltaspike.modules</groupId>
>> >>            <artifactId>deltaspike-jpa-module-impl</artifactId>
>> >>            <version>${deltaspike.version}</version>
>> >>            <scope>runtime</scope>
>> >>        </dependency>
>> >>    </dependencies>
>> >>   <repositories>
>> >>        <repository>
>> >>        <id>people.apache.snapshots</id>
>> >>        <url>
>> >>            http://repository.apache.org/content/groups/snapshots-group/
>> >>        </url>
>> >>        <releases>
>> >>            <enabled>false</enabled>
>> >>        </releases>
>> >>        <snapshots>
>> >>            <enabled>true</enabled>
>> >>        </snapshots>
>> >>        </repository>
>> >>    </repositories>
>> >>     <pluginRepositories> <pluginRepository>
>> >>    <id>apache.snapshots</id>
>> >>    <name>Apache Snapshots</name>
>> >>    <url>
>> >>        http://repository.apache.org/content/groups/snapshots-group/
>> >>    </url>
>> >>    <releases>
>> >>        <enabled>false</enabled>
>> >>    </releases>
>> >>    <snapshots>
>> >>        <enabled>true</enabled>
>> >>    </snapshots>
>> >> </pluginRepository></pluginRepositories>
>> >>  <build>
>> >>    <finalName>prog_tomcat</finalName>
>> >>    <plugins>
>> >>        <plugin>
>> >>          <groupId>org.apache.tomcat.maven</groupId>
>> >>          <artifactId>tomcat7-maven-plugin</artifactId>
>> >>          <version>2.1</version>
>> >>          <configuration>
>> >>          <server>mytomcat</server>
>> >>          <url>http://localhost:8080/manager/text</url>
>> >>        <contextReloadable>true</contextReloadable>
>> >>          </configuration>
>> >>        </plugin>
>> >>    </plugins>
>> >>  </build>
>> >> </project>
>> >>
>> >> thanks everyone !!!
>>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message