-
1. Re: Twitter VDB
van.halbert Mar 26, 2013 1:40 PM (in response to divadatabase)If you are setting up the resource adapter using JBoss CLI, which it appears you are, then that last line needs to be executed in order to enable the resource adapter. That line isn't present in the quickstart pom.xml, because there's a current issue (or was at the time of the quickstart creation) with the JBossAS maven plugin in that it won't activate the adapter. That's why its indicated in the readme that the server requires a restart if you use maven to setup the resource adapter.
Van
-
2. Re: Twitter VDB
divadatabase Mar 26, 2013 2:03 PM (in response to van.halbert)Hi Van,
Yes, I'm using my local instance of the Teiid server (standalone-teiid.xml) to deploy and activate my VDBs. Then I will be using JDBC to query against them (I'm not using Maven).
So how do I add the line? Do I just write "twitterDS:activate" somewhere in that section?
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>teiid-connector-ws.rar</archive>
<transaction-support>NoTransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="org.teiid.resource.adapter.ws.WSManagedConnectionFactory" jndi-name="java:/twitterDS" enabled="true" use-java-context="true" pool-name="twitter-ds">
<config-property name="EndPoint">http://search.twitter.com/search.json</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
twitterDS:activate
</resource-adapters>
</subsystem>
Thanks again!
-
3. Re: Twitter VDB
van.halbert Mar 26, 2013 2:13 PM (in response to divadatabase)That line is only of use if you are using JBoss CLI to add the resource adapter, so that the server will immediately activate the adapter. Otherwise, it shouldn't be manually added to the configuration (standalone-teiid-xml) file. If you were to start your server, the resource adapter should be available for the vdb to find.
Van
-
4. Re: Twitter VDB
divadatabase Mar 26, 2013 2:17 PM (in response to van.halbert)Hi Van,
That is exactly what I thought. Im also using another VDB which has only one data source, a CSV file, and it deploys and activates just fine (most of the time).
I'm not sure why I am receiving this error. Can you please take a look at my code:
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
teiid-connector-file.rar
</archive>
<transaction-support>NoTransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="org.teiid.resource.adapter.file.FileManagedConnectionFactory" jndi-name="java:/allstar-file" enabled="true" use-java-context="true" pool-name="allstar-file">
<config-property name="ParentDirectory">
../standalone/deployments/baseball/data
</config-property>
<config-property name="AllowParentPaths">
true
</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
<resource-adapter>
<archive>
teiid-connector-ws.rar
</archive>
<transaction-support>NoTransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="org.teiid.resource.adapter.ws.WSManagedConnectionFactory" jndi-name="java:/twitterDS" enabled="true" use-java-context="true" pool-name="teiid-twitter-ds">
<config-property name="EndPoint">
http://search.twitter.com/search.json
</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>
What could it be?
-
5. Re: Twitter VDB
van.halbert Mar 26, 2013 2:48 PM (in response to divadatabase)I ran the quickstart using maven to see what was added and compare to yours, and here's what it added:
<resource-adapter id="twitterDS">
<archive>
teiid-connector-ws.rar
</archive>
<transaction-support>NoTransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="org.teiid.resource.adapter.ws.WSManagedConnectionFactory" jndi-name="java:/twitterDS" enabled="true" use-java-context="true" pool-name="websericeDS">
<config-property name="EndPoint">
http://search.twitter.com/search.json
</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
After restarting server, I was able to execute the example in the quickstart.
The 2 differences I see are the "id" for the resource-adapter and the name of the pool-name is "websericeDS" (which shouldn't cause the issue). Try adding the "id" to if it fixes it.
Van
-
6. Re: Twitter VDB
divadatabase Mar 26, 2013 3:28 PM (in response to van.halbert)Hi Van,
I've made the changes accordingly. However, I am still getting that exact same error.
I am baffled.
Do you have anymore suggestions?
If not, I understand, you've been extremely helpful!
Thanks,
Danah
-
7. Re: Twitter VDB
van.halbert Mar 26, 2013 3:35 PM (in response to divadatabase)Danah,
I hate to ask this, could you try the maven option? If so, first delete the twitter resource adapter from the standalone-teiid.xml and delete the deployed twitter-vdb.xml from the deployments directory.
- set JBOSS_HOME to the jboss-as server installed directory.
- perform the steps in the README.md to run maven
This will at least confirm that it will work.
Van
-
8. Re: Twitter VDB
divadatabase Mar 26, 2013 3:38 PM (in response to van.halbert)Hi Van,
I think that's a good idea. I will try this now and post an update shortly.
Again, thank you so much.
Danah
-
9. Re: Twitter VDB
van.halbert Mar 26, 2013 3:41 PM (in response to divadatabase)Danah,
Thanks for your patience to work thru this, its very much appreciated.
Van
-
10. Re: Twitter VDB
divadatabase Mar 27, 2013 11:15 AM (in response to van.halbert)Hello again,
So I finally got it to work once I changed a few of the names in the twitter-vdb.xml (almost all of the name tags were "twitter" and I believe that was confusing the server). The Twitter VDB is now ACTIVE.
Now I'm attempting to query the View by JDBC, is that possible?
I tried to query it from the command line with:
run.bat localhost 31000 twitter "select * from tweet where query= 'jboss'"
but it kept telling me to start the JBoss AS Server when it has already been started.
Thanks in advance.
-
11. Re: Twitter VDB
van.halbert Mar 27, 2013 11:40 AM (in response to divadatabase)Where are you running run.bat from? It's not from the quickstart, so can you post what that script looks like?
Thanks.
Van
-
12. Re: Twitter VDB
divadatabase Mar 27, 2013 12:02 PM (in response to van.halbert)Hi Van,
Im running run.bat from JBOSS_HOME/bin.
Unsurprisingly, here is the script from run.bat.
@ECHO OFF
REM Placeholder for people used to run.bat from older version redirecting them to read the readme
echo.
echo =======================================================================================
echo.
echo To start JBoss Application Server please see %CD%\..\README.txt
echo.
echo ========================================================================================
echo.
In the README it says to use JBOSS_HOME/bin/standalone.bat to start the server, which I did.
Thus, I used the following command line to query the twitter view: standalone.bat localhost 31000 twitter "select * from tweet where query= 'jboss'"
I recieved the following error:
Invalid option 'localhost' Usage: .standalone.sh [args...] where args include: ...
-
13. Re: Twitter VDB
van.halbert Mar 27, 2013 12:17 PM (in response to divadatabase)Hey Danah,
The JBOSS_HOME/bin scripts are not used for querying teiid.
Use the simpleclient quickstart and run: mvn install -Dvdb=twitter -Dsql="select * from tweet where query= 'jboss'"
Van
-
14. Re: Twitter VDB
van.halbert Mar 27, 2013 12:20 PM (in response to van.halbert)Or you can use your favorite SQL tool (i.e., SQuirreL) to connect to Teiid and run the sql.