[
https://issues.apache.org/jira/browse/OLINGO-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14338063#comment-14338063
]
Michael Bolz commented on OLINGO-582:
-------------------------------------
Hi [~iliyan.velichkov],
we already had an issue with spaces in path and fixed it (and in addition add
the test in {{ClassHelperTest.loadFromSpaceDir()}}).
Hence it is possible that you found another bug (not related to spaces) in
class loading from a path.
Can you please provide the full path which causes the exception.
BTW as workaround you can also specify the annotated classes directly via
({{AnnotationServiceFactory.createAnnotationService(Collection<Class<?>>
annotatedClasses)}}) instead of the package which should be scanned for
annotated classes.
Kind regards,
Michael
> Issue in ClassHelper class
> --------------------------
>
> Key: OLINGO-582
> URL: https://issues.apache.org/jira/browse/OLINGO-582
> Project: Olingo
> Issue Type: Bug
> Components: odata2-annotation
> Affects Versions: V2 2.0.2
> Reporter: Iliyan Velichkov
> Assignee: Michael Bolz
> Priority: Critical
>
> When I create annotation service through AnnotationServiceFactory and my
> server is located at location which has space in the path (for example c:\My
> servers\serverX) the Olingo fails with the following exception:
> ...
> Caused by: java.lang.IllegalArgumentException: Invalid folder path for path
> URL 'file:/C:/Development/Workspaces/Eclipse Luna Lean/Extensions
> Service/Servers/Java Web Server-config/...more path...' from thread context
> class loader.
> at
> org.apache.olingo.odata2.annotation.processor.core.util.ClassHelper.getResourceUri(ClassHelper.java:118)
> at
> org.apache.olingo.odata2.annotation.processor.core.util.ClassHelper.loadClasses(ClassHelper.java:72)
> at
> org.apache.olingo.odata2.annotation.processor.core.util.ClassHelper.loadClasses(ClassHelper.java:65)
> at
> org.apache.olingo.odata2.annotation.processor.core.edm.AnnotationEdmProvider.<init>(AnnotationEdmProvider.java:101)
> at
> org.apache.olingo.odata2.annotation.processor.core.rt.AnnotationServiceFactoryImpl.createAnnotationService(AnnotationServiceFactoryImpl.java:42)
> at
> org.apache.olingo.odata2.annotation.processor.api.AnnotationServiceFactory.createAnnotationService(AnnotationServiceFactory.java:103)
> at
> com.sap.core.extensions.service.hcm.cloud.content.management.odata.cfg.AnnotationSampleServiceFactory$AnnotationInstances.<clinit>(AnnotationSampleServiceFactory.java:18)
> ... 60 more|
> This issue makes my web project an environment dependent, because I need to
> ensure that my server hasn't space in the location.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)