AnsweredAssumed Answered

activiti 5.2 on weblogic and oracle

Question asked by heymjo on Feb 4, 2011
Latest reply on Aug 25, 2011 by ananthk
Hi,

Just spent a bit of time getting the distribution to run on WLS and Oracle. Here is what i did to get things working

  • configure the standard 5.2 distribution to use Oracle, using the instructions as provided in the user manual (adding jdbc driver etc). Ensure that everything still works first before continuing.

  • create a new vanilla weblogic domain using WLS 10.3 or higher. 9.2 won't work because for some reason Activiti requires a servlet 2.5 compatible container.

  • copy the war files from apps\apache-tomcat-6.0.29\webapps\ to the autodeploy directory in the domain

  • adapt surf.xml and change <endpoint-url> to the new host and port locations for each webapp

  • because of classloader issues with org.mozilla classes, you need to deploy each war as an EAR. Basically wrap each webapp in another directory and add in META-INF an application.xml like this

  • <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5">
      <module>
        <web>
          <web-uri>cycle-5.2.war</web-uri>
          <context-root>/activiti-cycle</context-root>
        </web>
      </module>
    </application>
    and also a weblogic-application.xml like this

    <weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application
    http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd">
      <prefer-application-packages>
        <package-name>org.mozilla.*</package-name>
      </prefer-application-packages>
    </weblogic-application>

  • lastly, you need to disable weblogic handling of basic authentication. by default it will intercept all basic auth requests and reject them unless the domain is correctly configured for the basic auth. This doesn't make sense for activiti because it needs to handle the auth itself. So edit config.xml and add this just before the closing tag </security-configuration>

  •   <enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
That's pretty much it and things should work now.

The only thing that doesn't work is the modeler, upon deployment it throws a classnotfoundexception which is very strange:


<04-Feb-2011 15:18:45 o'clock CET> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: Failed to load webapp: '/activiti-modeler'
        at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:378)
        at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
        at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        Truncated. see log file for complete stacktrace

Caused By: java.lang.ClassNotFoundException: org.oryxeditor.server.BPMNLayouterServlet
        at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296)
        at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
        at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        Truncated. see log file for complete stacktrace

I looked through the complete distribution for this class but cannot find it. Anyone have an idea what is going on ? I have found a reference to signavio.war in jboss-classloading.xml but where does signavio.war come from ?

HTH,
Jorg

Outcomes