Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassNotFound Exceptions with tomcat7 #41

Open
ksmith97 opened this issue Apr 10, 2017 · 6 comments
Open

ClassNotFound Exceptions with tomcat7 #41

ksmith97 opened this issue Apr 10, 2017 · 6 comments
Labels

Comments

@ksmith97
Copy link
Contributor

ksmith97 commented Apr 10, 2017

I am kind of out of ideas here. This doesnt look like an obvious issue with the plugin but I can't find anyone else sharing a similar issues. Is it possible that a downstream dependency is missing a dependency or do I need to add an additional dependency manually?

I am getting the following stack trace

Caused by: java.lang.ClassNotFoundException: org.apache.jasper.compiler.Node$CustomTag
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)

when running jspc with the config

<plugin>
                <groupId>org.jasig.mojo.jspc</groupId>
                <artifactId>jspc-maven-plugin</artifactId>
                <version>2.0.0</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sources>
                        <directory>${basedir}/src/main/webapp</directory>
                        <includes>
                            <include>**/*.jsp</include>
                        </includes>
                    </sources>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jasig.mojo.jspc</groupId>
                        <artifactId>jspc-compiler-tomcat7</artifactId>
                        <version>2.0.2</version>
                    </dependency>
                    <dependency>
                        <groupId>javax.servlet.jsp</groupId>
                        <artifactId>jsp-api</artifactId>
                        <version>2.1</version>
                    </dependency>
                </dependencies>
            </plugin>```
@ksmith97
Copy link
Contributor Author

I upgraded to jspc-compiler-tomcat8 to see if it made a difference and the class not found exceptions disappeared. Looks like something down the tomcat7 dep chain is broken making it unusable.

@ChristianMurphy
Copy link
Member

Thanks for reaching out @ksmith97!
Could you check mvn dependency:analyze and mvn dependency:tree to see what versions are being pulled in and if any dependencies are missing?

@ksmith97
Copy link
Contributor Author

@ChristianMurphy Unfortunately, its impossible for me to know if a dependency is missing if it isn't there in the first place! I did look through the dependency tree but I did not see anything glaringly wrong.

@ChristianMurphy
Copy link
Member

Below is what the dependency tree look like on my system

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] JSPC Maven Support
[INFO] JSPC Compiler API
[INFO] JSPC Compilers
[INFO] JSPC Compiler for Tomcat 5
[INFO] JSPC Compiler for Tomcat 6
[INFO] JSPC Compiler for Tomcat 7
[INFO] JSPC Compiler for Tomcat 8
[INFO] JSPC Compiler for Tomcat 8.5.x
[INFO] JSPC Compiler for Glassfish 3
[INFO] JSPC Compiler for Tomcat 7
[INFO] JSPC Maven Plugin
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Maven Support 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc ---
[INFO] org.jasig.mojo.jspc:jspc:pom:2.0.3-SNAPSHOT
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Compiler API 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-compiler-api ---
[INFO] org.jasig.mojo.jspc:jspc-compiler-api:jar:2.0.3-SNAPSHOT
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Compilers 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-compilers ---
[INFO] org.jasig.mojo.jspc:jspc-compilers:pom:2.0.3-SNAPSHOT
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Compiler for Tomcat 5 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-compiler-tomcat5 ---
[INFO] org.jasig.mojo.jspc:jspc-compiler-tomcat5:jar:2.0.3-SNAPSHOT
[INFO] +- org.jasig.mojo.jspc:jspc-compiler-api:jar:2.0.3-SNAPSHOT:compile
[INFO] +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.ant:ant:jar:1.9.0:compile
[INFO] |  \- org.apache.ant:ant-launcher:jar:1.9.0:compile
[INFO] +- tomcat:jasper-compiler:jar:5.5.23:compile
[INFO] |  \- javax.servlet:jsp-api:jar:2.0:compile
[INFO] +- tomcat:jasper-compiler-jdt:jar:5.5.23:compile
[INFO] |  \- org.eclipse.jdt:core:jar:3.1.1:compile
[INFO] \- tomcat:jasper-runtime:jar:5.5.23:compile
[INFO]    +- javax.servlet:servlet-api:jar:2.4:compile
[INFO]    \- commons-el:commons-el:jar:1.0:compile
[INFO]       \- commons-logging:commons-logging:jar:1.1.2:compile
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Compiler for Tomcat 6 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-compiler-tomcat6 ---
[INFO] org.jasig.mojo.jspc:jspc-compiler-tomcat6:jar:2.0.3-SNAPSHOT
[INFO] +- org.jasig.mojo.jspc:jspc-compiler-api:jar:2.0.3-SNAPSHOT:compile
[INFO] +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.ant:ant:jar:1.9.0:compile
[INFO] |  \- org.apache.ant:ant-launcher:jar:1.9.0:compile
[INFO] \- org.apache.tomcat:jasper:jar:6.0.37:compile
[INFO]    +- org.apache.tomcat:servlet-api:jar:6.0.37:compile
[INFO]    +- org.apache.tomcat:juli:jar:6.0.37:compile
[INFO]    +- org.apache.tomcat:jsp-api:jar:6.0.37:compile
[INFO]    +- org.apache.tomcat:catalina:jar:6.0.37:compile
[INFO]    |  \- org.apache.tomcat:annotations-api:jar:6.0.37:compile
[INFO]    +- org.apache.tomcat:el-api:jar:6.0.37:compile
[INFO]    +- org.eclipse.jdt.core.compiler:ecj:jar:4.2.2:compile
[INFO]    \- org.apache.tomcat:jasper-el:jar:6.0.37:compile
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Compiler for Tomcat 7 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-compiler-tomcat7 ---
[INFO] org.jasig.mojo.jspc:jspc-compiler-tomcat7:jar:2.0.3-SNAPSHOT
[INFO] +- org.jasig.mojo.jspc:jspc-compiler-api:jar:2.0.3-SNAPSHOT:compile
[INFO] +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.ant:ant:jar:1.9.0:compile
[INFO] |  \- org.apache.ant:ant-launcher:jar:1.9.0:compile
[INFO] +- org.apache.tomcat:tomcat-jasper:jar:7.0.53:compile
[INFO] |  +- org.apache.tomcat:tomcat-servlet-api:jar:7.0.53:compile
[INFO] |  +- org.apache.tomcat:tomcat-juli:jar:7.0.53:compile
[INFO] |  +- org.apache.tomcat:tomcat-jsp-api:jar:7.0.53:compile
[INFO] |  +- org.apache.tomcat:tomcat-el-api:jar:7.0.53:compile
[INFO] |  +- org.eclipse.jdt.core.compiler:ecj:jar:P20140317-1600:compile
[INFO] |  +- org.apache.tomcat:tomcat-jasper-el:jar:7.0.53:compile
[INFO] |  +- org.apache.tomcat:tomcat-api:jar:7.0.53:compile
[INFO] |  \- org.apache.tomcat:tomcat-util:jar:7.0.53:compile
[INFO] \- org.apache.tomcat:tomcat-annotations-api:jar:7.0.53:compile
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Compiler for Tomcat 8 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-compiler-tomcat8 ---
[INFO] org.jasig.mojo.jspc:jspc-compiler-tomcat8:jar:2.0.3-SNAPSHOT
[INFO] +- org.jasig.mojo.jspc:jspc-compiler-api:jar:2.0.3-SNAPSHOT:compile
[INFO] +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.ant:ant:jar:1.9.0:compile
[INFO] |  \- org.apache.ant:ant-launcher:jar:1.9.0:compile
[INFO] +- org.apache.tomcat:tomcat-jasper:jar:8.0.36:compile
[INFO] |  +- org.apache.tomcat:tomcat-servlet-api:jar:8.0.36:compile
[INFO] |  +- org.apache.tomcat:tomcat-juli:jar:8.0.36:compile
[INFO] |  +- org.apache.tomcat:tomcat-jsp-api:jar:8.0.36:compile
[INFO] |  +- org.apache.tomcat:tomcat-el-api:jar:8.0.36:compile
[INFO] |  +- org.eclipse.jdt.core.compiler:ecj:jar:4.5:compile
[INFO] |  +- org.apache.tomcat:tomcat-jasper-el:jar:8.0.36:compile
[INFO] |  +- org.apache.tomcat:tomcat-api:jar:8.0.36:compile
[INFO] |  \- org.apache.tomcat:tomcat-util-scan:jar:8.0.36:compile
[INFO] |     \- org.apache.tomcat:tomcat-util:jar:8.0.36:compile
[INFO] \- org.apache.tomcat:tomcat-annotations-api:jar:8.0.36:compile
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Compiler for Tomcat 8.5.x 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-compiler-tomcat8_5_x ---
[INFO] org.jasig.mojo.jspc:jspc-compiler-tomcat8_5_x:jar:2.0.3-SNAPSHOT
[INFO] +- org.jasig.mojo.jspc:jspc-compiler-api:jar:2.0.3-SNAPSHOT:compile
[INFO] +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.ant:ant:jar:1.9.0:compile
[INFO] |  \- org.apache.ant:ant-launcher:jar:1.9.0:compile
[INFO] +- org.apache.tomcat:tomcat-jasper:jar:8.5.4:compile
[INFO] |  +- org.apache.tomcat:tomcat-servlet-api:jar:8.5.4:compile
[INFO] |  +- org.apache.tomcat:tomcat-juli:jar:8.5.4:compile
[INFO] |  +- org.apache.tomcat:tomcat-jsp-api:jar:8.5.4:compile
[INFO] |  +- org.apache.tomcat:tomcat-el-api:jar:8.5.4:compile
[INFO] |  +- org.eclipse.jdt.core.compiler:ecj:jar:4.5.1:compile
[INFO] |  +- org.apache.tomcat:tomcat-jasper-el:jar:8.5.4:compile
[INFO] |  +- org.apache.tomcat:tomcat-api:jar:8.5.4:compile
[INFO] |  \- org.apache.tomcat:tomcat-util-scan:jar:8.5.4:compile
[INFO] |     \- org.apache.tomcat:tomcat-util:jar:8.5.4:compile
[INFO] \- org.apache.tomcat:tomcat-annotations-api:jar:8.5.4:compile
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Compiler for Glassfish 3 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-compiler-glassfish3 ---
[INFO] org.jasig.mojo.jspc:jspc-compiler-glassfish3:jar:2.0.3-SNAPSHOT
[INFO] +- org.jasig.mojo.jspc:jspc-compiler-api:jar:2.0.3-SNAPSHOT:compile
[INFO] +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.ant:ant:jar:1.9.0:compile
[INFO] |  \- org.apache.ant:ant-launcher:jar:1.9.0:compile
[INFO] \- org.glassfish.main.extras:glassfish-embedded-all:jar:3.1.2.2:compile
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Compiler for Tomcat 7 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-compiler-tomcat7-multithreaded ---
[INFO] org.jasig.mojo.jspc:jspc-compiler-tomcat7-multithreaded:jar:2.0.3-SNAPSHOT
[INFO] +- org.jasig.mojo.jspc:jspc-compiler-api:jar:2.0.3-SNAPSHOT:compile
[INFO] +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.ant:ant:jar:1.9.0:compile
[INFO] |  \- org.apache.ant:ant-launcher:jar:1.9.0:compile
[INFO] +- org.apache.tomcat:tomcat-jasper:jar:7.0.39:compile
[INFO] |  +- org.apache.tomcat:tomcat-servlet-api:jar:7.0.39:compile
[INFO] |  +- org.apache.tomcat:tomcat-juli:jar:7.0.39:compile
[INFO] |  +- org.apache.tomcat:tomcat-jsp-api:jar:7.0.39:compile
[INFO] |  +- org.apache.tomcat:tomcat-el-api:jar:7.0.39:compile
[INFO] |  +- org.eclipse.jdt.core.compiler:ecj:jar:4.2.1:compile
[INFO] |  +- org.apache.tomcat:tomcat-jasper-el:jar:7.0.39:compile
[INFO] |  +- org.apache.tomcat:tomcat-api:jar:7.0.39:compile
[INFO] |  \- org.apache.tomcat:tomcat-util:jar:7.0.39:compile
[INFO] \- org.apache.tomcat:tomcat-annotations-api:jar:7.0.39:compile
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JSPC Maven Plugin 2.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jspc-maven-plugin ---
[INFO] org.jasig.mojo.jspc:jspc-maven-plugin:maven-plugin:2.0.3-SNAPSHOT
[INFO] +- org.jasig.mojo.jspc:jspc-compiler-api:jar:2.0.3-SNAPSHOT:compile
[INFO] +- org.apache.maven:maven-project:jar:2.0.11:compile
[INFO] |  +- org.apache.maven:maven-settings:jar:2.0.11:compile
[INFO] |  +- org.apache.maven:maven-profile:jar:2.0.11:compile
[INFO] |  +- org.apache.maven:maven-artifact-manager:jar:2.0.11:compile
[INFO] |  |  \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
[INFO] |  +- org.apache.maven:maven-plugin-registry:jar:2.0.11:compile
[INFO] |  +- org.apache.maven:maven-artifact:jar:2.0.11:compile
[INFO] |  \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[INFO] |     \- classworlds:classworlds:jar:1.1-alpha-2:compile
[INFO] +- org.apache.maven:maven-plugin-api:jar:3.0.5:compile
[INFO] |  \- org.sonatype.sisu:sisu-inject-plexus:jar:2.3.0:compile
[INFO] |     \- org.sonatype.sisu:sisu-inject-bean:jar:2.3.0:compile
[INFO] |        \- org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0:compile
[INFO] |           \- org.sonatype.sisu:sisu-guava:jar:0.9.9:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2:compile
[INFO] +- org.apache.maven.shared:file-management:jar:1.2.1:compile
[INFO] |  \- org.apache.maven.shared:maven-shared-io:jar:1.1:compile
[INFO] +- org.apache.maven.shared:maven-filtering:jar:1.1:compile
[INFO] +- org.codehaus.plexus:plexus-utils:jar:3.0.10:compile
[INFO] +- org.codehaus.plexus:plexus-interpolation:jar:1.16:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile
[INFO] +- org.apache.maven:maven-model:jar:3.0.5:compile
[INFO] +- org.apache.maven:maven-core:jar:3.0.5:compile
[INFO] |  +- org.apache.maven:maven-settings-builder:jar:3.0.5:compile
[INFO] |  +- org.apache.maven:maven-repository-metadata:jar:3.0.5:compile
[INFO] |  +- org.apache.maven:maven-model-builder:jar:3.0.5:compile
[INFO] |  +- org.apache.maven:maven-aether-provider:jar:3.0.5:compile
[INFO] |  |  \- org.sonatype.aether:aether-spi:jar:1.13.1:compile
[INFO] |  +- org.sonatype.aether:aether-impl:jar:1.13.1:compile
[INFO] |  +- org.sonatype.aether:aether-api:jar:1.13.1:compile
[INFO] |  +- org.sonatype.aether:aether-util:jar:1.13.1:compile
[INFO] |  +- org.codehaus.plexus:plexus-classworlds:jar:2.4:compile
[INFO] |  +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] |  \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[INFO] |     \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] \- org.apache.maven.shared:maven-verifier:jar:1.4:test
[INFO]    \- org.apache.maven.shared:maven-shared-utils:jar:0.2:test
[INFO]       \- com.google.code.findbugs:jsr305:jar:2.0.1:test
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] JSPC Maven Support ................................. SUCCESS [  0.548 s]
[INFO] JSPC Compiler API .................................. SUCCESS [  0.035 s]
[INFO] JSPC Compilers ..................................... SUCCESS [  0.004 s]
[INFO] JSPC Compiler for Tomcat 5 ......................... SUCCESS [  0.041 s]
[INFO] JSPC Compiler for Tomcat 6 ......................... SUCCESS [  0.018 s]
[INFO] JSPC Compiler for Tomcat 7 ......................... SUCCESS [  0.021 s]
[INFO] JSPC Compiler for Tomcat 8 ......................... SUCCESS [  0.018 s]
[INFO] JSPC Compiler for Tomcat 8.5.x ..................... SUCCESS [  0.019 s]
[INFO] JSPC Compiler for Glassfish 3 ...................... SUCCESS [  0.032 s]
[INFO] JSPC Compiler for Tomcat 7 ......................... SUCCESS [  0.016 s]
[INFO] JSPC Maven Plugin .................................. SUCCESS [  0.124 s]
[INFO] ------------------------------------------------------------------------

@ksmith97
Copy link
Contributor Author

I spent some time looking but I honestly don't know an easy way to figure out where the class should have come from. It is interesting that ecj is not at one of their regular build numbers for tomcat7 though.

@ChristianMurphy
Copy link
Member

Hey there! 👋

Thanks for opening an issue with jspc-maven-plugin. 👍 🙇‍♂️
At the moment, the jspc maven plugin does not have an active maintainer to process your request. ⛔
While the Jasig jspc maven plugin is without an active maintainer, we recommend the Apache Sling jspc maven plugin and the Jetty jspc maven plugin as alternatives that are actively maintained. ✅
If you are interested in becoming a project maintainer, there is a uPortal-dev list post where you can register your interest. 📧

Thanks again for contributing to the jspc-maven-plugin! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants