Re: [Firebird-devel] FBJava plugin issues

2018-05-19 Thread Chmakov, Vladimir
Hello Mark,

Here it is what we did in details:

1) Install plugin into C:\Firebird_Java\fbjava-1.0.0-alpha-1.
2) Create Environment Variable FBJAVA_ROOT= 
C:\Firebird_Java\fbjava-1.0.0-alpha-1
3) CD to C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example
4) call mvn clean package
5) Follow the instructions in 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\README. 
6) Make sure all tests complete as described in README. Specifically, make sure 
that C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\db.log is 
present and contains data.

Up to this point everything is fine.

Next steps.
1) Modify 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\util\createdb.bat:

@echo off
setlocal

set FB_BIN=%FIREBIRD%
set FBJAVA_BIN=%FBJAVA_ROOT%\bin

set THIS_DIR=%~dp0

pushd %THIS_DIR%..
set EXAMPLES_ROOT=%cd%
popd
set DB=%EXAMPLES_ROOT%\db.fdb

REM Create an empty database.
del %DB%
echo create database '%EXAMPLES_ROOT%\db.fdb' default character set utf8; | 
%FB_BIN%\isql -u SYSDBA -q 

REM Create the metadata.
%FB_BIN%\isql -u SYSDBA -q %DB% -i %THIS_DIR%\database.sql
%FB_BIN%\isql -u SYSDBA -q %DB% -i %THIS_DIR%\code.sql

2) Run createdb.bat to produce new 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\DB.FDB
3) Copy 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\target\fbjava-example-1.0.0-alpha-1.jar
 to C:\Firebird_Java\fbjava-1.0.0-alpha-1\jar
4) Copy 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\target\dependency\logback-classic-1.1.3.jar
 to C:\Firebird_Java\fbjava-1.0.0-alpha-1\jar
5) Copy 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\target\dependency\logback-core-1.1.3.jar
 to C:\Firebird_Java\fbjava-1.0.0-alpha-1\jar
6) Copy 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\target\dependency\postgresql-8.3-603.jdbc4.jar
 to C:\Firebird_Java\fbjava-1.0.0-alpha-1\jar
7) Copy 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\target\dependency\slf4j-api-1.7.13.jar
 to C:\Firebird_Java\fbjava-1.0.0-alpha-1\jar
8) Run tests described in 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\README
9) Make sure all tests complete as described in README. Specifically, make sure 
that C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\db.log is 
present and contains data.

Results: all tests complete successfully, but 
C:\Firebird_Java\fbjava-1.0.0-alpha-1\examples\fbjava-example\db.log is missing.

Please let me know if any additional information is required.

Thanks,
Vlad

-Original Message-
From: Mark Rotteveel <m...@lawinegevaar.nl> 
Sent: Friday, May 18, 2018 7:58 AM
To: firebird-devel@lists.sourceforge.net
Subject: Re: [Firebird-devel] FBJava plugin issues

On 16-5-2018 16:47, Chmakov, Vladimir wrote:
> Hello Mark,
> 
> Thank you for your reply!
> 
> Yes, the documentation recommends placing JARs inside the DB, but the 
> "external" deployment better suits our software deployment policies.
> My expectation would be that regardless of the JAR deployment model all JAR 
> components exposed onto the class path would be visible for the plugin. It 
> doesn't seem to be the case, as in the provided example it is obvious, that 
> logback.xml is being ignored or not visible when JAR deployed "externally".

Could you please describe the exact layout of your deployment, which files are 
where? eg: is that logback.xml in a jar file in the /jar/ 
directory, or did you deploy it separately (which is not going to work)?

> We also tried to push our own JARs into the DB, but ended up getting tons of 
> "PK violation" errors.

Please describe in more detail what you did and what error you get.

The fbjava plugin probably hasn't seen a lot of use, so unless you describe 
exactly what you did, it will be harder to replicate what you did and either 
point out what you did wrong, or what is wrong with the current plugin so it 
can be fixed.

Mark
--
Mark Rotteveel

--
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web 
interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] FBJava plugin issues

2018-05-16 Thread Chmakov, Vladimir
Hello Mark,

Thank you for your reply!

Yes, the documentation recommends placing JARs inside the DB, but the 
"external" deployment better suits our software deployment policies. 
My expectation would be that regardless of the JAR deployment model all JAR 
components exposed onto the class path would be visible for the plugin. It 
doesn't seem to be the case, as in the provided example it is obvious, that 
logback.xml is being ignored or not visible when JAR deployed "externally".

We also tried to push our own JARs into the DB, but ended up getting tons of 
"PK violation" errors.

Thanks,
Vlad

-Original Message-
From: Mark Rotteveel <m...@lawinegevaar.nl> 
Sent: Wednesday, May 16, 2018 10:26 AM
To: firebird-devel@lists.sourceforge.net
Subject: Re: [Firebird-devel] FBJava plugin issues

On 14-5-2018 17:53, Chmakov, Vladimir wrote:
> Hello,
> 
> We are placing them into %FBJAVA_ROOT%\jar folder.

The fbjava documentation specifically says not to put more jar files there:

"""
The internal  classes  necessary  for  FB/Java  are  in /jar/*.jar 
 and  is  not  recommended  to  put  more  jar files there.
"""

It also says:

"""
It is general recommendation that users store they classes in the database """

The documentation does seem to hint that it might be possible (and the code 
seems to confirm that), but given it is not recommended, I wouldn't do it.

Looking at the code involved, deploying this way will probably require a 
restart of Firebird for each change (but my knowledge of C++ and Firebird 
plugins is limited). I'm not sure if that is desirable.

Mark

--
Mark Rotteveel

--
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web 
interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] FBJava plugin issues

2018-05-15 Thread Chmakov, Vladimir
Hello,

We are placing them into %FBJAVA_ROOT%\jar folder.

Thanks,
Vlad


-Original Message-
From: Adriano dos Santos Fernandes <adrian...@gmail.com> 
Sent: Monday, May 14, 2018 11:49 AM
To: firebird-devel@lists.sourceforge.net
Subject: Re: [Firebird-devel] FBJava plugin issues

On 14/05/2018 09:21, Chmakov, Vladimir wrote:
>
> Hello,
>
>  
>
> We are testing FBJava plugin to see how well it suits our purposes.
> For the testing we use example provided with the package. It works 
> well when deployed directly into the DB. However, when JAR is placed 
> externally, org.firebirdsql.fbjava.examples.fbjava_example example.
> FbLogger stops working. The same happening with our own packages. Is 
> there something that we are missing or doing wrong?
>
>  
>
>
What is meant "placed externally"? Where?


Adriano


--
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web 
interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] FBJava plugin issues

2018-05-14 Thread Chmakov, Vladimir
Hello,

We are testing FBJava plugin to see how well it suits our purposes. For the 
testing we use example provided with the package. It works well when deployed 
directly into the DB. However, when JAR is placed externally, 
org.firebirdsql.fbjava.examples.fbjava_example example. FbLogger stops working. 
The same happening with our own packages. Is there something that we are 
missing or doing wrong?

Thanks,
Vlad

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel