Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-21 Thread Jorge Gonçalves projo...@gmail.com [firebird-support]
On Mon, Feb 19, 2018 at 10:21 AM, peshk...@mail.ru [firebird-support] <
firebird-support@yahoogroups.com> wrote:
>
>
> The problem is where should we place tmp files (including lock files and
> other shared files) now. Application cache may be at any moment cleaned
> which will cause problems if fb engine is running. Do you have better ideas
> than /storage/emulated/legacy/firebird ?
> __._,_.__
>
I'm totally lost with Android folder structure,
each version have a different hierarchy, folder links, and permission
rules...

On my devices (one Android 4.4 and two 6.0) only the 4.4 have the folder
/storage/emulated/legacy .
The 6.0 have /storage/emulated/0

So, I don't have no idea of a place that works among several versions.

I will try to find more information about this.


ps:

Worse... I have the embedded running on Android 6 but on 4.4 I'm getting
the error :
SQL Message : -904
Unsuccessful execution caused by an unavailable resource.

Engine Code: 335544375
Engine Message :
unavailable database

both for local and remote connections and everything is in the same place


Regards
jGoncalves
_,_._,___



Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-20 Thread Jorge Gonçalves projo...@gmail.com [firebird-support]
On Mon, Feb 19, 2018 at 9:16 AM, hv...@users.sourceforge.net
[firebird-support]  wrote:

>
>
> ---In firebird-support@yahoogroups.com,  wrote :
> >
>
> > files/firebird/intl/libfbintl. so
> /*The icu files are not in the distributed tar */
>
>   This is wrong structure, where do you get it ?
>

Trying  to use the same structure from Windows:

libclient in on folder and then the plugins and int folders relative to
this.



>
>   For correct structure look at android build here
>
> https://github.com/FirebirdSQL/firebird/releases/
> download/R3_0_3/Firebird-3.0.3.32900-0.arm.tar.gz
>
>   It contains subfolders :
> /bin with executables (you don't need it for embedded),
> /lib with libfbclient.so (you don't have it and this is the reason for
> errors you see)
>
>
I will try that later.

Regards
jGoncalves


[firebird-support] Re: FB3 Embedded on Android

2018-02-20 Thread peshk...@mail.ru [firebird-support]
Jorge, regarding access to /data/local/tmp. Some time ago when I was making 
Android port this was close to recommended place for tmp files on android. See 
for example 
https://stackoverflow.com/questions/21105281/where-is-the-tmp-in-android 
https://stackoverflow.com/questions/21105281/where-is-the-tmp-in-android

Surpise but currently I also can't access that directory any more, even on 
physically same device which was used for tests that time. I.e. appears to be 
SW upgrade result. 

The problem is where should we place tmp files (including lock files and other 
shared files) now. Application cache may be at any moment cleaned which will 
cause problems if fb engine is running. Do you have better ideas than 
/storage/emulated/legacy/firebird ?

Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-20 Thread Jorge Gonçalves projo...@gmail.com [firebird-support]
On Mon, Feb 19, 2018 at 10:04 AM, Jorge Gonçalves 
wrote:

>
>
>
>
>>
>>   For correct structure look at android build here
>>
>> https://github.com/FirebirdSQL/firebird/releases/download/
>> R3_0_3/Firebird-3.0.3.32900-0.arm.tar.gz
>>
>>   It contains subfolders :
>> /bin with executables (you don't need it for embedded),
>> /lib with libfbclient.so (you don't have it and this is the reason for
>> errors you see)
>>
>>
> I will try that later.
>

My mistake to assume that the structure are the same from windows.

Keeping the original structure does the job.

But I think that the FB team should work on this, since the process of
installing on Android is not a easy job.

Because there are a fixed structure is impossible to use the lib folder to
install the native libraries.





Thanks



Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-20 Thread hv...@users.sourceforge.net [firebird-support]
---In firebird-support@yahoogroups.com,  wrote :
> 
 > setting the FIREBIRD_LOCK to app/cache  solve the problem. 
  Noted, thanks


 > Now I have get privilege error but this time is a FB error.  
 > 
 > FB is working now.
 > > SQL Message : -607 > This operation is not defined for system tables.
 > 
 > Engine Code: 335544351
 > Engine Message :
 > unsuccessful metadata update
 > CREATE TABLE TMP_INSERT_TEST failed
 > There is no privilege for this operation
  
  Embedded engine doesn't verify user password but it still requires correct 
user 
name and checks all SQL operations against it. I guess, you provide no user 
name 
and engine uses OS user name. Obviously, it have no SQL privileges.

  So, provide correct user name when attaching to database (password could be
omitted in embedded case).

Regards,
Vlad










[firebird-support] Re: FB3 Embedded on Android

2018-02-19 Thread hv...@users.sourceforge.net [firebird-support]
---In firebird-support@yahoogroups.com,  wrote :
> 
 > Hi, > I'm trying to put the embedded version running on android,
 > but FB is allwys trying to connect to localhost.
 > 
 > 
 > The FB files are located on the app files folder
 > 
 > files/firebird/libfbclient.so

 > files/firebird/firebird.msg

 > files/firebird/plugins/ libEngine12.so
 > files/firebird/intl/fbintl. conf
 > files/firebird/intl/libfbintl. so 
 /*The icu files are not in the distributed tar */ 
  This is wrong structure, where do you get it ? 

  For correct structure look at android build here

https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0.arm.tar.gz
 
https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0.arm.tar.gz

  It contains subfolders :
/bin with executables (you don't need it for embedded), 
/lib with libfbclient.so (you don't have it and this is the reason for errors 
you see)


 

 

 > When I try to create a local database, trough IBPP, I'm getting the follow 
 > error:

 > 

 > Error message:
 > SQL Message : -902

 > can't format message 13:98 -- message file /data/data/com.fb.test/files/ 
 > firebird.msg not found 
 > /* FB is trying to pick the firebird.msg form files and not from 
 > files/firebird, where the libfbclient.so is located ??!!?!?!?*/

  Because firebird.msg is looked at one folder above libfbclient.so. If you put 
libfbclient.so into /lib
(files/firebird/lib in your case) it will start to work as it should.

 
 > Engine Code: 335544721

 > Engine Message :
 > Unable to complete network request to host "localhost".
 > Failed to establish a connection.
  

   Because libfbclient.so is in wrong place, it can't find and load plugin 
libEngine12.so, therefore
it tries to use next provider from default list - Loopback. Loopback provider 
add "localhost:" to the
connection string and thus the error above.

 

 > What is wrong about my embedded structure, 

  Hope it is clear now

> and what are the rules to use the embedded connection ?  
 

  Nothing special, i'd say ;)

Regards,
Vlad




Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-18 Thread Jorge Gonçalves projo...@gmail.com [firebird-support]
Yes, it's working now, thanks.


Regards
jGoncalves


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sun, Feb 18, 2018 at 11:45 PM, hv...@users.sourceforge.net
[firebird-support]  wrote:

>
>
> ---In firebird-support@yahoogroups.com,  wrote :
> >
> > setting the FIREBIRD_LOCK to app/cache  solve the problem.
>
>   Good
>
> > Now I have get privilege error but this time is a FB error.
> >
> > FB is working now.
> >
> > SQL Message : -607
> > This operation is not defined for system tables.
> >
> > Engine Code: 335544351
> > Engine Message :
> > unsuccessful metadata update
> > CREATE TABLE TMP_INSERT_TEST failed
> > There is no privilege for this operation
>
>   Embedded engine doesn't verify user password but still requires correct
> user
> name and checks all SQL operations against it. I guess, you provide no
> user name
> and engine uses OS user name. Obviously, it have no SQL privileges.
>
>   So, provide correct user name when attaching to database (password could
> be
> omitted in embedded case).
>
>
> Regards,
> Vlad
>
> 
>


Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-18 Thread hv...@users.sourceforge.net [firebird-support]
---In firebird-support@yahoogroups.com,  wrote :
> 
 > setting the FIREBIRD_LOCK to app/cache  solve the problem.

  Good

 > Now I have get privilege error but this time is a FB error.  
 > 
 > FB is working now.
 > > SQL Message : -607 > This operation is not defined for system tables.
 > 
 > Engine Code: 335544351
 > Engine Message :
 > unsuccessful metadata update
 > CREATE TABLE TMP_INSERT_TEST failed
 > There is no privilege for this operation
  





  Embedded engine doesn't verify user password but still requires correct user
name and checks all SQL operations against it. I guess, you provide no user name
and engine uses OS user name. Obviously, it have no SQL privileges.

  So, provide correct user name when attaching to database (password could be
omitted in embedded case).


Regards,
Vlad





Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-18 Thread Jorge Gonçalves projo...@gmail.com [firebird-support]
setting the FIREBIRD_LOCK to app/cache  solve the problem.

Now I have get privilege error but this time is a FB error.

FB is working now.

SQL Message : -607
This operation is not defined for system tables.

Engine Code: 335544351
Engine Message :
unsuccessful metadata update
CREATE TABLE TMP_INSERT_TEST failed
There is no privilege for this operation

Thanks
jGoncalves




Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sun, Feb 18, 2018 at 11:16 PM, hv...@users.sourceforge.net
[firebird-support]  wrote:

>
>
> ---In firebird-support@yahoogroups.com,  wrote :
>
> > Yes, putting firebird.conf and firebird.msg one folder above gives some
> progress..
>
>   Good to know. Looks like wrong build configuration, will investigate it
>
> ...
> > Can not access lock files directory /data/local/tmp/firebird/
>
>   Usually, firebird creates this folder by itself
>
> > It seems that the user can't access to data/local/tmp
> > I can only access to /data/local/tmp  as root
>
>   Seems you found a root of the problem. As a quick workaround you may set
> FIREBIRD_LOCK environment variable to the some accessible folder. The
> variable should be set before your app start or even by your app but before
> first call of Firebird API.
>
> Hope it helps,
> Vlad
>
>
> 
>


Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-18 Thread hv...@users.sourceforge.net [firebird-support]
---In firebird-support@yahoogroups.com,  wrote :
 
 > Yes, putting firebird.conf and firebird.msg one folder above gives some 
 > progress..

  Good to know. Looks like wrong build configuration, will investigate it


...
> Can not access lock files directory /data/local/tmp/firebird/ 
  Usually, firebird creates this folder by itself


 > It seems that the user can't access to data/local/tmp
 > I can only access to /data/local/tmp  as root
  
  Seems you found a root of the problem. As a quick workaround you may set
FIREBIRD_LOCK environment variable to the some accessible folder. The
variable should be set before your app start or even by your app but before
first call of Firebird API.

Hope it helps,
Vlad

  






Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-18 Thread Jorge Gonçalves projo...@gmail.com [firebird-support]
Yes, putting firebird.conf and firebird.msg one folder above gives some
progress..


SQL Message : -904
Unsuccessful execution caused by an unavailable resource.

Engine Code: 335544992
Engine Message :
Can not access lock files directory /data/local/tmp/firebird/

It seems that the user can't access to data/local/tmp
I can only access to /data/local/tmp  as root



On Sun, Feb 18, 2018 at 10:37 PM, hv...@users.sourceforge.net
[firebird-support]  wrote:

>
>
> > ---In firebird-support@yahoogroups.com,  wrote :
> >
> > Same error.
> >
> > I'm more inclined to something related with relative paths or similar.
> >
> > If you notice the fbclient is trying to read firebird.msg from the wrong
> folder.
>
>   Yes, it is strange. What if put modified firebird.conf (and
> firebird.msg) one folder above ?
>
> Regards,
> Vlad
>
>
> 
> <#m_-1410101366622491327_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> 
>


Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-18 Thread hv...@users.sourceforge.net [firebird-support]
> ---In firebird-support@yahoogroups.com,  wrote :
> 
 > Same error. > 

 > I'm more inclined to something related with relative paths or similar.
 > 

 > If you notice the fbclient is trying to read firebird.msg from the wrong 
 > folder. 

  Yes, it is strange. What if put modified firebird.conf (and firebird.msg) one 
folder above ?

Regards,
Vlad

 
 
https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail
 #DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2
 


Re: [firebird-support] Re: FB3 Embedded on Android

2018-02-18 Thread Jorge Gonçalves projo...@gmail.com [firebird-support]
Same error.

I'm more inclined to something related with relative paths or similar.

If you notice the fbclient is trying to read firebird.msg from the wrong
folder.



On Sun, Feb 18, 2018 at 10:00 PM, hv...@users.sourceforge.net
[firebird-support]  wrote:

>
>
>
>   Add firebird.conf file and change
>
> #Providers = Remote,Engine12,Loopback
>
> by
>
> Providers = Engine12
>
> Idea is to see what error is returned by Engine12 provider (if any).
> Probably something wrong with privileges at file system level.
>
> Regards,
> Vlad
> 
>



Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


[firebird-support] Re: FB3 Embedded on Android

2018-02-18 Thread hv...@users.sourceforge.net [firebird-support]

  Add firebird.conf file and change 

#Providers = Remote,Engine12,Loopback

by

Providers = Engine12

Idea is to see what error is returned by Engine12 provider (if any).
Probably something wrong with privileges at file system level.

Regards,
Vlad