Announcement Announcement Module
Collapse
No announcement yet.
Tonr sample project will not run because of a ClassNotFoundException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tonr sample project will not run because of a ClassNotFoundException

    I have no problems deploying the Sparklr sample project for OAuth 1.0 using 1.0.5.RELEASE. However, independently deploying the Tonr sample gives me a ClassNotFoundException for OAuthOverHttpsURLStreamHandler. I am using Spring 3.2.2.RELEASE and 3.1.4.RELEASE.

    One thing I don't understand is that in the Tonr project there is a Maven dependency on the Sparklr war. I do not have or desire this dependency in my POM because I want to deploy the consumer out independently. Is this causing this problem? Here is my POM:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <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/xsd/maven-4.0.0.xsd">
    
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.auth</groupId>
        <artifactId>consumer</artifactId>
        <packaging>war</packaging>
        <version>1.0.0-SNAPSHOT</version>
    
        <build>
            <plugins>
    
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.2</version>
                    <configuration>
                        <failOnMissingWebXml>false</failOnMissingWebXml>
                        <archive>
                            <addMavenDescriptor>false</addMavenDescriptor>
                        </archive>
                    </configuration>
                </plugin>
    
            </plugins>
        </build>
    
        <properties>
            <spring.version>3.2.2.RELEASE</spring.version>
            <spring.security.version>3.1.4.RELEASE</spring.security.version>
        </properties>
    
        <dependencies>
    
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>2.5</version>
                <scope>provided</scope>
            </dependency>
    
            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <version>2.2</version>
                <scope>provided</scope>
            </dependency>
    
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>jstl</artifactId>
                <version>1.2</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${spring.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
                <version>${spring.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context-support</artifactId>
                <version>${spring.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-expression</artifactId>
                <version>${spring.version}</version>
            </dependency>
    
            <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>org.springframework.security</groupId>
                <artifactId>spring-security-taglibs</artifactId>
                <version>${spring.security.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.security.oauth</groupId>
                <artifactId>spring-security-oauth</artifactId>
                <version>1.0.5.RELEASE</version>
            </dependency>
    
        </dependencies>
    
    </project>

  • #2
    It turns out I was not looking high enough up the stack, and the real exception is java.lang.ClassNotFoundException: sun.net.www.protocol.https.Handler. This appears to be a runtime library referenced in Spring Security OAuth that is available on whatever Servlet container it was tested (Tomcat?), but is not available by default to the app on JBoss 7.1.1. I'm trying to track that down, but maybe that will jog someone's memory?

    Comment


    • #3
      That class should be in the JRE libraries. It's possible that you have a borked classpath because of something your container is doing, but that class should be available in any standard SUN or openjdk JVM.

      Comment

      Working...
      X