[xwiki-users] Issue when using foreign database
Hi, For a local database in mysql, we wrote this code, but neither give any error nor display the details. Where is my fault? #set ($mydb=$xwiki.sql.getDatabase('test')) <table> #foreach($row in $mydb.executeQuery( "select Name, RNo from student") ) <tr> <td> $row.getString("Name") </td> <td> $row.getLong("RNo") </td> </tr> #end </table> THANks. ............................................................. Hi all, We are using XE 1.2.1 and Mysql 5.0, we created a Todo application by following this http://www.theserverside.com/tt/articles/article.tss?l=XWiki and it is possible to add and display data in a filterable table. We have to fetch and insert the inserted data into a Mysql table, can any one help us? Thanks in advance, Regards, Project Trainees.
On Thu, 10 Apr 2008 02:25:30 -0700 (PDT), project_trainees wrote
Hi,
For a local database in mysql, we wrote this code, but neither give any error nor display the details. Where is my fault?
#set ($mydb=$xwiki.sql.getDatabase('test')) <table> #foreach($row in $mydb.executeQuery( "select Name, RNo from student") ) <tr>
<td> $row.getString("Name") </td> <td> $row.getLong("RNo") </td> </tr> #end </table>
THANks.
1. check is xwikisql is added as plugin. 2. Try to enable logging of xwikisql (i.e. add to <xwiki-app>/WEB-INF/classes/log4j.properties next string log4j.logger.ua.gradsoft.xwikisql=debug )
............................................................. Hi all,
We are using XE 1.2.1 and Mysql 5.0,
we created a Todo application by following this http://www.theserverside.com/tt/articles/article.tss?l=XWiki and it is possible to add and display data in a filterable table.
We have to fetch and insert the inserted data into a Mysql table, can any one help us?
Thanks in advance,
Regards, Project Trainees. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
Hi Ruslan, rssh wrote:
1. check is xwikisql is added as plugin. 2. Try to enable logging of xwikisql (i.e. add to <xwiki-app>/WEB-INF/classes/log4j.properties next string
log4j.logger.ua.gradsoft.xwikisql=debug )
Please, is not this also a requirement?... *Configure JNDI data store in application container, where you xwiki instance is running. Thanks! Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
rssh wrote:
1. check is xwikisql is added as plugin. 2. Try to enable logging of xwikisql (i.e. add to <xwiki-app>/WEB-INF/classes/log4j.properties next string
log4j.logger.ua.gradsoft.xwikisql=debug )
Sorry if this question is too basic or simply stupid... May I create this log4j.properties in classes in XE 1.3 without affecting its log functioning? I remember I've read some document about this, I think written by Vincent, but I am not able to find it now. Thanks! Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Fri, 11 Apr 2008 01:05:18 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
rssh wrote:
1. check is xwikisql is added as plugin. 2. Try to enable logging of xwikisql (i.e. add to <xwiki-app>/WEB-INF/classes/log4j.properties next string
log4j.logger.ua.gradsoft.xwikisql=debug )
Sorry if this question is too basic or simply stupid...
May I create this log4j.properties in classes in XE 1.3 without affecting its log functioning?
As I remember, for this you must extract log4j.properties from lib/xwiki-core-<version>.jar and put extracted file in classes. Than add to log4j.properties additional statements.
I remember I've read some document about this, I think written by Vincent, but I am not able to find it now. Thanks!
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Logging
Cheers,
Ricardo
-- Ricardo RodrМguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
On Fri, 11 Apr 2008 00:46:20 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
Hi Ruslan,
rssh wrote:
1. check is xwikisql is added as plugin. 2. Try to enable logging of xwikisql (i.e. add to <xwiki-app>/WEB-INF/classes/log4j.properties next string
log4j.logger.ua.gradsoft.xwikisql=debug )
Please, is not this also a requirement?...
*Configure JNDI data store in application container, where you xwiki instance is running.
Yes. (And if JNDI database reference is not configured -- logging will say that) Other common error -- is try to use one without programming rights.
Thanks!
Ricardo
-- Ricardo RodrМguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
Hi Ruslan! rssh wrote:
As I remember, for this you must extract log4j.properties from lib/xwiki-core-<version>.jar and put extracted file in classes. Than add to log4j.properties additional statements.
I've extracted the file, added the required line and modified xwiki.cfg accordingly. Here it is a block containing the line loading xwikisql plugin. com.xpn.xwiki.plugin.scheduler.SchedulerPlugin,\ com.xpn.xwiki.plugin.mailsender.MailSenderPlugin,\ com.xpn.xwiki.plugin.watchlist.WatchListPlugin,\ ua.gradsoft.xwikisql.SqlPlugin Then, I've restarted XWiki and here the error I got: ***** type Informe de Excepcio'n mensaje descripcio'n El servidor encontro' un error interno () que hizo que no pudiera rellenar este requerimiento. excepcio'n javax.servlet.ServletException: La ejecucio'n del Servlet lanzo' una excepcio'n com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117) causa rai'z java.lang.UnsupportedClassVersionError: Bad version number in .class file java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:675) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:164) com.xpn.xwiki.plugin.XWikiPluginManager.addPlugin(XWikiPluginManager.java:70) com.xpn.xwiki.plugin.XWikiPluginManager.addPlugins(XWikiPluginManager.java:107) com.xpn.xwiki.XWiki.preparePlugins(XWiki.java:853) com.xpn.xwiki.XWiki.initXWiki(XWiki.java:785) com.xpn.xwiki.XWiki.<init>(XWiki.java:721) com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:292) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:490) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:118) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117) nota La traza completa de la causa de este error se encuentra en los archivos de diario de Apache Tomcat/6.0.14. ***** It I remove the entry in xwiki.cfg loading the plugin, XWiki works fine. Does this make any sense for you?
Thanks. I am wondering why Loggin or log4j returns nothing when searched in http://www.xwiki.org. Does it work for you? Cheers, Ricardo -- Ricardo Rodri'guez Your EPEC Network ICT Team
On Fri, 11 Apr 2008 14:59:55 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
Hi Ruslan!
rssh wrote:
As I remember, for this you must extract log4j.properties from lib/xwiki-core-<version>.jar and put extracted file in classes. Than add to log4j.properties additional statements.
I've extracted the file, added the required line and modified xwiki.cfg accordingly. Here it is a block containing the line loading xwikisql plugin.
so - looks like you run xwiki on jdk-1.5 when sql plugin is compiled with jdk-1.6 The solution is grab the source of xwikisql plugin and recompile one with JDK-1.5 (or add target - JDK-1.5 in build.xml)
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117) causa rai'z
java.lang.UnsupportedClassVersionError: Bad version number in .class file java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:675) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
rssh wrote:
so - looks like you run xwiki on jdk-1.5 when sql plugin is compiled with jdk-1.6
The solution is grab the source of xwikisql plugin and recompile one with JDK-1.5 (or add target - JDK-1.5 in build.xml)
Even worse! Our production server runs java version "1.4.2_10", any drawback running this release? Thanks! Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Fri, 11 Apr 2008 15:38:39 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
rssh wrote:
so - looks like you run xwiki on jdk-1.5 when sql plugin is compiled with jdk-1.6
The solution is grab the source of xwikisql plugin and recompile one with JDK-1.5 (or add target - JDK-1.5 in build.xml)
Even worse! Our production server runs java version "1.4.2_10", any drawback running this release? Thanks!
-target 1.4 must work (but this is untested. From other side - we have no any complex things in xwikisql, so all will work with hight probability)
Cheers,
Ricardo
-- Ricardo RodrМguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
Thanks, Ruslan. rssh wrote:
-target 1.4 must work (but this is untested. From other side - we have no any complex things in xwikisql, so all will work with hight probability) Digging into code and building xwiki and its plugins is in my ToDo list, but I'm afraid I am a bit far from understand how to do this right now.
Please, could you provide me some "simple" guidelines to build xwikisql here? Thank you so much for your help, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Fri, 11 Apr 2008 16:40:20 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
Thanks, Ruslan.
rssh wrote:
-target 1.4 must work (but this is untested. From other side - we have no any complex things in xwikisql, so all will work with hight probability) Digging into code and building xwiki and its plugins is in my ToDo list, but I'm afraid I am a bit far from understand how to do this right now.
Please, could you provide me some "simple" guidelines to build xwikisql here?
It's very simple ;) 1. download 2. start ant 'ant' (it will automatically fetch all dependencies and start build) 3. clean all 'ant clean' 4. to change target JDK, set "target" attribute of javac in "build" ant target. (consult with javac ant task documentation if needed).
Thank you so much for your help,
Ricardo
-- [UTF-8?]> Ricardo Rodrцґguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
Simple... :-) rssh wrote:
It's very simple ;)
1. download 2. start ant 'ant' (it will automatically fetch all dependencies and start build) 3. clean all 'ant clean' 4. to change target JDK, set "target" attribute of javac in "build" ant target. (consult with javac ant task documentation if needed).
I've downloaded xwiki-plugin-sql-src-1.4.tar.gz <http://xwikisql.googlecode.com/files/xwiki-plugin-sql-src-1.4.tar.gz>, extracted it, changed build.xml by adding target="1.5" to ... ***** <target name="build" depends="retrieve-libs"> <javac srcdir="src/main/java" includes="**/*.java" deprecation="on" debug="${debug}" target="1.5"> <classpath refid="std.build.path" /> </javac> <jar basedir="src/main/java" includes="**/*.class" destfile="target/xwiki-plugin-sql-${version}.jar" index="true"> <include name="build"/> <manifest> <attribute name="Build-By" value="${user-name}"/> </manifest> </jar> </target> ***** and... ***** <target name="build-tests" depends="build,retrieve-test-libs"> <javac srcdir="src/test/java" includes="**/*.java" deprecation="on" debug="${debug}" target="1.5"> <classpath refid="test.std.build.path" /> </javac> </target> ***** Then, started ant. And build failed recording the following messages: ***** sh-3.2# ant Buildfile: build.xml download-ivy: [get] Getting: http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.0.0-beta2/ivy-2.0.0-beta2... [get] To: /var/root/.ivy/jars/ivy.jar [get] Not modified - so not downloaded declare-ivy: init-ivy: No ivy:settings found for the default reference 'ivy.instance'. A default instance will be used [null] :: Ivy 2.0.0-beta2 - 20080225093827 :: http://ant.apache.org/ivy/ :: [null] :: loading settings :: file = /Users/rrodriguez/Downloads/xwiki-plugin-sql-src-1.4/ivysettings.xml [null] DEPRECATED: 'checkUpToDate' is deprecated, use 'caches[@checkUpToDate]' instead (file:/Users/rrodriguez/Downloads/xwiki-plugin-sql-src-1.4/ivysettings.xml) BUILD FAILED /Users/rrodriguez/Downloads/xwiki-plugin-sql-src-1.4/build.xml:39: java.lang.NoClassDefFoundError: com/jcraft/jsch/JSchException Total time: 1 second sh-3.2# ***** Please, does this any sense for your? What I am doing wrong? Thank you so much for your help, Ricardo -- Ricardo Rodri'guez Your EPEC Network ICT Team
On Fri, 11 Apr 2008 20:49:55 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
Simple... :-)
Oh .. it's my failure. (ivy use ssh plugin, but library does not downloaded during ivy bootstrap) You can manually download jsch and put into ivy jars directory. (Option 1) or apply patch to Details: 1. just manually download jsch-0.1.37.jar from http://www.jcraft.com/jsch/ and put one into <you-home-dir>/.ivy/jars/jsch.jar and start ant again 2. If you don't want to download jar by hands, apply patch from attachment and run ant again.
rssh wrote:
It's very simple ;)
1. download 2. start ant 'ant' (it will automatically fetch all dependencies and start build) 3. clean all 'ant clean' 4. to change target JDK, set "target" attribute of javac in "build" ant target. (consult with javac ant task documentation if needed).
I've downloaded xwiki-plugin-sql-src-1.4.tar.gz <http://xwikisql.googlecode.com/files/xwiki-plugin-sql-src- 1.4.tar.gz>, extracted it, changed build.xml by adding target="1.5" to ...
***** <target name="build" depends="retrieve-libs"> <javac srcdir="src/main/java" includes="**/*.java" deprecation="on" debug="${debug}" target="1.5"> <classpath refid="std.build.path" /> </javac> <jar basedir="src/main/java" includes="**/*.class" destfile="target/xwiki-plugin-sql-${version}.jar" index="true"> <include name="build"/> <manifest> <attribute name="Build-By" value="${user-name}"/> </manifest> </jar> </target> *****
and...
***** <target name="build-tests" depends="build,retrieve-test-libs"> <javac srcdir="src/test/java" includes="**/*.java" deprecation="on" debug="${debug}" target="1.5"> <classpath refid="test.std.build.path" /> </javac> </target> *****
Then, started ant. And build failed recording the following messages:
***** sh-3.2# ant Buildfile: build.xml
download-ivy: [get] Getting: http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.0.0-beta2/ivy- 2.0.0-beta2.jar [get] To: /var/root/.ivy/jars/ivy.jar [get] Not modified - so not downloaded
declare-ivy:
init-ivy: No ivy:settings found for the default reference 'ivy.instance'. A default instance will be used [null] :: Ivy 2.0.0-beta2 - 20080225093827 :: http://ant.apache.org/ivy/ :: [null] :: loading settings :: file = /Users/rrodriguez/Downloads/xwiki-plugin-sql-src-1.4/ivysettings.xml [null] DEPRECATED: 'checkUpToDate' is deprecated, use 'caches[@checkUpToDate]' instead
(file:/Users/rrodriguez/Downloads/xwiki-plugin-sql-src- 1.4/ivysettings.xml)
BUILD FAILED /Users/rrodriguez/Downloads/xwiki-plugin-sql-src-1.4/build.xml:39: java.lang.NoClassDefFoundError: com/jcraft/jsch/JSchException
Total time: 1 second sh-3.2# *****
Please, does this any sense for your? What I am doing wrong?
Thank you so much for your help,
Ricardo
-- Ricardo Rodri'guez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
On Sat, 12 Apr 2008 00:26:25 +0300, rssh wrote
2. If you don't want to download jar by hands, apply patch from attachment and run ant again.
looks like I forgot attachment in previous letter.
No, it is xwiki mail list strips attachments from letters (!) patch is uploaded for http://xwikisql.googlecode.com/files/xwiki-sql-plugin.1-4.1.patch Thanks for patience. -- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
Hi, rssh wrote:
No, it is xwiki mail list strips attachments from letters (!)
patch is uploaded for http://xwikisql.googlecode.com/files/xwiki-sql-plugin.1-4.1.patch
Thanks for patience. Thanks to you!
I've downloaded and applied the patch to build.xml. Now I get a long log with a number of errors. Please, could you take a look at it? I've tried it twice. This log belongs to the second turn. So, compilation time is not affected by the time invested in the first turn fetching jars. The recorded errors are the same. Here it is... http://mire.environmentalchange.net/~webmaster/txt/xwikisql.txt Do you find any clue in this log? What am I doing wrong? Thanks. Greetings, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Sat, 12 Apr 2008 00:34:18 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
Hi,
rssh wrote:
No, it is xwiki mail list strips attachments from letters (!)
patch is uploaded for http://xwikisql.googlecode.com/files/xwiki-sql-plugin.1-4.1.patch
Thanks for patience. Thanks to you!
I've downloaded and applied the patch to build.xml. Now I get a long log with a number of errors. Please, could you take a look at it? I've tried it twice. This log belongs to the second turn. So, compilation time is not affected by the time invested in the first turn fetching jars. The recorded errors are the same. Here it is...
http://mire.environmentalchange.net/~webmaster/txt/xwikisql.txt
Do you find any clue in this log? What am I doing wrong? Thanks.
So, in 1.5 we have no javax.sql.RowId, javax.sql.NClob and so on :( One quick solution: just comment out new JDBC-3.0 types in two cases in SqlPlugin.java and SqlTypes.java If you agree, in future I will prepare special version for JDK-1.5 (i. e. prepare JPE rules for receiving version for JDBC-2.0 from generic and will ask you to test one.)
Greetings,
Ricardo
-- Ricardo RodrМguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
Thanks Ruslan, rssh wrote:
So, in 1.5 we have no javax.sql.RowId, javax.sql.NClob and so on :(
One quick solution: just comment out new JDBC-3.0 types in two cases in SqlPlugin.java and SqlTypes.java
As I've been able to find by googling, only java.sql.Types.DATALINK data type has been added to the JDBC 3.0 API. So, please, what exactly must I comment out? The whole import java.sql.Types line? Only case Types.DATALINK: return "DATALINK";? As I am "a bit" lost in this arena, I do prefer to ask instead of doing no-sense things! Thanks for your patience!
If you agree, in future I will prepare special version for JDK-1.5 (i. e. prepare JPE rules for receiving version for JDBC-2.0 from generic and will ask you to test one.)
Of course I will try it. But, please, I don't know if I am the only one running XWiki in a Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03) box, but this is our production server and it will be difficult either to update Java or to have a new box in the following few months. Does this trick work also with 1.4? Or, do this plugin work in such an installation? Thanks! Cheers, Ricardo -- Ricardo Rodri'guez Your EPEC Network ICT Team
Thanks Ruslan, rssh wrote:
So, in 1.5 we have no javax.sql.RowId, javax.sql.NClob and so on :(
One quick solution: just comment out new JDBC-3.0 types in two cases in SqlPlugin.java and SqlTypes.java
As I've been able to find by googling, only java.sql.Types.DATALINK data type has been added to the JDBC 3.0 API. So, please, what exactly must I comment out? The whole import java.sql.Types line? Only case Types.DATALINK: return "DATALINK";? As I am "a bit" lost in this arena, I do prefer to ask instead of doing no-sense things! Thanks for your patience!
If you agree, in future I will prepare special version for JDK-1.5 (i. e. prepare JPE rules for receiving version for JDBC-2.0 from generic and will ask you to test one.)
Of course I will try it. But, please, I don't know if I am the only one running XWiki in a Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03) box, but this is our production server and it will be difficult either to update Java or to have a new box in the following few months. Does this trick work also with 1.4? Or, do this plugin work in such an installation? Thanks! Cheers, Ricardo -- Ricardo Rodri'guez Your EPEC Network ICT Team
On Sat, 12 Apr 2008 13:56:20 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
Thanks Ruslan,
rssh wrote:
So, in 1.5 we have no javax.sql.RowId, javax.sql.NClob and so on :(
One quick solution: just comment out new JDBC-3.0 types in two cases in SqlPlugin.java and SqlTypes.java
As I've been able to find by googling, only java.sql.Types.DATALINK data type has been added to the JDBC 3.0 API. So, please, what exactly must I comment out? The whole import java.sql.Types line? Only case Types.DATALINK: return "DATALINK";?
JDK1.4 docs http://java.sun.com/j2se/1.4.2/docs/api/ (see java,sql.types) JDK1.6 docs http://java.sun.com/javase/6/docs/api/ So, all typoes which exists in J2SE1.6 but not in J2SE1.4 must be commented out.
As I am "a bit" lost in this arena, I do prefer to ask instead of doing no-sense things! Thanks for your patience!
If you agree, in future I will prepare special version for JDK-1.5 (i. e. prepare JPE rules for receiving version for JDBC-2.0 from generic and will ask you to test one.)
Of course I will try it. But, please, I don't know if I am the only one running XWiki in a Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03) box, but this is our production server and it will be difficult either to update Java or to have a new box in the following few months. Does this trick work also with 1.4? Or, do this plugin work in such an installation? Thanks!
I will test this.
Cheers,
Ricardo
-- Ricardo Rodri'guez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
Hi, rssh wrote:
JDK1.4 docs http://java.sun.com/j2se/1.4.2/docs/api/ (see java,sql.types)
JDK1.6 docs http://java.sun.com/javase/6/docs/api/
So, all typoes which exists in J2SE1.6 but not in J2SE1.4 must be commented out.
Done. Build successful. The new .jar in on place, xwiki.cfg modified and XWiki restarted. All seems ok. Thanks! Now, I've tried by copying and pasting first code snippet in your site to a dummy page here. As JNDI is not set up, I was expecting an error message stating that lack of configuration. But nothing is logged neither to catalina.out nor to xwiki.log. I've extracted log4j.properties to /xwiki/WEB-INF/classes and added the lines: ## Added by rrodriguez to debug xwikisql XWiki plugin log4j.logger.ua.gradsoft.xwikisql=debug Could you figure out why I am not getting any error? Thanks once again! Ricardo
I will test this.
Great! Any new will be welcome. Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Sat, 12 Apr 2008 19:03:25 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
Hi,
rssh wrote:
JDK1.4 docs http://java.sun.com/j2se/1.4.2/docs/api/ (see java,sql.types)
JDK1.6 docs http://java.sun.com/javase/6/docs/api/
So, all typoes which exists in J2SE1.6 but not in J2SE1.4 must be commented out.
Done. Build successful. The new .jar in on place, xwiki.cfg modified and XWiki restarted. All seems ok. Thanks!
Now, I've tried by copying and pasting first code snippet in your site to a dummy page here. As JNDI is not set up, I was expecting an error message stating that lack of configuration. But nothing is logged neither to catalina.out nor to xwiki.log.
I've extracted log4j.properties to /xwiki/WEB-INF/classes and added the lines:
## Added by rrodriguez to debug xwikisql XWiki plugin log4j.logger.ua.gradsoft.xwikisql=debug
Could you figure out why I am not getting any error? Thanks once again!
Something really change. let's test all steps. 1. plugin is installed. test page: $plugin = $xwiki.sql plugin is $plugin (page must print something like 'plugin is ua.gradsoft.xwikisql.SqlPluginApi$3333' ) 2. database is retrieved test page: $plugin = $xwiki.sql plugin is $plugin <br> $db = $plugin.getDatabase('myDs'); db is $db (page must print something like 'plugin is ua.gradsoft.xwikisql.SqlPluginApi$3333' db is '$db' (if it was not found) ) and in xwiki.log we will see error message. (also, check, that you have no entry xwikisql.logEnabled=false in you xwiki.cfg ) If not - something very strange, will think about new experiments.
Ricardo
I will test this.
Great! Any new will be welcome.
Cheers,
Ricardo
-- Ricardo RodrМguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
Morning! rssh wrote:
Something really change.
let's test all steps.
1. plugin is installed. test page: $plugin = $xwiki.sql plugin is $plugin (page must print something like 'plugin is ua.gradsoft.xwikisql.SqlPluginApi$3333' )
2. database is retrieved test page: $plugin = $xwiki.sql plugin is $plugin <br> $db = $plugin.getDatabase('myDs'); db is $db
(page must print something like 'plugin is ua.gradsoft.xwikisql.SqlPluginApi$3333' db is '$db' (if it was not found) )
Here the results... http://mire.environmentalchange.net/~webmaster/images/XwikiSqlTest.png
and in xwiki.log we will see error message.
(also, check, that you have no entry xwikisql.logEnabled=false in you xwiki.cfg )
No error was logged in xwiki.log. There is no such an entry in xwiki.cfg. Here the logj.properties in /classes... http://mire.environmentalchange.net/~webmaster/txt/log4j.properties.txt
If not - something very strange, will think about new experiments.
Sorry for not being of much help!!! Please, let me know what else must/could I try here. Thanks! Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Mon, 14 Apr 2008 11:33:19 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
Morning!
Yet one quick question: are you have programming rights ? (I trying reproduce situation and still can't understand it)
rssh wrote:
Something really change.
let's test all steps.
1. plugin is installed. test page: $plugin = $xwiki.sql plugin is $plugin (page must print something like 'plugin is ua.gradsoft.xwikisql.SqlPluginApi$3333' )
2. database is retrieved test page: $plugin = $xwiki.sql plugin is $plugin <br> $db = $plugin.getDatabase('myDs'); db is $db
(page must print something like 'plugin is ua.gradsoft.xwikisql.SqlPluginApi$3333' db is '$db' (if it was not found) )
Here the results...
http://mire.environmentalchange.net/~webmaster/images/XwikiSqlTest.png
and in xwiki.log we will see error message.
(also, check, that you have no entry xwikisql.logEnabled=false in you xwiki.cfg )
No error was logged in xwiki.log. There is no such an entry in xwiki.cfg. Here the logj.properties in /classes...
http://mire.environmentalchange.net/~webmaster/txt/log4j.properties.txt
If not - something very strange, will think about new experiments.
Sorry for not being of much help!!! Please, let me know what else must/could I try here. Thanks!
Cheers,
Ricardo
-- [UTF-8?]> Ricardo Rodrцґguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
rssh wrote:
Yet one quick question: are you have programming rights ?
(I trying reproduce situation and still can't understand it)
Quick answer: Yeap! Default Admin user BUT virtual wiki! Let me try in the main wiki... Cheers, Ricardo -- Ricardo Rodri'guez Your EPEC Network ICT Team
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
rssh wrote:
Yet one quick question: are you have programming rights ?
(I trying reproduce situation and still can't understand it)
Quick answer:
Yeap! Default Admin user BUT virtual wiki! Let me try in the main wiki...
Cheers,
Ricardo
Same behavior in the main server: no message recorded in xwiki.log. Same answer to the document scripts: ***** plugin is installed $plugin = ua.gradsoft.xwikisql.SqlPluginApi@d7cb7e plugin is $plugin database is retrieved $plugin = ua.gradsoft.xwikisql.SqlPluginApi@820993 plugin is $plugin $db = $plugin.getDatabase('myDs'); db is $db ***** I am "sure" I am working with an user with programming rights because I using the same user to open/save the SendByEmail application that also requires programming rights. It is doing well and recording error messages in xwiki.log. I would like to go to JNDI configuration having this issue solved as it seems the only way of getting informative log messages so, please, let me know if I could try any other thing. Thank you so much for your help! Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Mon, 14 Apr 2008 16:36:59 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
rssh wrote:
Yet one quick question: are you have programming rights ?
(I trying reproduce situation and still can't understand it)
Quick answer:
Yeap! Default Admin user BUT virtual wiki! Let me try in the main wiki...
Cheers,
Ricardo
Same behavior in the main server: no message recorded in xwiki.log. Same answer to the document scripts:
***** plugin is installed
$plugin = ua.gradsoft.xwikisql.SqlPluginApi@d7cb7e plugin is $plugin
database is retrieved
$plugin = ua.gradsoft.xwikisql.SqlPluginApi@820993 plugin is $plugin $db = $plugin.getDatabase('myDs'); db is $db *****
And what container you use ? This is jetty or apache ? (btw, 1. if 'myDs' does not exists $plugin.getDatabase('myDs') must return valid SqlDatabase, which will throw exception on first SQL sentence) 2. test page is incorrect (my fault - I was mean velocity syntax of assigment but write simple assigment). I. e. instead:
test page: $plugin = $xwiki.sql plugin is $plugin <br> $db = $plugin.getDatabase('myDs'); db is $db
must be: #set($plugin = $xwiki.sql) plugin is $plugin <br> #set($db = $plugin.getDatabase('myDs')) db is $db And we will have something like plugin=ua.gradsoft.xwikisql.SqlPluginApi@19c21c6 udb=ua.gradsoft.xwikisql.SqlDatabase@16d5525 Then let add's add at end: $db.wasError()<br> $db.getLastException() We must have something like true javax.naming.NameNotFoundException: Name UNEXISTENT is not bound in this Context Is this true ? P.S. looks like I just reproduced this effect and will publish fix tomorrow. -- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
rssh wrote:
And what container you use ? This is jetty or apache ?
Tomcat. I guess when you say Apache you mean Apache Tomcat, doesn't you?
(btw, 1. if 'myDs' does not exists $plugin.getDatabase('myDs') must return valid SqlDatabase, which will throw exception on first SQL sentence)
2. test page is incorrect (my fault - I was mean velocity syntax of assigment but write simple assigment). I. e. instead:
test page: $plugin = $xwiki.sql plugin is $plugin <br> $db = $plugin.getDatabase('myDs'); db is $db
must be: #set($plugin = $xwiki.sql) plugin is $plugin <br> #set($db = $plugin.getDatabase('myDs')) db is $db
And we will have something like plugin=ua.gradsoft.xwikisql.SqlPluginApi@19c21c6 udb=ua.gradsoft.xwikisql.SqlDatabase@16d5525
Not only your fault! I've not been critic with your code and the lacking set was obvious! Sorry.
Then let add's add at end:
$db.wasError()<br> $db.getLastException()
We must have something like true javax.naming.NameNotFoundException: Name UNEXISTENT is not bound in this Context
Is this true ?
http://mire.environmentalchange.net/~webmaster/images/XwikiSqlTest02.png The message in Spanish is equivalent to the version in English you have posted upper here. Yeap, it is true! No messages in xwiki.log yet.
P.S. looks like I just reproduced this effect and will publish fix tomorrow.
Cool! I will be pending of this update and try it here ASAP. Thanks! Greetings, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Mon, 14 Apr 2008 23:56:09 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
rssh wrote:
And what container you use ? This is jetty or apache ?
Tomcat. I guess when you say Apache you mean Apache Tomcat, doesn't you?
yes. So, the diff to right solution is in attachment. (and by url: http://xwikisql.googlecode.com/files/xwiki-sql-plugin.1-4.2.patch ) I will publish next version which will include those fixes during this week. (Btw - can you send me files with commented out sql types -- so I will prepare version for JDK-1.4)
Cool! I will be pending of this update and try it here ASAP. Thanks!
Greetings,
Ricardo
-- Ricardo RodrМguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
rssh wrote:
So, the diff to right solution is in attachment. (and by url: http://xwikisql.googlecode.com/files/xwiki-sql-plugin.1-4.2.patch )
Patch applied. Please, see what Ant says now... build: [javac] Compiling 5 source files [javac] /Users/rrodriguez/Downloads/xwiki-plugin-sql-src-1.4/src/main/java/ua/gradsoft/xwikisql/SqlDatabase.java.bak.java:13: class SqlDatabase is public, should be declared in a file named SqlDatabase.java [javac] public class SqlDatabase implements SqlErrorable [javac] ^ [javac] 1 error BUILD FAILED /Users/rrodriguez/Downloads/xwiki-plugin-sql-src-1.4/build.xml:97: Compile failed; see the compiler error output for details. Total time: 13 seconds Any error of mine? Something unexpected? Thanks!
I will publish next version which will include those fixes during this week.
(Btw - can you send me files with commented out sql types -- so I will prepare version for JDK-1.4)
Of course I can. Here they are... http://mire.environmentalchange.net/~webmaster/txt/SqlTypes.java http://mire.environmentalchange.net/~webmaster/txt/SqlPlugin.java But I've not commented out the lines, but removed them :-( I do hope they are still useful. Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Tue, 15 Apr 2008 00:48:37 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
rssh wrote:
So, the diff to right solution is in attachment. (and by url: http://xwikisql.googlecode.com/files/xwiki-sql-plugin.1-4.2.patch )
Patch applied. Please, see what Ant says now...
build: [javac] Compiling 5 source files [javac] /Users/rrodriguez/Downloads/xwiki-plugin-sql-src- 1.4/src/main/java/ua/gradsoft/xwikisql/SqlDatabase.java.bak.java:13: ********************************************************** ^ *********
(backup file: SqlDatabase.java.bak.java if we have SqlDatabase.java, than .bak.java can be deleted)
class SqlDatabase is public, should be declared in a file named SqlDatabase.java [javac] public class SqlDatabase implements SqlErrorable [javac] ^ [javac] 1 error
BUILD FAILED /Users/rrodriguez/Downloads/xwiki-plugin-sql-src-1.4/build.xml:97: Compile failed; see the compiler error output for details.
Total time: 13 seconds
Any error of mine? Something unexpected? Thanks!
I will publish next version which will include those fixes during this week.
(Btw - can you send me files with commented out sql types -- so I will prepare version for JDK-1.4)
Of course I can. Here they are...
http://mire.environmentalchange.net/~webmaster/txt/SqlTypes.java http://mire.environmentalchange.net/~webmaster/txt/SqlPlugin.java
But I've not commented out the lines, but removed them :-( I do hope they are still useful.
Cheers,
Ricardo
-- [UTF-8?]> Ricardo Rodrцґguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
rssh wrote:
(backup file: SqlDatabase.java.bak.java if we have SqlDatabase.java, than .bak.java can be deleted)
My fault: I'd renamed the old SqlDatabase.java to *.java.bak but my clever MacBook had added .java to the file and I didn't realize. And I dind't read the error message :-( Sorry. Build successful, *.jar in place, XWiki restarted and here they are the error messages in XWiki.log: 2008-04-15 01:14:13,276 [http://test01.xen.net/xwiki/bin/view/Main/Database] [http-80-1] ERROR xwikisql.SqlPlugin - exception during creation of datasource myDs javax.naming.NameNotFoundException: El nombre myDs no este asociado a este contexto Now, the text code... 1.1.1 database is retrieved #set($plugin = $xwiki.sql) plugin is $plugin #set($db = $plugin.getDatabase('myDs')) db is $db Gives... http://mire.environmentalchange.net/~webmaster/images/XwikiSqlTest03.png Well, great! this works fine, as far as I can understand. Thanks, Ruslan! Now, I can move to JNDI set up. Any other thing I could try here before moving ahead? I will try the new *.jar tomorrow in the production server (java version "1.4.2_10") and post here the results. I've been trying in a java version "1.5.0_13" so far. Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Now, I can move to JNDI set up. Any other thing I could try here before moving ahead? I will try the new *.jar tomorrow in the production server (java version "1.4.2_10") and post here the results. I've been trying in a java version "1.5.0_13" so far.
http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/IsXwikiSqlPluginI... Plugin installed in java version "1.4.2_10" Please, do you know how could I show java version in a XWiki page? :-) But the same coded triggering this error... http://mire.environmentalchange.net/~webmaster/images/XwikiSqlTest03.png with java version "1.5.0_13" doesn't do the trick with "1.4.2_10". See this... http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/DoesJndiNameExist http://tinyurl.com/4yhzvp The same modified log4j.properties is in /classes and no xwikisql.logEnabled=false in xwiki.cfg Does this make any sense for you? Thanks! Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Tue, 15 Apr 2008 10:55:06 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Now, I can move to JNDI set up. Any other thing I could try here before moving ahead? I will try the new *.jar tomorrow in the production server (java version "1.4.2_10") and post here the results. I've been trying in a java version "1.5.0_13" so far.
http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/IsXwikiSqlPluginI...
Plugin installed in java version "1.4.2_10"
Please, do you know how could I show java version in a XWiki page? :-)
But the same coded triggering this error...
http://mire.environmentalchange.net/~webmaster/images/XwikiSqlTest03.png
with java version "1.5.0_13" doesn't do the trick with "1.4.2_10". See this...
http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/DoesJndiNameExist
The same modified log4j.properties is in /classes and no xwikisql.logEnabled=false in xwiki.cfg
Does this make any sense for you? Thanks!
1. can you recheck that patch is applied to version plugin, compiled with JDK-1.4 ? 2. Are we have something in log on info level (may be one message about programming rights [?]) 3. what say: $plugin.getSqlPlugin().getConfiguration().getThrowExceptions() <br> $plugin.getSqlPlugin().getConfiguration().getLogEnabled() <br> [?]
Cheers,
Ricardo
-- [UTF-8?]> Ricardo Rodrцґguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
On Tue, 15 Apr 2008 13:12:00 +0300, rssh wrote
On Tue, 15 Apr 2008 10:55:06 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Now, I can move to JNDI set up. Any other thing I could try here before moving ahead? I will try the new *.jar tomorrow in the production server (java version "1.4.2_10") and post here the results. I've been trying in a java version "1.5.0_13" so far.
http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/IsXwikiSqlPluginI...
Plugin installed in java version "1.4.2_10"
Please, do you know how could I show java version in a XWiki page? :-)
But the same coded triggering this error...
http://mire.environmentalchange.net/~webmaster/images/XwikiSqlTest03.png
with java version "1.5.0_13" doesn't do the trick with "1.4.2_10". See this...
http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/DoesJndiNameExist
The same modified log4j.properties is in /classes and no xwikisql.logEnabled=false in xwiki.cfg
Does this make any sense for you? Thanks!
1. can you recheck that patch is applied to version plugin, compiled with JDK-1.4 ?
2. Are we have something in log on info level (may be one message about programming rights [?])
3. what say: $plugin.getSqlPlugin().getConfiguration().getThrowExceptions() <br> $plugin.getSqlPlugin().getConfiguration().getLogEnabled() <br> [?]
Cheers,
Ricardo
-- [UTF-8?]> Ricardo Rodrцґguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
rssh wrote:
1. can you recheck that patch is applied to version plugin, compiled with JDK-1.4 ?
My fault: I've just copied the plugin compiled with JDK-1.4 to the 1.5 box. I'll recompile it and try again. Sorry.
Thanks,
Ricardo
Here what I get compiling with JDK-1.4... http://mire.environmentalchange.net/~webmaster/txt/XwikiSqlPluginCompilingIn... I've installed Ant 1.6 (the one available with the Suse distribution I am rinning in this server) and modified build.xml to change target=1.5 with target=1.4. Please, does this make anysense for you? Thanks!!! Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
On Tue, 15 Apr 2008 14:36:30 +0200, [Ricardo Rodriguez] Your EPEC Network ICT Team wrote
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
rssh wrote:
1. can you recheck that patch is applied to version plugin, compiled with JDK-1.4 ?
My fault: I've just copied the plugin compiled with JDK-1.4 to the 1.5 box. I'll recompile it and try again. Sorry.
Thanks,
Ricardo
Here what I get compiling with JDK-1.4...
http://mire.environmentalchange.net/~webmaster/txt/XwikiSqlPluginCompilingIn...
I've installed Ant 1.6 (the one available with the Suse distribution I am rinning in this server) and modified build.xml to change target=1.5 with target=1.4.
Please, does this make anysense for you? Thanks!!!
Hmm - You try compile xwikisql with jdk-1.4 (this will not work). Instead -- compile and create jar with JDK-1.5 but set target to JDK-1.4 (yes, this is possible) In such case JDK-1.5 will create jar, applicable for JDK-1.4.
Ricardo
-- Ricardo RodrМguez Your EPEC Network ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
rssh wrote:
Hmm - You try compile xwikisql with jdk-1.4 (this will not work). Instead -- compile and create jar with JDK-1.5 but set target to JDK-1.4 (yes, this is possible)
In such case JDK-1.5 will create jar, applicable for JDK-1.4.
Done! Newly compiled plugin on place, up and running. Error messages are logged both in xwiki.log and catalina.out. Check it by yourself... http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/IsXwikiSqlPluginI... http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/DoesJndiNameExist Just to claridy myself with this issue. A new release of this plugin will run in whatever JDK is installed (1.4, 1.5 or 1.6), or must be compiled separately for each platform. If the late is true, must we modify build.xml accordingly or is it possible to create such a build.xml that is valid for all three JDK releases? I am guessing I must move ahead now to configure JNDI. Some years ago I dealt with this issue to access eDirectory, but I must reconize that I remember nothing about this business. Please, could you provide some entry point to this configuration working with Java 1.4, 1.5 and Tomcat as servlet container? Thanks! Best regards, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
participants (3)
-
[Ricardo Rodriguez] Your EPEC Network ICT Team -
project_trainees@amritatech.com -
rssh