org.objectweb.asm.ClassWriter.
On calling:
MockClassControl.createStrictControl(Toto.class);
Error:
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
Fix: add a dependency to cglib-full-2.0.2.jar before the other dependencies.
ids for this class must be manually assigned before calling save()
Error:
javax.ejb.EJBException: EJB Exception: : org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save():
Fix: You must assign the primary-key (which is probably a composite-id) before saving the object.
java.lang.NullPointerException at org.dbunit.dataset.DefaultTableIterator.next
Still another dumb error:
java.lang.NullPointerException at org.dbunit.dataset.DefaultTableIterator.next(DefaultTableIterator.java:59) at org.dbunit.dataset.AbstractDataSet.getTable(AbstractDataSet.java:77) at org.dbunit.dataset.AbstractDataSet.getTableMetaData(AbstractDataSet.java:70) at org.dbunit.dataset.filter.SequenceTableFilter.getTableNames(SequenceTableFilter.java:94) at org.dbunit.dataset.filter.SequenceTableFilter.iterator(SequenceTableFilter.java:110) at org.dbunit.dataset.FilteredDataSet.createIterator(FilteredDataSet.java:74) at org.dbunit.dataset.AbstractDataSet.iterator(AbstractDataSet.java:112) at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:81)
I’m laughing because I had only to check the DBUnit XML file did start with <dataset> tag… :-S
How to have syntax color in VIm under CygWin?
In order to have syntax color in VIm under CygWin, in your $HOME folder, add a file .vimrc, with this simple line as content:
syntax on
javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found
Here is the stacktrace I have had this morning:
javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72) at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176) at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92) at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
To solve it, I had to add following jars to my lib/ folder:
wls-stax-1.0.jarwls-jsr173-1.0-ri.jar
Unable to validate using XSD: Your JAXP provider does not support XML Schema
Here is the stacktrace that happened this morning:
Unable to validate using XSD: Your JAXP provider org.apache.crimson.jaxp.DocumentBuilderFactoryImpl@e6a73d does not support XML Schema. Are you running on Java 1.4 or below with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
To solve it, I had to remove the j2ee-X.X.jar from my project.xml Maven config file.
How to test a single class in Maven?
Use the command:
maven test:single -Dtestcase=com.mypath.(...).MyUnitTest
How to reboot or shutdown Windows?
Use following commands:
- to shutdow:
shutdown -s -t 0 -f - to reboot:
shutdown -r -t 0 -f
Create an alias in MS-DOS
Here is a very useful way to retrieve UNIX’customs in DOS: creating aliases. For instance, you can type this:
doskey ls=dir
Bug with ImageZoom: when all pictures get bigger
ImageZoom is one of my prefered extentions to FireFox. Yet, sometimes I encounter a situation in which all pictures size is increased.
It is very easy to fix this: in the address bar, launch about:config.
Then find the property imagezoom.defaultGlobalZoom, set it at 100.
And it’s over!