Tuesday, September 2, 2014

TF CLC pending changes look abhorrent

I keep wondering who does this look readable to ? Isn't there too much information duplication here ? What's wrong with the existing .diff format ? Why invent a new standard ? Merely creating a new  standard won't do !! you have to make it work for the users !!

Microsoft seems to be in perpetual denial about it's rock stardom, like a high school teenager, it seems to think people will call it cool just because it is going against the norm. No ! going against the norm is not the only criterion . Making it better than the norm is what makes it cool. Wheather it goes against the norm or it extends and furthers the norm is immaterial to the user. 

$/Cobalt Search/Development/CobaltPlatformSearch
.checkstyleConfig.xml                                                                                       edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.checkstyleConfig.xml
.tfignore                                                                                                   add    C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tfignore
.tpignore                                                                                                   edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tpignore
gradle.properties                                                                                           add    C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\gradle.properties
ivy.xml                                                                                                     edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ivy.xml

$/Cobalt Search/Development/CobaltPlatformSearch/ant
deploy.xml                                                                                                  edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ant\deploy.xml

$/Cobalt Search/Development/CobaltPlatformSearch/config
spring-imports.xml                                                                                          edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\config\spring-imports.xml

Attaching the image below to show the actual command line output. 






What's wrong with something simpler, shouldn't brief be simple ? - for removed files, + for added files, * for edited files.



-  C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.checkstyleConfig.xml
+ C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tfignore
C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tpignore
+ C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\gradle.properties
C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ivy.xml
C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ant\deploy.xml
* C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\config\spring-imports.xml



Shell Script that will clean this mess


#!/bin/bash

tf status -login\:domain\\user,pass -workspace:workspace -format:brief > ~/tmp

# Change windows CRLF to Unix
sed -i 's/\r//' ~/tmp

# Remove first two lines, they are table header.
sed 1,2d ~/tmp >~/tmp1
mv ~/tmp1 ~/tmp 

# Remove all the lines starting with "$/" those lines show the directory on TFS server.
awk '!/^\$\//' ~/tmp > ~/tmp1
mv ~/tmp1 ~/tmp 

# Remove empty lines
awk 'NF > 0' ~/tmp > ~/tmp1
mv ~/tmp1 ~/tmp
 

##sed 's/[\/t]*[ ]*add//'
##sed -n 's/.*add -t //p' ~/tmp

#awk '/add|edit/+ {print $NF}' ~/tmp > ~/tmp1
awk '{print substr($0, index($0, $2))}'  ~/tmp > ~/tmp1
mv ~/tmp1 ~/tmp

STATUS_OUTPUT=`cat ~/tmp` 
rm ~/tmp

echo "$STATUS_OUTPUT"

Monday, March 24, 2014

org.springframework.data.mapping.PropertyReferenceException: No property change found for type

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property change found for type Login!
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:75)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:327)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:359)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:307)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:270)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:241)
at org.springframework.data.repository.query.parser.Part.<init>(Part.java:76)
at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:201)
at org.springframework.data.repository.query.parser.PartTree$Predicate.buildTree(PartTree.java:291)
at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:271)
at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:80)
at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:57)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:91)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:162)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:69)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:304)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:161)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:224)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:210)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:84)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
... 51 more
null
null


The exception above is caused by Named Queries whose names are not properly namespaced.


@NamedQueries({
@NamedQuery(
name = "Login.findLogins",
query = "SELECT login FROM Login login WHERE login.login = :login"
),
@NamedQuery(
name = "Login.changePassword",
query = "Some query"
)})