0

Upgrading to ZK8 java.lang.NoClassDefFoundError: javassist/util/proxy/Proxy Caused by: java.lang.ClassNotFoundException: javassist.util.proxy.Proxy

asked 2015-10-22 20:40:59 +0800

rickcr gravatar image rickcr
704 7

Upgrading from 7.0.4 to 8.0.0

I have a page that opens up a new model popup window and passss to the VM an instance of the object I'm editing. It works just fine in ZK 7, but in ZK 8 I get the exception

java.lang.NoClassDefFoundError: javassist/util/proxy/Proxy Caused by: java.lang.ClassNotFoundException: javassist.util.proxy.Proxy

I've even tried to include the dependency:

    <dependency>
        <groupId>javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.9.0.GA</version>
    </dependency>

But still the same error.

What do I need to differently? Is there a migration doc somewhere of what one has to change that is not backwards compatible with 7?

delete flag offensive retag edit

4 Answers

Sort by ยป oldest newest most voted
1

answered 2015-11-02 05:54:22 +0800

rickcr gravatar image rickcr
704 7

updated 2015-11-02 06:03:11 +0800

I'm not an Eclipse guy - I use IDEA, but not important since I'm building with Maven from the command line. Regardless, I found the issue and it's going to cause me to create another post or maybe bug ticket...

When using zkspring-core 3.1, it will attempt to pull in an older version of javassist 3.14.0-GA, which apparently is the issue. If I add an exclude for 3.14.0-GA on the zkspring-core library and then include 3.9.0.G as a javassist dependency things work ok when using 3.1....

If I try to use zkspring-webflow 3.1.1 or 3.2.0 then things get even more messed up and for some reason those libraries are causing the following older spring libraries to be included in my war which causes conflicts in reading the xml files. I have a dependency on spring 4 and when I use 3.1.1 or 3.2.0 of zkspring, I'll get the following pulled in (which I believe is in incorrect): (note these are NOT pulled in when using zkspring-webflow 3.1)

org.springframework.aop-3.0.4.RELEASE.jar org.springframework.asm-3.0.4.RELEASE.jar org.springframework.beans-3.0.4.RELEASE.jar org.springframework.binding-2.2.1.RELEASE.jar org.springframework.context-3.0.4.RELEASE.jar org.springframework.context.support-3.0.4.RELEASE.jar org.springframework.core-3.0.4.RELEASE.jar org.springframework.expression-3.0.4.RELEASE.jar org.springframework.js-2.2.1.RELEASE.jar org.springframework.js.resources-2.2.1.RELEASE.jar org.springframework.web-3.0.4.RELEASE.jar org.springframework.web.servlet-3.0.4.RELEASE.jar

link publish delete flag offensive edit
1

answered 2016-01-04 12:12:19 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

I also had the same Problem. Here is the Fix i made and it works fine

<properties>
    <zk.version>8.0.0</zk.version>
    <commons-io>2.4</commons-io>
    <hib.version>5.0.3.Final</hib.version>
    <jawwa.version>0.4.1</jawwa.version>
    <lb.version>1.0.12</lb.version>
    <jawwa.version>0.4.1</jawwa.version>
    <spring.version>4.2.3.RELEASE</spring.version>
    <spring-security.version>3.2.0.RELEASE</spring-security.version>
    <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
    <packname>-${project.version}-FL-${maven.build.timestamp}</packname>
</properties>

/////// /////

<dependency>
        <groupId>javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.9.0.GA</version>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>${hib.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
link publish delete flag offensive edit
0

answered 2015-10-26 09:11:38 +0800

Darksu gravatar image Darksu
1991 1 4

Hello rickcr,

Just to be sure please follow the following actions:

  1. Add javaassist.jar dependency in the pom
  2. Run maven clean install using command line
  3. Refresh project in eclipse
  4. Clean the project

If the problem still persists please upload a sample of you code so that we can examine it better.

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2015-11-02 06:13:34 +0800

rickcr gravatar image rickcr
704 7

Note, here is the full list of exclusions I needed ... royal pain:

     <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkspring-core</artifactId>
        <version>3.2.0</version>
        <exclusions>
            <exclusion>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
            </exclusion>
        </exclusions>
     </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkspring-webflow</artifactId>
        <version>3.2.0</version>
        <exclusions>
            <exclusion>
                <groupId>javax.el</groupId>
                <artifactId>javax.el-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.aop</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.asm</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.beans</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.binding</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.context</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.binding</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.context.support</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.core</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.expression</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.js.resources</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.web</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.web.servlet</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.webflow</artifactId>
            </exclusion>
        </exclusions>
   </dependency>

      <dependency>
        <groupId>javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.9.0.GA</version>
    </dependency>
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-10-22 20:40:59 +0800

Seen: 133 times

Last updated: Jan 04 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More