ITeye博客

reymont的博客

reymont · 共 73 篇文章

Cannot find any registered HttpDestinationFactory from the Bus

严重: Cannot find any registered HttpDestinationFactory from the Bus. Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350) at org.apache.cxf.jaxws.EndpointImpl.pub…

2012-05-02 16:24 · CXF · 评论(1)

tomcat无法启动和关闭

在部署项目时,经常碰到Tomcat无法启动和关闭的现象。碰到这些情况时,一般是端口被占用。那么就需要了解启动和关闭的端口设置了。 Tomcat 修改关闭端口 一个server.xml中只能有一个Server节点,因为它代表着Tomcat自身。如果你需要两个server,就必须运行两个Tomcat实例。 <Server port="8005" shutdown="SHUTDOWN" debug="0"> Shutdown属性可以是任意字符串。当你调用带有stop指令的catalina脚本,它会发送到运行中的Tomcat实例。一般的server.xml远程是无法查看到,如果你修改了默认的字符串S…

2012-04-25 11:23 · 评论(0)

Maven Archetype Plugin创建新工程

Maven Archetype plugin是Maven用来创建新工程的工具。Archetypes给开源项目很大的帮助,像Apache Wicket、 Apache Cocoon等。这些项目使用Archetypes提供很多新项目的模板。Archetypes也可以帮助公司推行项目标准化。如果你是公司里的一个大团队中的成员,需要依照现有的项目创建新的项目,那么你可以利用团队中使用的archetype来创建新的项目。 有两种方式创建新工程 第一种直接创建 mvn archetype:generate \ -DgroupId=org.sonatype.mavenbook \ -DartifactId…

2012-04-20 11:15 · 评论(0)

Maven Jetty Plugin运行配置jetty:run㈡

mvn jetty:run有几个扩展命令 mvn jetty:run-war 先打包,让后再部署指定的war。如果不指定webApp,默认为${project.build.directory}/${project.build.finalName}.war <project> ... <plugins> ... <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <configuration> <webApp>${basedir}/target/mycustom.wa…

2012-04-17 10:48 · 评论(0)

Maven Jetty Plugin运行配置jetty:run

如果这个工程是标准的maven-webapp那么基本上不用修改,直接运行jetty:run就可以执行。 但是有时候会报错说 [ERROR] No plugin found for prefix 'jetty' in the current project and in the plu gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo sitories [local (C:\Documents and Settings\reymont.li\.m2\repository), cent…

2012-04-17 10:38 · 评论(1)

jetty运行配置jetty:run-war

刚使用jetty时,完全不懂怎么配置。老是出现各种错误。就像下面这种 [ERROR] Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.19:run ( default-cli) on project orderapp: Webapp source directory D:\resource\ApacheCXFB ook\Chapter2\orderapp\src\main\webapp does not exist -> [Help 1] 一看,是工程不符MAVEN的标准。但是现在又不想修改这个结构。怎么办? 使…

2012-04-17 10:07 · 评论(0)

Cannot find any registered HttpDestinationFactory from the Bus

apache cxf 2.4.6 samples\wsdl_first 输入命令mvn install -Pserver -X 检查报错 Caused by: org.apache.maven.project.DependencyResolutionException: Could not res olve dependencies for project org.apache.cxf.samples:wsdl_first:war:2.4.6: Could not find artifact org.apache.cxf:cxf-rt-transports-http-jetty:jar:2.…

2012-04-13 11:31 · CXF · 评论(0)

Cannot find any registered HttpDestinationFactory from the Bus

apache cxf 2.4.6 samples\wsdl_first 输入命令mvn install -Pserver -X 检查报错 Caused by: org.apache.maven.project.DependencyResolutionException: Could not res olve dependencies for project org.apache.cxf.samples:wsdl_first:war:2.4.6: Could not find artifact org.apache.cxf:cxf-rt-transports-http-jetty:jar:2.…

2012-04-13 11:31 · 评论(0)

RACI模型在IT项目管理中应用

在国内, IT 项目团队的成员一般来自于各个部门。这些成员受到部门经理和项目经理的双重管理。因为项目本身的特性,临时性、唯一性和渐进明细性等,因此项目管理中的人力资源管理和传统的人力资源管理有所不同。 项目有明确的结束时间,项目经理需要在最短的时间内将项目团队整合成一个整体,按照项目计划中的要求完成项目。由于项目成员本身属于各个职能部门,各个职能部门的具体工作会影响项目成员进入项目的时间。这些工作需要项目经理快速的了解岗位状态, RACI 模型可以帮助项目经理。 RACI 是一个用以明确项目中的各个角色及其相关责任的相对直观的模型。有如下四种角色: 谁负责( R = Responsible …

2011-10-08 10:26 · 评论(0)

创建itext document&横向打印

概述 Document是itext的基础,你可以添加文档数据(用户阅读的信息)和元数据(pdf内部使用的信息)。在创建document对象时,你可以定义page size,page color and page margins。 构造函数 查看一下API,Document的构造函数有三个。 其中第一个Document给size,color,margins都设置了默认值。查看源代码,默认为Document(PageSize.A4, 36, 36, 36, 36); 第二个构造函数就可以自定义页面的大小了,例如: Rectangle rect = new Rectangle(800,600); …

2011-07-29 10:54 · PDF · 评论(2)

itext使用rtf格式生成word,使用image为页眉

起因: 在生成word文档时,一般都要求生成固定的页眉。页眉,即可以是文字也可以图片。对于程序员来说,图片可以简化开发的复杂度,对于用户来说可以丰富页眉的样式。于是我尝试使用itext生成rtf格式来获得包含图片页眉的word文档。 尝试1: 直接使用document.add(Image),可以看到图片在文本内,就算使用Image.setAbsolutePosition(),图片的位置仍然没有变化。 尝试2: 使用new HeaderFooter(Phrase,false)。貌似可以达到预期效果,但是你一看代码,就知道这是以代码的复杂性为代价的,而且会额外的多处两个回车符。 尝试3: 使用 …

2011-07-21 16:54 · PDF · 评论(5)

itext pdftemplate使用

在开发系统时,需要在PDF上写入总页数。于是在网上搜索到 iText加入页码 这篇文章。但是仍然不知道PdfTemplate是什么使用的。 在Itext in action 2006版 第14章刚好有个这个例子(14.2.3 PageXofY) /* chapter14/PageXofY.java */ import java.io.FileOutputStream; import java.io.IOException; import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import c…

2011-07-19 17:08 · PDF · 评论(0)

itext设置默认NO_BORDER表格

读到itext in action第6章6.1.3,有个函数getDefaultCell(),查看该函数的API PdfPCell com.lowagie.text.pdf. PdfPTable .getDefaultCell() Gets the default PdfPCell that will be used as reference for all the addCell methods except addCell(PdfPCell) . 那么就是说你使用new PdfPCell就有border 那再查看PdfPCell的构造函数。以PdfPCell()和PdfPCell(Phr…

2011-07-18 16:40 · PDF · 评论(0)

itext Chunk Phrase Paragraph区别

IText中有三个处理text的类com.lowagie.text.Chunk,com.lowagie.text.Phrase,com.lowagie.text.Paragraph。 它们之间有什么区别呢? Chunk Chunk是IText最小的文本编辑单位。不能再拆分更小的单元。其他高级的文本对象都是基于Chunk的。请看下图 (注此图,来源自http://www.cnblogs.com/LifelongLearning/archive/2011/03/30/2000072.html) package org.study.itext.text; import java.awt.Color…

2011-07-14 12:48 · PDF · 评论(0)

java实现oracle函数rpad和lpad

import junit.framework.TestCase; public class StringTest extends TestCase{ public void ntestRpad(){ System.out.println(rpad("1",3,"0")); } public void testLpad(){ System.out.println(lpad("1",3,"0")); } private String lpad(String s, int n, String replace) { while (s.length() < n) { s = replace+s; } …

2011-07-01 16:20 · jdk · 评论(3)