Skip to Main Content

Running JUnit for EJB

User_5FXCEMar 8 2016 — edited Mar 8 2016

Hi,

I am trying to run JUnit testcase for EJB. But getting below error.

Caused by: weblogic.server.embed.EmbeddedServerException: Error creating default domain

  at weblogic.server.embed.internal.DomainConfig.createConfig(DomainConfig.java:215)

  at weblogic.server.embed.internal.DomainConfig.getDefaultDomain(DomainConfig.java:124)

  at weblogic.server.embed.internal.DomainConfig.ensureInitialized(DomainConfig.java:57)

  at weblogic.server.embed.internal.EmbeddedServerImpl.ensureStarted(EmbeddedServerImpl.java:208)

  at weblogic.server.embed.internal.EmbeddedServerImpl.start(EmbeddedServerImpl.java:108)

  at weblogic.ejb.embeddable.EJBContainerImpl.initializeServer(EJBContainerImpl.java:98)

  ... 18 more

Caused by: weblogic.descriptor.DescriptorValidateException: The following failures occurred:

-- Unresolved reference to WebLogicCertPathProvider by [mydomain]/SecurityConfiguration[mydomain]/Realms[myrealm]/CertPathBuilder

  at weblogic.descriptor.internal.ReferenceManager.resolveReferences(ReferenceManager.java:365)

  at weblogic.descriptor.internal.DescriptorImpl.resolveReferences(DescriptorImpl.java:490)

I'm using Jdev Version 12.2.1.0.0

written below code,

            Map<String, Object> properties = new HashMap<String, Object>();

            properties.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");

            properties.put(Context.SECURITY_PRINCIPAL,"weblogic");

            properties.put(Context.SECURITY_CREDENTIALS,"weblogic1");

            properties.put(Context.PROVIDER_URL,"t3://10.184.87.129:8101");

            System.setProperty("weblogic.home", "D:\\Oracle\\12.2.1\\Middleware\\Oracle_Home\\wlserver");

            properties.put(EJBContainer.PROVIDER, "weblogic.ejb.embeddable.EJBContainerProvider");

            container=EJBContainer.createEJBContainer(properties);

kindly provide the suggestion how to proceed with this.

Thanks,

Arun

Comments
Post Details
Added on Mar 8 2016
0 comments
493 views