Error : Type javax.mvc.Viewable not present

16 views
Skip to first unread message

Gonzalo Tirapegui

unread,
Jun 7, 2018, 1:28:43 PM6/7/18
to jsr371...@googlegroups.com
Hi people! i'm trying to run a Java MVC Project on Glassfish 4.1.1 with this dependencies :

<dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>eclipselink</artifactId>
            <version>2.5.2</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
            <version>2.5.2</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>6.0.10.Final</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.ozark</groupId>
            <artifactId>ozark</artifactId>
            <version>1.0.0-m02</version>
        </dependency>   
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-moxy</artifactId>
            <version>2.26-b02</version>
        </dependency>   
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-multipart</artifactId>
            <version>2.26-b08</version>
        </dependency> 
        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>6.4.0</version>
        </dependency>  
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-s3</artifactId>
            <version>1.11.164</version>
        </dependency>
        <dependency>
            <groupId>com.owlike</groupId>
            <artifactId>genson</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>7.0</version>
        </dependency>
        <dependency>
            <groupId>javax.mvc</groupId>
            <artifactId>javax.mvc-api</artifactId>
            <version>1.0-pr</version>
        </dependency>
        <dependency>
            <groupId>org.mvc-spec.ozark</groupId>
            <artifactId>ozark-jersey</artifactId>
            <version>1.0.0-m03</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
        </dependency>

and i'm getting this trace :

Severe:   Exception while loading the app : CDI deployment failure:Type javax.mvc.Viewable not present
java.lang.TypeNotPresentException: Type javax.mvc.Viewable not present
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.repository.ConstructorRepository.getParameterTypes(ConstructorRepository.java:94)


    I've been trying to make it work by downgrading the version of  javax.mvc-api to 1.0-edr1 or edr2 but still doesn't work , can you help me with this? Thanks!

Christian Kaltepoth

unread,
Jun 7, 2018, 1:47:59 PM6/7/18
to MVC 1.0 Users
The Maven group id of Ozark is incorrect. You are using a recent version of the MVC API but a very old version of Ozark. 

Have a look here:


I hope this helps... 

Christian 


--
You received this message because you are subscribed to the Google Groups "MVC 1.0 Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsr371-users...@googlegroups.com.
To post to this group, send email to jsr371...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jsr371-users/CAG3Ufmnc6Xww5%2BN2xyE9G95D_eEUfSbB4AoSLXiPEpdKyfytYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Pedro Gutiérrez

unread,
Jun 7, 2018, 1:52:49 PM6/7/18
to jsr371...@googlegroups.com
Hi,
I'm not sure what is happening, but I'd suggest you read first the following recomendations for using Ozark with Glassfish: https://www.mvc-spec.org/ozark/docs/install-javaee.html

Pay special attentions to the following aspects:
* "Ozark requires at least the Java EE 8 Web-Profile or the Eclipse MicroProfile" It seems you're using Java EE 7 Web-Profile
BTW Java EE 7 web profile already includes java servlet api 3.1 and  I see that you're including as dependency the java servlet api 4.0.1 that belongs to Java EE 8 This must be creating an interesting conflict
* There are examples out there using Java EE 7 but, if possible, I'd stick with the recommended approach
* Use the recommended dependencies for Glassfish. If they don't work you can try the snapshot versions

Pedro

--
You received this message because you are subscribed to the Google Groups "MVC 1.0 Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsr371-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages