samedi 14 mars 2015

why web service data not display using eclipse with maven?

Server log



19:27:45,333 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
19:27:45,586 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
19:27:45,648 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
19:27:46,666 INFO [org.xnio] XNIO Version 3.0.3.GA
19:27:46,667 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
19:27:46,677 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
19:27:46,686 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
19:27:46,706 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
19:27:46,709 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
19:27:46,733 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
19:27:46,745 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
19:27:46,756 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
19:27:46,759 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
19:27:46,762 INFO [org.jboss.as.security] (MSC service thread 1-8) JBAS013100: Current PicketBox version=4.0.7.Final
19:27:46,811 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
19:27:46,825 INFO [org.jboss.as.connector] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
19:27:46,962 INFO [org.jboss.as.naming] (MSC service thread 1-7) JBAS011802: Starting Naming Service
19:27:46,977 INFO [org.jboss.as.mail.extension] (MSC service thread 1-5) JBAS015400: Bound mail session [java:jboss/mail/Default]
19:27:47,000 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
19:27:47,004 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA
19:27:47,330 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-8) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
19:27:47,885 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
19:27:48,018 INFO [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on localhost/127.0.0.1:4447
19:27:48,018 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:9999
19:27:48,029 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /Users/naveenkumar/Documents/java_work/jboss-as-7.1.1.Final/standalone/deployments
19:27:48,037 WARN [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015002: Deployment of 'naveentest' requested, but the deployment is not present
19:27:48,038 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015010: The deployment scanner found a directory named WEB-INF that was not inside a directory whose name ends with .ear, .jar, .rar, .sar or .war. This is likely the result of unzipping an archive directly inside the /Users/naveenkumar/Documents/java_work/jboss-as-7.1.1.Final/standalone/deployments directory, which is a user error. The WEB-INF directory will not be scanned for deployments, but it is possible that the scanner mayfind other files from the unzipped archive and attempt to deploy them, leading to errors.
19:27:48,115 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
19:27:48,116 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 3127ms - Started 133 of 208 services (74 services are passive or on-demand)
19:27:48,130 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "pom.xml"
19:27:48,131 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "mani"
19:27:48,455 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "mani"
19:27:48,456 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "pom.xml"


Hello I am trying to make web service using spring mvc in eclipse editor .So i will tell you my steps



  • Installing maven plugin in eclipse eclipse.org/m2e


  • new project ->maven project ->maven-achetype-webapp when i run server and check my out put on browser http://localhost:8080/mani it show resource not found why ? i am using jboss server is there is problem in my server ? controller.js


    package tutorialspoint;



    import java.util.HashMap;
    import java.util.Map;

    import org.springframework.stereotype.Controller;
    import org.springframework.ui.ModelMap;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RequestMethod;
    import org.springframework.web.bind.annotation.ResponseBody;

    @Controller
    public class HelloController{

    @RequestMapping(value="/")
    public String home(){
    return "hello";
    }

    @RequestMapping(value="/hello", method = RequestMethod.GET,headers="Accept=application/json")
    public @ResponseBody Map printHello(ModelMap model) {
    Map<String,String> json = new HashMap<String,String>();
    json.put("name", "abcd");
    return json;
    }

    }



here is my code http://ift.tt/1LaWb5f


Aucun commentaire:

Enregistrer un commentaire