- 浏览: 88306 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
baohuan_love:
文章写的不错
JBoss Seam从头学到脚之1---事前准备及配置 -
codor:
部署时出现错误,SEAM版本为2.2,JBOSS为AS713: ...
JBoss Seam从头学到脚之2---创建工程 -
strongsun:
这个怎么配置呢
eclipse+jboss+seam新的环境装好了 -
依舟cxj:
楼主知道在MyEclipse下怎么安装吗?
JBoss Seam从头学到脚之1---事前准备及配置 -
wwwwcome:
你好 想请教点问题 给你发了站内信了。
JBoss Seam从头学到脚之5---eclipse中,registration例子的实现
1:创建一个seam工程,工程类型选择如下图
2:点击“Next”按钮,进入下一步
3:在“Project Name”里输入,“helloworld”
设置“Target Runtime”,点击“New”按钮
4:点击“Next”按钮
5:点击“Finish”按钮。
然后开始设置“Target Server”,同样点击“New”按钮
6:点击“Finish”按钮,结束设定。
最后“Configuration”中选择“Dynamic Web Project with Seam 2.1(technology preview)”。
最终的画面如下图所示
7:点击“Next”
8:点击“Next”
9:点击“Next”
10:这里要配置“Seam Runtime”,点击“Add”按钮,并作如下选择
11:设置好后,点击“Finish”按钮。
“Deploy as”,我们选择“EAR”。
接下来设置数据库,这里我是用的是mySQL
首先,在“Database Type”里选择“MySQL 5 (InnoDB)”
然后,在“Connection profile”中,点击“New”按钮,来设置数据库的连接配置。
第一个画面如下选择:
12:点击“Next”按钮
13:点击新建的按钮后,出现下图,这里选择“5.1”。
14:然后点击“Jar List”,并正确选择mySQL的类库
15:然后点击“OK”按钮
16:把数据库名字,改成自己设置好的名字,这里我设置的是“studyseamdb”,如下图所示
17:如果没问题,点击“Test Connection”按钮,我们会得到下面的成功画面
18:没问题的话,点击“Finish”按钮,完成配置。
在下面的画面,继续点击“Finish”按钮来完成配置
19:大致的界面如下图所示
20:如果有java错误的话,把所有工程都重新编译一遍。
我这里最后还有一个错误没有清除掉,如下图
21:启动jboss服务,如下图
22:启动好后,如果一切正常,在浏览器地址栏中输入http://localhost:8080/helloworld,可以得到以下画面
END
评论
13:24:34,000 INFO [org.jboss.as.deployment] (DeploymentScanner-threads - 2) Found helloworld-ear.ear in deployment directory. To trigger deployment create a file called helloworld-ear.ear.dodeploy
13:24:34,015 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "helloworld-ds.xml"
13:24:34,015 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Starting deployment of "helloworld-ear.ear"
13:24:34,125 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."helloworld-ds.xml".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."helloworld-ds.xml".STRUCTURE: Failed to process phase STRUCTURE of deployment "helloworld-ds.xml"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_10-rc2]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_10-rc2]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_10-rc2]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to mount deployment content
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:82)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method) [:1.6.0_10-rc2]
at java.util.zip.ZipFile.<init>(ZipFile.java:114) [:1.6.0_10-rc2]
at java.util.jar.JarFile.<init>(JarFile.java:133) [:1.6.0_10-rc2]
at java.util.jar.JarFile.<init>(JarFile.java:97) [:1.6.0_10-rc2]
at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:95)
at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:81)
at org.jboss.vfs.VFS.mountZip(VFS.java:408)
at org.jboss.vfs.VFS.mountZip(VFS.java:434)
at org.jboss.as.server.deployment.repository.impl.ServerDeploymentRepositoryImpl.mountDeploymentContent(ServerDeploymentRepositoryImpl.java:75)
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:78)
... 6 more
13:24:34,750 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "jboss-seam.jar"
13:24:34,750 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "helloworld.war"
13:24:34,750 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "helloworld-ejb.jar"
13:24:35,453 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry iText-toolbox.jar in "/C:/Tools/jboss/standalone/deployments/helloworld-ear.ear/helloworld.war/WEB-INF/lib/itext.jar" does not point to a valid jar for a Class-Path reference.
13:24:35,453 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry iText-toolbox-2.1.2.jar in "/C:/Tools/jboss/standalone/deployments/helloworld-ear.ear/helloworld.war/WEB-INF/lib/itext.jar" does not point to a valid jar for a Class-Path reference.
13:24:35,453 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry bcmail-jdk14-138.jar in "/C:/Tools/jboss/standalone/deployments/helloworld-ear.ear/helloworld.war/WEB-INF/lib/itext.jar" does not point to a valid jar for a Class-Path reference.
13:24:35,453 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry bcprov-jdk14-138.jar in "/C:/Tools/jboss/standalone/deployments/helloworld-ear.ear/helloworld.war/WEB-INF/lib/itext.jar" does not point to a valid jar for a Class-Path reference.
13:24:35,453 INFO [org.jboss.jpa] (MSC service thread 1-1) read persistence.xml for helloworld
13:24:35,453 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.subunit."helloworld-ear.ear"."helloworld.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."helloworld-ear.ear"."helloworld.war".PARSE: Failed to process phase PARSE of subdeployment "helloworld.war" of deployment "helloworld-ear.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_10-rc2]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_10-rc2]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_10-rc2]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to parse "/C:/Tools/jboss/standalone/deployments/helloworld-ear.ear/helloworld.war/WEB-INF/jboss-web.xml" at [5,5]
at org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:68)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
... 5 more
13:24:35,453 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "helloworld-ear.ear" was rolled back with no failure message
13:24:35,468 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "helloworld-ds.xml" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"helloworld-ds.xml\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"helloworld-ds.xml\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"helloworld-ds.xml\""}}
13:24:35,468 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment helloworld-ds.xml in 1ms
13:24:35,468 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment helloworld-ejb.jar in 5ms
13:24:35,859 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment jboss-seam.jar in 391ms
13:24:37,953 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment helloworld.war in 2493ms
13:24:38,703 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) Stopped deployment helloworld-ear.ear in 3244ms
13:24:38,703 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"helloworld-ds.xml\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"helloworld-ds.xml\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"helloworld-ds.xml\""}}}}
13:24:38,718 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) Composite operation was rolled back
有时JDK版本不一致会导致ClassNotFoundException.
你的JBoss是什么版本的?JDK呢?
PS:累坏我了,还做了个测验先.
could not find the main class. Program will exit.
控制台报以下错误:
ClassNotFoundException:jboss\lib\endorsed 之类的错误
然后把jboss\lib\endorsed下面的所有jar设置进classpath,还是报同样的错误,为什么?
搞了好几个晚上,真的郁闷死
楼主可遇到这种情况,或知道如何解决吗?
发表评论
-
继续学习,反复开始
2010-07-11 14:22 0==eclipse:eclipse-jee-galileo-S ... -
eclipse+jboss+seam新的环境装好了
2010-01-30 23:31 1818eclipse-jee-galileo-SR1-win32 ... -
JBoss Seam从头学到脚之21---基本功之再练习(2)
2009-04-23 15:36 0接着上篇继续打基础,呵呵 -
JBoss Seam从头学到脚之20---基本功之再练习
2009-04-21 15:12 2302工作之余,学学seam,虽然大概意思能明白,但是 ... -
JBoss Seam从头学到脚之20---dvdstore例子的理解(3)
2009-04-20 15:04 0browse.xhtml里用到了xmlns:fn=htt ... -
JBoss Seam从头学到脚之19---dvdstore例子的理解(2)
2009-04-03 12:48 1892@DiscriminatorValue的用法(在Ad ... -
JBoss Seam从头学到脚之18---dvdstore例子中的jbpm的理解
2009-03-24 14:45 2035记录一下学习情况,有不对的地方请大家多多指正,thanks! ... -
JBoss Seam从头学到脚之17---目前seam的开发工具都是GA版的了
2009-03-20 16:17 1885随着jboss tools的3.0.0.GA的正式发布, 目前 ... -
JBoss Seam从头学到脚之16---eclipse中,dvdstore例子的理解点
2009-03-16 14:57 1718org.jboss.seam.international.S ... -
JBoss Seam从头学到脚之15---自己的学习点滴,记录一下
2009-03-11 13:35 2103记录下自己的学习轨迹,todo部分是日后的任务。---附件是s ... -
JBoss Seam从头学到脚之14---eclipse中,dvdstore例子的实现
2009-03-10 15:36 2440继续学习seam中自带的例子,今天学习的是dvdstore,特 ... -
JBoss Seam从头学到脚之13---javax.ejb.Local的一点理解
2009-03-05 15:27 2399学习seam过程中,写了一个用户注册的例子,按照常规,用户注册 ... -
JBoss Seam从头学到脚之12---eclipse中,seamspace例子的实现及理解
2009-02-19 14:41 2495继续学习seam中自带的例子,今天学习的是seamspace, ... -
JBoss Seam从头学到脚之11---eclipse中,itext例子的实现及理解
2009-02-13 14:01 3780继续学习seam中自带的例子,今天学习的是itext,是一个关 ... -
JBoss Seam从头学到脚之10---eclipse中,numberguess例子的实现及理解
2009-02-12 10:56 2187继续学习seam中自带的例子,今天学习的是numbergues ... -
JBoss Seam从头学到脚之9---eclipse中,contactlist例子的实现及理解
2009-02-11 16:36 2062继续学习seam中自带的例子,今天学习的是contactlis ... -
JBoss Seam从头学到脚之8---eclipse中,booking例子的实现及理解
2009-02-10 14:46 2949继续学习seam中自带的例 ... -
JBoss Seam从头学到脚之7---eclipse中,blog例子的理解
2009-02-09 11:05 2640把学习过程自己不理解的地方记录下来,供参考,指正, 初始 ... -
JBoss Seam从头学到脚之6---eclipse中,blog例子的实现
2009-02-05 15:08 3365首先,创建一个名为blog的"Seam Web Pr ... -
JBoss Seam从头学到脚之5---eclipse中,registration例子的实现
2009-01-19 12:03 4779学习的最好途径还是多 ...
相关推荐
JBoss_Enterprise_Application_Platform-5.0.1-Seam_Reference_Guide-en-US.pdf
标题中的“Jboss seam3 实战”表明,本文将重点介绍JBoss Seam框架的第三个版本的实际应用。JBoss Seam是一个开源的Java EE框架,它通过依赖注入和会话模型,简化了基于Java EE的企业级应用开发。Seam框架为开发者...
- **下载文件**:jboss-seam-2.1.1.GA.zip 4. **JBoss Tools** - **下载地址**:[www.jboss.org/tools/download/index.html](http://www.jboss.org/tools/download/index.html) - **推荐版本**:3.0.0 CR1 - *...
5. **配置文件**:Seam工程包含多个XML配置文件,如jboss-beans.xml、persistence-test.xml等,它们分别用于不同的测试和部署环境。其中,测试相关的配置(如import-test.sql)会在单元测试时导入HSQLDB数据库。开发...
java jboss seam jboss-seam-selectitems
总之,本书是JBoss Seam框架领域的一部经典之作,不仅提供了深入的技术解析,还包含了丰富的实战案例和最佳实践。对于希望深入了解并掌握JBoss Seam框架的开发者来说,这无疑是一本不可或缺的宝典。
### 关于《Beginning JSF2 APIs and JBoss Seam》的知识点总结 #### 一、书籍简介与背景 《Beginning JSF2 APIs and JBoss Seam》是一本深入介绍JavaServer Faces 2(简称JSF2)及其相关API以及JBoss Seam框架的...
### JBoss Seam 2.01GA REF DOC #### 引言:JBoss Seam概览与功能介绍 JBoss Seam 是一个为简化企业级 Java 应用开发而设计的框架。它结合了 JavaServer Faces (JSF)、Java Persistence API (JPA) 和 Java ...
由于Seam的主要贡献者之一Gavin King同时也是Hibernate的创造者,因此Seam在设计之初就考虑到了如何更好地支持ORM,使得开发者可以轻松地处理延迟加载等场景。 **2. 改善JSF** Seam还提供了一套增强JSF的工具,...
3. **注入(Injection)**: Seam支持依赖注入,可以将一个组件的实例自动注入到其他组件中,无需手动创建对象或管理依赖关系。 4. **导航和流程控制(Navigation and Flow Control)**: Seam提供了强大的导航机制,...
1. **在JBoss AS上运行示例**:首先需要安装配置JBoss AS服务器,然后导入Seam项目到服务器中进行部署。 2. **在Tomcat服务器上运行示例**:Tomcat作为轻量级的应用服务器,可以快速部署简单的Seam应用,便于学习和...
### JBoss Seam 教程知识点概述 #### 一、Seam简介与教程概览 - **Seam**:一个基于Java EE平台的应用框架,旨在简化企业级应用开发。 - **JBoss Seam**:由JBoss提供的Seam实现,提供了一系列功能强大的工具和...
从创建组件、定义业务逻辑到整合前端界面,Seam提供了一套完整的工具链和API,帮助开发者快速搭建企业级应用。例如,通过声明式状态管理,可以轻松管理用户的会话状态;通过Bijection,可以自动处理组件间的依赖注入...
**JBoss Seam 中文文档集合概述** JBoss Seam 是一个开源的应用框架,它结合了JavaServer Faces (JSF)、Java Persistence API (JPA)、Enterprise JavaBeans (EJB) 3.0 和其他Java EE组件,旨在简化企业级开发。这个...
【JBoss Seam 2.0文档详解】 JBoss Seam 是一个开源的企业级开发框架,它旨在简化Java EE应用的开发过程,特别是在Web和富互联网应用程序(Rich Internet Applications, RIA)领域。Seam 2.0是其重要的版本,提供了...
整理自jboss seam 中文站,压缩为chm格式,便于广大jboss seam爱好者阅读,所有版权归jboss seam中文站所有。
2. **JSF集成**:学习如何利用Seam与JSF的集成,创建动态、数据驱动的用户界面。 3. **EJB和JPA集成**:掌握Seam如何与EJB和JPA协作,实现业务逻辑和数据持久化。 4. **安全和事务管理**:学习Seam的安全框架和事务...