AngularFaces icon indicating copy to clipboard operation
AngularFaces copied to clipboard

Error Loading Decorator: de.beyondjava.angularFaces.core.tagTransformer.AngularTagDecorator: java.lang.ClassNotFoundException: de.beyondjava.angularFaces.core.tagTransformer.AngularTagDecorator

Open haribollina opened this issue 8 years ago • 14 comments

Hi, when i try to run the project i got above error could you please help on this and below is the pom.xml file.

<project xmlns="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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<groupId>de.beyondjava.angularFaces</groupId>
	<artifactId>angularfaces-examples</artifactId>
	<packaging>war</packaging>
	<version>2.1.8</version>
	<name>angularfaces-2.1.8-examples</name>
	<description>AngularFaces makes JSF programming simpler. In particular, it adds AngularJS to JSF.</description>
	<url>http://www.beyondjava.net</url>
	<licenses>
		<license>
			<name>GNU General Public License (GPL) version 3.0</name>
			<url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>Stephan Rauh</name>
			<email>[email protected]</email>
			<organization>BeyondJava.net</organization>
			<organizationUrl>http://www.beyondjava.net</organizationUrl>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:[email protected]:stephanrauh/AngularFaces.git</connection>
		<developerConnection>scm:git:[email protected]:stephanrauh/AngularFaces.git</developerConnection>
		<url>[email protected]:stephanrauh/AngularFaces.git</url>
	</scm>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.6</maven.compiler.source>
		<maven.compiler.target>1.6</maven.compiler.target>
	</properties>
	<repositories>
		<repository>
			<id>lib</id>
			<url>file://${basedir}/../../dist</url>
		</repository>
	</repositories>
	<dependencies>
		<dependency>
			<groupId>de.beyondjava</groupId>
			<artifactId>angularFaces-core</artifactId>
			<version>2.1.9</version>
		</dependency>

		<dependency>
			<groupId>org.primefaces</groupId>
			<artifactId>primefaces</artifactId>
			<version>5.2</version>
			<scope>compile</scope>
		</dependency>
        <dependency>
            <groupId>net.bootsfaces</groupId>
            <artifactId>bootsfaces</artifactId>
            <version>0.8.0</version>
            <scope>compile</scope>
        </dependency>

		<dependency>
			<groupId>javax.el</groupId>
			<artifactId>el-api</artifactId>
			<version>2.2.1-b04</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>net.glxn</groupId>
			<artifactId>qrgen</artifactId>
			<version>1.4</version>
		</dependency>
		<dependency>
			<groupId>net.sf.barcode4j</groupId>
			<artifactId>barcode4j</artifactId>
			<version>2.1</version>
		</dependency>
		<!-- <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> 
			<version>2.2.4</version> <scope>runtime</scope> </dependency> -->
		<dependency>
			<groupId>com.fasterxml.jackson.jaxrs</groupId>
			<artifactId>jackson-jaxrs-json-provider</artifactId>
			<version>2.5.0</version>
		</dependency>

		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>1.1.3</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>5.2.2.Final</version>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<version>1.1.0.Final</version>
		</dependency>
		<dependency>
			<groupId>org.omnifaces</groupId>
			<artifactId>omnifaces</artifactId>
			<version>1.11</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<profiles>
    	<profile>
			<id>release</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<dependencies>
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-impl</artifactId>
                    <version>2.2.8</version>
                    <exclusions>
                        <exclusion>
                            <groupId>org.apache.geronimo.specs</groupId>
                            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-validator</artifactId>
                    <version>5.2.2.Final</version>
                </dependency>
                <!-- 
                <dependency>
                    <groupId>org.jboss.weld.servlet</groupId>
                    <artifactId>weld-servlet</artifactId>
                    <version>2.2.9.Final</version>
                </dependency>
                <dependency>
                    <groupId>javax.enterprise</groupId>
                    <artifactId>cdi-api</artifactId>
                    <version>1.2</version>
                    <scope>compile</scope>
                </dependency>
                 -->
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.3</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	
		<profile>
			<id>Mojarra 2.2.11</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<dependencies>
				<dependency>
					<groupId>com.sun.faces</groupId>
					<artifactId>jsf-api</artifactId>
					<version>2.2.11</version>
					<scope>compile</scope>
				</dependency>
				<dependency>
					<groupId>com.sun.faces</groupId>
					<artifactId>jsf-impl</artifactId>
					<version>2.2.11</version>
					<scope>compile</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>MyFaces 2.2.8</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<dependencies>
				<dependency>
					<groupId>org.apache.myfaces.core</groupId>
					<artifactId>myfaces-api</artifactId>
					<version>2.2.8</version>
				</dependency>
				<dependency>
					<groupId>org.apache.myfaces.core</groupId>
					<artifactId>myfaces-impl</artifactId>
					<version>2.2.8</version>
				</dependency>
			</dependencies>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<outputDirectory>dist</outputDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<configuration>
            <additionalparam>-Xdoclint:none</additionalparam>
          </configuration>
				<!-- <executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions> -->
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.5</version>
				<configuration>
            <additionalparam>-Xdoclint:none</additionalparam>
          </configuration>
				<!-- <executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions> -->
			</plugin>
		</plugins>
	</build>
</project>

haribollina avatar Nov 11 '16 04:11 haribollina

Hello haribollina, i have started the process of looking over the issues. By a quick look Stephan mentioned it most likely is an issue with the pom.xml.

I also get errors while using the pom.xml you specified and i will later today try to find exactly whats causing it.

UPDATE: I think the problem is that the class files are not downloaded by Maven, when i ran

I am currently not at my home computer so it is difficult for me to test the problem but in my IDE the errors were removed by changing the active by default to true under MyFaces.

<profile>
        <id>MyFaces 2.2.8</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <dependencies>
            <dependency>
                <groupId>org.apache.myfaces.core</groupId>
                <artifactId>myfaces-api</artifactId>
                <version>2.2.8</version>
            </dependency>
            <dependency>
                <groupId>org.apache.myfaces.core</groupId>
                <artifactId>myfaces-impl</artifactId>
                <version>2.2.8</version>
            </dependency>
        </dependencies>
    </profile>

More specifically i changed this line: <activeByDefault>true</activeByDefault>

brokenprogrammer avatar Nov 11 '16 11:11 brokenprogrammer

Thanks for your response. I changed to <activeByDefault>true</activeByDefault>, but i'm getting same error. Below is my web.xml file.

    <context-param>
        <param-name>javax.faces.FACELETS_DECORATORS</param-name>
        <param-value>
            de.beyondjava.angularFaces.core.tagTransformer.AngularTagDecorator
        </param-value>
    </context-param>

haribollina avatar Nov 11 '16 17:11 haribollina

It is my bad i believe the issue doesnt have to do with the true and false i have mentioned before.

Can you confirm that maven actually have downloaded the class files for angularfaces-core ? Default maven directory is the following depending on OS:

  • Unix/Mac OS X – ~/.m2
    
  • Windows – C:\Documents and Settings{your-username}.m2
    

brokenprogrammer avatar Nov 11 '16 18:11 brokenprogrammer

Here i attached maven download image angularfaces-core jar.

image

haribollina avatar Nov 11 '16 18:11 haribollina

Theese are the words of the project author:

My guess is that it's either a typo or - more likely - that the compiler doesn't generate any classes. Sometime errors like this occur when there's an error in the pom.xml, so Eclipse copies the resource files, but the libraries and the class file folder are empty.

Unfortunately this is not in my area of knowledge, i would try to reset the pom.xml to the projects and try get the project working from there.

I will notify the project author to have a look at the issue.

brokenprogrammer avatar Nov 11 '16 18:11 brokenprogrammer

Hello, Do i need to add this jar file in WEB_INF/lib folder ?

haribollina avatar Nov 11 '16 18:11 haribollina

@haribollina @brokenprogrammer Please use the backtick to mark your inline source code, and a triple backtick followed by the name of the programming language to mark multi-line source code. You'll be rewarded with beautifully formatted code. Otherwise, your sourcecode is interpreted as HTML, and most of the information gets lost. Here's an example: image

stephanrauh avatar Nov 11 '16 19:11 stephanrauh

@haribollina I suggest you have a quick look into the jar file in your Maven repository. There should be a file called AngularTagDecorator in the folder de/beyondjava/angularFaces/core/tagTransformer within the AngularFaces-core-2.1.11.jar. In rare cases, the jar file gets corrupted.

stephanrauh avatar Nov 11 '16 19:11 stephanrauh

@haribollina As for your question: I suppose you're using an IDE like Eclipse, Netbeans or IntelliJ? And I also suppose you've imported the project as a Maven project? If you did, you don't have to copy into the WEB-INF/lib folder. Your IDE does this automatically for you. Most of the time, that is. Sometimes errors occur, so it pays to double-check this, too. Find out where your IDE deploys your project, open this folder and start looking for WEB-INF/lib/angularFaces-core-2.1.1.jar.

I hope this explanation is precise enough :). If you tell us which IDE and which application server you''re using, we might be able to give you more specific instructions.

stephanrauh avatar Nov 11 '16 19:11 stephanrauh

@stephanrauh

Yes i created as maven project and added AngularFaces-core-2.1.11.jar file in WEB-INF/lib folder now i didn't get error, i think it's wrong, why because jsf page could not load angularfaces components.

Actually i have knowledge on JSF and Angular JS, so now i try to develop new project using AngularFaces. Can i start to develop the new project in AngularFaces ? And i'm using below environment. IDE: Eclipse-neon Server: Wildfly-10.0.1

haribollina avatar Nov 11 '16 20:11 haribollina

I suggest you boil down the pom.xml down to what you really need. You've activated the MyFaces profile. That's fine if you're running the project on Tomcat, as I did, but Wildfly brings it own implementation of JSF. So you end up with two competing implementations of JSF, and there's a fair chance that this causes your problems. I didn't test it yet, but I guess your pom.xml should look like so:

<project xmlns="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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>de.beyondjava.angularFaces</groupId>
    <artifactId>angularfaces-examples</artifactId>
    <packaging>war</packaging>
    <version>2.1.8</version>
    <name>angularfaces-2.1.8-examples</name>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
    </properties>
    <dependencies>
        <dependency>
            <groupId>de.beyondjava</groupId>
            <artifactId>angularFaces-core</artifactId>
            <version>2.1.9</version>
        </dependency>

        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>5.2</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>net.bootsfaces</groupId>
            <artifactId>bootsfaces</artifactId>
            <version>0.8.0</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <version>2.2.1-b04</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.glxn</groupId>
            <artifactId>qrgen</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>net.sf.barcode4j</groupId>
            <artifactId>barcode4j</artifactId>
            <version>2.1</version>
        </dependency>
        <!-- <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> 
            <version>2.2.4</version> <scope>runtime</scope> </dependency> -->
        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
            <version>2.5.0</version>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.2.Final</version>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.1.0.Final</version>
        </dependency>
        <dependency>
            <groupId>org.omnifaces</groupId>
            <artifactId>omnifaces</artifactId>
            <version>1.11</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

stephanrauh avatar Nov 11 '16 21:11 stephanrauh

Even so, I'm not sure if you're adding dependencies that are already there in Wildfly. In particular, javax.el, org.hibernate and commons.logging are probably redundant - and that usually means trouble. In any case, look out for red dots in the "problems" view of Eclipse. I've constructed an example to illustrate the point: image I caused these error messages by adding a dependency that doesn't exist. So the error won't look identical on your machine, but maybe you'll observe a similar error.

stephanrauh avatar Nov 11 '16 21:11 stephanrauh

@stephanrauh , is it possible to update AngularFaces-2.0-examples project to Dynamic web module-3.1 Java-1.8 JSF-2.2 in git repository. i think i'm facing above problems with versioning. Because AngularFaces-2.0-examples using Dynamic web module-2.5 ,Java-1.6 ,JSF-2.0.so if i try to add existing project with latest versions we have issues. If i try to run with old versions it's working fine. So could you please help on this.

haribollina avatar Nov 12 '16 20:11 haribollina

Sorry for my late answer. In theory, it should be possible to update the example to Java 1.8. The dynamic web module stuff only influences Eclipse, so that shouldn't be a problem, either.

I'm a bit surprised you can run AngularFaces using JSF 2.0. AngularFaces uses pass-through attributes, which have been introduced with JSF 2.2.

stephanrauh avatar Nov 13 '16 20:11 stephanrauh

AngularFaces was an interesting project, but it turned out to be impossible to migrate it to Angular 2, and since the, the Java community has abandoned UI programming altogether. So I'm closing all remaining tickets and archive the project.

stephanrauh avatar Nov 10 '22 17:11 stephanrauh