You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Khare, Aparna" <ap...@sap.com> on 2015/02/10 12:49:52 UTC

JPA entites with byte array

Dear Colleagues,

  I have a JPA entity with byte[] .When I do a Post operation on the odata service  I get the below error

java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.isBase64(Ljava/lang/String;)Z
               org.apache.olingo.odata2.core.edm.EdmBinary.validateLiteral(EdmBinary.java:59)
               org.apache.olingo.odata2.core.edm.EdmBinary.internalValueOfString(EdmBinary.java:91)


Can you please let me know in case this is a bug for byte[] in olingo.

Thanks,
Aparna



Re: JPA entites with byte array

Posted by "Bolz, Michael" <mi...@sap.com>.
Hello Aparna,

no this is not a bug.
In your deployed service the necessary (runtime) dependency to “apache.commons.codec" is missing (see below for maven GAV coordinates).
This dependency should be provided by your application server or packed into the builded war file.

In which environment is the OData service deployed?

Kind regards,
Michael

<dependency>
 <groupId>commons-codec</groupId>
 <artifactId>commons-codec</artifactId>
 <version>1.6</version>
</dependency>


> On 10 Feb 2015, at 12:49, Khare, Aparna <ap...@sap.com> wrote:
> 
> Dear Colleagues,
> 
>  I have a JPA entity with byte[] .When I do a Post operation on the odata service  I get the below error
> 
> java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.isBase64(Ljava/lang/String;)Z
>               org.apache.olingo.odata2.core.edm.EdmBinary.validateLiteral(EdmBinary.java:59)
>               org.apache.olingo.odata2.core.edm.EdmBinary.internalValueOfString(EdmBinary.java:91)
> 
> 
> Can you please let me know in case this is a bug for byte[] in olingo.
> 
> Thanks,
> Aparna
> 
>