[hibernate:2.1.1]: No bean named 'transactionManagerwordpressSessionFactory' is defined - grails-plugin

I have upgraded grails from 1.3.7 to 2.1.1, and after starting server (grails run-app) following error is being thrown. I'm not getting the solution-
1st exception-
| Error 2012-09-17 14:23:09,767 [localhost-startStop-1] ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [hibernate:2.1.1]: No bean named 'transactionManagerwordpressSessionFactory' is defined
Message: No bean named 'transactionManagerwordpressSessionFactory' is defined
Line | Method
->> 334 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 166 | run in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 679 | run . . . in java.lang.Thread
2nd Error-
| Error 2012-09-17 14:23:09,959 [localhost-startStop-1] ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [taxonomy:1.2]: null
Message: null
Line | Method
->> 108 | methodMissing in org.grails.datastore.gorm.GormStaticApi
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 14 | init in com.grailsrocks.taxonomy.TaxonomyService
| 43 | doCall . . . in TaxonomyGrailsPlugin$_closure3
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 679 | run in java.lang.Thread
3rd error-
| Error 2012-09-17 14:23:11,762 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error executing bootstraps: null
Message: null
Line | Method
->> 108 | methodMissing in org.grails.datastore.gorm.GormStaticApi
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 17 | doCall in BootStrap$_closure1
| 301 | evaluateEnvironmentSpecificBlock in grails.util.Environment
| 294 | executeForEnvironment in ''
| 270 | executeForCurrentEnvironment . . in ''
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 679 | run in java.lang.Thread
The above error is being thrown, and server is not starting up. I am using grails 2.1.1 with jdk1.6. Kindly help me for the same.
.
Thank You in advance

Related

How to index a specific column to perform field comparison calculations?

Given the following table:
| A | B | holdingtemp1 | holdingTemp2 | holdingtemp3 | holdingTemp4 | idx |
| Grits| 7:06:24 AM | 180.199 | - | - | - | 0 |
| | 8:35:56 AM | - | 174.30 | - | - | 1 |
| | 9:25:18 AM | - | - | 182 | - | 2 |
| | 10:02:0 AM | - | - | - | 180 | 3 |
How to properly index column B to perform field comparisons in order to implement conditional logic where each temperature recording must be taken within a two hour interval relative to the previous recording, such that:
if(B[0] + 2 > B[1], green(), red()) // 9:06 > 8:35, turns cell green
if(B[1] + 2 > B[2], green(), red()) // 10:35 > 9:25, turns cell green
Edit:
Found the right function to use for this implementation, but peak() is returning 4:43:21 AM for all records with
Peek('B', 0) as peekB, // 4:43:21 AM
and 5:11:03 AM with
Peek('B', 1) as peekB, // 5:11:03 AM
If so, does peek() fetch the field value of the preloaded or postloaded data?

SPARQL how to select number of all classes and instance without distinct?

I have problem to select data by using sparql query.
I made .owl file that structure is like as below:
Superclass
- subclassA - instance1
- subclassB
- subclass1 - instance1
- subclass2
-subclass1 - instance1
- subclassC
- subclass1 - instance1
- subclass2 - instance1
then i want to make result like:
+------------+-----------+-----------+-----------+-----------+
| Class | sub1 | sub2 | sub3 | instance |
+------------+-----------+-----------+-----------+-----------+
| Superclass | subclassA | | | instance1 |
| Superclass | subclassB | subclass1 | | instance1 |
| Superclass | subclassB | subclass2 | subclass1 | instance1 |
| Superclass | subclassC | | | instance1 |
| Superclass | subclassC | | | instance2 |
+------------+-----------+-----------+-----------+-----------+\
I want to show the results, including instance value, from Class to leafclass.
so, I tried to make query like
SELECT ?Class ?sub1 ?sub2 ?sub3 ?instance
WHERE{
?instance rdf:type ?Class.
?instance tdf:type ?sub1.
?sub1 rdfs:subClassOf ?Class.
}
but, I have no idea. How do i fix it?

Column result unexpectedly returning nothing

Have a SPARQL query that returns nothing for Airport_Name when I believe it should.
PREFIX nas: <https://data.nasa.gov/ontologies/atmonto/NAS#>
PREFIX gen: <https://data.nasa.gov/ontologies/atmonto/general#>
SELECT *
WHERE{
{
{SELECT ?Airport_Name{
?Airport rdf:type nas:Airport ;
nas:airportName ?Airport_Name .
}
}
}UNION{
?Location rdf:type gen:PointLocation;
gen:longitude ?X ;
gen:latitude ?Y .
}
?Location rdf:type gen:PointLocation;
gen:longitude ?X ;
gen:latitude ?Y .
FILTER (?X > -80 && ?X < -64 && ?Y > 18 && ?Y < 32)
}
Expected result should return Location, X, Y, and Airport_Name
When I try to return Airport_Name at the bottom, the Location columns then appear blank, so im not sure what has been done wrongly. If anyone could point me in the right direction, that would be much appreciated.
Your query has several issues, the correct query would be something like below.
Query
SELECT *
WHERE
{ ?airport rdf:type/rdfs:subClassOf* nas:Airport ;
nas:airportName ?Airport_Name ;
nas:airportLocation ?location .
?location gen:longitude ?X ;
gen:latitude ?Y
FILTER ( ?X > "-80"^^xsd:float && ?X < "-64"^^xsd:float && ?Y > "18"^^xsd:float && ?Y < "32"^^xsd:float )
}
Result (sample with LIMIT 10)
--------------------------------------------------------------------------------------------------------------------------
| airport | Airport_Name | location | X | Y |
==========================================================================================================================
| nas:MYEMairport | "Governors Harbour" | nas:MYEMcoordinates | "-76.330178"^^xsd:float | "25.283586"^^xsd:float |
| nas:MDPCairport | "Punta Cana Intl" | nas:MDPCcoordinates | "-68.366186"^^xsd:float | "18.570781"^^xsd:float |
| nas:MUGTairport | "Mariana Grajales" | nas:MUGTcoordinates | "-75.158333"^^xsd:float | "20.085278"^^xsd:float |
| nas:MDSTairport | "Cibao Intl" | nas:MDSTcoordinates | "-70.604689"^^xsd:float | "19.406092"^^xsd:float |
| nas:MYLSairport | "Stella Maris" | nas:MYLScoordinates | "-75.268778"^^xsd:float | "23.583047"^^xsd:float |
| nas:MBNCairport | "North Caicos" | nas:MBNCcoordinates | "-71.939658"^^xsd:float | "21.917486"^^xsd:float |
| nas:MUMOairport | "Orestes Acosta" | nas:MUMOcoordinates | "-74.922222"^^xsd:float | "20.653889"^^xsd:float |
| nas:MYRPairport | "New Port Nelson" | nas:MYRPcoordinates | "-74.836186"^^xsd:float | "23.684378"^^xsd:float |
| nas:MYEGairport | "George Town" | nas:MYEGcoordinates | "-75.781670"^^xsd:float | "23.466667"^^xsd:float |
| nas:MUBYairport | "Carlos Manuel De Cespedes" | nas:MUBYcoordinates | "-76.621389"^^xsd:float | "20.396389"^^xsd:float |
--------------------------------------------------------------------------------------------------------------------------
Note, the query uses the property path rdf:type/rdfs:subClassOf* which only works if you've also loaded the ontology (NAS.ttl). The property path is necessary because the instance data (airportInst.ttl) uses subclasses of nas:Airport like nas:InternationAirport or nas:CanadianAirport.

Following namespaces in SPARQL query

Given this data structure
#prefix core <http://www.w3.org/2004/02/skos/core#>
<http://localhost/myvocab/1> core#notation 1 .
<http://localhost/myvocab/1> <http://www.w3.org/2006/time#inDateTime> <http://localhost/myvocab/item1#DateDescription> .
<http://localhost/myvocab/item1#DateDescription> <http://www.w3.org/2006/time#year> 2016 ;
<http://www.w3.org/2006/time#month> "June"
If I run
select * where {?s ?p ?o .
<http://www.w3.org/2004/02/skos/core#notation> 1 . }
then only the first 2 triples (:hasID and :hasTime) are returned. Is there a sparql query (preferably not using a regex filter for matching the id) to return all triples from the child namespaces too?
I'm hoping I can achieve a result something along the lines of
-------------------------------------------------------------------------------------------------------------------------------------------------------
| s | p | o |
=======================================================================================================================================================
| <http://localhost/myvocab/item1> | <http://www.w3.org/2006/time#inDateTime> | <http://localhost/myvocab/item1#DateDescription |
| <http://localhost/myvocab/item1> | <http://www.w3.org/2004/02/skos/core#notation> | 1 |
| <http://localhost/myvocab/item1#DateDescription> | <http://www.w3.org/2006/time#month> | "June" |
| <http://localhost/myvocab/item1#DateDescription> | <http://www.w3.org/2006/time#year> | 2016 |
-------------------------------------------------------------------------------------------------------------------------------------------------------
It always helps if you provide data that we can actually load and property formed queries that you've tried. The data that you've shown isn't actually legal, nor is the query that you provided. Here's some sample data that's actually loadable:
#prefix core: <http://www.w3.org/2004/02/skos/core#>
<http://localhost/myvocab/1> core:notation 1 ;
<http://www.w3.org/2006/time#inDateTime> <http://localhost/myvocab/item1#DateDescription> .
<http://localhost/myvocab/item1#DateDescription> <http://www.w3.org/2006/time#year> 2016 ;
<http://www.w3.org/2006/time#month> "June"
If I understand you, you want to follow the :item1_DateTime object's properties too. You can do that with a property path that follows :item1's properties and value, and so on. In this query, I use (:|!:) as a wildcard, since every property is either : or it isn't. The * at the end means to follow paths of arbitrary length.
prefix core: <http://www.w3.org/2004/02/skos/core#>
select ?s ?p ?o where {
?s_ core:notation 1 ;
(<>|!<>)* ?s .
?s ?p ?o .
}
--------------------------------------------------------------------------------------------------------------------------------------------------
| s | p | o |
==================================================================================================================================================
| <http://localhost/myvocab/1> | <http://www.w3.org/2006/time#inDateTime> | <http://localhost/myvocab/item1#DateDescription> |
| <http://localhost/myvocab/1> | core:notation | 1 |
| <http://localhost/myvocab/item1#DateDescription> | <http://www.w3.org/2006/time#month> | "June" |
| <http://localhost/myvocab/item1#DateDescription> | <http://www.w3.org/2006/time#year> | 2016 |
--------------------------------------------------------------------------------------------------------------------------------------------------

Apache Drill mash file metadata with results

My present query on Apache Drill is as follows -
select
CAST(columns[0] AS Integer) as ID,
to_timestamp(SUBSTR(columns[10],1,14),'YYYYMMddHHmmss') as RecordDt
from dfs.`/data/100Krows/`
What I would like to do is get the modificationTime metadata for each of the .csv files in my folder as a column something like this -
select
CAST(columns[0] AS Integer) as ID,
to_timestamp(SUBSTR(columns[10],1,14),'YYYYMMddHHmmss') as RecordDt,
modificationTime as versionStartTime
from dfs.`/data/100Krows/`
The modificationTime metadata can be found when I run the following
SHOW FILES in dfs.data
Is there a way to achieve this in its current version 1.1 or 1.0?
UPDATE 1
What I am truly looking for is the file metadata included in the result set of select statement against individual files
if my directory structure is as follows -
dir0
dir1
samefilename.csv -- Modified Date - 10/01/2013
*******DATA******
Col0,Col1,Col2
Val1-2013,Val2-2013,Val3-2014
*******DATA******
dir2
samefilename.csv -- Modified Date - 10/01/2014
*******DATA******
Col0,Col1,Col2
Val1-2014,Val2-2014,Val3-2014
*******DATA******
Kind of query I want to write -
select
name as filename,
modificationTime as versionStartTime,
Col0,
Col2,
Col3
from dfs.`/dir0/`
Expected Result -
Columns[0] Columns[1] Columns[2] .....
samefileName.csv 10/01/2013 Val1-2013 .....
samefileName.csv 10/01/2014 Val1-2014 .....
Dakuji,
This is currently not exactly possible (as of version 1.1) but here is a proxy for it until this Drill issue that addresses your question is implemented. What I am proposing below is not the exact solution, but with some work can get you there.
Preconditions and notes:
Have .tbl extension registered under .psv storage configuration.
I do this under dfs.
is a placeholder for the file you name whatever you want.
Do this from the Drill's SQLLine prompt:
0: jdbc:drill:zk=local> use dfs;
0: jdbc:drill:zk=local> record! <file_name.tbl>
0: jdbc:drill:zk=local> SHOW FILES;
0: jdbc:drill:zk=local> record!
0: jdbc:drill:zk=local> select columns[9] from dfs.`<file_name.tbl>';
There might be some noise in some column entries, but you can further filter that out with a query.
> 0: jdbc:drill:zk=local> !record <file_name.tbl>
Recording stopped.
0: jdbc:drill:zk=local> select columns[9] from dfs.`<\path\<file_name.tbl>`;
+---------------------------+
| EXPR$0 |
+---------------------------+
| null |
| null |
| modificationTime |
| null |
| 2013-04-26 23:44:56.0 |
| 2015-08-12 16:21:39.0 |
| 2014-04-26 10:09:33.0 |
| 2015-04-27 22:49:48.0 |
| 2013-08-24 20:16:29.0 |
| 2015-08-23 19:26:54.0 |
| 2014-10-21 16:43:38.0 |
| 2014-04-26 10:09:35.0 |
| 2014-10-21 16:43:38.0 |
| 2012-11-16 11:38:17.0 |
| 2012-11-16 11:44:27.0 |
| 2014-10-21 16:42:57.0 |
| 2014-04-26 10:09:28.0 |
| 2013-08-24 21:48:39.0 |
| 2015-08-20 22:27:34.0 |
+---------------------------+
19 rows selected (0.082 seconds)