Subject Re: Error 335544344 when connecting to Firebird 2 from web application
Author Jeroen Wenting
Oops. Me (and everyone else) completely overlooked the superfluous ">" at the end of the URI.
Noticed it after upgrading to FB 2.1.8 and Jaybird 2.1.6 when reinstating the Firebird settings in the Hibernate and SpringJPA configuration.

Working perfectly now.

Strangely no XML editor I tried noticed it as an XML syntax error and neither did Apache's or Sun's XML parsers tag it as such.

--- In firebird-support@yahoogroups.com, Mark Rotteveel <Avalanche1979@...> wrote:
>
> I'd first try to upgrade Jaybird to 2.1.6 and see if that helps,
> although none of the reported fixes between Jaybird 2.1.1 and 2.1.6 seem
> related to this error.
>
> Out of interest I took another look at that issue in the tracker (and
> the code involved), and it looks like it was more a case of 'user error'
> (or unclear URL specification) than an actual problem.
>
> Text I added to the tracker:
> "A similar error was raised in Firebird-Support today (although there
> changing the url did not help).
>
> I took another look at the code and the original issue reported has to
> do with the fact that the URL specification is:
>
> jdbc:firebirdsql://host:port/path-to-db
>
> If on a Unix/Linux environment the path is /opt/firebird/database.fdb
> the resulting URL should be:
> jdbc:firebirdsql://localhost:3050//opt/firebird/database.fdb (note the
> two slashes after the port)
>
> The perceived differences between SuperServer and Classic could be the
> result from different RootDirectory settings in firebird.conf (default
> is root (/))"
>
> Jeroen Wenting wrote:
> > I read that and tried an old style URI.
> > It didn't work, still the same error (if it had been a problem it would almost certainly have happened at all times of course, rather than just when called from a web application).
> > May try updating to the latest builds of Jaybird and FB and see what that does.
> >
> > --- In firebird-support@yahoogroups.com, "Mark Rotteveel" <Avalanche1979@> wrote:
> >> See: http://tracker.firebirdsql.org/browse/JDBC-96
> >>
> >> Summary occurs with Firebird 2.0 SS (maybe also 2.1) in combination with Jaybird 2.1
> >>
> >> This should be solved in the next Jaybird (2.2). For now use the old style jdbc url ( jdbc:firebirdsql:localhost/3050:libman2 ), which should work according to the bug-description).
> >>
> >> Mark
> >>
> >>> I'm working on a web application connecting to Firebird 2 using Hibernate
> >>> 3.
> >>> When trying to launch Hibernate, a 335544344 gets logged.
> >>>
> >>> WARNING: Could not obtain connection metadata
> >>> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544344. I/O error
> >>> for file %.0s"CreateFile (open)"
> >>> null
> >>> Error while trying to open file
> >>> null
> >>> Reason: I/O error for file %.0s"CreateFile (open)"
> >>> null
> >>> Error while trying to open file
> >>> null
> >>> at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:122)
> >>> at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:131)
> >>>
> >>>
> >>> Using the exact same Hibernate configuration to connect to the same
> >>> database, from the same system, using a Swing application works flawlessly. Same
> >>> when trying to connect to the database using SQL clients like Squirrel or
> >>> isql.
> >>> When changing the Firebird data in the Hibernate config for Oracle data,
> >>> connection to the mapped Oracle database can be made just fine as well.
> >>>
> >>> The database is empty right now, created new for the application. But the
> >>> web application seems unable to connect to any Firebird database existing
> >>> on the machine (I tried letting it connect to another one that works fine
> >>> from an existing Swing application, that too fails).
> >>>
> >>> Hibernate config:
> >>> <property
> >>> name="connection.driver_class">org.firebirdsql.jdbc.FBDriver</property>
> >>> <property
> >>> name="connection.url">jdbc:firebirdsql://localhost:3050/libman2></property>
> >>> <property name="connection.username">sysdba</property>
> >>> <property name="connection.password">masterkey</property>
> >>> <property
> >>> name="dialect">org.hibernate.dialect.FirebirdDialect</property>
> >>>
> >>> aliases.conf contains:
> >>> libman2=g:\dev\libman2\database\libman2.fdb
> >>>
> >>> which exists (case sensitive).
> >>>
> >>> Running on Vista Enterprise SP2, Firebird 2.0.something, Jaybird 2.1.1
> >>> Database and applications are running on the same machine.
> >>>
> >>> I've in the past successfully used this combination on XP and Linux.
>
> --
> Mark Rotteveel
>