Search code examples
javaweblogic12ctogglz

togglz-console included in Java EE7 application running on Weblogic 12.2.1.0


I'm trying to get the togglz-console up and running in our Java EE7 Application running on Weblogic 12.2.1.0. In order to use the console I added the dependency as stated on the togglz webpage, no addition to web.xml since I assume Weblogic will be able to run servlets.

However, when I try to deploy the application I get the following error:

[ERROR] Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.2.1-0-0:redeploy (wls-redeploy) on project foobar: weblogic.Deployer$DeployerException: weblogic.deploy.api.tools.deployer.DeployerException: Task 4 failed: [Deployer:149026]deploy application foobar on foobarcluster.
[ERROR] Target state: redeploy failed on Cluster foobarcluster
[ERROR] weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
[ERROR] <path_to_basedomain>\base_domain\weblogic.utils.classloaders.GenericClassLoader@26f37eff finder: weblogic.utils.classloaders.CodeGenClassFinder@70f09e70 annotation: foobar@\WEB-INF\lib\togglz-console-2.4.0.Final.jar!\META-INF\web-fragment.xml:6:26:6:26: problem: cvc-datatype-valid.1.1: string value 'togglz-console' does not match pattern for java-identifierType in namespace http://java.sun.com/xml/ns/javaee

I also tried to include servlet-mapping and servlet in web.xml but this doesn't help either.

Some more investigation reveals, that our application's web.xml uses Servlet Version 3.1 while the web-fragment.xml inside the togglz-console.jar uses 3.0. Looks like a namespace conflict that others have come across to. Will try to remove our application's web.xml completely and try again.

Any help would be greatly appreciated.


Solution

  • Looks like Weblogic has some problem with the name element in the web-fragment.xml file. I think this was added in Togglz 2.4.0, so you could try to use 2.3.0 instead.

    Also, if Weblogic allows to disable XML descriptor validation, this would be a way to work around this.