我正在使用NetBeans 7.3,Glassfish 3.1.2.2和Maven。当我将我的应用程序部署到Glassfish时,我得到以下日志:
Launching GlassFish on Felix platform
INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
INFO: Grizzly Framework 1.9.50 started in: 3ms - bound to [0.0.0.0:3700]
INFO: Grizzly Framework 1.9.50 started in: 15ms - bound to [0.0.0.0:8181]
INFO: Grizzly Framework 1.9.50 started in: 27ms - bound to [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.50 started in: 8ms - bound to [0.0.0.0:4848]
INFO: Grizzly Framework 1.9.50 started in: 1ms - bound to [0.0.0.0:7676]
INFO: The Admin Console is already installed, but not yet loaded.
INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]
INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]
INFO: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848]
INFO: WEB0171: Created virtual server [server]
INFO: WEB0171: Created virtual server [__asadmin]
INFO: WEB0172: Virtual server [server] loaded default web module []
INFO: core.start_container_done
INFO: SEC1002: Security Manager is OFF.
INFO: SEC1010: Entering Security Startup Service
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
INFO: SEC1011: Security Service(s) Started Successfully
WARNING: DPL8027: Ignore WEB-INF/sun-web.xml in archive /C:/Users/Tiago Peres/Documents/NetBeansProjects/playground-websockets/target/playground-websockets-1.0-SNAPSHOT/, as GlassFish counterpart runtime xml WEB-INF/glassfish-web.xml is present in the same archive.
INFO: WELD-000900 1.1.8 (Final)
INFO: HV000001: Hibernate Validator 4.3.0.Final
INFO: Activating CDI extension for Spring Data JPA repositories.
INFO: PWC1412: WebModule[null] ServletContext.log():No Spring WebApplicationInitializer types detected on classpath
INFO: Inicializando Mojarra 2.1.6 (SNAPSHOT 20111206) para o contexto '/playground-websockets'
INFO: Monitoring jndi:/server/playground-websockets/WEB-INF/faces-config.xml for modifications
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1a4ffb5b: startup date [Thu Mar 14 14:11:17 BRT 2013]; root of context hierarchy
INFO: Loading XML bean definitions from URL [jndi:/server/playground-websockets/WEB-INF/beans.xml]
INFO: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
INFO: JSR-330 'javax.inject.Named' annotation found and supported for component scanning
INFO: Overriding bean definition for bean 'loginService': replacing [Generic bean: class [com.playground.core.service.impl.LoginServiceImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/C:/Users/Tiago%20Peres/Documents/NetBeansProjects/playground-websockets/target/playground-websockets-1.0-SNAPSHOT/WEB-INF/lib/playground-core-1.0-SNAPSHOT.jar!/com/playground/core/service/impl/LoginServiceImpl.class]] with [Generic bean: class [com.playground.core.service.impl.LoginServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jndi:/server/playground-websockets/WEB-INF/beans.xml]]
INFO: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
INFO: Bean 'dataSource' of type [class org.springframework.jdbc.datasource.DriverManagerDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: Bean 'persistenceProvider' of type [class org.hibernate.ejb.HibernatePersistence] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: Bean 'jpaVendorAdapter' of type [class org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: Bean 'jpaDialect' of type [class org.springframework.orm.jpa.vendor.HibernateJpaDialect] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: persistence-websockets.xml should be located inside META-INF directory; cannot determine persistence unit root URL for class path resource [persistence-websockets.xml]
INFO: Building JPA container EntityManagerFactory for persistence unit 'playground-websockets'
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
INFO: HHH000412: Hibernate Core {4.1.6.Final}
INFO: HHH000206: hibernate.properties not found
INFO: HHH000021: Bytecode provider name : javassist
INFO: HHH000204: Processing PersistenceUnitInfo [
name: playground-websockets
...]
INFO: HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
INFO: HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
INFO: HHH000397: Using ASTQueryTranslatorFactory
INFO: HHH000229: Running schema validator
INFO: HHH000102: Fetching database metadata
INFO: HHH000261: Table found: playground.gametitle
INFO: HHH000037: Columns: [id, playedtimes, name, maximumnumberofplayers, rating, launchdate]
INFO: HHH000261: Table found: playground.player
INFO: HHH000037: Columns: [id, nickname, facebookid]
INFO: HHH000261: Table found: playground.score
INFO: HHH000037: Columns: [id, playedtimes, gametitle_id, victories, losses, player_id, points]
INFO: HHH000261: Table found: playground.hibernate_sequence
INFO: HHH000037: Columns: [next_val]
INFO: Bean 'entityManagerFactory' of type [class org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@56983a92: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,scoreRepositoryImpl,scoreRepository,gameTitleRepositoryImpl,gameTitleRepository,playerRepositoryImpl,playerRepository,org.springframework.data.repository.core.support.RepositoryInterfaceAwareBeanPostProcessor#0,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,invitationRepositoryImpl,loggedPlayerRepository,queueRepositoryImpl,roomRepositoryImpl,invitationServiceImpl,loginService,queueServiceImpl,roomServiceImpl,dataSource,entityManagerFactory,persistenceProvider,jpaDialect,jpaVendorAdapter,org.springframework.transaction.config.internalTransactionAspect,transactionManager,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#1,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#1,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
INFO: Using JTA UserTransaction: com.sun.enterprise.transaction.UserTransactionImpl@45f8a36d
INFO: Using JTA TransactionManager: com.sun.enterprise.transaction.TransactionManagerHelper@46b16cfe
INFO: Using JTA TransactionSynchronizationRegistry: com.sun.enterprise.transaction.TransactionSynchronizationRegistryImpl@c91aca4
INFO: ***MyWebSocketApplication registered successfully in the Servlet***
INFO: ***LoginApplication registered successfully in the Servlet***
INFO: WEB0671: Loading application [playground-websockets] at [/playground-websockets]
INFO: CORE10010: Loading application playground-websockets done in 21.807 ms
INFO: GlassFish Server Open Source Edition 3.1.2.2 (5) hora de inicialização : Felix (1.296ms), serviços de inicialização(23.324ms), total(24.620ms)
INFO: Created EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 32 thread-keep-alive-seconds 60 thread-queue-capacity 2147483647 allow-core-thread-timeout false
然后它开始为“泽西岛应用程序”再次做所有事情。
INFO: Initiating Jersey application, version 'Jersey: 1.11.1 03/31/2012 06:49 PM'
INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.50 started in: 2ms - bound to [0.0.0.0:8080]
INFO: REST00001: Listening to REST requests at context: /management/domain
INFO: The Admin Console is already installed, but not yet loaded.
INFO: The Admin Console is starting. Please wait.
INFO: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://Tiago-PC:8686/jndi/rmi://Tiago-PC:8686/jmxrmi
INFO: Inicializando Mojarra 2.1.6 (SNAPSHOT 20111206) para o contexto ''
WARNING: DPL8027: Ignore WEB-INF/sun-web.xml in archive /C:/Users/Tiago Peres/Documents/NetBeansProjects/playground-websockets/target/playground-websockets-1.0-SNAPSHOT/, as GlassFish counterpart runtime xml WEB-INF/glassfish-web.xml is present in the same archive.
INFO: WEB0671: Loading application [__admingui] at [/]
INFO: CORE10010: Loading application __admingui done in 2.489 ms
INFO: The Admin Console application is loaded.
INFO: Activating CDI extension for Spring Data JPA repositories.
INFO: PWC1412: WebModule[null] ServletContext.log():No Spring WebApplicationInitializer types detected on classpath
INFO: Inicializando Mojarra 2.1.6 (SNAPSHOT 20111206) para o contexto '/playground-websockets'
INFO: Monitoring jndi:/server/playground-websockets/WEB-INF/faces-config.xml for modifications
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@2b58140c: startup date [Thu Mar 14 14:11:40 BRT 2013]; root of context hierarchy
INFO: Loading XML bean definitions from URL [jndi:/server/playground-websockets/WEB-INF/beans.xml]
INFO: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
INFO: JSR-330 'javax.inject.Named' annotation found and supported for component scanning
INFO: Overriding bean definition for bean 'loginService': replacing [Generic bean: class [com.playground.core.service.impl.LoginServiceImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/C:/Users/Tiago%20Peres/Documents/NetBeansProjects/playground-websockets/target/playground-websockets-1.0-SNAPSHOT/WEB-INF/lib/playground-core-1.0-SNAPSHOT.jar!/com/playground/core/service/impl/LoginServiceImpl.class]] with [Generic bean: class [com.playground.core.service.impl.LoginServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jndi:/server/playground-websockets/WEB-INF/beans.xml]]
INFO: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
INFO: Bean 'dataSource' of type [class org.springframework.jdbc.datasource.DriverManagerDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: Bean 'persistenceProvider' of type [class org.hibernate.ejb.HibernatePersistence] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: Bean 'jpaVendorAdapter' of type [class org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: Bean 'jpaDialect' of type [class org.springframework.orm.jpa.vendor.HibernateJpaDialect] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: persistence-websockets.xml should be located inside META-INF directory; cannot determine persistence unit root URL for class path resource [persistence-websockets.xml]
INFO: Building JPA container EntityManagerFactory for persistence unit 'playground-websockets'
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
INFO: HHH000412: Hibernate Core {4.1.6.Final}
INFO: HHH000206: hibernate.properties not found
INFO: HHH000021: Bytecode provider name : javassist
INFO: HHH000204: Processing PersistenceUnitInfo [
name: playground-websockets
...]
INFO: HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
INFO: HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
INFO: HHH000397: Using ASTQueryTranslatorFactory
INFO: HHH000229: Running schema validator
INFO: HHH000102: Fetching database metadata
INFO: HHH000261: Table found: playground.gametitle
INFO: HHH000037: Columns: [id, playedtimes, name, maximumnumberofplayers, rating, launchdate]
INFO: HHH000261: Table found: playground.player
INFO: HHH000037: Columns: [id, nickname, facebookid]
INFO: HHH000261: Table found: playground.score
INFO: HHH000037: Columns: [id, playedtimes, gametitle_id, victories, losses, player_id, points]
INFO: HHH000261: Table found: playground.hibernate_sequence
INFO: HHH000037: Columns: [next_val]
INFO: Bean 'entityManagerFactory' of type [class org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6bbeacbf: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,playerRepositoryImpl,playerRepository,gameTitleRepositoryImpl,gameTitleRepository,scoreRepositoryImpl,scoreRepository,org.springframework.data.repository.core.support.RepositoryInterfaceAwareBeanPostProcessor#0,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,invitationRepositoryImpl,loggedPlayerRepository,queueRepositoryImpl,roomRepositoryImpl,invitationServiceImpl,loginService,queueServiceImpl,roomServiceImpl,dataSource,entityManagerFactory,persistenceProvider,jpaDialect,jpaVendorAdapter,org.springframework.transaction.config.internalTransactionAspect,transactionManager,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#1,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#1,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
INFO: Using JTA UserTransaction: com.sun.enterprise.transaction.UserTransactionImpl@32ada1c
INFO: Using JTA TransactionManager: com.sun.enterprise.transaction.TransactionManagerHelper@46b16cfe
INFO: Using JTA TransactionSynchronizationRegistry: com.sun.enterprise.transaction.TransactionSynchronizationRegistryImpl@c91aca4
INFO: ***MyWebSocketApplication registered successfully in the Servlet***
INFO: ***LoginApplication registered successfully in the Servlet***
INFO: WEB0671: Loading application [playground-websockets] at [/playground-websockets]
INFO: playground-websockets foi implantado com sucesso em 19.620 milissegundos.
INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]
INFO: Grizzly Framework 1.9.50 started in: 2ms - bound to [0.0.0.0:8181]
我不明白为什么必须将应用程序部署到Jersey。我没有任何Restfull服务,为什么我需要它?我可以删除它吗?怎么样?
提前感谢您的回答。
答案 0 :(得分:2)
日志中的第一个摘录显示Glassfish启动。如果先前部署了应用程序,Glassfish会在启动时加载它。
第二个顺序是将您的应用程序的当前版本(由Oracle Glassfish插件驱动)部署到Glassfish中。它不会跟踪Glassfish停止/启动时部署的Web应用程序版本的状态 - 因此它只是重新发布它。
如果在发布更新时Glassfish正在运行,则只应发布一次。