You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Lewis John McGibbney (JIRA)" <ji...@apache.org> on 2012/05/17 22:25:07 UTC

[jira] [Created] (GORA-137) MockDataStore throws ClassCastException when used with LogManager

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

        

[jira] [Updated] (GORA-137) MockDataStore throws ClassCastException when used with LogManager

Posted by "Lewis John McGibbney (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney updated GORA-137:
--------------------------------------

    Attachment: GORA-XX.patch

Patch attachment which does not directly address this issue, but hopefully addresses the class loading issues I was having.
                
> 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
>
>         Attachments: GORA-XX.patch
>
>
> 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

        

[jira] [Commented] (GORA-137) MockDataStore throws ClassCastException when used with LogManager

Posted by "Lewis John McGibbney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13278227#comment-13278227 ] 

Lewis John McGibbney commented on GORA-137:
-------------------------------------------

This unfortunate situation seems to be happening because the configuration from $GORA_HOME/gora-core/src/test/conf/gora.properties is getting picked up rather than the configuration in $GORA_HOME/gora-tutorial/conf/gora.properties

Mmmmm....
                
> 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