ITeye博客

glassfish v3 热部署 控制台 相关

tdttyl.cwm · 2011-02-12 17:12 · 编程语言 · Markdown

嗯,看到大家都说是从tomcat转到glassfish的,其实我也是,呵呵。

 

网上好多关于glassfish的帖子都是老早以前的,随着版本的不断更新,有些解决方案不再适用了,看帖子时一定要注意斟酌,谨慎学习。

 

1、我用到glassfish版本和开发环境。(windows系统)

·java_ee_sdk-6u1-windows.exe

·eclipse-jee-helios-SR1-win32.zip

·jdk 6u23 当前最新版

 

2、安装,安装,安装,一切都要安装....

 

3、在eclipse-->window-->preferences-->servers-->Runtime environments

点击右上角的 Add ,在弹出的对话框中的右上角有 Download additional server adapters

等加载完了,点击glassfish插件,下载安装。

 

4、安装完了之后,重复步骤3,配置glassfish服务器。

 

5、建立Web项目,部署到glassfish上。

 

6、尝试修改java文件试试,glassfish会自动同步,进行热部署。不需要写.reploy文件,那些过时了。

 

7、控制台的问题,有人说看不到控制台的输出,其实是控制台输出保存到log文件中了

在domain1\logs\server.log中可以查看。

其实Eclipse可以直接查看server.log文件的,只要更改Console的频道即可。

评论(1)

  1. #1 楼 · bushkarl · 2011-03-28 11:25

    我在myeclipse上配置glassfish3.1时候为什么无法启动,不知道你有没有碰到这种情况。 异常信息: Launching GlassFish on Felix platform Exception in thread "main" java.lang.reflect.InvocationTargetException 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:597) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97) at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55) Caused by: javax.xml.stream.FactoryFinder$ConfigurationError: Provider com.ctc.wstx.stax.WstxInputFactory not found at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:154) at javax.xml.stream.FactoryFinder.findJarServiceProvider(FactoryFinder.java:308) at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:233) at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:123) at org.jvnet.hk2.config.ConfigParser.(ConfigParser.java:242) at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(AbstractModulesRegistryImpl.java:174) at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createHabitat(AbstractModulesRegistryImpl.java:158) at com.sun.enterprise.module.bootstrap.Main.createHabitat(Main.java:425) at org.jvnet.hk2.osgiadapter.HK2Main.createHabitat(HK2Main.java:96) at org.glassfish.kernel.GlassFishActivator$1.newGlassFish(GlassFishActivator.java:104) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:113) ... 6 more

评论功能维护中,当前仅展示历史评论。