0

java.lang.ClassCastException: com.product.domain.Clients_$$_javassist_66 cannot be cast to javassist.util.proxy.Proxy

asked 2017-07-04 10:30:28 +0800

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

java.lang.ClassCastException: com.product.domain.Clients$$javassist_66 cannot be cast to javassist.util.proxy.Proxy at org.zkoss.bind.proxy.ProxyHelper.createFormProxy(ProxyHelper.java:247) at org.zkoss.bind.impl.FormBindingImpl.initFormBean(FormBindingImpl.java:81) at org.zkoss.bind.impl.SaveFormBindingImpl.getFormBean(SaveFormBindingImpl.java:112) at org.zkoss.bind.impl.SaveFormBindingImpl.<init>(SaveFormBindingImpl.java:65)

Here is my POM <project xmlns="&lt;a href=" http:="" maven.apache.org="" pom="" 4.0.0"="">http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>PMS</groupid> <artifactid>PMS</artifactid> <version>0.0.1-SNAPSHOT</version> <properties> <zk.version>8.0.5</zk.version> <commons-io>2.4</commons-io> <jawwa.version>0.4.1</jawwa.version> <lb.version>1.0.12</lb.version> <jawwa.version>0.4.1</jawwa.version> <spring.version>4.0.0.RELEASE</spring.version> <jackson.version>2.7.0</jackson.version> <spring-security.version>3.2.0.RELEASE</spring-security.version> <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format> <packname>-${project.version}-FL-${maven.build.timestamp}</packname> </properties> <packaging>war</packaging> <name>The PMS Project</name> <description>The PMS Project</description> <licenses> <license> <name>GNU LESSER GENERAL PUBLIC LICENSE, Version 3</name> <url>http://www.gnu.org/licenses/lgpl.html</url> <distribution>repo</distribution> </license> </licenses> <repositories> <repository> <id>ZK CE</id> <name>ZK CE Repository</name> <url>http://mavensync.zkoss.org/maven2</url> </repository> <repository> <id>ZK EE</id> <url>https://maven.zkoss.org/repo/zk/ee</url> </repository>

    <repository>
        <id>ZK Evaluation Repository</id>
        <url>http://mavensync.zkoss.org/eval</url>
    </repository>

    <repository>
        <id>jawsy-releases</id>
        <url>http://oss.jawsy.fi/maven2/releases/</url>
    </repository>

    <repository>
        <id>com.asual.maven.public</id>
        <name>Asual Public Repository</name>
        <url>http://www.asual.com/maven/content/groups/public</url>
    </repository>

    <repository>
        <id>repository.springsource.milestone</id>
        <name>SpringSource Milestone Repository</name>
        <url>http://repo.springsource.org/milestone</url>
    </repository>

    <repository>
        <id>jr-ce-releases</id>
        <url>http://jaspersoft.artifactoryonline.com/jaspersoft/jr-ce-releases</url>
    </repository>

</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>zkmaven</id>
        <name>ZK Maven Plugin Repository</name>
        <url>http://mavensync.zkoss.org/maven2/</url>
    </pluginRepository>
</pluginRepositories>

<dependencies>
    <!-- CE requirements -->
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zk</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zml</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.common</groupId>
        <artifactId>zcommon</artifactId>
        <version>${zk.version}</version>
    </dependency>


    <dependency>
        <groupId>org.zkoss.common</groupId>
        <artifactId>zweb</artifactId>
        <version>${zk.version}</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.common</groupId>
        <artifactId>zel</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkbind</artifactId>
        <version>${zk.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zul</artifactId>
        <version>${zk.version}</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkplus</artifactId>
        <version>${zk.version}</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zhtml</artifactId>
        <version>${zk.version}</version>
    </dependency>




    <!-- PE & EE requirements -->
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkmax</artifactId>
        <version>${zk.version}</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkex</artifactId>
        <version>${zk.version}</version>
    </dependency>
    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io}</version>
    </dependency>

    <!-- ZK JSP -->
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zuljsp</artifactId>
        <version>2.0</version>
    </dependency>

    <!-- Addons -->
    <dependency>
        <groupId>org.zkoss.addon</groupId>
        <artifactId>flashchart</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zkforge</groupId>
        <artifactId>timelinez</artifactId>
        <version>2.3.1_50</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zkforge</groupId>
        <artifactId>timeplotz</artifactId>
        <version>1.1_50</version>
        <!-- to avoid version conflict -->
        <exclusions>
            <exclusion>
                <artifactId>timelinez</artifactId>
                <groupId>org.zkoss.zkforge</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zkforge</groupId>
        <artifactId>gmapsz</artifactId>
        <version>3.0.1</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zkforge</groupId>
        <artifactId>ckez</artifactId>
        <version>3.6.4.0</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.calendar</groupId>
        <artifactId>calendar</artifactId>
        <version>2.1.5</version>
    </dependency>

    <!-- javax activation? -->
    <dependency>
        <groupId>javax.activation</groupId>
        <artifactId>activation</artifactId>
        <version>1.1-rev-1</version>
    </dependency>

    <!-- Themes -->


    <dependency>
        <groupId>org.zkoss.theme</groupId>
        <artifactId>silvertail</artifactId>
        <version>${zk.version}</version>
    </dependency>


    <!-- commons -->
    <dependency>
        <groupId>commons-discovery</groupId>
        <artifactId>commons-discovery</artifactId>
        <version>0.2</version>
    </dependency>

    <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.1</version>
    </dependency>
    <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.2.1</version>
    </dependency>
    <dependency>
        <groupId>commons-digester</groupId>
        <artifactId>commons-digester</artifactId>
        <version>2.0</version>
    </dependency>
    <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.1</version>
    </dependency>
    <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.4</version>
    </dependency>

    <!-- Rome -->
    <dependency>
        <groupId>rome</groupId>
        <artifactId>rome</artifactId>
        <version>1.0</version>
    </dependency>

    <!-- Jasperreports -->
    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
        <version>6.2.1</version>
    </dependency>



    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports-functions</artifactId>
        <version>6.2.1</version>
    </dependency>



    <!-- filters -->
    <dependency>
        <groupId>com.jhlabs</groupId>
        <artifactId>filters</artifactId>
        <version>2.0.235</version>
    </dependency>




    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>1.0.13</version>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.0.13</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.6.2</version>
    </dependency>


    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.1</version>
    </dependency>

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>1.8.1</version>
    </dependency>



    <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>pdfbox</artifactId>
        <version>1.8.4</version>
    </dependency>



    <dependency>
        <groupId>com.jcraft</groupId>
        <artifactId>jsch</artifactId>
        <version>0.1.50</version>
    </dependency>


    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-vfs2</artifactId>
        <version>2.0</version>
    </dependency>


    <dependency>
        <groupId>commons-validator</groupId>
        <artifactId>commons-validator</artifactId>
        <version>1.4.0</version>
    </dependency>


    <dependency> <!-- Apache BasicDataSource -->
        <groupId>commons-dbcp</groupId>
        <artifactId>commons-dbcp</artifactId>
        <version>1.2.2</version>
    </dependency>

    <dependency>
        <groupId>c3p0</groupId>
        <artifactId>c3p0</artifactId>
        <version>0.9.1.2</version>
    </dependency>


    <!-- AOP dependency -->
    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>2.2.2</version>
    </dependency>


    <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4.7</version>
    </dependency>


    <dependency> <!-- MySQL database driver -->
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.24</version>
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
    </dependency>




    <!-- Spring framework -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency> <!-- Used for Hibernate4 LocalSessionFactoryBean -->
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-expression</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi</artifactId>
        <version>3.9</version>
    </dependency>

    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.9</version>
    </dependency>

    <dependency>
        <groupId>fi.jawsy.jawwa</groupId>
        <artifactId>jawwa-zk-gritter</artifactId>
        <version>${jawwa.version}</version>
    </dependency>



    <!-- Spring Secuirty framework -->
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>${spring-security.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>${spring-security.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring-security.version}</version>
    </dependency>


    <dependency>
        <groupId>net.sourceforge.barbecue</groupId>
        <artifactId>barbecue</artifactId>
        <version>1.5-beta1</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.chart</groupId>
        <artifactId>zkcharts</artifactId>
        <version>2.0.0</version>
    </dependency>

    <dependency>
        <groupId>org.samba.jcifs</groupId>
        <artifactId>jcifs</artifactId>
        <version>1.3.14-kohsuke-1</version>
    </dependency>


    <dependency>
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>1.7.2</version>
    </dependency>

    <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.0.1</version>
        <scope>provided</scope>
    </dependency>


    <dependency>
        <groupId>net.sf.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>2.3</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-csv -->
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-csv</artifactId>
        <version>1.4</version>
    </dependency>

    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-client</artifactId>
        <version>3.0.2.Final</version>
    </dependency>


    <dependency>
        <groupId>org.apache.axis</groupId>
        <artifactId>axis</artifactId>
        <version>1.4</version>
    </dependency>

    <dependency>
        <groupId>javax.xml</groupId>
        <artifactId>jaxrpc-api</artifactId>
        <version>1.1</version>
    </dependency>

    <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.18.2-GA</version>
    </dependency>

    <!-- Hibernate -->

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.2.5.Final</version>
        <exclusions>
            <exclusion>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>5.0.0.Final</version>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-ehcache</artifactId>
        <version>4.2.5.Final</version>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
    </dependency>


    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.pivot</groupId>
        <artifactId>pivottable</artifactId>
        <version>2.2.0-Eval</version>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.6.2</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.apache.velocity/velocity -->
    <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>1.7</version>
    </dependency>
</dependencies>
<build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
        <!-- Run with Jetty -->

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <!-- Build war -->
        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <groupId>org.apache.maven.plugins</groupId>
            <version>2.1.1</version>
        </plugin>
        <!-- Pack zips -->
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2</version>
            <executions>
                <execution>
                    <id>webapp</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                    <configuration>
                        <finalName>PMS${packname}</finalName>
                        <appendAssemblyId>false</appendAssemblyId>
                        <descriptors>
                            <descriptor>src/main/assembly/webapp.xml</descriptor>
                        </descriptors>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

</project>

delete flag offensive retag edit

Comments

you try to create a proxy (form object) are some getter of the object lazy loading or proxy objects?

chillworld ( 2017-07-04 19:57:35 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-07 08:16:43 +0800

cor3000 gravatar image cor3000
4351 2 7
ZK Team

found a similar error message here: https://stackoverflow.com/questions/22481540/hibernate-exception-javassist-0-cannot-be-cast-to-javassist-util-proxy-proxy

this could be due to a version conflict with the javaassist.jar

Please check your dependency tree to see which version gets resolved. Maven Command:

mvn dependency:tree

ZK needs at least version 3.18.2-GA

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: 2017-07-04 10:30:28 +0800

Seen: 13 times

Last updated: Jul 07 '17

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