`
endual
  • 浏览: 3558217 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

juddiv3 部署到自己的tomcat中

 
阅读更多

How to install jUDDI on Tomcat by yourself

 
1 Vote

 

 

Hi!

This week I had to install Apache jUDDI for the purpose of the “Knowledge Organization and WEB 3.0” class which is one of my Master’s degree disciplines at PPGI-UFRJ.

When I went to jUDDI‘s web site I discovered that jUDDI have a embeded Apache Tomcat within it. No problem if I hadn’t already installed Tomcat.

Since I wouldn’t like to have 2 running Tomcat installations I decided to install and deploy jUDDI in my existing Tomcat installation. After a few searches in Google I could not find someone who have already done it. That’s why I decided to write this (not so comprehensive) instructions.

Well, since I have already had a running Tomcat installation you will have to install it. It’s very easy. You can find a lot of HOW TOs around. Therefore, I consider the following prerequisites for my step-by-step installation instructions of jUDDI.

Prerequisites:

Having properly installed and configured Java and Tomcat we can now start with the other jUDDI‘s prerequisites.

Step 1 – Install MySQL and create a database for jUDDI
  1. Download and install MySQL Community Server 5.5.14. Choose the MSI installer version;
  2. Now let’s create a user and a database for jUDDI…
  3. Execute the MySQL Command Line Client (It’s in Windows’ Program menu);
  4. Execute these 3 commands: “CREATE USER ‘juddi’@'localhost’ IDENTIFIED BY ‘juddi’;“, “CREATE DATABASE juddi;” and “GRANT ALL PRIVILEGES ON juddi.* TO ‘juddi’@'localhost’;“;
Step 2 – Deploy Apache jUDDI
  1. Download jUDDI portal bundle 3.0.4 and unzip it. Although this zip have an embeded Tomcat installation we won’t use it. We’ll need jus some webapps inside it.
  2. Copy the juddiv3, pluto and juddi-portlets folders (they are located inside the webapps folder in the zip file) to Tomcat‘s webapps folder. Again, just as a reference my webapps folder is in C:\Program Files\apache-tomcat-6.0.29\webapps;
  3. Also copy the following libraries from your zip’s juddi-portal-bundle-3.0.4\lib folder to your existing C:\Program Files\apache-tomcat-6.0.29\webapps folder:
    • castor-1.1.1.jar
    • commons-discovery-0.2.jar
    • commons-logging-1.1.jar
    • pluto-container-1.1.7.jar
    • pluto-descriptor-api-1.1.7.jar
    • pluto-descriptor-impl-1.1.7.jar
    • pluto-taglib-1.1.7.jar
    • portlet-api-1.0.jar
    • log4j-1.2.13.jar
Step 3 – Configure MySQL JNDI Resources in Tomcat
  1. Download MySQL Connector/J 5.1.17 (the official JDBC driver for MySQL) and unzip it. Find the mysql-connector-java-5.1.17-bin.jar file and copy it to the lib folder of your existing Tomcat installation. My Tomcat‘s lib is in C:\Program Files\apache-tomcat-6.0.29\lib;
  2. Open the file C:\Program Files\apache-tomcat-6.0.29\webapps\juddiv3\META-INF\context.xml with any text editor and edit it in order to look like this…
    1.  
      • <?xml version=”1.0″ encoding=”UTF-8″?>
      • <Context>
      • <WatchedResource>WEB-INF/web.xml</WatchedResource>
      • <Resource
      • name=”jdbc/juddiDB
      • auth=”Container” 
      • type=”javax.sql.DataSource” 
      • username=”juddi” 
      • password=”juddi” 
      • driverClassName=”com.mysql.jdbc.Driver” 
      • url=”jdbc:mysql://localhost:3306/juddi”
      • />
      • </Context>
  3. Now a very important thing. There are 3 other files that must be in synch with the context.xml. The resource name juddiDB must be present in the following files relative to C:\Program Files\apache-tomcat-6.0.29\webapps\juddiv3\WEB-INF\:
    • .\web.xml: Set the value of <res-ref-name> as jdbc/juddiDB;
    • .\classes\juddiv3.properties: Set the property juddi.persistenceunit.name with value juddiDB;
    • .\classes\META-INF\persistence.xml: Set the persistence-unit‘ name to juddiDB, set <non-jta-data-source> value to java:comp/env/jdbc/juddiDB and make sure there is a <property name=”openjpa.jdbc.DBDictionary” value=”mysql“/> element in it.

Step 4 – Add users and roles to Tomcat

  1. Open C:\Arquivos de programas\apache-tomcat-6.0.32\conf\tomcat-users.xml and make sure it looks like this one:

<?xml version=’1.0′ encoding=’utf-8′?>
<tomcat-users>
<role rolename=”pluto“/>
<role rolename=”tomcat”/>
<role rolename=”manager”/>
<user username=”root” password=”root” roles=”pluto,tomcat,manager”/>
<user username=”uddi” password=”uddi” roles=”pluto,tomcat,manager”/>
<user username=”sales” password=”sales” roles=”pluto,tomcat,manager”/>
<user username=”marketing” password=”marketing” roles=”pluto,tomcat,manager”/>
<user username=”tomcat” password=”tomcat” roles=”manager”/>
</tomcat-users>

Step 5 – Enjoy your brand new Registry

Now start Tomcat and open your web browser at http://localhost:8080/juddiv3/. You should see a Apache jUDDI‘s welcome page like this one…
The Apache jUDDI's welcome page

The Apache jUDDI's welcome page

…or like the following one if you click on the jUDDI Portal link

Pluto: The jUDDI portal

Pluto: The jUDDI portal

Now you may for example connect to juddi MySQL database and execute the command “show tables;” just to list all tables created by the jUDDI installation process.

Some very important notes:

  • Of course the instructions on this post are not perfect for a production environment. I installed everything in my windows development sandbox. If you are installing it for a production environment I strongly recommend you not to use the same password as the login name of the MySQL user. Another thing is to change the default jUDDI Authentication.
  • It’s possible to do the same thing for a Linux environment. Just follow the instructions having Linux on your mind;

I’ll talk more about Apache jUDDI Registry on a next post.

Stay away from trouble!

Update at 2011-07-23 23:17

After logging in at Pluto you probably will see that the portlets don’t work. It may print some strack trace errors inside the portlet windows or a javascript alert “erro:null” is shown. To solve this problem you’ll have to do the following:

Make sure the file juddiv3.properties of webapps/juddiv3 and webapps/uddi-portlets have the same configurations. Therefore, copy webapps/juddiv3/WEB-INF/classes/juddiv3.properties to webapps/uddi-portlets/WEB-INF/classes/juddiv3.properties.

分享到:
评论

相关推荐

    将xxl-job-1.7.2导入到myeclipse并部署到tomcat

    ### 将xxl-job-1.7.2导入到MyEclipse并部署到Tomcat的详细步骤 ...通过以上步骤,您可以顺利地将xxl-job-1.7.2导入到MyEclipse,并部署到Tomcat中进行使用。希望这些详细步骤能够帮助您顺利完成部署工作。

    tomcat文章中的项目部署的示例war包

    tomcat文章中的项目部署的示例war包,用于部署项目测试 tomcat文章中的项目部署的示例war包,用于部署项目测试 tomcat文章中的项目部署的示例war包,用于部署项目测试 tomcat文章中的项目部署的示例war包,用于部署...

    eclipse部署tomcat 报错

    3. 第三,需要添加项目路径到Tomcat服务器的配置文件中。在Eclipse中部署Tomcat服务器时,需要添加项目路径到Tomcat服务器的配置文件中,以确保Tomcat服务器能够正确地启动项目。 4. 最后,需要启动Tomcat服务器。在...

    springboot部署到外部tomcat容器.rar

    本资源"springboot部署到外部tomcat容器.rar"显然是关于如何将Spring Boot应用部署到外部的Tomcat服务器上的教程。下面,我们将深入探讨这一主题。 首先,了解Spring Boot的内置Tomcat与外置Tomcat的区别至关重要。...

    mule3.4对应应用部署到tomcat7相关步骤文档

    3. 复制Mule库文件:将Mule安装目录下的`lib`文件夹中除`boot`目录外的所有文件和文件夹复制到Tomcat的根目录下的`mule-libs`文件夹(如果不存在,则创建)。 4. 添加`boot`目录文件:将`lib/boot`目录下的所有必需...

    tomcat 部署java项目 jar

    3. **部署Java Web应用到Tomcat** - 将Java项目部署到Tomcat通常有以下几种方式: - 将JAR文件放入`$CATALINA_HOME/lib`目录,这样Tomcat会自动加载其中的Servlet和过滤器。 - 将JAR文件放入`$CATALINA_HOME/...

    Docker容器部署tomcat出现中文乱码.docx

    Docker 容器中 Tomcat 部署出现中文乱码解决方案 在 Docker 容器中部署 Tomcat 时,可能会遇到中文乱码的问题,这是由于 Docker 容器的 locale 设置导致的。在本文中,我们将介绍如何解决这个问题。 什么是 locale...

    windows服务器部署 nginx+tomcat+mysql服务器端部署 阿里云服务器部署及配置

    详细说明了windows服务器nginx+tomcat+mysql部署及配置(配置阿里云后台安全组,配置域名)很适合新手学习 附件中包含: 1.操作说明文档 2.操作录屏 3.安装所用到的软件安装包 1)Windows Server 2019 数据中心版 ...

    jenkins实现maven项目自动部署到tomcat

    【Jenkins实现Maven项目自动部署到Tomcat】是一篇关于自动化构建和部署流程的教程。该文档旨在教你如何利用Jenkins自动化处理Maven项目的编译、打包和部署到Tomcat服务器的过程,使得开发工作更加高效。以下是详细的...

    tomcat服务器上部署项目

    3. **管理工具部署**:Tomcat提供了一个名为`Manager App`的Web管理界面,可以在浏览器中访问`http://localhost:8080/manager/html`(需要在`conf/tomcat-users.xml`中添加有足够权限的用户)。上传WAR文件或者通过...

    项目部署到tomcat

    ### 项目部署到Tomcat的三种方法 在IT领域中,将开发完成的应用程序部署到生产环境是一项重要的工作。对于使用Java技术栈的开发者来说,Apache Tomcat作为一款开源、轻量级的Servlet容器,是部署Java Web应用程序的...

    springboot项目部署到tomcat

    在实际开发过程中,经常需要将Spring Boot应用部署到Tomcat容器中运行。这种方式的优势在于可以充分利用Spring Boot自身的便捷特性,同时又能在企业级环境中利用Tomcat提供的稳定性和管理功能。 #### 二、Maven配置...

    spring boot项目和vue一起放在tomcat部署

    在本文中,我们将介绍如何将 Spring Boot 项目和 Vue 一起部署到 Tomcat 服务器中。这个过程需要我们对 Tomcat 服务器进行配置,以便能够正确地部署并运行我们的应用程序。 Spring Boot 项目和 Vue 的结合 在 ...

    Eclipse中创建Web Maven Project并部署到Tomcat中

    本篇文章将详细解释如何在Eclipse中创建一个基于Maven的Web项目,并将其部署到Tomcat服务器上。 首先,创建一个`Web Maven Project`: 1. 打开Eclipse,选择“File” -&gt; “New” -&gt; “Dynamic Web Project”。 2. ...

    springboot项目打成war包并部署到Linux的Tomcat中

    springboot项目打成war包并部署到Linux的Tomcat中流程目录:启动类继承`SpringBootServletInitializer`pom文件添加`war`mvn命令操作(clean、install)打好的war包部署到Linux的Tomcat中本地访问部署好的项目 ...

    自动化部署项目_Tomcat

    3. **版本控制**:在自动化部署中,版本控制工具如Git是必不可少的。通过Git,我们可以方便地管理代码版本,实现代码的版本回溯和协同开发。 4. **服务器环境准备**:确保目标服务器上已经安装了Tomcat、Java运行...

    在Tomcat中部署Web项目的操作方法(必看篇)

    将Web项目部署到Tomcat中的方法之一,是部署没有封装到WAR文件中的Web项目。要使用这一方法部署未打包的webapp目录,只要把我们的项目(编译好的发布项目,非开发项目)放到Tomcat的webapps目录下就可以了。如下图所...

Global site tag (gtag.js) - Google Analytics