diff --git a/.gwt/.gwt-log b/.gwt/.gwt-log index d4ff74a..08f585e 100644 --- a/.gwt/.gwt-log +++ b/.gwt/.gwt-log @@ -104683,3 +104683,146 @@ Compiling... Compilation completed in 0.00 seconds Removing invalidated units Finding entry point classes +Public resources found in... + [WARN] Error processing classpath URL 'file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar' +java.net.URISyntaxException: Illegal character in path at index 26: file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar + at java.net.URI$Parser.fail(URI.java:2829) + at java.net.URI$Parser.checkChars(URI.java:3002) + at java.net.URI$Parser.parseHierarchical(URI.java:3086) + at java.net.URI$Parser.parse(URI.java:3034) + at java.net.URI.(URI.java:595) + at java.net.URL.toURI(URL.java:938) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:323) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:358) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.(ResourceOracleImpl.java:402) + at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:545) + at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:199) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:447) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:125) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:103) + at com.google.gdt.eclipse.designer.WarmUpSupport.doWarmUp(WarmUpSupport.java:84) + at com.google.gdt.eclipse.designer.Activator.earlyStartup(Activator.java:190) + at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87) + at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:73) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2552) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) +Translatable source found in... +Found 0 cached/archived units. Used 0 / 2719 units from cache. +Compiling... + 0% complete (ETR: 55 seconds) + 10% complete (ETR: 50 seconds) + 20% complete (ETR: 38 seconds) + 30% complete (ETR: 29 seconds) + 40% complete (ETR: 22 seconds) + 50% complete (ETR: 19 seconds) + 60% complete (ETR: 14 seconds) + 70% complete (ETR: 9 seconds) + 80% complete (ETR: 6 seconds) + 90% complete (ETR: 3 seconds) + 100% complete (ETR: 0 seconds) + Compilation completed in 38.56 seconds +Removing invalidated units +Finding entry point classes +Public resources found in... + [WARN] Error processing classpath URL 'file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar' +java.net.URISyntaxException: Illegal character in path at index 26: file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar + at java.net.URI$Parser.fail(URI.java:2829) + at java.net.URI$Parser.checkChars(URI.java:3002) + at java.net.URI$Parser.parseHierarchical(URI.java:3086) + at java.net.URI$Parser.parse(URI.java:3034) + at java.net.URI.(URI.java:595) + at java.net.URL.toURI(URL.java:938) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:323) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:358) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.(ResourceOracleImpl.java:402) + at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:545) + at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:199) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:447) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:125) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:104) + at com.google.gdt.eclipse.designer.WarmUpSupport.doWarmUp(WarmUpSupport.java:84) + at com.google.gdt.eclipse.designer.Activator.earlyStartup(Activator.java:190) + at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87) + at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:73) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2552) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) +Translatable source found in... +Found 2719 cached/archived units. Used 2719 / 2719 units from cache. +Compiling... + Compilation completed in 0.00 seconds +Removing invalidated units +Finding entry point classes +Public resources found in... + [WARN] Error processing classpath URL 'file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar' +java.net.URISyntaxException: Illegal character in path at index 26: file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar + at java.net.URI$Parser.fail(URI.java:2829) + at java.net.URI$Parser.checkChars(URI.java:3002) + at java.net.URI$Parser.parseHierarchical(URI.java:3086) + at java.net.URI$Parser.parse(URI.java:3034) + at java.net.URI.(URI.java:595) + at java.net.URL.toURI(URL.java:938) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:323) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:358) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.(ResourceOracleImpl.java:402) + at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:545) + at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:199) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:447) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:125) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:105) + at com.google.gdt.eclipse.designer.WarmUpSupport.doWarmUp(WarmUpSupport.java:84) + at com.google.gdt.eclipse.designer.Activator.earlyStartup(Activator.java:190) + at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87) + at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:73) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2552) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) +Translatable source found in... +Found 2719 cached/archived units. Used 2719 / 2719 units from cache. +Compiling... + Compilation completed in 0.00 seconds +Removing invalidated units +Finding entry point classes diff --git a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java index fb78f92..98b8cdc 100644 --- a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java +++ b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java @@ -1443,9 +1443,10 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore { // Inserting data MutationBatch m = conn.getKeyspace().prepareMutationBatch(); for (String hashtag : noduplicatesHashtags) { - m.withRow(cf_HashtagTimeline, hashtag).putColumn(feedid, vreid, null); + String lowerCaseHashtag = hashtag.toLowerCase(); + m.withRow(cf_HashtagTimeline, lowerCaseHashtag).putColumn(feedid, vreid, null); boolean firstInsert = execute(m); - boolean secondInsert = updateVREHashtagCount(vreid, hashtag, true); + boolean secondInsert = updateVREHashtagCount(vreid, lowerCaseHashtag, true); if (! (firstInsert && secondInsert)) { _log.error("saveHashTags: Could not save the hashtag(s)"); return false; @@ -1465,9 +1466,10 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore { // Inserting data MutationBatch m = conn.getKeyspace().prepareMutationBatch(); for (String hashtag : noduplicatesHashtags) { - m.withRow(cf_HashtagTimeline, hashtag).deleteColumn(feedid); + String lowerCaseHashtag = hashtag.toLowerCase(); + m.withRow(cf_HashtagTimeline, lowerCaseHashtag).deleteColumn(feedid); boolean firstDelete = execute(m); - boolean secondInsert = updateVREHashtagCount(vreid, hashtag, false); + boolean secondInsert = updateVREHashtagCount(vreid, lowerCaseHashtag, false); if (! (firstDelete && secondInsert)) { _log.error("deleteHashTags: Could not delete the hashtag(s)"); return false; diff --git a/src/main/java/org/gcube/portal/databook/server/DatabookCassandraTest.java b/src/main/java/org/gcube/portal/databook/server/DatabookCassandraTest.java index cd62681..21bd051 100644 --- a/src/main/java/org/gcube/portal/databook/server/DatabookCassandraTest.java +++ b/src/main/java/org/gcube/portal/databook/server/DatabookCassandraTest.java @@ -57,13 +57,13 @@ public class DatabookCassandraTest { hashtags.add(HASHTAG1); hashtags.add(HASHTAG2); - Feed feed = new Feed(UUID.randomUUID().toString(), FeedType.TWEET, "massimiliano.assante", new Date(), VREID, - "www.d4science.org/monitor", "thumbUri", "This is a feed with " + HASHTAG1 + " and " + HASHTAG2, PrivacyLevel.VRES, "Massimiliano Assante", "massimiliano.assante@isti.cnr.it", "thumburl", "linkTitle", "linkDesc", "host"); - assertTrue(store.saveUserFeed(feed)); - assertTrue(store.saveHashTags(feed.getKey(), VREID, hashtags)); - //assertTrue(store.deleteHashTags("d0c64e42-9616-4e24-a65a-7a63a280d676", VREID, hashtags)); - System.out.println(feed); - +// Feed feed = new Feed(UUID.randomUUID().toString(), FeedType.TWEET, "massimiliano.assante", new Date(), VREID, +// "www.d4science.org/monitor", "thumbUri", "This is a feed with " + HASHTAG1 + " and " + HASHTAG2, PrivacyLevel.VRES, "Massimiliano Assante", "massimiliano.assante@isti.cnr.it", "thumburl", "linkTitle", "linkDesc", "host"); +// assertTrue(store.saveUserFeed(feed)); +// assertTrue(store.saveHashTags(feed.getKey(), VREID, hashtags)); +// assertTrue(store.deleteHashTags("d0c64e42-9616-4e24-a65a-7a63a280d676", VREID, hashtags)); +// System.out.println(feed); +// System.out.println("\ngetting getVREHashtagsWithOccurrence for " + VREID); Map hashtagsWithOcc = store.getVREHashtagsWithOccurrence(VREID); for (String hashtag : hashtagsWithOcc.keySet()) { diff --git a/src/main/java/org/gcube/portal/databook/server/DatabookStore.java b/src/main/java/org/gcube/portal/databook/server/DatabookStore.java index cde7051..71c3762 100644 --- a/src/main/java/org/gcube/portal/databook/server/DatabookStore.java +++ b/src/main/java/org/gcube/portal/databook/server/DatabookStore.java @@ -343,7 +343,7 @@ public interface DatabookStore { /** * * @param vreid VRE identifier - * @param hashtag the hashtag to look for including the '#' + * @param hashtag the hashtag to look for including the '#', it is case sensitive * @throws ColumnNameNotFoundException . * @throws FeedIDNotFoundException . * @throws FeedTypeNotFoundException .