Skip to main content

service failed to start : com.sun.enterprise.naming.GlassFishNamingBuilder

No replies
ablyes
Offline
Joined: 2012-08-10
Points: 0

I want to deploy on glassfish-embedded, but the server doesn't startup. Here is my error:

GRAVE: Startup service failed to start : com.sun.enterprise.naming.GlassFishNamingBuilder
14 ao¹t 2012 16:43:39 com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1 onReady
INFO: Grizzly Framework 1.9.46 started in: 78ms - bound to [0.0.0.0:7070]
14 ao¹t 2012 16:43:39 com.sun.enterprise.v3.admin.StopServer doExecute
INFO: Server shutdown initiated
</pre>
<pre>Results :

</pre>
<pre>Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

In final, i have 0 test passed.
Here is a part of my pom.xml project:

<profile>
            <id>arquillian-glassfish-h2-embedded</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
                    <version>1.0.0.CR3</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish.main.extras</groupId>
                    <artifactId>glassfish-embedded-all</artifactId>
                    <version>3.1.2</version>
                    <scope>provided</scope>
                </dependency>
                <!--
                <dependency>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-entitymanager</artifactId>
                    <version>3.3.2.GA</version>
                    <scope>test</scope>
                </dependency>
                -->
                <dependency>
                    <groupId>org.apache.derby</groupId>
                    <artifactId>derby</artifactId>
                    <version>10.8.2.2</version>
                    <scope>test</scope>
                </dependency>
               
               
               
                <dependency>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate</artifactId>
                    <version>3.2.2.ga</version>
                    <exclusions>
                        <exclusion>
                            <groupId>asm</groupId>
                            <artifactId>asm</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>asm</groupId>
                            <artifactId>asm-attrs</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>cglib</groupId>
                            <artifactId>cglib</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>asm</groupId>
                    <artifactId>asm</artifactId>
                    <version>2.2.3</version>
                </dependency>
                <dependency>
                    <groupId>cglib</groupId>
                    <artifactId>cglib-nodep</artifactId>
                    <version>2.1_3</version>
                </dependency>
                                <!--
                <dependency>
                    <groupId>com.h2database</groupId>
                    <artifactId>h2</artifactId>
                    <version>1.3.166</version>
                    <scope>test</scope>
                </dependency>
                -->
                 <dependency>
                    <groupId>org.glassfish.security</groupId>
                    <artifactId>websecurity </artifactId>
                    <version>3.1</version>
                </dependency>
<!--
                <dependency>
                    <groupId>org.osgi</groupId>
                    <artifactId>org.osgi.core</artifactId>
                    <version>4.2.0</version>
                    <scope>test</scope>
                </dependency>
                -->
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <!-- changed version from 2.12 to 2.11 because of bug regression in 2.12 -->
                        <!-- http://jira.codehaus.org/browse/SUREFIRE-836 -->
                        <version>2.11</version>
                        <configuration>
                            <systemPropertyVariables>
                                <arquillian.launch>glassfish_embedded</arquillian.launch>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
                <testResources>
                    <testResource>
                        <directory>src/test/resources</directory>
                    </testResource>
                    <testResource>
                        <directory>src/test/resources-glassfish-h2-embedded</directory>
                    </testResource>
                </testResources>
            </build>
        </profile>

I tested with H2 and derby databases.
When i don't add the artifact [org.glassfish.security, security, anyVersion], the server starts, but i have this error:

GRAVE: PWC3989: An exception or error occurred in the container during the request processing
java.lang.NoClassDefFoundError: Could not initialize class com.sun.enterprise.security.jmac.config.HttpServletHelper
        at com.sun.web.security.RealmAdapter.getConfigHelper(RealmAdapter.java:1412)
        at com.sun.web.security.RealmAdapter.initConfigHelper(RealmAdapter.java:1741)
        at com.sun.web.security.RealmAdapter.findSecurityConstraints(RealmAdapter.java:1169)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:623)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:662)

I need your help.
Thank you.