Archive for the 'Java' Category
Maven with Clover in IDEA
When running mvn install from IntelliJ IDEA with the Clover2 plugin, I got the following error:
Clover could not be initialised. Are you sure you have Clover in the runtime classpath?
It was easily fixed by running mvn clean.
I found the original answer here, but I wanted to repost so people wouldn’t have to deal with such a horrid site.
No commentsSpring AOP requires an ApplicationContext
Having problems getting Spring AOP working? Is your bean being created, but your aspect not running? Is the section on @AspectJ support not helping?
Make sure you check out Section 3.8.1 of the Spring documentation, which says, “if you are using just a plain BeanFactory then a fair amount of support such as transactions and AOP will not take effect (at least not without some extra steps on your part), which could be confusing because nothing will actually be wrong with the configuration.”
No commentsWicket problems & solutions
So, I’m learning a lot about Wicket lately. Here’s a couple things I’ve learned:
If you’re using the CheckBoxTree from the openCDMS, make sure you get the most recent version. The revision linked to in the Google search results is old, and does not include CheckBoxIconPanel.html. It took me a while to realize what the problem was, because Wicket Components will use the HTML file of their superclass if one is not provided. Here’s a link to the most recent version.
Another issue I recently ran into is that an AJAX Component on my page would get redrawn for the first AJAX call, but not for subsequent calls, even though I added it to the AjaxRequestTarget. Looking at the handy in-page Wicket AJAX debug, I saw,
“ERROR: Wicket.Ajax.Call.processComponent: Component with id [[selectedFeaturesContainera]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update.”
I was indeed calling setOutputMarkupId(true). The problem was actually that I was using a <wicket:container> for that Component. The <wicket:container> was present with the proper id in the HTML of the initial page load, but would not be included in the document replacing it during the AJAX call. As a result, subsequent calls could not find the element to replace.
The solution: use a real HTML element for every element that has setOutputMarkupId(true). Also, remember that if you’re using using id selectors in your stylesheets, you need to be careful of setOutputMarkupId(true) because your id hard-coded in the HTML will get replaced/overwritten by Wicket’s automatically generated id.
No commentsEclipse IAM
If you get this error when launching a Run Configuration in Eclipse with the IAM (Maven) plugin:
Referenced classpath provider does not exist: org.maven.ide.eclipse.launchconfig.classpathProvider
It’s probably because your Run Configuration was created on an old project, and has bad entries in the Classpath section. The solution is to delete the Run Configuration and create a new one.
No comments