weblogic

How to deploy arquillian EAR package to remote server with all required dependencies

If you want to test your enterprise package with arquillian, here is my way how to do it:

0. Prerequisites

  1. Maven multimodule project
  2. application server (I’ve used Weblogic 12c)

1. Add required maven dependencies to projects:

 

 2. Create base test class

Note that all required dependencies and test classes are included in the package, so  NoClassDefFoundException will not bother you anymore ;)

3. Add arquillian.xml descriptor to src/test/resources

  3. Write a test

 

NoAccessRuntimeException while deploying mBean on weblogic 8.1

NoAccessRuntimeException will be thrown if current JNDI user has not sufficient privileges to some operations on JMX server.

But exception can also occur when InitialContext is not closed after lookup. Problem is really hard to debug as exception is thrown in different thread.

Ways to solve NoAccessRuntimeException:
  1. Add your JNDI user to group administrators in weblogic server.
  2. Find places where you create InitialContext and close it after use!

Here is code snippet: