2011-03-03 80 views
0

将NetBeans 6.9.1我选择了包括安装GlassFish 3。然后,我创建了一个新的Web应用程序,并选择JSF 2.0,所以NetBeans中创建一个“Hello World”类型的应用程序从启动。然而,运行它会带来错误,但现在我更好地修改了glassfish。但是,为什么当我甚至不使用数据库时仍然存在数据库问题?“Hello World” 的Web应用程序和Glassfish崩溃:地址已在使用中:8080

现在我越来越:

的GlassFish:

Mar 2, 2011 8:49:36 PM com.sun.enterprise.glassfish.bootstrap.ASMain main 
INFO: Launching GlassFish on Felix platform 
Welcome to Felix 
================ 
INFO: Perform lazy SSL initialization for the listener 'http-listener-2' 
INFO: Starting Grizzly Framework 1.9.18-o - Wed Mar 02 20:50:51 PST 2011 
INFO: Starting Grizzly Framework 1.9.18-o - Wed Mar 02 20:50:51 PST 2011 
INFO: Grizzly Framework 1.9.18-o started in: 1122ms listening on port 7676 
INFO: Grizzly Framework 1.9.18-o started in: 1606ms listening on port 8181 
INFO: Grizzly Framework 1.9.18-o started in: 1821ms listening on port 8081 
INFO: Grizzly Framework 1.9.18-o started in: 1491ms listening on port 3700 
INFO: Grizzly Framework 1.9.18-o started in: 1537ms listening on port 4848 
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(67028ms) startup services(17874ms) total(84902ms) 
INFO: Binding RMI port to *:8686 
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://tleilax.servebeer.com:8686/jndi/rmi://tleilax.servebeer.com:8686/jmxrmi 
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2 
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. 
INFO: Grizzly Framework 1.9.18-o started in: 266ms listening on port 8081 
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate 
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started 
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /home/thufir/glassfish-3.0.1/glassfish/modules/autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-8585686048027063971, felix.fileinstall.filter = null} 
INFO: Installed /home/thufir/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar 
INFO: Installed /home/thufir/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.fileinstall-autodeploy-bundles.cfg 
INFO: Installed /home/thufir/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.scr.jar 
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /home/thufir/glassfish-3.0.1/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-3996754497384347726, felix.fileinstall.filter = null} 
INFO: Started bundle: file:/home/thufir/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar 
INFO: Started bundle: file:/home/thufir/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.scr.jar 
INFO: SEC1002: Security Manager is OFF. 
INFO: Security startup service called 
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper. 
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created. 
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created. 
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created. 
INFO: Security service(s) started successfully.... 
INFO: Total number of available updates : 59 
INFO: Available updates : 
glassfish-full-incorporation 3.1,0-43:20110215T074016Z Tue Feb 15 07:40:16 PST 2011 
glassfish-web-incorporation 3.1,0-43:20110215T074014Z Tue Feb 15 07:40:14 PST 2011 
glassfish-web-l10n 3.1,0-41.1:20110213T154415Z Sun Feb 13 15:44:15 PST 2011 
glassfish-ejb-lite-l10n 3.1,0-41.1:20110213T154350Z Sun Feb 13 15:43:50 PST 2011 
pkg-java 1.122,0-52.2817:20110218T204119Z Fri Feb 18 20:41:19 PST 2011 
glassfish-ejb-l10n 3.1,0-41.1:20110213T154345Z Sun Feb 13 15:43:45 PST 2011 
glassfish-gui-l10n 3.1,0-41.1:20110213T154326Z Sun Feb 13 15:43:26 PST 2011 
glassfish-nucleus-l10n 3.1,0-41.1:20110213T154338Z Sun Feb 13 15:43:38 PST 2011 
javadb-core 10.6.2.1,0-1:20101213T185842Z Mon Dec 13 18:58:42 PST 2010 
javadb-client 10.6.2.1,0-1:20101213T185835Z Mon Dec 13 18:58:35 PST 2010 
jersey 1.5,0-1.0:20110215T072802Z Tue Feb 15 07:28:02 PST 2011 
mq-core 4.5,0-29.2:20110210T074434Z Thu Feb 10 07:44:34 PST 2011 
glassfish-jdbc-l10n 3.1,0-41.1:20110213T154422Z Sun Feb 13 15:44:22 PST 2011 
glassfish-full-profile 3.1,0-43:20110215T074029Z Tue Feb 15 07:40:29 PST 2011 
glassfish-upgrade-l10n 3.1,0-41.1:20110213T154456Z Sun Feb 13 15:44:56 PST 2011 
glassfish-jca-l10n 3.1,0-41.1:20110213T154405Z Sun Feb 13 15:44:05 PST 2011 
javadb-common 10.6.2.1,0-1:20101213T185828Z Mon Dec 13 18:58:28 PST 2010 
glassfish-common-full-l10n 3.1,0-41.1:20110213T154354Z Sun Feb 13 15:43:54 PST 2011 
glassfish-web-profile 3.1,0-43:20110215T074022Z Tue Feb 15 07:40:22 PST 2011 
glassfish-common-l10n 3.1,0-41.1:20110213T154451Z Sun Feb 13 15:44:51 PST 2011 
glassfish-jts-l10n 3.1,0-41.1:20110213T154359Z Sun Feb 13 15:43:59 PST 2011 
glassfish-jms-l10n 3.1,0-41.1:20110213T154409Z Sun Feb 13 15:44:09 PST 2011 
glassfish-corba 3.1.0,0-27:20110215T071130Z Tue Feb 15 07:11:30 PST 2011 
glassfish-jms 3.1,0-43:20110215T072339Z Tue Feb 15 07:23:39 PST 2011 
mq-locale 4.5,0-29.2:20110210T074528Z Thu Feb 10 07:45:28 PST 2011 
mq-server 4.5,0-29.2:20110210T074445Z Thu Feb 10 07:44:45 PST 2011 
mq-bin-sh 4.5,0-29.2:20110210T074442Z Thu Feb 10 07:44:42 PST 2011 
metro 2.1,0-30:20110215T073257Z Tue Feb 15 07:32:57 PST 2011 
glassfish-cmp 3.1,0-43:20110215T072715Z Tue Feb 15 07:27:15 PST 2011 
mq-bin-exe 4.5,0-29.2:20110210T105419Z Thu Feb 10 10:54:19 PST 2011 
glassfish-ejb 3.1,0-43:20110215T072446Z Tue Feb 15 07:24:46 PST 2011 
glassfish-common-full 3.1,0-43:20110215T072130Z Tue Feb 15 07:21:30 PST 2011 
glassfish-appclient 3.1,0-43:20110215T073837Z Tue Feb 15 07:38:37 PST 2011 
mq-config-gf 4.5,0-29.2:20110210T074525Z Thu Feb 10 07:45:25 PST 2011 
glassfish-grizzly-full 1.9.31,0-1:20110215T070725Z Tue Feb 15 07:07:25 PST 2011 
glassfish-management 3.1,0-43:20110215T071037Z Tue Feb 15 07:10:37 PST 2011 
glassfish-hk2 3.1,0-43:20110215T070538Z Tue Feb 15 07:05:38 PST 2011 
glassfish-upgrade 3.1,0-43:20110215T071009Z Tue Feb 15 07:10:09 PST 2011 
glassfish-jts 3.1,0-43:20110215T072233Z Tue Feb 15 07:22:33 PST 2011 
glassfish-corba-base 3.1.0,0-27:20110215T070738Z Tue Feb 15 07:07:38 PST 2011 
glassfish-javahelp 2.0.2,0-1:20110215T071001Z Tue Feb 15 07:10:01 PST 2011 
glassfish-scripting 3.1,0-41:20110208T202810Z Tue Feb 08 20:28:10 PST 2011 
glassfish-nucleus 3.1,0-43:20110215T070659Z Tue Feb 15 07:06:59 PST 2011 
glassfish-jpa 3.1,0-43:20110215T071106Z Tue Feb 15 07:11:06 PST 2011 
glassfish-ejb-lite 3.1,0-43:20110215T072030Z Tue Feb 15 07:20:30 PST 2011 
glassfish-jcdi 3.1,0-43:20110215T072735Z Tue Feb 15 07:27:35 PST 2011 
glassfish-jdbc 3.1,0-43:20110215T071818Z Tue Feb 15 07:18:18 PST 2011 
glassfish-common 3.1,0-43:20110215T074007Z Tue Feb 15 07:40:07 PST 2011 
glassfish-jsf 2.1.0,0-11:20110215T071155Z Tue Feb 15 07:11:55 PST 2011 
glassfish-gui 3.1,0-43:20110215T071924Z Tue Feb 15 07:19:24 PST 2011 
glassfish-registration 3.1,0-43:20110215T071019Z Tue Feb 15 07:10:19 PST 2011 
felix 3.0.8,0-0:20110215T070355Z Tue Feb 15 07:03:55 PST 2011 
glassfish-grizzly 1.9.31,0-1:20110215T070555Z Tue Feb 15 07:05:55 PST 2011 
glassfish-web 3.1,0-43:20110215T071324Z Tue Feb 15 07:13:24 PST 2011 
glassfish-jta 3.1,0-43:20110215T071139Z Tue Feb 15 07:11:39 PST 2011 
glassfish-jca 3.1,0-43:20110215T071053Z Tue Feb 15 07:10:53 PST 2011 
glassfish-cluster 3.1,0-43:20110215T070945Z Tue Feb 15 07:09:45 PST 2011 
shoal 1.5.29,0-0:20110215T070911Z Tue Feb 15 07:09:11 PST 2011 
glassfish-ha 3.1,0-43:20110215T070954Z Tue Feb 15 07:09:54 PST 2011 
INFO: Created HTTP listener http-listener-1 on port 8081 
INFO: Created HTTP listener http-listener-2 on port 8181 
INFO: Created HTTP listener admin-listener on port 4848 
INFO: Created virtual server server 
INFO: Created virtual server __asadmin 
INFO: Virtual server server loaded system default web module 
INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/WebApplication1' 
INFO: Loading application WebApplication1 at /WebApplication1 
INFO: WebApplication1 was successfully deployed in 245,397 milliseconds. 

Java DB数据库进程:

2011-03-03 04:49:35.249 GMT : Security manager installed using the Basic server security policy. 
2011-03-03 04:49:48.584 GMT : Could not listen on port 1527 on host localhost: 
java.net.BindException: Address already in use 

WebApplication1(运行):

init: 
deps-module-jar: 
deps-ear-jar: 
deps-jar: 
library-inclusion-in-archive: 
library-inclusion-in-manifest: 
compile: 
compile-jsps: 
Starting GlassFish Server 3 
GlassFish Server 3 is running. 
In-place deployment at /home/thufir/NetBeansProjects/WebApplication1/build/web 
Initializing... 
run-deploy: 
Browsing: http://localhost:8080/WebApplication1/ 
run-display-browser: 
run: 
BUILD SUCCESSFUL (total time: 15 minutes 35 seconds) 

然而, “数据库”仍然在出于某种原因错误的端口(?)。

我修改了一个domain.xml中,但也有一个模板:

[email protected]:~$ 
[email protected]:~$ nl /home/thufir/glassfish-3.0.1/glassfish/domains/domain1/config/domain.xml | grep 8081 
    189   <network-listener port="8081" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" /> 
[email protected]:~$ 
[email protected]:~$ 
[email protected]:~$ ll /home/thufir/glassfish-3.0.1/glassfish/lib/templates/domain.xml 
-rw-rw-r-- 1 thufir thufir 12804 2010-06-08 15:37 /home/thufir/glassfish-3.0.1/glassfish/lib/templates/domain.xml 
[email protected]:~$ 

然而,现在的GlassFish似乎是确定运行,但我宁愿它在8080,因为它是在默认情况下。我只是不明白为什么有一个数据库连接,显然,没有数据库 - 这当然不是一个我选择。

[email protected]:~$ 
[email protected]:~$ sudo lsof -i :1527 
[sudo] password for thufir: 
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME 
java 4757 thufir 27u IPv6 46934  0t0 TCP localhost.localdomain:1527 (LISTEN) 
[email protected]:~$ 
[email protected]:~$ 
[email protected]:~$ 
[email protected]:~$ nl /home/thufir/glassfish-3.0.1/glassfish/domains/domain1/config/domain.xml | grep 8081 
    189   <network-listener port="8081" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" /> 
[email protected]:~$ 
[email protected]:~$ ll /home/thufir/glassfish-3.0.1/glassfish/lib/templates/domain.xml 
-rw-rw-r-- 1 thufir thufir 12804 2010-06-08 15:37 /home/thufir/glassfish-3.0.1/glassfish/lib/templates/domain.xml 
[email protected]:~$ 
[email protected]:~$ sudo lsof -i :1527 
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME 
java 4757 thufir 27u IPv6 46934  0t0 TCP localhost.localdomain:1527 (LISTEN) 
[email protected]:~$ 
[email protected]:~$ 

回答

2

这意味着端口8080已被您的系统中的其他进程使用。

尝试运行sudo lsof -i:8080以查看在该端口上运行的进程/服务并终止它。

另一种解决方案是完全改变的端口号。

我上一次在一年前第二次安装Netbeans时遇到过这种问题,但据我所知我有v2 glassfish和v3 beta(2年前)。

我所做的是改变端口号。看看domain.xml中(可能),并更改端口号8080到别的东西(未占用的端口)。

+0

'thufir @ tleilax:〜$ thufir @ tleilax:〜$须藤lsof的-i:8080 COMMAND PID USER FD型器件SIZE/OFF NODE NAME 的java 7277 thufir 34U的IPv6 146037 0t0 TCP *:HTTP-ALT( LISTEN) thufir @ tleilax:〜删除德比db和编辑Glkassfish domain.xml中所描述的后$' – Thufir 2011-03-03 05:39:37

+0

,它运行:) – Thufir 2011-03-03 06:26:27

相关问题