2

我有一个写作任务unit tests,逐渐变成了写作integration tests。我对embedded glassfish server. 我会尽力解释我的问题,请多多包涵。

这是我的相关pom.xml部分:

<dependency>
    <groupId>org.glassfish.main.extras</groupId>
    <artifactId>glassfish-embedded-all</artifactId>
    <version>4.1.2</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
    <scope>test</scope>
    <type>jar</type>
</dependency>

这是我相关的 TestClass(EmbeddedContainerFirstTest) 代码:

public class EmbeddedContainerFirstTest extends TestCase {

     private Context  ctx;
     private EJBContainer ejbContainer;

    @BeforeClass
    public  void setUp() {
        // below line is where exception is thrown. 
        // so my ejb beans can not be deployed successfully to glassfish embedded server
        ejbContainer = EJBContainer.createEJBContainer();
        System.out.println("Opening the container" );
        ctx = ejbContainer.getContext();
    }

    @AfterClass
    public  void tearDown() {
        ejbContainer.close();
        System.out.println("Closing the container" );
    }
}

想象一个ear文件,其中有jars超过 5 家公司。我们将该文件部署到WildFly 10.0. 我在 stackoverflow 上找到了这篇Java EE applications关于为. 当我在一个简单的模块上尝试它时它可以工作,但是当我在一个具有其他公司依赖项的模块上尝试它时它会失败。它失败了:

Exception Details:
  Location:
    com/milsoft/turkuaz/core/comm/dds/TurkuazAbstractDDSEntityCommunicator.newData(Ljava/lang/String;Lcom/milsoft/turkuaz/core/comm/TurkuazMessage;)V @28: ifeq
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0x0000000: 2cb9 0022 0100 4e2a b400 142d 03b9 0024
    0x0000010: 0300 3a04 b200 13b9 002a 0100 9900 35b2
    0x0000020: 0013 bb00 1059 b700 192a b600 18b6 001a
    0x0000030: 1203 b600 1b2a b400 15b6 0018 b600 1a12
    0x0000040: 01b6 001b 1904 b600 1ab6 001c b900 2802
    0x0000050: 002a b400 1519 04b9 0026 0200 b1

        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getConstructors(Class.java:1651)
        at org.glassfish.apf.impl.ComponentDefinition.initializeConstructors(ComponentDefinition.java:116)
        at org.glassfish.apf.impl.ComponentDefinition.<init>(ComponentDefinition.java:74)
        at org.glassfish.apf.impl.JavaEEScanner.getComponentInfo(JavaEEScanner.java:70)
        at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:177)
        at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134)
        at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:627)
        at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:463)
        at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:447)
        at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:419)
        at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
        at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
        at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:611)
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:229)
        at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:232)
        at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:193)
        at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227)
        at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
        at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
        at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:141)
        at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:134)
        at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:127)
        at EmbeddedContainerFirstTest.setUp(EmbeddedContainerFirstTest.java:26)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Haz 21, 2017 10:43:40 AM org.glassfish.deployment.admin.DeployCommand execute
SEVERE: Exception while deploying the app [ejb-app] : Expecting a stackmap frame at branch target 81
Exception Details:
  Location:
    com/milsoft/turkuaz/core/comm/dds/TurkuazAbstractDDSEntityCommunicator.newData(Ljava/lang/String;Lcom/milsoft/turkuaz/core/comm/TurkuazMessage;)V @28: ifeq
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0x0000000: 2cb9 0022 0100 4e2a b400 142d 03b9 0024
    0x0000010: 0300 3a04 b200 13b9 002a 0100 9900 35b2
    0x0000020: 0013 bb00 1059 b700 192a b600 18b6 001a
    0x0000030: 1203 b600 1b2a b400 15b6 0018 b600 1a12
    0x0000040: 01b6 001b 1904 b600 1ab6 001c b900 2802
    0x0000050: 002a b400 1519 04b9 0026 0200 b1

Haz 21, 2017 10:43:40 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer
INFO: [EJBContainerProviderImpl] Cleaning up on failure ...
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 37.581 sec <<< FAILURE!
testApp(EmbeddedContainerFirstTest)  Time elapsed: 37.537 sec  <<< ERROR!
javax.ejb.EJBException: Failed to deploy EJB modules - see log for details
        at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:149)
        at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:134)
        at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:127)
        at EmbeddedContainerFirstTest.setUp(EmbeddedContainerFirstTest.java:26)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

下面是project view,在editor panel of Idea line 95是抛出异常的地方。它也是我的Singleton beanTurkuazMessage班级来自另一家公司jar,我无权访问source code该公司jar

在此处输入图像描述

这个失败是由于一些jarsdifferent java versions. 在my server run configuration我解决了它添加-noverifyVM options. 如果我从中删除-noverifymy server run conf. vm options我会得到same exception上述内容。所以,我也需要run embedded glassfish with -noverify。为此,我将我的模块添加custom domain.xml到. 之间的唯一区别是。这是我的:test sourcesIdeamy domain.xml and default domain.xmljvm optionsdomain.xml

<domain log-root="${com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}/applications" version="10.0">
    <security-configurations>
        <authorization-service default="true" name="authorizationService">
            <security-provider name="simpleAuthorization" type="Simple" provider-name="simpleAuthorizationProvider">
                <authorization-provider-config support-policy-deploy="false" name="simpleAuthorizationProviderConfig"></authorization-provider-config>
            </security-provider>
        </authorization-service>
    </security-configurations>
    <system-applications />
    <applications />
    <resources>
        <jdbc-resource pool-name="__TimerPool" jndi-name="jdbc/__TimerPool" object-type="system-admin" />
        <jdbc-resource pool-name="DerbyPool" jndi-name="jdbc/__default" object-type="system-all" />
        <jdbc-connection-pool name="__TimerPool" datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource">
            <property value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer" name="databaseName" />
            <property value=";create=true" name="connectionAttributes" />
        </jdbc-connection-pool>
        <jdbc-connection-pool is-isolation-level-guaranteed="false" name="DerbyPool" datasource-classname="org.apache.derby.jdbc.EmbeddedDataSource" res-type="javax.sql.DataSource">
            <property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/embedded_default" />
            <property name="connectionAttributes" value=";create=true" />
        </jdbc-connection-pool>
    </resources>
    <servers>
        <server name="server" config-ref="server-config">
            <resource-ref ref="jdbc/__TimerPool" />
            <resource-ref ref="jdbc/__default" />
        </server>
    </servers>
    <configs>
        <config name="server-config">
            <http-service>
                <access-log rotation-interval-in-minutes="15" rotation-suffix="yyyy-MM-dd" />
                <virtual-server id="server" network-listeners="http-listener, https-listener" />
            </http-service>
            <iiop-service>
                <orb use-thread-pool-ids="thread-pool-1" />
                <iiop-listener address="0.0.0.0" port="3700" id="orb-listener-1" />
                <iiop-listener security-enabled="true" address="0.0.0.0" port="3820" id="SSL">
                    <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" />
                </iiop-listener>
                <iiop-listener security-enabled="true" address="0.0.0.0" port="3920" id="SSL_MUTUALAUTH">
                    <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true" />
                </iiop-listener>
            </iiop-service>
            <admin-service type="das-and-server" system-jmx-connector-name="system">
                <jmx-connector enabled="false" auth-realm-name="admin-realm" security-enabled="false" address="0.0.0.0" port="8686" name="system" />
                <das-config autodeploy-enabled="false" dynamic-reload-enabled="true" deploy-xml-validation="full" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" />
                <property value="/admin" name="adminConsoleContextRoot" />
                <property value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war" name="adminConsoleDownloadLocation" />
                <property value="${com.sun.aas.installRoot}/.." name="ipsRoot" />
            </admin-service>
            <connector-service shutdown-timeout-in-seconds="30">
            </connector-service>
            <ejb-container steady-pool-size="0" max-pool-size="32" session-store="${com.sun.aas.instanceRoot}/session-store" pool-resize-quantity="8">
                <ejb-timer-service />
            </ejb-container>
            <mdb-container steady-pool-size="0" max-pool-size="32" pool-resize-quantity="8" >
            </mdb-container>
            <jms-service type="EMBEDDED" default-jms-host="default_JMS_host">
                <jms-host name="default_JMS_host" host="localhost" port="7676" admin-user-name="admin" admin-password="admin" lazy-init="false"/>
            </jms-service>
            <log-service file="${com.sun.aas.instanceRoot}/logs/server.log" log-rotation-limit-in-bytes="2000000">
                <module-log-levels />
            </log-service>
            <security-service activate-default-principal-to-role-mapping="true" jacc="simple">
                <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
                    <property value="${com.sun.aas.instanceRoot}/config/admin-keyfile" name="file" />
                    <property value="fileRealm" name="jaas-context" />
                </auth-realm>
                <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
                    <property value="${com.sun.aas.instanceRoot}/config/keyfile" name="file" />
                    <property value="fileRealm" name="jaas-context" />
                </auth-realm>
                <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate" />
                <jacc-provider policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl" policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default">
                    <property value="${com.sun.aas.instanceRoot}/generated/policy" name="repository" />
                </jacc-provider>
                <jacc-provider policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory" policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" />
                <audit-module classname="com.sun.enterprise.security.ee.Audit" name="default">
                    <property value="false" name="auditOn" />
                </audit-module>
                <message-security-config auth-layer="SOAP">
                    <provider-config provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-type="client">
                        <request-policy auth-source="content" />
                        <response-policy auth-source="content" />
                        <property value="s1as" name="encryption.key.alias" />
                        <property value="s1as" name="signature.key.alias" />
                        <property value="false" name="dynamic.username.password" />
                        <property value="false" name="debug" />
                    </provider-config>
                    <provider-config provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-type="client">
                        <request-policy auth-source="content" />
                        <response-policy auth-source="content" />
                        <property value="s1as" name="encryption.key.alias" />
                        <property value="s1as" name="signature.key.alias" />
                        <property value="false" name="dynamic.username.password" />
                        <property value="false" name="debug" />
                        <property value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml" name="security.config" />
                    </provider-config>
                    <provider-config provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-type="server">
                        <request-policy auth-source="content" />
                        <response-policy auth-source="content" />
                        <property value="s1as" name="encryption.key.alias" />
                        <property value="s1as" name="signature.key.alias" />
                        <property value="false" name="debug" />
                    </provider-config>
                    <provider-config provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule" provider-type="server">
                        <request-policy auth-source="content" />
                        <response-policy auth-source="content" />
                        <property value="s1as" name="encryption.key.alias" />
                        <property value="s1as" name="signature.key.alias" />
                        <property value="false" name="debug" />
                        <property value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml" name="security.config" />
                    </provider-config>
                </message-security-config>
                <property value="SHA-256" name="default-digest-algorithm" />
            </security-service>
            <monitoring-service>
                <module-monitoring-levels />
            </monitoring-service>
            <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs" >
            </transaction-service>
            <java-config>
                <!--<jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>-->
                <!--<jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>-->
                <!--<jvm-options>-Dorg.glassfish.jms.InitializeOnDemand=true</jvm-options>-->
                <jvm-options>-Xms64m</jvm-options>
                <jvm-options>-Xmx512m</jvm-options>
                <jvm-options>-XX:+UseConcMarkSweepGC</jvm-options>
                <jvm-options>-Dorg.jboss.resolver.warning=true</jvm-options>
                <jvm-options>-Djava.net.preferIPv4Stack=true</jvm-options>
                <jvm-options>-Dsun.rmi.dgc.client.gcInterval=3600000</jvm-options>
                <jvm-options>-Dsun.rmi.dgc.server.gcInterval=3600000</jvm-options>
                <jvm-options>-Djboss.modules.system.pkgs=org.jboss.byteman</jvm-options>
                <jvm-options>-Djava.awt.headless=true</jvm-options>
                <jvm-options>-noverify</jvm-options>
                <jvm-options>-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl</jvm-options>
                <jvm-options>-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl</jvm-options>
            </java-config>
            <network-config>
                <protocols>
                    <protocol name="http-listener">
                        <http default-virtual-server="server" max-connections="250">
                            <file-cache enabled="false"></file-cache>
                        </http>
                    </protocol>
                    <protocol security-enabled="true" name="https-listener">
                        <http default-virtual-server="server" max-connections="250">
                            <file-cache enabled="false"></file-cache>
                        </http>
                        <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" ssl3-enabled="false" cert-nickname="s1as"></ssl>
                    </protocol>
                </protocols>
                <network-listeners>
                    <network-listener port="0" protocol="http-listener" transport="tcp" name="http-listener" thread-pool="http-thread-pool" enabled="false" />
                    <network-listener port="0" protocol="https-listener" transport="tcp" name="https-listener" thread-pool="http-thread-pool" enabled="false" />
                </network-listeners>
                <transports>
                    <transport name="tcp"></transport>
                </transports>
            </network-config>
            <thread-pools>
                <thread-pool name="http-thread-pool" max-queue-size="4096"></thread-pool>
                <thread-pool name="thread-pool-1" max-thread-pool-size="200"/>
            </thread-pools>
        </config>
    </configs>
    <property name="administrative.domain.name" value="domain1"/>
</domain>

使用上面domain.xml并没有解决我的问题。我能做些什么来解决这个问题?如果您需要更多信息,我会尽快添加。我对任何想法持开放态度。提前致谢。

4

0 回答 0