2016-06-28 20 views
2

以下のエラーが表示され、問題を追跡するのに役立ちます。私はjsp、servelt wildflyとhibernateを使ってmavenプロジェクトに取り組んでいます。プロジェクトは初期段階にあります。maven、servlet、jsp、javaを使用したビルドの失敗

13:13:15,694 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."KinaGroup.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."KinaGroup.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "KinaGroup.war" 
     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163) 
     at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) 
     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
     at java.lang.Thread.run(Thread.java:745) 
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0406: No EJB found with interface of type 'kina.member.bean.MemberBeanI' for binding kina.member.action.MemberAction/memberBean 
     at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:90) 
     at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:212) 
     at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:183) 
     at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54) 
     at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:151) 
     at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:144) 
     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156) 
     ... 5 more 

    13:13:15,741 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 61) WFLYCTL0013: Operation ("redeploy") failed - address: ([("deployment" => "KinaGroup.war")]) - failure description: { 
     "WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"KinaGroup.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"KinaGroup.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"KinaGroup.war\" 
     Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0406: No EJB found with interface of type 'kina.member.bean.MemberBeanI' for binding kina.member.action.MemberAction/memberBean"}, 
     "WFLYCTL0180: Services with missing/unavailable dependencies" => [ 
      "jboss.deployment.unit.\"KinaGroup.war\".batch.environment is missing [jboss.deployment.unit.\"KinaGroup.war\".beanmanager]", 
      "jboss.deployment.unit.\"KinaGroup.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"KinaGroup.war\".beanmanager]" 
     ] 
    } 
    13:13:15,743 ERROR [org.jboss.as.server] (management-handler-thread - 61) WFLYSRV0011: Redeploy of deployment "KinaGroup.war" was rolled back with the following failure message: 
    { 
     "WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"KinaGroup.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"KinaGroup.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"KinaGroup.war\" 
     Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0406: No EJB found with interface of type 'kina.member.bean.MemberBeanI' for binding kina.member.action.MemberAction/memberBean"}, 
     "WFLYCTL0180: Services with missing/unavailable dependencies" => [ 
      "jboss.deployment.unit.\"KinaGroup.war\".batch.environment is missing [jboss.deployment.unit.\"KinaGroup.war\".beanmanager]", 
      "jboss.deployment.unit.\"KinaGroup.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"KinaGroup.war\".beanmanager]" 
     ] 
    } 
    13:13:15,743 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 203) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'KinaGroup.war#primary' 
    13:13:15,758 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0028: Stopped deployment KinaGroup.war (runtime-name: KinaGroup.war) in 15ms 
    13:13:15,760 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 61) WFLYCTL0190: Step handler [email protected] for operation {"operation" => "full-replace-deployment","address" => [],"name" => "KinaGroup.war","runtime-name" => "KinaGroup.war","content" => [{"input-stream-index" => 0}],"operation-headers" => {"caller-type" => "user","access-mechanism" => "NATIVE"},"enabled" => undefined,"persistent" => true,"owner" => undefined} at address [] failed handling operation rollback -- java.util.NoSuchElementException: No child 'name' exists: java.util.NoSuchElementException: No child 'name' exists 
     at org.jboss.dmr.ModelValue.requireChild(ModelValue.java:377) 
     at org.jboss.dmr.ObjectModelValue.requireChild(ObjectModelValue.java:299) 
     at org.jboss.dmr.ModelNode.require(ModelNode.java:870) 
     at org.jboss.as.server.deployment.DeploymentHandlerUtil$4$1.handleResult(DeploymentHandlerUtil.java:259) 
     at org.jboss.as.controller.AbstractOperationContext$Step.invokeResultHandler(AbstractOperationContext.java:1401) 
     at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1381) 
     at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1332) 
     at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1307) 
     at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1180) 
     at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:621) 
     at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354) 
     at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330) 
     at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1183) 
     at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:362) 
     at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:218) 
     at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:201) 
     at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:128) 
     at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:150) 
     at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:146) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at javax.security.auth.Subject.doAs(Subject.java:422) 
     at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:92) 
     at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:146) 
     at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:298) 
     at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:518) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
     at java.lang.Thread.run(Thread.java:745) 
     at org.jboss.threads.JBossThread.run(JBossThread.java:320) 

//My bean look like this 
package kina.member.bean; 

import java.util.List; 

import javax.inject.Inject; 

import kina.member.dao.MemberDaoI; 
import kina.member.model.Member; 

public class MemberBean implements MemberBeanI{ 

    @Inject 
    private MemberDaoI memberDao; 

    public void add(Member member) { 
     // TODO Auto-generated method stub 

    } 

    public List<Member> list() { 
     // TODO Auto-generated method stub 
     return null; 
    } 

} 

が//これは私の豆を実装していますインターフェイスである

package kina.member.bean; 

import java.util.List; 

import kina.member.model.Member; 

public interface MemberBeanI { 

    void add(Member member); 

    List<Member> list(); 

} 

//これは私のDAOある

package kina.member.dao; 

import java.util.List; 

import kina.member.model.Member; 

public class MemberDao implements MemberDaoI{ 

    public Member add(Member member) { 
     // TODO Auto-generated method stub 
     return null; 
    } 

    public Member load(Member member) { 
     // TODO Auto-generated method stub 
     return null; 
    } 

    public List<Member> list(Member filter) { 
     // TODO Auto-generated method stub 
     return null; 
    } 

    public void delete(Long memberId) { 
     // TODO Auto-generated method stub 

    } 

} 

//このように私のDAOインターフェイスの外観

package kina.member.dao; 

import java.util.List; 

import kina.member.model.Member; 

public interface MemberDaoI { 

    Member add(Member member); 

    Member load(Member member); 

    List<Member> list(Member filter); 

    void delete(Long memberId); 

} 

//私のモデルはこのように見える

package kina.member.model; 

import javax.annotation.Generated; 
import javax.persistence.Column; 
import javax.persistence.Entity; 
import javax.persistence.GeneratedValue; 
import javax.persistence.GenerationType; 
import javax.persistence.Id; 
import javax.persistence.Table; 

@Entity 
@Table(name = "memb_members") 
public class Member { 

    @[email protected](strategy = GenerationType.AUTO) 
    private Long id; 

    @Column(name = "name") 
    private String name; 

    @Column(name = "national_id") 
    private Long memberId; 

    public Long getId() { 
     return id; 
    } 
    public void setId(Long id) { 
     this.id = id; 
    } 
    public String getName() { 
     return name; 
    } 
    public void setName(String name) { 
     this.name = name; 
    } 
    public Long getMemberId() { 
     return memberId; 
    } 
    public void setMemberId(Long nationalId) { 
     this.memberId = nationalId; 
    } 



} 

//私はこの

<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="primary" transaction-type="JTA"> 
     <jta-data-source>java:jboss/datasources/KinaGroupDS</jta-data-source> 
     <properties> 

     <!-- Database connection settings --> 
     <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" /> 
     <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" /> 
     <property name="hibernate.archive.autodetection" value="class, hbm" /> 

     <!-- Disable second-level cache. --> 
     <property name="cache.provider_class" value="org.hibernate.cache.NoCacheProvider" /> 
     <property name="cache.use_query_cache" value="false" /> 
     <property name="cache.use_minimal_puts" value="false" /> 

     <!-- Print SQL to stdout. --> 
     <property name="show_sql" value="true" /> 
     <property name="format_sql" value="true" /> 

     <!-- update schema on SessionFactory build --> 
     <property name="hibernate.hbm2ddl.auto" value="update" /> 

     </properties> 
    </persistence-unit> 
</persistence> 

のようなpersistence.xmlのが私のstandalone.xmlは次のようになり持っています。私は私のデータソース定義した

JDBC:H2:MEM:テスト; DB_CLOSE_DELAY = -1; DB_CLOSE_ON_EXIT = FALSE H2 SA SA JDBCます。mysql:// localhostを:3306/trip_ticket ?useSSL = false mysql ルート sam123#@! JDBCます。mysql:// localhostを:?3306/kina_group useSslオプション= falseを mysqlの ルート sam123#1 @! org.h2.jdbcx.JdbcDataSource はcom.mysql.jdbc.Driver

+0

EJBクラス、deployment.xmlなどの詳細を教えてください。 – dasrohith

+0

私のbeanを共有してください。 –

答えて

4

Beanの実装をサーブレットに注入してみてください。前の手順を実行した場合は、Bean実装のパッケージをインポートします。

+1

私の豆、DAO、モデルを共有させてください。私の実装が見えるように。 –

2

wildflyエラーログは、あなたが展開しているアプリケーション内にエラーがあるかもしれないことを示しています。エラーをうまく解決して、アプリケーションをもう一度展開してみてください。確認する展開の前にwildflyを再起動することをお勧めします。

関連する問題