7 Replies Latest reply on Nov 7, 2006 8:54 PM by defenes trator

    Tutorial on JBossIDE EJB3.0 Tools

    jbosszone Newbie

      Post Subject : Tutorial on JBossIDE EJB3.0 Tools

      Ref. 1 : JBoss IDE TrailBlazer : Hike 1 - EJB 3.0 Tools
      http://trailblazer.demo.jboss.com/IDETrail/

      Ref. 2 : JBoss EJB 3.0 TrailBlazer : Hike 1 - Getting Started; 2. Install a JBoss EJB 3.0 Server
      http://trailblazer.demo.jboss.com/EJB3Trail/background/install/index.html

      Ref. 3 : JBoss User's Forum : JBoss Eclipse IDE (users)
      http://www.jboss.org/index.html?module=bb&op=viewforum&f=201

      Ref. 4 : JBoss User's Forum : EJB 3.0
      http://www.jboss.org/index.html?module=bb&op=viewforum&f=221

      === Environment;
      - Windows XP SP2
      - JDK 1.5.0_05
      - JBoss AS 4.0.3SP1
      - JBoss IDE1.5RC1 + Eclipse 3.1.1

      This is a summary of some notes on Ref. 1 (Task 1 - 5 below)
      Followings cover Task 1 - 4 only. (Task 5 will be covered by a next post)

      Task 1: Download and install JDK 1.5
      Task 2: Install JBoss AS 4.0.3SP1 using the installer (Ref. 2)
      Task 3: Download and install JBoss IDE1.5RC1 and Eclipse3.1.1
      Task 4: Configure Eclipse and JBossIDE to control JBoss AS

      Task 5: Carry out a tutorial (Ref. 1)

      Note : For more details on download/installation of JDK, JBoss AS, Eclipse and JBossIDE, see the related sites / docs / references.
      Also, for the trailblazer, a comment by Mr Bill Burke (Oct.24.2005, a thread below) should be referred and considered.
      "EJB3 Tutorial Problem with Servlet"
      http://www.jboss.org/index.html?module=bb&op=viewtopic&t=71379

      Task 1: Download and install JDK 1.5
      - download JDK 1.5 --> jdk-1_5_0_05-windows-i586-p.exe
      http://java.sun.com/j2se/1.5.0/download.jsp

      - install into "C:\jdk1.5.0_05" (for JRE, "Custom Setup" is in "C:\jre1.5.0_05")
      - edit the Windows environment variables to configure JDK.
      = in the User's Env. Var.

      CLASSPATH .;C:\jdk1.5.0_05\lib\tools.jar
      JAVA_HOME C:\jdk1.5.0_05

      = in the System Env. Var.
      Path (add following item)
      ;C:\jdk1.5.0_05\bin

      - test JDK using "java -version" in a command prompt window.
      = The result is;
      java version "1.5.0_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)

      Task 2: Install JBoss AS 4.0.3SP1 using the installer
      *- see Ref. 2 for the step-by-step procedures
      *- Ref. 2 can be reached with following way as well;
      *= go to http://trailblazer.demo.jboss.com/EJB3Trail/ > 1.Getting Started > 2.Install a JBoss EJB 3.0 Server
      *= click the "Watch the installer in action" button under "Use the JBoss AS Installer".

      - go to http://www.jboss.com/products/jbossas/downloads
      - click "Run Installer" of "4.0.3SP1"
      = the installation path is changed to "C:\jboss-4.0.3SP1"
      = select "all" configuration
      = set the Configuration Name to "all"
      = put checks for "Secure jmx-console.war" and "Secure web-console.war"

      - on completion of the installation, add/modify the Windows environment variables to configure JBoss AS
      =In the User's Env. Var.
      CATALINA_HOME C:\jboss-4.0.3SP1
      JBOSS_HOME C:\jboss-4.0.3SP1

      =In the System Env. Var.
      Path (add following item)
      ;C:\jboss-4.0.3SP1\bin

      - test JBoss AS
      = open a command prompt window
      = type "run.bat -c all" to start JBoss AS
      = confirm no error message during startup and following line at the end.
      ... INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231751)] Started in ...

      = "Ctl+c" to stop JBoss AS

      Task 3: Download and install JBossIDE1.5RC1 and Eclipse3.1.1
      - go to http://www.jboss.com/products/jbosside/downloads
      - click "Download" button of "JBoss Eclipse IDE Tools 1.5RC1"
      - unzip it under "C:\" --> "C:\eclipse" as a result
      - start "eclipse.exe" to test

      Task 4: Configure Eclipse and JBossIDE to control JBoss AS
      - Start Eclipse3.1.1
      = go to the main menu bar "Window > Show View > Other... > JBoss-IDE"
      = select "Server Navigator", then click "OK". A new tag named "Server Navigator" is added in the work bench.
      = in "Server Navigator" view, right-click mouse button, click "Configuration..." to open "Debug" view.
      = double-click "JBoss 4.0.x" to enter values for " Create, manage and run configurations" as below;
      *Name --> JBoss4.0.3SP1
      *JBoss 4.0.x Home Directory --> C:\jboss-4.0.3SP1
      *Server Configuration --> all

      = click "Apply", then "Close"

      - start JBoss AS in the Eclipse to test the configuration
      = click "Start" button in the menu icons at top-right of "Server Navigator" view
      (or right-click mouse button inside the "Server Navigator" view to show a pop-up menu, then click "Start")
      = confirm no error message during startup and following line at the end.
      ...INFO [Server] JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231751)] Started in ...

      - keep JBoss AS running...
      - check the database, tables and records in order to confirm the configuration
      = go to http://localhost:8080/jmx-console/

      Note: input "admin" as the user name and the password, if requested, in order to access JMX-Console and Web-Console.
      Ref. "THe JBoss 4 Application Server Guide", Section 2.3.1.1 Securing the JMX Console
      http://www.jboss.org/jbossas/jboss4guide/r2/html/ch2.chapter.html#d0e4085
      The "jmx-console-users.properties" file is in "..\server\all\conf\props"

      = click "database=localDB,service=Hypersonic" under "jboss"
      = click "Invoke" button of "void startDatabaseManager()" under "List of MBean operations"
      = "HSQL Database Manager" start.
      = type "select * from JMS_USERS" in SQL editor window and click "Execute SQL" button in the menu bar.
      = the results are;
      USERID PASSWD CLIENTID
      -----------------------------
      dynsub dynsub [null]
      guest guest [null]
      j2ee j2ee [null]
      :

      = note that there are no records/data in the "ARTICLES" and "AUTHORS" tables at this stage.

      - to stop JBoss AS, click "Shutdown" bottun in the menu icons at top-right of "Server Navigator" view
      (or right-click mouse button inside the "Server Navigator" view to show a pop-up menu, then click "Shutdown")


      jbosszone



        • 1. Re: Tutorial on JBossIDE EJB3.0 Tools
          jbosszone Newbie

          Post Subject : Tutorial on JBossIDE EJB3.0 Tools

          Ref. 1 : JBoss IDE TrailBlazer : Hike 1 - EJB 3.0 Tools
          http://trailblazer.demo.jboss.com/IDETrail/

          === Environment in use;
          - Windows XP SP2
          - JDK 1.5.0_05
          - JBoss AS 4.0.3SP1
          - JBoss IDE1.5RC1 + Eclipse 3.1.1

          Following notes/findings cover only Task 5 below;

          Task 1: Download and install JDK 1.5
          Task 2: Install JBoss AS 4.0.3SP1 using the installer
          Task 3: Download and install JBoss IDE1.5RC1 and Eclipse3.1.1
          Task 4: Configure Eclipse and JBossIDE to control JBoss AS
          Task 5: Carry out a tutorial (Ref. 1)

          - Ref. 1 contains following trails;

          Trail 1: Create an EJB 3.0 Project
          Trail 2: Create EJB 3.0 Entity Beans
          Trail 3: Create EJB 3.0 Session Beans
          Trail 4: Create a Java Servlet
          Trail 5: Package an EJB 3.0 Application
          Trail 6: Deploy and Debug

          Trail 1: Create an EJB 3.0 Project
          - follow the trail in Ref. 1
          = jump over "Create a JBoss configuration" link since it has been configured at Task 4 in the last post of this thread.
          - on completion of the project named "articles", confirm following point before proceeding further steps.
          = in the Eclipse Package Explorer, the JRE System Library path is to be "[jdk 1.5]", not "(C:\)"[jre 1.5.0_05]" (see Task 1. in the last post)
          = if not, change the library location as follow;
          = right-click the project "articles" in the Package Explorer.
          = then, go to "Properties > Java Build Path > Libraries > JRE System Library > Edit... > Installed JREs... > Edit..."
          = in "Edit JRE" box;
          * JRE name --> jdk 1.5
          * JRE home directory --> C:\jdk1.5.0_05\jre
          = click "OK"...

          Trail 2: Create EJB 3.0 Entity Beans
          - create "Article.java" and "Author.java" as per the trail in Ref. 1
          - type "@E" then "Ctrl+space" for the code assist, a pop-up menu shows a list of annotations.
          - select "@Entity"

          = note1: If no "@Entity",
          * right-click the project "articles" in the Eclipse Package Explorer (left top).
          * then go to "Properties > Java Build Path > Libraries (tag) > Add External JARs..."
          * add "ejb3-persistence.jar" under "..\server\all\deploy\ejb3.deployer".

          = note2: Creation of the class "Author" (in Article.java)
          * place the mouse cursor on "Author", then "Ctrl+1" (or right-click "light-bulb") to show "Quick Fix"

          = note3: "Organize Imports" for "Collection" (in Author.java)
          * place the mouse cursor on "Collection"
          * then "Ctrl+Shift+O" to show "Organize Imports"
          * (or right-click "light-bulb", then Quick Fix)

          Trail 3: Create EJB 3.0 Session Beans
          - create "Authors.java" and "AuthorsBean.java" as per the trail in Ref. 1
          - in "AuthorsBean.java", use "@PersistenceContext" instead of "@Inject".
          Ref.: "A problem with @Injected EntityManager"
          http://www.jboss.org/index.html?module=bb&op=viewtopic&t=66949

          Trail 4: Create a Java Servlet
          - add "J2EE 1.4Libraries (JBoss-IDE)" and
          - create "AuthorServlet.java" as per the trail in Ref. 1

          = note1: On completion of the servlet, descriptions in "Problems" tag in the Eclipse workbench might show;

          Problem : "The serializable class AuthorServlet does not declare a static final serialVersionUID field of type long"
          AuthorServlet.java articles/src/org/jboss/ejb3demo/web line xx

          * if the problem occur,
          * place mouse cursor on "AuthorServlet", then "Ctl+1".
          * select and double-click "Add default serial version ID"
          * a set of codes below is added at the top and the problem will be gone.
          /**
           *
           */
          private static final long serialVersionUID = 1L;

          = note2: Apply same process as Note1 to following classes, if necessary;
          * class "Article" in "Article.java"
          * class "Author" in "Author.java"

          Trail 5: Package an EJB 3.0 Application
          - as per the steps in Ref. 1

          Trail 6: Deploy and Debug
          - start "Debug" session to start JBoss AS and deploy .ejb3 and .war files as per the steps in Ref. 1
          - go to URL "http://localhost:8080/authors/authors" and see the results.
          = they might be as follows (error);
          HTTP Status 500 -
          -----------------------------------------------------------------------------------------
          type Exception report
          
          message
          description The server encountered an internal error () that prevented it from fulfilling
          this request.
          
          exception
          java.lang.reflect.UndeclaredThrowableException
           $Proxy83.addAuthor(Unknown Source)
           org.jboss.ejb3demo.web.AuthorServlet.createArticles(AuthorServlet.java:57)
           org.jboss.ejb3demo.web.AuthorServlet.doPost(AuthorServlet.java:50)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
          
          note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
          ------------------------------------------------------------------------------------------
          Apache Tomcat/5.5

          - if so, modify "Articles.java" and "Author.java" (not "Authors.java")

          Ref.: "JBoss EJB3.0 tutorial problems and solutions"
          http://www.jboss.org/index.html?module=bb&op=viewtopic&t=69256
          In "Articles.java";
          add : import java.io.Serializable;
          change : public class Article {... --> public class Article implements Serializable {...
          
          In "Author.java";
          add : import java.io.Serializable;
          change : public class Author {... --> public class Author implements Serializable {...

          - then, re-packaging and re-deploy them.

          = note1: re-deploy both of .ejb3 and .war files even if revision is one side only, otherwise the results might not come properly.
          = note2: a few repetition might be necessary to get the results. Repeat un-deploy/re-packaging/re-deploy if no success.

          = In "server.log" file, following part seems to be a set of characteristic messages of ejb3/hibernate in case of normal process.
          :
          2005-11-06 15:31:46,440 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] GETTING NEW ...
          2005-11-06 15:31:46,440 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] logLived...
          2005-11-06 15:31:46,440 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] LONG LIVED ...
          2005-11-06 15:31:46,440 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: ...
          2005-11-06 15:31:46,440 DEBUG [org.hibernate.impl.SessionImpl] find: from Author
          2005-11-06 15:31:46,440 DEBUG [org.hibernate.engine.QueryParameters] named parameters: {}
          2005-11-06 15:31:46,440 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] parse() - HQL: from ...
          2005-11-06 15:31:46,450 DEBUG [org.hibernate.hql.ast.AST] --- HQL AST ---
           \-[QUERY] 'query'
           \-[SELECT_FROM] 'SELECT_FROM'
           \-[FROM] 'from'
           \-[RANGE] 'RANGE'
           \-[DOT] '.'
           +-[DOT] '.'
           | +-[DOT] '.'
           | | +-[IDENT] 'org'
           | | \-[IDENT] 'jboss'
           | \-[IDENT] 'ejb3demo'
           \-[IDENT] 'Author'
          
          2005-11-06 15:31:46,450 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : ...
          2005-11-06 15:31:46,460 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select << begin ...
          2005-11-06 15:31:46,460 DEBUG [org.hibernate.hql.ast.tree.FromElement] FromClause{level=1} ...
          2005-11-06 15:31:46,460 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select : finishing ...
          2005-11-06 15:31:46,460 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] processQuery() : ( SELECT ...
          2005-11-06 15:31:46,460 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] Derived SELECT clause created.
          2005-11-06 15:31:46,460 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] Using FROM fragment ...
          2005-11-06 15:31:46,460 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select >> end ...
          2005-11-06 15:31:46,470 DEBUG [org.hibernate.hql.ast.AST] --- SQL AST ---
           \-[SELECT] QueryNode: 'SELECT' querySpaces (AUTHORS)
           +-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
           | +-[SELECT_EXPR] SelectExpressionImpl: 'author0_.authorId as authorId9_' {FromElement{...
           | \-[SQL_TOKEN] SqlFragment: 'author0_.name as name9_'
           \-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, ...
           \-[FROM_FRAGMENT] FromElement: 'AUTHORS author0_' FromElement{explicit,not a collection ...
          
          2005-11-06 15:31:46,470 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : ...
          2005-11-06 15:31:46,470 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] HQL: from org.jboss...
          2005-11-06 15:31:46,470 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select author0_...
          2005-11-06 15:31:46,470 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : ...
           :

          = in "HSQL Database Manager", type "select * from ARTICLES" to confirm the records.
          ARTICLEID TITLE BODY AUTHORID
          --------------------------------------------------------------------
           1 marshall's 1st article this is an article 1
           2 marshall's 2nd article this is also article 2
           3 max's 1st article this is an article 3
           4 max's 2nd article this is also article 4

          = for "AUTHORS";
          AUTHORID NAME
          -------------------
           1 Marshall
           2 Marshall
           3 Max
           4 Max


          === Ref. On completion of the trails, the files are as follow;
          Article.java
          package org.jboss.ejb3demo;
          
          import java.io.Serializable;
          
          import javax.persistence.Column;
          import javax.persistence.Entity;
          import javax.persistence.GeneratorType;
          import javax.persistence.Id;
          import javax.persistence.JoinColumn;
          import javax.persistence.ManyToOne;
          import javax.persistence.Table;
          
          @Entity
          @Table(name = "ARTICLES")
          public class Article implements Serializable {
          
           /**
           *
           */
           private static final long serialVersionUID = 1L;
          
           private int articleId;
           private String title;
           private String body;
           private Author author;
          
           @Id (generate = GeneratorType.AUTO)
           @Column (name = "articleId")
           public int getArticleId() {
           return articleId;
           }
           public void setArticleId(int articleId) {
           this.articleId = articleId;
           }
          
           @ManyToOne
           @JoinColumn (name = "authorId")
           public Author getAuthor() {
           return author;
           }
           public void setAuthor(Author author) {
           this.author = author;
           }
           public String getBody() {
           return body;
           }
           public void setBody(String body) {
           this.body = body;
           }
           public String getTitle() {
           return title;
           }
           public void setTitle(String title) {
           this.title = title;
           }
          }

          Authors.java
          package org.jboss.ejb3demo;
          
          import java.util.List;
          import javax.ejb.Remote;
          
          @Remote
          public interface Authors {
           public List<Author> getAllAuthors();
           public Author addAuthor (String name);
           public void addArticle (Author author, String title, String body);
          }

          AuthorsBean.java
          package org.jboss.ejb3demo;
          
          import javax.ejb.Stateless;
          
          import java.util.ArrayList;
          import java.util.List;
          
          import javax.persistence.EntityManager;
          import javax.persistence.PersistenceContext;
          import javax.persistence.Query;
          
          
          public @Stateless class AuthorsBean implements Authors {
          
           @PersistenceContext
           private EntityManager manager;
          
           public void addArticle(Author author, String title, String body) {
           manager.persist(author);
           author.addArticle(title, body);
           }
          
           public Author addAuthor(String name) {
           Author author = new Author();
           author.setName(name);
           return author;
           }
          
           public List<Author> getAllAuthors() {
           ArrayList<Author> authors = new ArrayList<Author>();
           Query q = manager.createQuery("from Author");
          
           for (Object o : q.getResultList())
           {
           authors.add((Author) o);
           }
           return authors;
           }
          }

          Author.java
          package org.jboss.ejb3demo;
          
          import java.io.Serializable;
          import java.util.ArrayList;
          import java.util.Collection;
          
          import javax.persistence.CascadeType;
          import javax.persistence.Column;
          import javax.persistence.Entity;
          import javax.persistence.FetchType;
          import javax.persistence.GeneratorType;
          import javax.persistence.Id;
          import javax.persistence.JoinColumn;
          import javax.persistence.OneToMany;
          import javax.persistence.Table;
          
          @Entity
          @Table(name = "AUTHORS")
          public class Author implements Serializable {
          
           /**
           *
           */
           private static final long serialVersionUID = 1L;
          
           private int authorId;
           private String name;
           private Collection<Article> articles;
          
           @OneToMany (cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "author")
           @JoinColumn (name = "authorId")
           public Collection<Article> getArticles() {
           return articles;
           }
          
           public void setArticles(Collection<Article> articles) {
           this.articles = articles;
           }
          
           @Id(generate = GeneratorType.AUTO)
           @Column (name = "authorId")
           public int getAuthorId() {
           return authorId;
           }
          
           public void setAuthorId(int authorId) {
           this.authorId = authorId;
           }
          
           public String getName() {
           return name;
           }
          
           public void setName(String name) {
           this.name = name;
           }
          
           public void addArticle(String title, String body) {
           if (articles == null)
           articles = new ArrayList<Article>();
           Article article = new Article();
           article.setAuthor(this);
           article.setBody(body);
           article.setTitle(title);
           articles.add(article);
           }
          }

          AuthorServlet.java
          package org.jboss.ejb3demo.web;
          
          import java.io.IOException;
          import java.io.PrintWriter;
          
          import javax.naming.Context;
          import javax.naming.InitialContext;
          import javax.naming.NamingException;
          import javax.servlet.ServletException;
          import javax.servlet.http.HttpServlet;
          import javax.servlet.http.HttpServletRequest;
          import javax.servlet.http.HttpServletResponse;
          
          import org.jboss.ejb3demo.Article;
          import org.jboss.ejb3demo.Author;
          import org.jboss.ejb3demo.Authors;
          
          public class AuthorServlet extends HttpServlet {
          
           /**
           *
           */
           private static final long serialVersionUID = 1L;
           private Authors authorsBean;
          
           public void init() throws ServletException {
           try {
           Context context = new InitialContext();
           authorsBean =(Authors) context.lookup(Authors.class.getName());
           } catch (NamingException e) {
           e.printStackTrace();
           }
           }
          
           protected void doGet(HttpServletRequest req, HttpServletResponse resp)
           throws ServletException, IOException {
           doPost(req, resp);
           }
          
           protected void doPost(HttpServletRequest req, HttpServletResponse resp)
           throws ServletException, IOException {
           String mode = req.getParameter("mode");
          
           if (mode == null)
           mode = "show";
           if (mode.equals("show"))
           {
           showArticles(req, resp);
           }
           else if (mode.equals("create"))
           {
           createArticles(req, resp);
           }
           }
          
           private void createArticles(HttpServletRequest req, HttpServletResponse resp)
           throws ServletException, IOException
           {
           Author marshall = authorsBean.addAuthor("Marshall");
           Author max = authorsBean.addAuthor("Max");
          
           authorsBean.addArticle(marshall, "marshall's 1st article", "this is an article");
           authorsBean.addArticle(marshall, "marshall's 2nd article", "this is also an article");
           authorsBean.addArticle(max, "max's 1st article", "this is an article");
           authorsBean.addArticle(max, "max's 2nd article", "this is also an article");
          
           showArticles(req, resp);
           }
          
           private void showArticles(HttpServletRequest req, HttpServletResponse resp)
           throws ServletException, IOException
           {
           PrintWriter out = resp.getWriter();
          
           for (Author author : authorsBean.getAllAuthors())
           {
           for (Article article : author.getArticles())
           {
           out.println("<b>" + article.getTitle() + "</b>" + " by <i>" + author.getName() + "</i><br/>");
           out.println("    " + article.getBody() + "<br/><br/>");
           }
           }
           out.println("<form method=\"POST\" action=\"authors\">");
           out.println("<input type=\"hidden\" name=\"mode\" value=\"create\">");
           out.println("<input type=\"submit\" value=\"Create articles\">");
           out.println("</form>");
           }
          }

          web.xml
          <?xml version="1.0" encoding="UTF-8"?>
          <web-app version="2.4"
           xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
           <servlet>
           <servlet-name>AuthorServlet</servlet-name>
           <servlet-class>org.jboss.ejb3demo.web.AuthorServlet</servlet-class>
           </servlet>
           <servlet-mapping>
           <servlet-name>AuthorServlet</servlet-name>
           <url-pattern>/authors</url-pattern>
           </servlet-mapping>
          </web-app>

          packaging-build.xml
          <?xml version="1.0" encoding="UTF-8"?>
          <project name="Packaging Generator" default="_packaging_generation_">
          <target name="_packaging_generation_" depends="N65540,N65557"/>
          <target name="N65540" description="authors-beans.ejb3">
          <jar destfile="authors-beans.ejb3">
          <zipfileset dir="bin" excludes="**/*Servlet.java"/>
          </jar>
          </target>
          <target name="N65557" description="authors.war">
          <jar destfile="authors.war">
          <zipfileset dir="src" prefix="WEB-INF">
          <include name="web.xml"/>
          </zipfileset>
          <zipfileset dir="bin" prefix="WEB-INF/classes" includes="**/*Servlet.java"/>
          </jar>
          </target>
          </project>


          jbosszone


          • 2. Re: Tutorial on JBossIDE EJB3.0 Tools
            Johannes Steinhäuser Newbie

            Hi folks,

            just adding ";C:\jdk1.5.0_05\bin" at the end of Path does not work because Path consists of "%SystemRoot%\system32" which contains a "java.exe".

            So I inserted "C:\jdk1.5.0_05\bin;" in front of Path and it works fine.

            Best regards,
            Johannes

            • 3. Re: Tutorial on JBossIDE EJB3.0 Tools
              Daniel Crenna Newbie

              I seem to be experiencing a more subtle error. I have set up my server configuration and can boot it in Eclipse and at the command prompt without errors. I made all of the suggested fixes to the source code and repackaged it before deploying. My only trouble now is that I cannot "see" the deployment. The server gives back messages that it has deployed both files, however when I link to http://localhost:8080/authors/authors I am getting a 404 error. I have checked the HSQL DB Manager and the schema is there but the data is absent, which makes sense since I haven't hit the application yet.

              Any suggestions?

              • 4. Re: Tutorial on JBossIDE EJB3.0 Tools
                jbosszone Newbie

                Post Subject : Tutorial on JBossIDE EJB3.0 Tools

                Dear UglyDuckling

                Ref. 1 : JBoss IDE TrailBlazer : Hike 1 - EJB 3.0 Tools
                http://trailblazer.demo.jboss.com/IDETrail/

                === Environment in use;
                - Windows XP SP2
                - JDK 1.5.0_05
                - JBoss AS 4.0.3SP1
                - JBoss IDE1.5RC1 + Eclipse 3.1.1


                In the case of incomplete deployment, it seems either 404 or 500 error occurs.
                e.g.;

                If deployed;
                1. no files ===> HTTP Status 404 - /authors/authors
                2. 'authors.war' only ===> HTTP Status 500 -
                3. 'authors-beans.ejb3' only ===> HTTP Status 404 - /authors/authors

                In order to complete deployment, it might be necessary to repeat a cycle of undeploy/packaging/deploy/check_results.
                (see Note1 and 2 on the Trail 6 in my last post.)

                --- Ref. Messages in the Console at each step ---

                Trail 5: Package an EJB 3.0 Application
                - on completion of packaging (see "packaging-build.xml" in my last post), the message is;
                Buildfile: E:\workspace\articles\packaging-build.xml
                N65540:
                N65557:
                _packaging_generation_:
                BUILD SUCCESSFUL
                Total time: 5 seconds


                Trail 6: Deploy and Debug
                - keep JBoss AS running.
                - with Windows Explorer, check if there are 'authors.war' and 'authors-beans.ejb3' under '../jboss-4.0.3SP1/server/all/deploy'.
                - if exist, Undeploy both of them.
                = in the Package Explorer, right-click 'authors.war' -> Deployment -> Undeploy
                = The message in the console is;
                23:38:03,855 INFO [TomcatDeployer] undeploy, ctxPath=/authors, warUrl=.../tmp/deploy/tmp28493authors-exp.war/

                = and then, right-click 'authors-beans.ejb3' -> Deployment -> Undeploy
                23:38:14,250 INFO [Ejb3Deployment] Create EntityManager with JNDI name: authors-beans
                23:38:14,260 INFO [SessionFactoryImpl] closing
                23:38:14,260 INFO [SchemaExport] Running hbm2ddl schema export
                23:38:14,270 INFO [SchemaExport] exporting generated schema to database
                23:38:14,270 INFO [SchemaExport] schema export complete

                = confirm undeployment of the two files using Windows Explorer.

                - Deploy them again.
                1. 'authors.war'
                = in the Package Explorer, right-click 'authors.war' -> Deployment -> Deploy To... -> Target Choice Box
                = click and highlight 'JBoss4.0.3SPI [file:/E:/jboss-4.0.3SP1/server/all/deploy/]' in blue, then click 'OK'.
                23:38:29,662 INFO [TomcatDeployer] deploy, ctxPath=/authors, warUrl=.../tmp/deploy/tmp28496authors-exp.war/

                2. 'authors-beans.ejb3'
                = in the Package Explorer, right-click 'authors-beans.ejb3' -> Deployment -> Deploy To... -> Target Choice Box
                = click and highlight 'JBoss4.0.3SPI [file:/E:/jboss-4.0.3SP1/server/all/deploy/]' in blue, then click 'OK'.
                23:38:50,752 INFO [JaccHelper] Initialising JACC Context for deployment: authors-beans.ejb3
                23:38:51,003 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=org.jboss.ejb3demo.AuthorsBean, class=org.jboss.ejb3demo.AuthorsBean, type=STATELESS
                23:38:51,383 INFO [JaccHelper] org.jboss.ejb3demo.AuthorsBean has no @SecurityDomain - skipping JACC configuration
                23:38:51,463 INFO [Ejb3Deployment] default entity manager name: authors-beans
                23:38:51,473 INFO [Ejb3Configuration] found EJB3 Entity bean: org.jboss.ejb3demo.Article
                23:38:51,483 INFO [Ejb3Configuration] found EJB3 Entity bean: org.jboss.ejb3demo.Author
                23:38:51,594 INFO [Configuration] processing extends queue
                 :
                 : (Total 74 lines of message)
                 :
                23:38:52,305 INFO [Ejb3Deployment] Create EntityManager with JNDI name: authors-beans
                23:38:52,305 INFO [JaccHelper] JACC Policy Configuration for deployment has been put in service
                23:38:52,305 INFO [Ejb3Deployment] EJB3 deployment time took: 1553
                23:38:52,695 INFO [ProxyDeployer] no declared remote bindings for : org.jboss.ejb3demo.AuthorsBean
                23:38:52,705 INFO [ProxyDeployer] there is remote interfaces for org.jboss.ejb3demo.AuthorsBean
                23:38:52,705 INFO [ProxyDeployer] default remote binding has jndiName of org.jboss.ejb3demo.Authors
                23:38:52,946 INFO [EJB3Deployer] Deployed: file:/E:/jboss-4.0.3SP1/server/all/deploy/authors-beans.ejb3

                = using Windows Explorer, confirm the two files deployed under '../jboss-4.0.3SP1/server/all/deploy'.

                - go to URL "http://localhost:8080/authors/authors" and check the results.


                jbosszone



                • 5. Re: Tutorial on JBossIDE EJB3.0 Tools
                  Daniel Crenna Newbie

                  Thank you for the quick follow-up.

                  Unfortunately, using your methods I was able to repeat each message you listed for confirmation, but I still cannot see the application.

                  I made the recommended changes to the TrailBlazer IDE code as referenced in your reply and previous posting, and repackaged after confirming with Window Explorer on my running JBoss instance that the files were undeployed, and got this back:

                  Buildfile: C:\workspace\articles\packaging-build.xml
                  N65540:
                   [jar] Building jar: C:\workspace\articles\authors-beans.ejb3
                  N65557:
                   [jar] Building jar: C:\workspace\articles\authors-web.war
                  _packaging_generation_:
                  BUILD SUCCESSFUL
                  Total time: 1 second
                  



                  After successful deployment, I redeployed each file individually, first authors-web.war ...

                  20:23:14,005 INFO [TomcatDeployer] deploy, ctxPath=/authors-web, warUrl=.../tmp/deploy/tmp10024authors-web-exp.war/


                  and then ...

                  20:23:35,056 INFO [JaccHelper] Initialising JACC Context for deployment: authors-beans.ejb3
                  20:23:35,116 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=org.jboss.ejb3demo.AuthorsBean, class=org.jboss.ejb3demo.AuthorsBean, type=STATELESS
                  20:23:35,276 INFO [JaccHelper] org.jboss.ejb3demo.AuthorsBean has no @SecurityDomain - skipping JACC configuration
                  20:23:35,296 INFO [Ejb3Deployment] default entity manager name: authors-beans
                  20:23:35,306 INFO [Ejb3Configuration] found EJB3 Entity bean: org.jboss.ejb3demo.Article
                  20:23:35,306 INFO [Ejb3Configuration] found EJB3 Entity bean: org.jboss.ejb3demo.Author
                  20:23:35,346 INFO [Configuration] processing extends queue
                  20:23:35,346 INFO [Configuration] processing collection mappings
                  20:23:35,346 INFO [CollectionBinder] Mapping collection: org.jboss.ejb3demo.Author.articles -> ARTICLES
                  20:23:35,346 INFO [Configuration] processing association property references
                  20:23:35,346 INFO [Configuration] processing foreign key constraints
                  20:23:35,396 INFO [Configuration] processing extends queue
                  20:23:35,396 INFO [Configuration] processing collection mappings
                  20:23:35,396 INFO [Configuration] processing association property references
                  20:23:35,396 INFO [Configuration] processing foreign key constraints
                  20:23:35,396 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.InjectedDataSourceConnectionProvider
                  20:23:35,406 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
                  20:23:35,406 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.8.0
                  20:23:35,406 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.8.0
                  20:23:35,416 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
                  20:23:35,416 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
                  20:23:35,416 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
                  20:23:35,416 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
                  20:23:35,416 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
                  20:23:35,416 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
                  20:23:35,416 INFO [SettingsFactory] JDBC batch size: 15
                  20:23:35,416 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
                  20:23:35,416 INFO [SettingsFactory] Scrollable result sets: enabled
                  20:23:35,416 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
                  20:23:35,416 INFO [SettingsFactory] Connection release mode: after_statement
                  20:23:35,416 INFO [SettingsFactory] Default batch fetch size: 1
                  20:23:35,416 INFO [SettingsFactory] Generate SQL with comments: disabled
                  20:23:35,416 INFO [SettingsFactory] Order SQL updates by primary key: disabled
                  20:23:35,416 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
                  20:23:35,416 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
                  20:23:35,416 INFO [SettingsFactory] Query language substitutions: {}
                  20:23:35,416 INFO [SettingsFactory] Second-level cache: enabled
                  20:23:35,416 INFO [SettingsFactory] Query cache: disabled
                  20:23:35,416 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
                  20:23:35,416 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
                  20:23:35,416 INFO [SettingsFactory] Structured second-level cache entries: disabled
                  20:23:35,416 INFO [SettingsFactory] Statistics: disabled
                  20:23:35,416 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: enabled
                  20:23:35,426 INFO [SettingsFactory] Default entity-mode: POJO
                  20:23:35,446 INFO [SessionFactoryImpl] building session factory
                  20:23:35,687 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
                  20:23:35,687 INFO [Configuration] processing extends queue
                  20:23:35,687 INFO [Configuration] processing collection mappings
                  20:23:35,687 INFO [Configuration] processing association property references
                  20:23:35,687 INFO [Configuration] processing foreign key constraints
                  20:23:35,687 INFO [Configuration] processing extends queue
                  20:23:35,687 INFO [Configuration] processing collection mappings
                  20:23:35,687 INFO [Configuration] processing association property references
                  20:23:35,687 INFO [Configuration] processing foreign key constraints
                  20:23:35,687 INFO [SchemaExport] Running hbm2ddl schema export
                  20:23:35,687 INFO [SchemaExport] exporting generated schema to database
                  20:23:35,697 INFO [SchemaExport] schema export complete
                  20:23:35,697 INFO [Configuration] processing extends queue
                  20:23:35,697 INFO [Configuration] processing collection mappings
                  20:23:35,697 INFO [Configuration] processing association property references
                  20:23:35,697 INFO [Configuration] processing foreign key constraints
                  20:23:35,707 INFO [Configuration] processing extends queue
                  20:23:35,707 INFO [Configuration] processing collection mappings
                  20:23:35,707 INFO [Configuration] processing association property references
                  20:23:35,707 INFO [Configuration] processing foreign key constraints
                  20:23:35,707 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
                  20:23:35,707 INFO [SessionFactoryImpl] Checking 0 named queries
                  20:23:35,707 INFO [Ejb3Deployment] Create EntityManager with JNDI name: authors-beans
                  20:23:35,707 INFO [JaccHelper] JACC Policy Configuration for deployment has been put in service
                  20:23:35,707 INFO [Ejb3Deployment] EJB3 deployment time took: 651
                  20:23:36,307 INFO [ProxyDeployer] no declared remote bindings for : org.jboss.ejb3demo.AuthorsBean
                  20:23:36,317 INFO [ProxyDeployer] there is remote interfaces for org.jboss.ejb3demo.AuthorsBean
                  20:23:36,338 INFO [ProxyDeployer] default remote binding has jndiName of org.jboss.ejb3demo.Authors
                  20:23:36,438 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.3SP1/server/all/deploy/authors-beans.ejb3
                  




                  Now, I have found an error in my JBoss server startup which I haven't been able to correct. I set my environment variables as suggested using a clean copy Windows XP SP2, using the exact path names, installation suggestions, etc... the machine I'm using is not connected to the Internet in any way. I am still able to log into the jmx-console but I did spot this error on JBoss startup...

                  [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50, bindAddress=/0.0.0.0
                  19:54:31,680 WARN [HANamingService] Failed to start AutomaticDiscovery
                  java.net.SocketException: error setting options
                   at java.net.PlainDatagramSocketImpl.join(Native Method)
                   at java.net.PlainDatagramSocketImpl.join(Unknown Source)
                   at java.net.MulticastSocket.joinGroup(Unknown Source)
                   at org.jboss.ha.jndi.DetachedHANamingService$AutomaticDiscovery.start(DetachedHANamingService.java:495)
                   at org.jboss.ha.jndi.DetachedHANamingService.startService(DetachedHANamingService.java:332)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
                   at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
                   at $Proxy0.start(Unknown Source) .......



                  Thanks for your patience with me, I am attempting to use the instructions explicitly to get a single example deployed so I can do away with my EJB2.1 code :)



                  • 6. Re: Tutorial on JBossIDE EJB3.0 Tools
                    Daniel Crenna Newbie

                    I followed the instruction so precisely I blinded myself to the fact that in this packaging configuration, the correct path to the application is http://localhost:8080/authors-web/authors, since it's based on the name of the .war file ... I've been building successfully, I've just been pointing to the wrong spot. I hope this helps other people while I wait for my face to drain.

                    • 7. Re: Tutorial on JBossIDE EJB3.0 Tools
                      defenes trator Newbie

                      I followed the steps up to the deployment portion. Since JbossIDE 2.0.0.Beta2 doesn't seem to support deploying the ejb3 project to the server, I manually copy the authors-beans.ejb3 and authors.war directly into the deploy directory. But I get the following error on my 4.0.5.GA server below. Btw, I did change @Id (generate = GeneratorType.AUTO) to @Id @GeneratedValue(strategy=GenerationType.AUTO) for Article.java and Author.java to fix the compilation errors, but I don't think that's the problem here.

                      17:32:49,924 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:jar=authors-beans.ejb3,name=AuthorsBean,service=EJB3
                      17:32:49,924 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:jar=authors-beans.ejb3,name=AuthorsBean,service=EJB3
                      17:32:49,939 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB3,module=authors-beans.ejb3
                      java.lang.RuntimeException: Illegal @PersistenceUnit on private javax.persistence.EntityManager org.jboss.ejb3demo.AuthorsBean.manager :There is no default persistence unit in this deployment.
                      at org.jboss.injection.PersistenceContextHandler.handleFieldAnnotations(PersistenceContextHandler.java:182)
                      at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:136)
                      at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.java:173)
                      at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:270)
                      at org.jboss.ejb3.SessionContainer.processMetadata(SessionContainer.java:116)
                      at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:273)
                      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:322)
                      at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
                      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                      at $Proxy0.start(Unknown Source)
                      at org.jboss.system.ServiceController.start(ServiceController.java:417)
                      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                      at $Proxy37.start(Unknown Source)
                      at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                      at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                      at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
                      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                      at $Proxy38.start(Unknown Source)
                      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                      at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                      at $Proxy6.deploy(Unknown Source)
                      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)