users@glassfish.java.net

How to get rid of exceptions when starting glassfish 3.1 embedded.

From: <forums_at_java.net>
Date: Wed, 8 Feb 2012 14:24:00 -0600 (CST)

I am new at using glassfish and I am interested in running Glassfish
embedded.

I am using latest netbean and all I am doing it to run this code from the
IDE.
I added the jar glassfish-embedded-all-3.1.jar to to project.

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package startglassfish;

import org.glassfish.embeddable.*
/**
 *
 */
public class StartGlassfish {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        try
        {   
            GlassFishProperties gfProps = new
GlassFishProperties();
            gfProps.setPort("http-listener", 8080); // refer
JavaDocs for the details of this API.
            GlassFish glassfish =
GlassFishRuntime.bootstrap().newGlassFish(gfProps);
            //GlassFish glassfish =
GlassFishRuntime.bootstrap().newGlassFish();
            glassfish.start();
        }
        catch(Exception e)
        {   
        }
    }
}

 

I am getting all these exceptions. I would need help to resolve.

Feb 08, 2012 11:52:27 AM org.hibernate.validator.util.Version <clinit>
INFO: Hibernate Validator 4.1.0.Final
Feb 08, 2012 11:52:27 AM
org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA
INFO: Instantiated an instance of
org.hibernate.validator.engine.resolver.JPATraversableResolver.
Feb 08, 2012 11:52:28 AM
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory
processXMLProbeProviders
SEVERE: MNTG0301:Cannot process XML ProbeProvider, xml =
META-INF/gfprobe-provider.xml
java.lang.IllegalStateException: Provider already mapped
glassfish:javamail:smtp-transport
 at
org.glassfish.flashlight.impl.core.ProbeProviderRegistry.registerProbeProvider(ProbeProviderRegistry.java:100)
 at
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.registerProvider(FlashlightProbeProviderFactory.java:539)
 at
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.processXMLProbeProviders(FlashlightProbeProviderFactory.java:364)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.processProbeProviderXML(MonitoringBootstrap.java:484)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.processManifest(MonitoringBootstrap.java:360)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.addProvider(MonitoringBootstrap.java:301)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.verifyModule(MonitoringBootstrap.java:245)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.discoverProbeProviders(MonitoringBootstrap.java:188)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.enableMonitoringForProbeProviders(MonitoringBootstrap.java:624)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.postConstruct(MonitoringBootstrap.java:176)
 at
com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
 at
com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
 at
com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
 at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
 at
com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
 at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
 at
com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:229)
 at
com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145)
 at
com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136)
 at
com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
 at startglassfish.StartGlassfish.main(StartGlassfish.java:27)

Feb 08, 2012 11:52:28 AM
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory
processXMLProbeProviders
SEVERE: MNTG0301:Cannot process XML ProbeProvider, xml =
META-INF/mojarra-jsf-api-probe-provider.xml
java.lang.IllegalStateException: Provider already mapped
glassfish:jsf:faces-servlet
 at
org.glassfish.flashlight.impl.core.ProbeProviderRegistry.registerProbeProvider(ProbeProviderRegistry.java:100)
 at
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.registerProvider(FlashlightProbeProviderFactory.java:539)
 at
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.processXMLProbeProviders(FlashlightProbeProviderFactory.java:364)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.processProbeProviderXML(MonitoringBootstrap.java:484)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.processManifest(MonitoringBootstrap.java:360)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.addProvider(MonitoringBootstrap.java:301)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.verifyModule(MonitoringBootstrap.java:245)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.discoverProbeProviders(MonitoringBootstrap.java:188)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.enableMonitoringForProbeProviders(MonitoringBootstrap.java:624)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.postConstruct(MonitoringBootstrap.java:176)
 at
com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
 at
com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
 at
com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
 at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
 at
com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
 at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
 at
com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:229)
 at
com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145)
 at
com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136)
 at
com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
 at startglassfish.StartGlassfish.main(StartGlassfish.java:27)

Feb 08, 2012 11:52:28 AM
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory
processXMLProbeProviders
SEVERE: MNTG0301:Cannot process XML ProbeProvider, xml =
jersey-gf-server-probe-provider.xml
java.lang.IllegalStateException: Provider already mapped
glassfish:jersey:server-hidden
 at
org.glassfish.flashlight.impl.core.ProbeProviderRegistry.registerProbeProvider(ProbeProviderRegistry.java:100)
 at
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.registerProvider(FlashlightProbeProviderFactory.java:539)
 at
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.processXMLProbeProviders(FlashlightProbeProviderFactory.java:364)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.processProbeProviderXML(MonitoringBootstrap.java:484)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.processManifest(MonitoringBootstrap.java:360)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.addProvider(MonitoringBootstrap.java:301)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.verifyModule(MonitoringBootstrap.java:245)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.discoverProbeProviders(MonitoringBootstrap.java:188)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.enableMonitoringForProbeProviders(MonitoringBootstrap.java:624)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.postConstruct(MonitoringBootstrap.java:176)
 at
com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
 at
com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
 at
com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
 at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
 at
com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
 at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
 at
com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:229)
 at
com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145)
 at
com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136)
 at
com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
 at startglassfish.StartGlassfish.main(StartGlassfish.java:27)

Feb 08, 2012 11:52:28 AM
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory
processXMLProbeProviders
SEVERE: MNTG0301:Cannot process XML ProbeProvider, xml =
jersey-gf-statsprovider-probe-provider.xml
java.lang.IllegalStateException: Provider already mapped
glassfish:jersey:server
 at
org.glassfish.flashlight.impl.core.ProbeProviderRegistry.registerProbeProvider(ProbeProviderRegistry.java:100)
 at
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.registerProvider(FlashlightProbeProviderFactory.java:539)
 at
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.processXMLProbeProviders(FlashlightProbeProviderFactory.java:364)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.processProbeProviderXML(MonitoringBootstrap.java:484)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.processManifest(MonitoringBootstrap.java:360)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.addProvider(MonitoringBootstrap.java:301)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.verifyModule(MonitoringBootstrap.java:245)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.discoverProbeProviders(MonitoringBootstrap.java:188)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.enableMonitoringForProbeProviders(MonitoringBootstrap.java:624)
 at
org.glassfish.admin.monitor.MonitoringBootstrap.postConstruct(MonitoringBootstrap.java:176)
 at
com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
 at
com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
 at
com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
 at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
 at
com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
 at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
 at
com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:229)
 at
com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145)
 at
com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136)
 at
com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
 at startglassfish.StartGlassfish.main(StartGlassfish.java:27)

Feb 08, 2012 11:52:28 AM com.sun.enterprise.v3.services.impl.GrizzlyService
createNetworkProxy
INFO: Network listener https-listener on port 0 disabled per domain.xml
Feb 08, 2012 11:52:28 AM com.sun.enterprise.v3.services.impl.GrizzlyService
createNetworkProxy
INFO: Network listener https-listener on port 0 disabled per domain.xml
Feb 08, 2012 11:52:28 AM
org.glassfish.ha.store.spi.BackingStoreFactoryRegistry register
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy
for persistence-type = replicated in BackingStoreFactoryRegistry
Feb 08, 2012 11:52:28 AM com.sun.enterprise.v3.server.AppServerStartup run
SEVERE: Startup service failed to start :
com.sun.enterprise.naming.GlassFishNamingBuilder
Feb 08, 2012 11:52:28 AM com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1
onReady
INFO: Grizzly Framework 1.9.36 started in: 109ms - bound to [0.0.0.0:8080]
Feb 08, 2012 11:52:28 AM com.sun.enterprise.v3.server.AppServerStartup run
INFO: GlassFish Server Open Source Edition 3.1.1 (12) startup time : Embedded
(640ms), startup services(688ms), total(1,328ms)
Feb 08, 2012 11:52:28 AM com.sun.enterprise.v3.server.AppServerStartup run
SEVERE: Shutting down v3 due to startup exception : No free port within
range:
8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler_at_
[1]
Feb 08, 2012 11:52:28 AM com.sun.enterprise.v3.admin.StopServer doExecute
INFO: Server shutdown initiated

/


[1]
mailto:8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler_at_

--
[Message sent by forum member 'Stephane14']
View Post: http://forums.java.net/node/883372