I am guessing that my problems could stem from Windows file issues related to UTF8. But then again, the code is Java based, so the problem could be anything.
I ran the MSV and JING validators and both gave the same result as in below. But the same file in does validate just fine on it's internal validator. What am I missing? Note it fails on the first character, so the parser is not likely the problem. Tried running it in administrator mode to eliminate any possible permissions issues. Same result.
C:\docbook\src>java -jar c:\msv\msv.jar c:\docbook\rnc\docbook.rnc dgsample.xml
-debug
start parsing a grammar.
Content is not allowed in prolog.
1:1#file:///c:/docbook/rnc/docbook.rnc
Exception in thread "main" java.lang.NullPointerException
at com.sun.msv.driver.textui.Driver.run(Driver.java:221)
at com.sun.msv.driver.textui.Driver.main(Driver.java:68)
Your problem isn't windows (well, not this particular problem)
You are trying to validation using a RelaxNG schema in compact format. oXygen handles this just fine as it uses Jing internally. MSV can't handle compact format as format as I'm aware. If you need to do this at at the command line using MSV then use the Trang converter built into oXygen (Tools menu, Generate/Convert Schema in version 12.2) to convert your schema into the XML format.
Assuming that you are using a normal DocBook release you should have a copy of docbook.rng as well anyway so you could do (I don't know where you store jing.jar obviously):
C:\docbook\src>java -jar jing.jar c:\docbook\rnc\docbook.rng dgsample.xml
or
C:\docbook\src>java -jar c:\msv\msv.jar c:\docbook\rnc\docbook.rng dgsample.xml
On the other hand you can use Jing to do this but you need to tell it that the file is in compact format:
C:\docbook\src>java -jar jing.jar -c c:\docbook\rnc\docbook.rnc dgsample.xml
Hope that helps
Related
I understand that nunit console 3 can write to TestResult.xml after running the tests, where the TestResult.xml is located inside the directory specified by --work parameter.
But from what I can tell, TestResult.xml contains too many (irrelevant) details, that I don't need to fix my unit tests errors. All I need is just the failed or ignored test cases, just like what is displayed in command line prompt when I am running nunit console in it.
How to configure the parameters for nunit console 3 so that it only gives me failed or ignored test cases?
Sorry, I'm a few months late (unfortunately I came across this problem only now). But as far as I searched, the only possibility is to use XSL transformation. There are some applications that can convert the XML report file, but... I tested a few, but unfortunately the output was not that was I need.
Therefore I created a simple NUnit3summary application that can transform the standard XML output file to text file. I was surprised that nobody until now made something like this (or at least did not publish it). It were only two hours of work (first working version) and a few more to finish it to stare ready for publishing.
It is only a simple application that was aimed for my needs. You can use filtration for now only with another application, e.g.:
NUnit3summary.exe TestResult.xml | grep Failed >FailedTests.txt
You can see a practical application here (this is also the project where the application was needed, because of too many errors in unit tests).
I am developing a JDBC driver which is a wrapper for a web service. My unit tests work fine and I can write my own Java code that uses the driver to do useful things.
When I plug it into Squirrel SQL it is able to connect and get its initial batch of metadata (properties, schemas/catalogs, etc), but a simple SELECT query does not work. I receive an InvocationTargetException. This means a reflective call failed inside the method or constructor being invoked: this exception always wraps another exception which shows what really failed.
However, the error window in Squirrel SQL simply shows the exception name: no wrapped exception/cause, no stack trace. The log in my user directory contains no information regarding what happened.
Looking through the global properties and connection properties, I have not found any settings that would increase logging. I am using Squirrel SQL version 3.5.3 on Java 7 64-bit, Windows 7 64-bit.
How can I get Squirrel SQL to provide more information to help me find the cause of this error? I do not care if it outputs to the log file or the error window, just so I have something to go by.
The easiest way to change the log level is to edit the log4j.properties file. This file is in the same folder as the batch file that starts SquirrelSQL.
Simply change the line
log4j.rootLogger=info, SquirrelAppender
to
log4j.rootLogger = debug, SquirrelAppender
I'm trying to learn about using mod-wsgi, and I thought the best way would be for me to write my own simple 'debug' framework. I am NOT looking to use someone else's debug framework at this time.
The problem is, I'm not sure how to get started.
Specifically, I have a script working now where there is a WSGIAlias to my python script:
/testscript -> /home/bill/testscript.py [this works ok]
There are several annoying problems here, namely that if there is any syntax error of any kind, apache returns a 500 server error, and I have to check the server logs, which is annoying.
What I would like to do is to have some kind of framework called, that then encapsulates my script, this way when an error occurs (like a syntax error in testscript.py or any other type of exception), I can catch the exception, and return a nicely formatted HTML file with debugging information.
My question is, how do I 'pass' the script I want to run as an argument to my debug script?
From the command line, it would be easy, I would do something like this:
$ python debug.py myscript.py
How can I do this using WSGI though? Any ideas?
I have a Vector < String >. Now i want to store those Strings in database. But i have one "but"! The program user mustn't install anything else except J2RE, he will just copy program to his computer and run. Does java has such kind of database?
P.S. Previously i think about object serialization or just simple text\xml file but according to the task it must be database... So user just copy my program and run, without installing any additional software, except J2RE.
I think HSQLDB is the right choice for your problem. You just need the HSQLDB JAR in your classpath and then use the file-based database configuration
You can embed Apache Derby in your application. This will run on a JRE installation.
The only thing I know of is JavaDB, but I don't know if that's included in J2RE.
For more info on JavaDB see JavaDB
Edit
After reading on the JavaDB site it seems it's only included in the JDK, which I assume would be not sufficient for you.
Why the requirement for a database? You have 1 Vector - is there any other data that is linked to each String? If you just have to search for Strings in the Vector, you can do that without a database. Ordering the list, searching for substring matches, etc can all be done using Java string functions. Even if the list contians 100,000 thousand Strings, it should still be fast.
JavaDB and Derby are very closely related. JavaDB is the Sun distribution of Derby. You can get Derby directly from the Apache web site (http://db.apache.org/derby) and embed it directly into your application, and both JavaDB and Derby require only the JRE in order to run.
I got the following SQLException: "invalid options in all7"
Upon googling the error message, the ONLY hits I saw were Oracle error lists which pinpointed the error at "ORA-17432: invalid options in all7". Sadly, googling for the error # brought up only combined lists with no explanation for the error, aside from this page that said "A TTC Error Message" as the entire explanation.
The error happens when a Java program retrieves data from a prepared statement call executing a procedure that returns a fairly large, but not unreasonable, # of rows via a cursor.
I can add the stack trace from the exception as well as condensed code, but I assume that's not terribly relevant to figuring out what "ORA-17432: invalid options in all7" means.
Context:
Error seemed to have appeared when the Java program was migrated from Oracle 9 OCI to Oracle 10.2 thin client. The procedure, when run directly against database (via Toad) works perfectly fine and returns the correct cursor with correct data and no errors.
This seems to be something data specific (result set size may be?) since running that same exact code against a different currency as a procedure parameter (which returns much smaller resultset) works 100% fine.
This is almost certainly not something you're going to have control of. It looks like a problem with the way your thin driver is using the two-task common (TTC) protocol. One thing to note is that this sort of thing can be very sensitive to the version of the driver you are using. Make absolutely certain that you have the latest version of the JDBC driver for the combination of the version of Java you're using and the version of Oracle on the server.
Akohchi - you were in the right area though not quite correct. The explanation obtained via Oracle Support call was that this version of Java (1.3) was not compatible with new Oracle. Java 1.4 fixed the issue.