Lewis John McGibbney created GORA-137:
-----------------------------------------

             Summary: MockDataStore throws ClassCastException when used with 
LogManager
                 Key: GORA-137
                 URL: https://issues.apache.org/jira/browse/GORA-137
             Project: Apache Gora
          Issue Type: Bug
          Components: storage
    Affects Versions: 0.2
            Reporter: Lewis John McGibbney
             Fix For: 0.3


lewismc@lewismc-HP-Mini-110-3100:~/ASF/gora$ bin/gora logmanager -parse 
gora-tutorial/src/main/resources/access.log
12/05/17 21:16:40 INFO log.LogManager: Parsing 
file:gora-tutorial/src/main/resources/access.log
Exception in thread "main" java.lang.ClassCastException: java.lang.Long cannot 
be cast to java.lang.String
        at org.apache.gora.mock.store.MockDataStore.put(MockDataStore.java:36)
        at 
org.apache.gora.tutorial.log.LogManager.storePageview(LogManager.java:140)
        at org.apache.gora.tutorial.log.LogManager.parse(LogManager.java:91)
        at org.apache.gora.tutorial.log.LogManager.main(LogManager.java:240)

I actually remember getting this exception ages ago. All other datastore 
implementations accept public void put(K key, T value), whereas the 
MockDataStore accepts public void put(String key, MockPersistent obj)

Understandably a simple way out of this is to define another datastore, however 
this really should be dealt with as I think mock datastore seems to be the 
default datastore!  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to