Tables does not exist but they do

16 views
Skip to first unread message

X W

unread,
Dec 14, 2010, 9:05:32 AM12/14/10
to jiql
I was trying to install Drupal 6.2 on GAE4J using SDK 1.3.8 + Quercus
with the Jun 4th release of jiql (which I believe the latest I got
from http://code.google.com/p/jiql/downloads/detail?name=jiql.jar&can=2&q=).
Out of the box, it does not work. So I have to install Drupal
separately, copy the files and export the DDL manually. I have to make
some changes to the 942 SQL statements over the weekend, including
removing things like AUTO_INCREMENT=1, non-supported column types like
smallint to int, longblob to blob etc. So far it works quite fine.
However, when I try to run the Drupal by the URL http://localhost:8888/index.php,
I got the following error -

sessions s Table does NOT Exists jiql.SQLParser table:sessions
s;aliases:{};values:{};selects:[];selectAS:{};selectAS2:
{};includealllist:[];eitheroralllist:[];getOriginalSelectList:
[];groupby:org.jiql.db.GroupBy@1e9246f;union:null
permission p Table does NOT Exists jiql.SQLParser table:permission
p;aliases:{};values:{};selects:[];selectAS:{};selectAS2:
{};includealllist:[];eitheroralllist:[];getOriginalSelectList:
[];groupby:org.jiql.db.GroupBy@3251c7;union:null
watchdog
Table does NOT Exists jiql.SQLParser table:watchdog
;aliases:{};values:{referer=, uid=0, timestamp=1292334783, type=access
denied, hostname=127.0.0.1, link=, location=http://localhost:8888/cibt/
index.php, variables=N;, message=node, severity=4};selects:[];selectAS:
{};selectAS2:{};includealllist:[];eitheroralllist:
[];getOriginalSelectList:
[];groupby:org.jiql.db.GroupBy@a973bd;union:jiql.Union tables:
{};aliases:{};selects:;selectAS:;jincludealllist:[];jeitheroralllist:
[];includealllist:;eitheroralllist:
Tue Dec 14 13:53:03 UTC 2010[ERROR]: * ERROR Row.get null
java.lang.NullPointerException
java.lang.NullPointerException

The following is the DDL used to create the table using jiql jdbc
wrapper -

CREATE TABLE `sessions` ( `uid` int(10) unsigned NOT NULL, `sid`
varchar(64) NOT NULL DEFAULT '', `hostname` varchar(128) NOT NULL
DEFAULT '', `timestamp` int(11) NOT NULL DEFAULT '0', `cache`
int(11) NOT NULL DEFAULT '0', `session` longtext, PRIMARY KEY
(`sid`) );

CREATE TABLE `permission` ( `pid` int(11) NOT NULL, `rid` int(10)
unsigned NOT NULL DEFAULT '0', `perm` longtext, `tid` int(10)
unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`pid`) );

CREATE TABLE `watchdog` ( `wid` int(11) NOT NULL, `uid` int(11)
NOT NULL DEFAULT '0', `type` varchar(16) NOT NULL DEFAULT '',
`message` longtext NOT NULL, `variables` longtext NOT NULL,
`severity` int(3) unsigned NOT NULL DEFAULT '0', `link` varchar(255)
NOT NULL DEFAULT '', `location` text NOT NULL, `referer` text,
`hostname` varchar(128) NOT NULL DEFAULT '', `timestamp` int(11) NOT
NULL DEFAULT '0', PRIMARY KEY (`wid`) );

Any idea why?

Thanks for any insight and looking forward to be able to "run" Drupal
soon on GAE4J! :)

Gabriel Wong

unread,
Dec 14, 2010, 1:19:15 PM12/14/10
to jiql
Hi,
I would suggest installing the jiqladmin tool and manually create
those tables:
https://docs.google.com/View?id=dhg923vj_7fdqfpffb&pli=1

On Dec 14, 6:05 am, X W <xaw...@gmail.com> wrote:
> I was trying to install Drupal 6.2 on GAE4J using SDK 1.3.8 + Quercus
> with the Jun 4th release of jiql (which I believe the latest I got
> fromhttp://code.google.com/p/jiql/downloads/detail?name=jiql.jar&can=2&q=).
> Out of the box, it does not work. So I have to install Drupal
> separately, copy the files and export the DDL manually. I have to make
> some changes to the 942 SQL statements over the weekend, including
> removing things like AUTO_INCREMENT=1, non-supported column types like
> smallint to int, longblob to blob etc. So far it works quite fine.
> However, when I try to run the Drupal by the URLhttp://localhost:8888/index.php,

Gabe Wong

unread,
Dec 14, 2010, 1:40:25 PM12/14/10
to jiql
Also make sure your app is going against the correct Google Database.
Are you using the local test DB or going against the Live DB on App Engine.
I do not believe the local test environment is persistent.

> --
> You received this message because you are subscribed to the Google Groups "jiql" group.
> To post to this group, send email to ji...@googlegroups.com.
> To unsubscribe from this group, send email to jiql+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jiql?hl=en.
>
>

Gabriel Wong

unread,
Dec 14, 2010, 3:58:56 PM12/14/10
to jiql
Are you sure you are going against the live engine because you
provided a local URL:
http://localhost:8888/index.php

X W

unread,
Dec 14, 2010, 4:08:11 PM12/14/10
to jiql
I used jiql admin as suggested by you, all run fine. I see under tab
"Tables/Kinds" that three tables are fine, with primary key and
everything. But why would jiql wrapper complains that it can't find
it? Do I need to add anything else in jiql property file? Mine looks
like this -

user=admin
password=jiql
catalog=drupal

Thanks.

Gabriel Wong

unread,
Dec 14, 2010, 5:17:01 PM12/14/10
to jiql
That is not enough since you are connecting to App Engine from your
local app.
Refer to the Remote Access section here:
https://docs.google.com/Doc?id=dhg923vj_2ghr8q9f3
Message has been deleted

Gabriel Wong

unread,
Dec 14, 2010, 5:38:38 PM12/14/10
to jiql
I get a 404 to that link. Just login to App Engine console, and copy
paste logs with errors if any.


On Dec 14, 2:26 pm, X W <xaw...@gmail.com> wrote:
> Wong,
>
> It is deployed at scigrpservice.appspot.com/cibt/index.php. I am not sure
> how to show you the log, as you need to be using xawave. But I am willing to
> hear any suggestions from you.
>
> Thanks for your prompt support!
>
> J
> > --
> > You received this message because you are subscribed to the Google Groups
> > "jiql" group.
> > To post to this group, send email to ji...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > jiql+uns...@googlegroups.com <jiql%2Bunsu...@googlegroups.com>.
Message has been deleted

Gabriel Wong

unread,
Dec 14, 2010, 6:23:59 PM12/14/10
to jiql
Do you know the exact query string? The table seem to being parsed as
"sessions s" instead of session

On Dec 14, 3:18 pm, X W <xaw...@gmail.com> wrote:
> here u go -
>
>    1. 12-14 02:36PM 46.840 /cibt/index.php 403 2600ms 9950cpu_ms
>    7080api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
>    AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215
>    Safari/534.10,gzip(gfe)
>
>    71.129.145.165 - - [14/Dec/2010:14:36:49 -0800] "GET
> /cibt/index.php HTTP/1.1" 403 217 - "Mozilla/5.0 (Windows; U; Windows
> NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko)
> Chrome/8.0.552.215 Safari/534.10,gzip(gfe)"
> "scigrpservice.appspot.com" ms=2601 cpu_ms=9950 api_cpu_ms=7080
> cpm_usd=0.276499
>
>    2. W12-14 02:36PM 47.260
>
>    [scigrpservice/1.346915530153276219].<stderr>: sessions s Table
> does NOT Exists jiql.SQLParser table:sessions
> s;aliases:{};values:{};selects:[];selectAS:{};selectAS2:{};includealllist:[ ];eitheroralllist:[];getOriginalSelectList:[];groupby:org.jiql.db.GroupBy@7 9a340;union:null
> > jiql%2Bunsu...@googlegroups.com<jiql%252Buns...@googlegroups.com>
Message has been deleted

Gabriel Wong

unread,
Dec 14, 2010, 7:13:35 PM12/14/10
to jiql
Please download the latest jiql.jar
http://jiql.googlecode.com/files/jiql.jar
and upload to GAE.
This one should show the original SQL statement with the error.


On Dec 14, 3:18 pm, X W <xaw...@gmail.com> wrote:
> here u go -
>
>    1. 12-14 02:36PM 46.840 /cibt/index.php 403 2600ms 9950cpu_ms
>    7080api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
>    AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215
>    Safari/534.10,gzip(gfe)
>
>    71.129.145.165 - - [14/Dec/2010:14:36:49 -0800] "GET
> /cibt/index.php HTTP/1.1" 403 217 - "Mozilla/5.0 (Windows; U; Windows
> NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko)
> Chrome/8.0.552.215 Safari/534.10,gzip(gfe)"
> "scigrpservice.appspot.com" ms=2601 cpu_ms=9950 api_cpu_ms=7080
> cpm_usd=0.276499
>
>    2. W12-14 02:36PM 47.260
>
>    [scigrpservice/1.346915530153276219].<stderr>: sessions s Table
> does NOT Exists jiql.SQLParser table:sessions
> s;aliases:{};values:{};selects:[];selectAS:{};selectAS2:{};includealllist:[ ];eitheroralllist:[];getOriginalSelectList:[];groupby:org.jiql.db.GroupBy@7 9a340;union:null
>
>
>
>
>
>
>
> On Tue, Dec 14, 2010 at 5:38 PM, Gabriel Wong <appcl...@gmail.com> wrote:
> > jiql%2Bunsu...@googlegroups.com<jiql%252Buns...@googlegroups.com>
Message has been deleted
Message has been deleted

Gabriel Wong

unread,
Dec 14, 2010, 10:54:31 PM12/14/10
to jiql
What is the create statement for users?

On Dec 14, 4:13 pm, Gabriel Wong <appcl...@gmail.com> wrote:
> Please download the latest jiql.jarhttp://jiql.googlecode.com/files/jiql.jar

Gabriel Wong

unread,
Dec 14, 2010, 11:54:00 PM12/14/10
to jiql
Please respond here:
http://groups.google.com/group/jiql

The JOIN statement
SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid
WHERE s.sid = '18iipbZORE4AAAASzgBVAu'
refers to table "users"

X W

unread,
Dec 16, 2010, 11:20:35 AM12/16/10
to jiql
I have spent some time to create the following test php running on
quercus. You just need to copy and paste into test.php and run it to
recreate the error easily -

<?
/*
** Connect to database:
*/

// Connect to the database (host, username, password)
$con = mysqli_connect('localhost','admin','jiql') or die('Could not
connect to the server!');

// Select a database:
mysqli_select_db($con, 'drupal') or die('Could not select a
database.');
//mysql_select_db('drupal',$con) or die('Could not select a
database.');

$SQL = "DROP TABLE `sessions`;";
//$result = @mysql_query($SQL, $con);
$result = @mysqli_query($con, $SQL);

$SQL = "DROP TABLE `users`;";
//$result = @mysql_query($SQL, $con);
$result = @mysqli_query($con, $SQL);

$SQL = "CREATE TABLE `sessions` ( `uid` int(10) unsigned NOT NULL,
`sid`
varchar(64) NOT NULL DEFAULT '', `hostname` varchar(128) NOT NULL
DEFAULT '', `timestamp` int(11) NOT NULL DEFAULT '0', `cache`
int(11) NOT NULL DEFAULT '0', `session` longtext, PRIMARY KEY
(`sid`) );";
//$result = mysql_query($SQL, $con) or die('A error occured: ' .
mysql_error());
$result = mysqli_query($con, $SQL) or die('A error occured: ' .
mysql_error());

//$SQL = "INSERT INTO `actions` VALUES
('comment_unpublish_action','comment','comment_unpublish_action','','Unpublish
comment');";
//$result = mysqli_query($con, $SQL) or die('A error occured: ' .
mysql_error());
//$result = mysql_query($SQL, $con) or die('A error occured: ' .
mysql_error());

$SQL = "CREATE TABLE `users` ( `uid` int(10) unsigned NOT NULL,
`name` varchar(60) NOT NULL DEFAULT '', `pass` varchar(32) NOT NULL
DEFAULT '', `mail` varchar(64) DEFAULT '', `mode` int(4) NOT NULL
DEFAULT '0', `sort` int(4) DEFAULT '0', `threshold` int(4) DEFAULT
'0', `theme` varchar(255) NOT NULL DEFAULT '', `signature`
varchar(255) NOT NULL DEFAULT '', `signature_format` smallint(6) NOT
NULL DEFAULT '0', `created` int(11) NOT NULL DEFAULT '0', `access`
int(11) NOT NULL DEFAULT '0', `login` int(11) NOT NULL DEFAULT
'0', `status` int(4) NOT NULL DEFAULT '0', `timezone` varchar(8)
DEFAULT NULL, `language` varchar(12) NOT NULL DEFAULT '',
`picture` varchar(255) NOT NULL DEFAULT '', `init` varchar(64)
DEFAULT '', `data` longtext, PRIMARY KEY (`uid`), UNIQUE KEY
`name` (`name`) );";
//$result = mysql_query($SQL, $con) or die('A error occured: ' .
mysql_error());
$result = mysqli_query($con, $SQL) or die('A error occured: ' .
mysql_error());

$SQL = "INSERT INTO `users` VALUES
('0','','','','0','0','0','','','0','0','0','0','0',null,'','','',null);";
//$result = mysql_query($SQL, $con) or die('A error occured: ' .
mysql_error());
$result = mysqli_query($con, $SQL) or die('A error occured: ' .
mysql_error());

//$SQL = "select * from sessions, users;";
$SQL = "SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid =
s.uid
WHERE s.sid = '18iipbZORE4AAAASzgBVAu'";

//$result = mysqli_query($con, $SQL) or die('A error occured: ' .
mysql_error());
//$result = mysql_query($SQL, $con) or die('A error occured: ' .
mysql_error());
$result = mysqli_query($con, $SQL) or die('A error occured: ' .
mysql_error());

// Get result count:
$Count = mysql_num_rows($result);
print "Showing $count rows:<hr/>\n\n";

// Fetch rows:
while($Row = mysqli_fetch_array($result)) {

print $Row[0].', '.$Row[1].', '.$Row[2] . "<br>";

}

mysqli_close($con);
?>

Let me know if you need anything else. Thanks.

Gabriel Wong

unread,
Dec 16, 2010, 6:34:30 PM12/16/10
to jiql
Hi,
Please download the latest jiql.jar.
An update was uploaded yesterday.
Regards
Reply all
Reply to author
Forward
0 new messages