constant problem with error: oblem: real path for /_error_pages//velocity/ is null.

15 views
Skip to first unread message

Jacek Grzebyta

unread,
Nov 16, 2016, 10:20:52 AM11/16/16
to linked-data-api-discuss
Hi,

I am building a linkd data service within docker container based on jetty:alpine. I need to build custom view so I am trying to use Velocity renderer. I have constant problems with launching Velocity.

The application is launched in the following contexts:
- resource/
- elda-assets/

Is seems there is a hidden configuration because I cannot find anything about that path. Or it is taken from _velicityPath.



The error message is:

real path for /_error_pages//velocity/

The log looks like:

adalab-elda_1  | 2016-11-16 14:59:25,183  WARN [qtp2143192188-12] (VelocityRendering.java:129) - [1]: problem: real path for /_error_pages//velocity/ is null. (java.lang.RuntimeException: problem: real path for /_error_pages//velocity/ is null.)
adalab
-elda_1  | 2016-11-16 14:59:25,184 ERROR [qtp2143192188-12] (RouterRestlet.java:602) - [1]: Error while sending response: 'com.epimorphics.lda.exceptions.VelocityRenderingException'
adalab
-elda_1  | com.epimorphics.lda.exceptions.VelocityRenderingException
adalab
-elda_1  |     at com.epimorphics.lda.renderers.velocity.VelocityRendering.writeAll(VelocityRendering.java:130)
adalab
-elda_1  |     at com.epimorphics.lda.restlets.RouterRestlet$2.write(RouterRestlet.java:598)
adalab
-elda_1  |     at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
adalab
-elda_1  |     at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
adalab
-elda_1  |     at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)
adalab
-elda_1  |     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510)
adalab
-elda_1  |     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
adalab
-elda_1  |     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
adalab
-elda_1  |     at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
adalab
-elda_1  |     at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
adalab
-elda_1  |     at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:927)
adalab
-elda_1  |     at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:875)
adalab
-elda_1  |     at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:829)
adalab
-elda_1  |     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
adalab
-elda_1  |     at com.epimorphics.lda.support.LogRequestFilter.doFilter(LogRequestFilter.java:74)
adalab
-elda_1  |     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
<< CUT >>


The steps I did before launching are:
1. unpack both (elda-assets, elda-comon) war files and copy:
 - elda-assets/velocity    into /tmp/static
 - elda-common/_error_pages/ into /tmp/static

In the documentation I found that _velocityPath needs to have absolute path to resources on the disk. That why I extracted velocity data.

2. Add following settings:
[] a api:API;
.... <cut>
       
; api:defaultFormatter resource:VelocityFormatter
       
; api:variable [ api:name "_exceptionIfEmpty"
                       
; api:value "no" ] ,
               
[ api:name "_velocityPath"  ;
                 api
:value "/tmp/static/velocity, /tmp/static/_error_pages/velocity, elda-assets/velocity/"] ,
               
[ api:name "_resourceRoot"
                     
; api:value "/elda-assets/" ] ,
               
[ api:name "_suppress_ipto"  
                 
; api:value "yes" ] # Suppress isPrimaryTopicOf

resource:Velocityformatter has just basic content:
resource:VelocityFormatter a elda:VelocityFormatter
   
; api:name "html"
   
; api:mimeType "text/html; charset=utf-8"
   
; elda:className "com.epimorphics.lda.renderers.VelocityRendererFactory"
   
.


chris dollin

unread,
Nov 17, 2016, 5:51:20 AM11/17/16
to linked-data-api-discuss
I shall look into this later today.
> --
> You received this message because you are subscribed to the Google Groups
> "linked-data-api-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to linked-data-api-d...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Chris "allusive" Dollin

Jacek Grzebyta

unread,
Nov 17, 2016, 6:39:57 AM11/17/16
to linked-data...@googlegroups.com
Thanks a lot. That would be great. By the way: I use Elda version 1.3.19.

Regards,
Jacek


> For more options, visit https://groups.google.com/d/optout.



--
Chris "allusive" Dollin

--
You received this message because you are subscribed to the Google Groups "linked-data-api-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linked-data-api-discuss+unsub...@googlegroups.com.

Jacek Grzebyta

unread,
Nov 17, 2016, 10:44:46 AM11/17/16
to linked-data...@googlegroups.com
I fixed a configuration file on Tomcat:

        ; api:variable [ api:name "_velocityPath"  ; api:value "/var/lib/html/elda-assets/velocity"] ;
        ; api:variable [ api:name "_resourceRoot"  ; api:value "/elda-assets/"] ;

In Tomcat (tomcat:8.5-jre8-alpine) the velocity rendering works fine. However for jetty this error still occurs. It seems to be a problem with Jetty then.

Thanks a lot,
Jacek

On 17 November 2016 at 11:39, Jacek Grzebyta <grzeby...@gmail.com> wrote:
Thanks a lot. That would be great. By the way: I use Elda version 1.3.19.

Regards,
Jacek

> For more options, visit https://groups.google.com/d/optout.



--
Chris "allusive" Dollin

--
You received this message because you are subscribed to the Google Groups "linked-data-api-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linked-data-api-discuss+unsubscr...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages