troubles communicating between OPS and databases

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

troubles communicating between OPS and databases

hodack
Hi,

I have some problems while creating ops applications that use databases
through jdbc. I can see that the jdbc connection is ok because the xpl
files can create and insert into the database. But there are problems
while updating/inserting through the web application interface with ops,
it seems like no changes are reflected in the database.
This is really strange because the application used to work before, then
when I try to create other that use a database or share the same
database I encounter this problem, even if I get back to the initial
data source configuration.

For instance, the SQL address book sample worked at first, then I
created another application that also use a database (and which works
currently now), but the SQL address book doesn't work anymore.

I know that it seems unclear but I can't find out why the transactions
with the xpl files (create table/insert of SQL address book) are
reflected in the database but the transactions between the ops web
application (for instance insert/update/delete of SQL addresss book
sample) and the database are not reflected.

Could it be due because of the datasource-sql.xml, which doesn't make
use of connection pooling ?
I also tried to configure this with my Tomcat 5.5.17 instance, but
exactly the same problem occurs (jdbc connection is ok, but no
transaction between the application and database occurs).
In most xpl files, I removed :
<p:input name="datasource" href="/config/datasource-sql.xml"/>
and added <sql:datasource> element in the sql processor.
However, in the generic-init-database, I'm not sure where to read the
datasource, as the datasource is configured in web.xml and no more in an
xml file, and there is no sql processor, so no <sql:datasource> to add.

I also saw that in the web.xml files, there are elements to uncomment
for the SQL examples, I uncommented what is between the <resource-ref>
elements, but I'm not sure of the use of <servlet-mapping> and <servlet>
elements so I let them commented.

Did anyone encountered similar problems or could someone point me to the
right direction ?

Thank you.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: troubles communicating between OPS and databases

Alessandro Vernet
Administrator
On 9/4/07, Kim-Vân Ho-Dac <[hidden email]> wrote:
> I have some problems while creating ops applications that use databases
> through jdbc. I can see that the jdbc connection is ok because the xpl
> files can create and insert into the database. But there are problems
> while updating/inserting through the web application interface with ops,
> it seems like no changes are reflected in the database.
> This is really strange because the application used to work before, then
> when I try to create other that use a database or share the same
> database I encounter this problem, even if I get back to the initial
> data source configuration.

I am not sure what is going on, but if there is an issue with a SQL
query sent to the database, you should see something in the logs. Can
you check the Orbeon Forms log file? You can also enable logging in
debug mode for the SQL processor. To do this, add what follows to your
log4j.xml.

    <category name="org.orbeon.oxf.processor.sql.SQLProcessor">
        <priority value="debug"/>
    </category>

When the SQL processor is in debug mode, every SQL query sent to the
database will be logged. I hope this helps,

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: troubles communicating between OPS and databases

hodack
I enabled logging as you said in log4j.xml, and checked my tomcat logs but didn't see anything concerning SQL.
If there is a special orbeon log file where I should look at, where is it located ?
Alessandro Vernet a écrit :
On 9/4/07, Kim-Vân Ho-Dac [hidden email] wrote:
  
I have some problems while creating ops applications that use databases
through jdbc. I can see that the jdbc connection is ok because the xpl
files can create and insert into the database. But there are problems
while updating/inserting through the web application interface with ops,
it seems like no changes are reflected in the database.
This is really strange because the application used to work before, then
when I try to create other that use a database or share the same
database I encounter this problem, even if I get back to the initial
data source configuration.
    

I am not sure what is going on, but if there is an issue with a SQL
query sent to the database, you should see something in the logs. Can
you check the Orbeon Forms log file? You can also enable logging in
debug mode for the SQL processor. To do this, add what follows to your
log4j.xml.

    <category name="org.orbeon.oxf.processor.sql.SQLProcessor">
        <priority value="debug"/>
    </category>

When the SQL processor is in debug mode, every SQL query sent to the
database will be logged. I hope this helps,

Alex
  


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: troubles communicating between OPS and databases

Alessandro Vernet
Administrator
On 9/12/07, Kim-Vân Ho-Dac <[hidden email]> wrote:
>  I enabled logging as you said in log4j.xml, and checked my tomcat logs but
> didn't see anything concerning SQL.
>  If there is a special orbeon log file where I should look at, where is it
> located ?

Yes, you should have a "special Orbeon log file". Look at the
config/log4j.xml. At the end of the file make sure the only
appender-ref there is for SingleFileAppender. Then look at the
definition of the SingleFileAppender appender. Inside there, you have
<param name="File" value="../logs/ops.log"/>. If you are running
Tomcat, and you start it from the bin directory, this will create an
ops.log in the Tomcat log directory.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: troubles communicating between OPS and databases

hodack
In reply to this post by Alessandro Vernet
This can be fixed by configuring /etc/mysql/my.cnf, with the following lines :

set-variable=lower_case_table_names=1

It might help for users who have been developing locally on Windows with MySQL then trying to deploy the application to a Unix server.
 
Alessandro Vernet a écrit :
On 9/4/07, Kim-Vân Ho-Dac [hidden email] wrote:
  
I have some problems while creating ops applications that use databases
through jdbc. I can see that the jdbc connection is ok because the xpl
files can create and insert into the database. But there are problems
while updating/inserting through the web application interface with ops,
it seems like no changes are reflected in the database.
This is really strange because the application used to work before, then
when I try to create other that use a database or share the same
database I encounter this problem, even if I get back to the initial
data source configuration.
    

I am not sure what is going on, but if there is an issue with a SQL
query sent to the database, you should see something in the logs. Can
you check the Orbeon Forms log file? You can also enable logging in
debug mode for the SQL processor. To do this, add what follows to your
log4j.xml.

    <category name="org.orbeon.oxf.processor.sql.SQLProcessor">
        <priority value="debug"/>
    </category>

When the SQL processor is in debug mode, every SQL query sent to the
database will be logged. I hope this helps,

Alex
  



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws