# Problem with zk on weblogic 12.2.1.4

RicardoRivas
31

Hello, We are updating our weblogics servers to version 12.2.1.4 from 12.2.1.3. When we finish the update and test our zk application we see that the windows are not loading. We are getting an error of type ClassNotFoundExcepcion like the one shown below:

org.zkoss.zk.ui.UiException: java.lang.ClassNotFoundException: com.cajamar.zk.WSAGDBE.LWSAGDBE_v1

We use version 2.3 of servlets in the web.xml associated with the application. We use version 9.0.0 of zk on the test server. In the production server we have version 8.0.4.

Thanks.

delete retag edit

## 10 Replies

RicardoRivas
31

Hi, we have located this trace. We think it may be related:


The url-pattern /zkau/* in web application PSD2 is mapped to multiple Servlets.


thanks

cor3000
5673 2 7

Your exception (ClassNotFoundException) indicates that one of your own classes is missing on the classpath. So I'd look out for a compilation or war packaging problem.

After building a war, simply un-zip it to verify all your expected jars and classes are contained in WEB-INF/lib and WEB-INF/classes.

Besides that I personally prefer such an upgrade in a 2 step process. Upgrade the infrastructure (weblogic version) independent of the application dependencies.

e.g. Try deploying your old war file on the new weblogic version first, without any changes. Then you know whether a problem correlates with the server version update.

Once that's ruled out: Unzip both the old and the new war file and do a directory comparison. There you'll see if any files are missing or were added between your builds. This often reveals the changes potentially leading to problems.

RicardoRivas
31

Hi Our zk application works correctly on weblogic version 12.2.1.3. We update version 12.2.1.4 and see the errors described. We have put version 12.2.1.3 back and it works normally. The .jar files have not been modified. We believe that it may be derived from the error I put in the second comment: The url-pattern /zkau/* in web application PSD2 is mapped to multiple Servlets but

We don't know if there are any changes to be do in the application configuration

cor3000
5673 2 7

That would be possible to verify by removing the duplicate url-pattern from your web.xml, did you try that?

RicardoRivas
31

Hi, we have no duplicate url-pattern in the web.xml. The web.xml works correctly with weblogic version 12.2.1.3. When we update to version 12.2.1.4 it is when it gives the error that I have commented. Next I indicate what I have in the web.xml regarding zk.

    <listener>
<listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>
</listener>
<servlet>
<servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
<init-param>
<param-name>update-uri</param-name>
<param-value>/zkau</param-value>
</init-param>
</servlet>
<servlet-mapping>
<url-pattern>*.zul</url-pattern>
</servlet-mapping>
<servlet-mapping>
<url-pattern>*.zhtml</url-pattern>
</servlet-mapping>
<servlet>
<description>The asynchronous update engine for ZK</description>
<servlet-name>auEngine</servlet-name>
</servlet>
<servlet-mapping>
<servlet-name>auEngine</servlet-name>
<url-pattern>/zkau/*</url-pattern>
</servlet-mapping>


cor3000
5673 2 7

What you shared doesn't look wrong... so the problem must be hidden somewhere else.

I think this case is too specific to debug in a forum. Please contact our support. Once the problem is identified, and a solution is available (or not) it makes sense to share the information in public.

alexamm
102 2

Do you resolve the issue?

I had similar problem, on weblogic 11g works fine, but on weblogic 12c fails. If you see the content on web.xml, the servlet section, is repeated, that is generated by zk studio, but works on weblogic 11g.

<servlet>
<description>The asynchronous update engine for ZK</description>
<servlet-name>auEngine</servlet-name> <----- here **
</servlet>
<servlet-mapping>
<servlet-name>auEngine</servlet-name> <----- and here **
<url-pattern>/zkau/*</url-pattern>
</servlet-mapping>


Deletes the last section of servlet-mapping, in my case works

RicardoRivas
31

Hi alexamm the problem of the url-pattern duplicated we resolved add the attribute metadata-complete="true" to element root in the web.xml of application. The problem of the classnotfound we have not solved it yet.

cor3000
5673 2 7

zk has built in servlet 3.0 servlet configuration, since you mentioned that you are using version 2.3 metadata-complete should have NO effect, unless there's an application server ignoring the servlet spec version of your web.xml.

since ZK version 8.6.0 the automatic servlet configuration has been moved into a separate optional jar file zkwebfragment.jar, which can be omitted or excluded in your maven dependencies to avoid duplicate servlet(-mapping) configuration (Related Release Article)

Related Feature: ZK-4022

cor3000
5673 2 7

sounds like others have similar weblogic issues when upgrading weblogic:

[hide preview]