<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Programming notes</title>
	<atom:link href="http://www.paykin.info/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paykin.info/java</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 26 Apr 2012 18:24:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Spell checking with suggestions with Hibernate Search 4 and Lucene 3.6</title>
		<link>http://www.paykin.info/java/spell-check-suggestions-hibernate-search-lucene/</link>
		<comments>http://www.paykin.info/java/spell-check-suggestions-hibernate-search-lucene/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 17:59:16 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Lucene]]></category>

		<guid isPermaLink="false">http://www.paykin.info/java/?p=114</guid>
		<description><![CDATA[In latest releases of Hibernate Search 4 and Lucene 3.6 there was some changes in SpellChecker API&#8217;s. Here is example of the new API that allows to use spell checking with suggested words: public String[] getSuggestions(String txt){ String[] suggestions = &#8230; <a href="http://www.paykin.info/java/spell-check-suggestions-hibernate-search-lucene/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In latest releases of Hibernate Search 4 and Lucene 3.6 there was some changes in SpellChecker API&#8217;s.<br />
Here is example of the new API that allows to use spell checking with suggested words:</p>
<pre class="brush:java">public String[] getSuggestions(String txt){
	String[] suggestions =  new String[]{};

	FullTextSession fullTextSession = Search.getFullTextSession(sf.getCurrentSession());
	SearchFactory searchFactory = fullTextSession.getSearchFactory();
	IndexReader reader = searchFactory.getIndexReaderAccessor().open(MyEntity.class);
	try {
		FSDirectory spellCheckerDir = FSDirectory.open(new File("D:\\lucene\\spellchecker\\com.site.model.MyEntity"));
		SpellChecker spellChecker = new SpellChecker(spellCheckerDir);
		Dictionary dictionary = new LuceneDictionary(reader, "description");
		IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_35, searchFactory.getAnalyzer("myAnalyzer"));
		spellChecker.indexDictionary(dictionary, config, true);
		suggestions = spellChecker.suggestSimilar(txt, 10);
	} catch (Exception e) {
		e.printStackTrace();
	}
	finally{
		searchFactory.getIndexReaderAccessor().close(reader);
	}
	return suggestions;
}</pre>
<p><code>sf.getCurrentSession()</code> gets standard Hibernate session. If you use <code>EntityManager</code>, there exists a method to obtain <code>FullTextSession</code>.<br />
The example creates new index directory dedicated to spell checking. It adds terms from MyEntity&#8217;s <code>description</code> field to the index. <code>spellChecker.indexDictionary</code> adds the terms to the index, and optionally merges it with existing index.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paykin.info/java/spell-check-suggestions-hibernate-search-lucene/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Portlets with Wicket 1.5.x in Liferay portal</title>
		<link>http://www.paykin.info/java/wicket_liferay_portlets/</link>
		<comments>http://www.paykin.info/java/wicket_liferay_portlets/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 13:28:46 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[Wicket]]></category>
		<category><![CDATA[liferay]]></category>
		<category><![CDATA[portlet]]></category>
		<category><![CDATA[wicket]]></category>

		<guid isPermaLink="false">http://www.paykin.info/java/?p=106</guid>
		<description><![CDATA[After Wicket dropped support for portlets and moving it to wicketstuff the settings in XMLs are changed: portlet.xml should look like &#60;portlet&#62; &#60;description&#62;wickettest4&#60;/description&#62; &#60;portlet-name&#62;wickettest4&#60;/portlet-name&#62; &#60;display-name&#62;wickettest4&#60;/display-name&#62; &#60;portlet-class&#62;org.apache.wicket.portlet.WicketPortlet&#60;/portlet-class&#62; &#60;init-param&#62; &#60;name&#62;wicketFilterPath&#60;/name&#62; &#60;value&#62;/bla&#60;/value&#62; &#60;/init-param&#62; &#60;supports&#62; &#60;mime-type&#62;text/html&#60;/mime-type&#62; &#60;portlet-mode&#62;VIEW&#60;/portlet-mode&#62; &#60;/supports&#62; &#60;portlet-info&#62; &#60;title&#62;wickettest4&#60;/title&#62; &#60;keywords&#62;wickettest4&#60;/keywords&#62; &#60;/portlet-info&#62; &#60;/portlet&#62; Note &#8230; <a href="http://www.paykin.info/java/wicket_liferay_portlets/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After Wicket dropped support for portlets and moving it to wicketstuff the settings in XMLs are changed:</p>
<p>portlet.xml should look like</p>
<pre class="brush:xml">&lt;portlet&gt;
	&lt;description&gt;wickettest4&lt;/description&gt;
	&lt;portlet-name&gt;wickettest4&lt;/portlet-name&gt;
	&lt;display-name&gt;wickettest4&lt;/display-name&gt;
	&lt;portlet-class&gt;org.apache.wicket.portlet.WicketPortlet&lt;/portlet-class&gt;
	&lt;init-param&gt;
		&lt;name&gt;wicketFilterPath&lt;/name&gt;
		&lt;value&gt;/bla&lt;/value&gt;
	&lt;/init-param&gt;
	&lt;supports&gt;
		&lt;mime-type&gt;text/html&lt;/mime-type&gt;
		&lt;portlet-mode&gt;VIEW&lt;/portlet-mode&gt;
	&lt;/supports&gt;
	&lt;portlet-info&gt;
		&lt;title&gt;wickettest4&lt;/title&gt;
		&lt;keywords&gt;wickettest4&lt;/keywords&gt;
	&lt;/portlet-info&gt;
&lt;/portlet&gt;</pre>
<p>Note new portlet-class. Also, mime-type have to be text/html.</p>
<p>web.xml also changed, notice filter class:</p>
<pre class="brush:xml">&lt;filter&gt;
	&lt;filter-name&gt;wicket.wicket&lt;/filter-name&gt;
	&lt;filter-class&gt;org.apache.wicket.portlet.PortletFilter&lt;/filter-class&gt;
	&lt;init-param&gt;
		&lt;param-name&gt;applicationClassName&lt;/param-name&gt;
		&lt;param-value&gt;org.wicket.WicketApplication&lt;/param-value&gt;
	&lt;/init-param&gt;
&lt;/filter&gt;
&lt;filter-mapping&gt;
	&lt;filter-name&gt;wicket.wicket&lt;/filter-name&gt;
	&lt;url-pattern&gt;/bla/*&lt;/url-pattern&gt;
	&lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
	&lt;dispatcher&gt;INCLUDE&lt;/dispatcher&gt;
	&lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
&lt;/filter-mapping&gt;</pre>
<p>And of course Maven dependencies also changed:</p>
<pre class="brush:xml">&lt;dependency&gt;
	&lt;groupId&gt;org.apache.wicket&lt;/groupId&gt;
	&lt;artifactId&gt;wicket-core&lt;/artifactId&gt;
	&lt;version&gt;${wicket.version}&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
	&lt;groupId&gt;org.apache.portals.bridges&lt;/groupId&gt;
	&lt;artifactId&gt;portals-bridges-common&lt;/artifactId&gt;
	&lt;version&gt;2.0&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
	&lt;groupId&gt;org.wicketstuff&lt;/groupId&gt;
	&lt;artifactId&gt;wicketstuff-portlet&lt;/artifactId&gt;
	&lt;version&gt;${wicket.version}&lt;/version&gt;
&lt;/dependency&gt;</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paykin.info/java/wicket_liferay_portlets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create datasource programmatically on JBoss 7</title>
		<link>http://www.paykin.info/java/add-datasource-programaticaly-cli-jboss-7/</link>
		<comments>http://www.paykin.info/java/add-datasource-programaticaly-cli-jboss-7/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 14:22:31 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[J2ee]]></category>

		<guid isPermaLink="false">http://www.paykin.info/java/?p=96</guid>
		<description><![CDATA[In order to create new datasource programmatically on JBoss 7 without restart (on the fly) from Java you can use CLI Java API. You have to include jboss-as-controller-client to your project dependencies: &#60;dependency&#62; &#60;groupId&#62;org.jboss.as&#60;/groupId&#62; &#60;artifactId&#62;jboss-as-controller-client&#60;/artifactId&#62; &#60;version&#62;7.0.2.Final&#60;/version&#62; &#60;/dependency&#62; The following example creates new &#8230; <a href="http://www.paykin.info/java/add-datasource-programaticaly-cli-jboss-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In order to create new datasource programmatically on JBoss 7 without restart (on the fly) from Java you can use CLI Java API. You have to include jboss-as-controller-client to your project dependencies:</p>
<pre class="brush:xml">&lt;dependency&gt;
	&lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
	&lt;artifactId&gt;jboss-as-controller-client&lt;/artifactId&gt;
	&lt;version&gt;7.0.2.Final&lt;/version&gt;
&lt;/dependency&gt;</pre>
<p>The following example creates new datasource:</p>
<pre class="brush:java">public void createDatasource() throws Exception{
	ModelNode request = new ModelNode();
	request.get(ClientConstants.OP).set(ClientConstants.ADD);
	request.get(ClientConstants.OP_ADDR).add("subsystem",
			"datasources");
	request.get(ClientConstants.OP_ADDR).add("data-source",
			"java:jboss/datasources/NewDatasource");

	request.get("jndi-name").set("java:jboss/datasources/NewDatasource");
	request.get("connection-url").set("jdbc:as400://1.2.3.4/SCHEME");
	request.get("driver-class").set("com.ibm.as400.access.AS400JDBCDriver");
	request.get("driver-name").set("jt400.jar");
	request.get("user-name").set("username");
	request.get("password").set("password");
	request.get("pool-name").set("pool_NewDatasource");

	ModelControllerClient client = ModelControllerClient.Factory.create(
			InetAddress.getByName("127.0.0.1"), 9999);
	client.execute(new OperationBuilder(request).build());
}</pre>
<p>If you want to check if the datasource already exists, consider following snippet:</p>
<pre class="brush:java">public boolean checkIfDatasourceExists() throws Exception {
	ModelNode request = new ModelNode();
	request.get(ClientConstants.OP).set("read-resource");
	request.get("recursive").set(false);
	request.get(ClientConstants.OP_ADDR).add("subsystem", "datasources");

	ModelControllerClient client = ModelControllerClient.Factory.create(
			InetAddress.getByName("127.0.0.1"), 9999);
	ModelNode responce = client.execute(new OperationBuilder(request).build());

	ModelNode datasources = responce.get(ClientConstants.RESULT).get("data-source");

	if (datasources.isDefined()) {
		for (ModelNode dataSource : datasources.asList()) {
			String dataSourceName = dataSource.asProperty().getName();
			if (dataSourceName.equals("java:jboss/datasources/NewDatasource")) {
				return true;
			}
		}
	}
	return false;
}</pre>
<p>The examples have the same effect as trying to add datasource from Jboss Administration console.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paykin.info/java/add-datasource-programaticaly-cli-jboss-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cleaning eclipse with -clean argument</title>
		<link>http://www.paykin.info/java/cleaning-eclipse-with-clean-argument/</link>
		<comments>http://www.paykin.info/java/cleaning-eclipse-with-clean-argument/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 09:24:17 +0000</pubDate>
		<dc:creator>shacham</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.paykin.info/java/?p=92</guid>
		<description><![CDATA[For those of you who work a lot with Eclipse, you probably run into all sorts of strange errors in Eclipse that not really related to your code, and then you get the feeling that Eclipse has gone mad. One &#8230; <a href="http://www.paykin.info/java/cleaning-eclipse-with-clean-argument/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For those of you who work a lot with Eclipse,<br />
you probably run into all sorts of strange errors in Eclipse that<br />
not really related to your code, and then you get the feeling that Eclipse has gone mad.</p>
<p>One way to solve these problems and clean the Eclipse is using -clean argument.<br />
all you need to do is to edit the eclipse.ini file located in your &lt;Eclipse install directory&gt; and add it as the first argument on the first line.<br />
After you upload the eclipse you can delete it until the next time you will need it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paykin.info/java/cleaning-eclipse-with-clean-argument/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forcing JBoss 7 to apply changes to JSP&#8217;s immediately</title>
		<link>http://www.paykin.info/java/jboss-7-changes-jsp/</link>
		<comments>http://www.paykin.info/java/jboss-7-changes-jsp/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 12:18:10 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[J2ee]]></category>

		<guid isPermaLink="false">http://www.paykin.info/java/?p=79</guid>
		<description><![CDATA[JBoss AS 7 by default do not reflect any changes to JSP files in WAR deployment. So, during application development you have to redeploy WAR or restart JBoss. In order to change this behaviour it is necessary to change section &#8230; <a href="http://www.paykin.info/java/jboss-7-changes-jsp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>JBoss AS 7 by default do not reflect any changes to JSP files in WAR deployment. So, during application development you have to redeploy WAR or restart JBoss. In order to change this behaviour it is necessary to change section of urn:jboss:domain:web:1.0 in standalone.xml so it looks like:</p>
<pre class="brush:xml">&lt;subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host"&gt;
    &lt;configuration&gt;
        &lt;jsp-configuration development="true"/&gt;
    &lt;/configuration&gt;
    ...
&lt;/subsystem&gt;</pre>
<p>And now JBoss behaves as you expect it in development mode: all changes to JSP files are loaded automatically as soon as you change the JSP file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paykin.info/java/jboss-7-changes-jsp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android browser recognizes CSS media type after page reloading</title>
		<link>http://www.paykin.info/java/android-css-media-reloading/</link>
		<comments>http://www.paykin.info/java/android-css-media-reloading/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 07:34:16 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Adndroid]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.paykin.info/java/?p=67</guid>
		<description><![CDATA[While trying to optimize site for mobile devices you have to add viewport meta tag: &#60;meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, height=device-height, initial-scale=1.0" /&#62; You can add additional CSS file that will be used on mobile device only. To&#160;achieve&#160;this just add CSS &#8230; <a href="http://www.paykin.info/java/android-css-media-reloading/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While trying to optimize site for mobile devices you have to add viewport meta tag:</p>
<pre class="brush:xml">&lt;meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, height=device-height, initial-scale=1.0" /&gt;</pre>
<p>You can add additional CSS file that will be used on mobile device only. To&nbsp;achieve&nbsp;this just add CSS media type.&nbsp;In Android developer&#8217;s guide at&nbsp;<a href="http://developer.android.com/guide/webapps/targeting.html">http://developer.android.com/guide/webapps/targeting.html</a>&nbsp;it suggests to target device DPI value like:</p>
<pre class="brush:xml">&lt;link rel="stylesheet" href="css/mobile.css" type="text/css" media="screen and (-webkit-device-pixel-ratio:1.0)" /&gt;</pre>
<p>It works fine, but Google Chrome on desktop PC also loads this CSS file.</p>
<p>There is another solution to target mobile devices (both Android, iPhone, Blackberry): to specify maximal width of the screen like:</p>
<pre class="brush:xml">&lt;link rel="stylesheet" href="css/mobile.css" type="text/css" media="screen and (max-device-width:801px) and (max-width:801px)" /&gt;</pre>
<p>The problem is that Android (at least 2.3 I&#8217;ve tested) recognizes this media type only after page reloading (refreshing) in browser. Googling the web I found the open&nbsp;<a title="issue" href="http://code.google.com/p/android/issues/detail?id=11961" target="_blank">issue</a>.<br />
I solved it using JavaScript:</p>
<pre class="brush:js">if(isMobile){
	var cssLink = document.createElement("link");
	cssLink.setAttribute("type", "text/css");
	cssLink.setAttribute("rel", "stylesheet");
	cssLink.setAttribute("href", "css/mobile.css");
	document.head.appendChild(cssLink);
}</pre>
<p>I tested it on my device an it works fine, unless some little delay: the CSS file loads only after JavaScript executes. When google will fix the issue (I hope so&#8230;), there will be no delay, since original link is in the HEAD section.</p>
<p>Of course&nbsp;you have to detect mobile device using the JavaScript, I used solution suggested here:&nbsp;<a href="http://localstreamer.posterous.com/javascript-code-snippet-how-to-detect-all-mob">http://localstreamer.posterous.com/javascript-code-snippet-how-to-detect-all-mob</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paykin.info/java/android-css-media-reloading/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Deploying JDBC driver in JBoss Maven plugin</title>
		<link>http://www.paykin.info/java/deploying-jdbc-jboss-maven-plugin/</link>
		<comments>http://www.paykin.info/java/deploying-jdbc-jboss-maven-plugin/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 06:47:04 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://www.paykin.info/java/?p=54</guid>
		<description><![CDATA[With release of jboss-as maven plugin&#160;version 7.0.1.Final the new goal&#160;deploy-artifact is added. It allows to deploy additional artifacts to JBoss server, like JDBC DB driver JAR. After trying do deploy JDBC driver with jboss-as maven plugin using following code in &#8230; <a href="http://www.paykin.info/java/deploying-jdbc-jboss-maven-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With release of jboss-as maven plugin&nbsp;version 7.0.1.Final the new goal&nbsp;deploy-artifact is added. It allows to deploy additional artifacts to JBoss server, like JDBC DB driver JAR.</p>
<p>After trying do deploy JDBC driver with jboss-as maven plugin using following code in pom.xml&nbsp;I received the <code>NullPointerException</code>&nbsp;in Maven build.</p>
<p>Here is part of maven pom.xml used to deploy the driver to jboss:</p>
<pre class="brush:xml">					&lt;plugin&gt;
						&lt;groupId&gt;org.jboss.as.plugins&lt;/groupId&gt;
						&lt;artifactId&gt;jboss-as-maven-plugin&lt;/artifactId&gt;
						&lt;version&gt;7.0.1.Final&lt;/version&gt;
						&lt;executions&gt;
							&lt;execution&gt;
								&lt;id&gt;deploy-driver-AS400&lt;/id&gt;
								&lt;phase&gt;package&lt;/phase&gt;
								&lt;goals&gt;
									&lt;goal&gt;deploy-artifact&lt;/goal&gt;
								&lt;/goals&gt;

								&lt;configuration&gt;
									&lt;hostname&gt;${jboss-hostname}&lt;/hostname&gt;
									&lt;groupId&gt;com.ibm&lt;/groupId&gt;
									&lt;artifactId&gt;as400&lt;/artifactId&gt;
									&lt;fileName&gt;jt400.jar&lt;/fileName&gt;
									&lt;name&gt;jt400.jar&lt;/name&gt;
								&lt;/configuration&gt;
							&lt;/execution&gt;

						&lt;/executions&gt;
					&lt;/plugin&gt;</pre>
<p>&nbsp;</p>
<p>In the plugin&#8217;s manual at&nbsp;<a href="http://docs.jboss.org/jbossas/7/plugins/maven/latest/examples/deployment-example.html">http://docs.jboss.org/jbossas/7/plugins/maven/latest/examples/deployment-example.html</a>&nbsp;it said</p>
<blockquote><p>The artifact must be already listed as a dependency in the projects pom.xml</p></blockquote>
<p>but it do not tells in which scope the driver&#8217;s JAR have to be: it have to be in <strong>compile</strong> or <strong>runtime</strong> scope in order to work. I had it in provided scope. After changing the scope of dependency it works fine.<br />
<span id="more-54"></span><br />
Here is full stacktrace of the error I&nbsp;received:</p>
<p><code>[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.1.Final:deploy-artifact (deploy-driver-AS400) on project project-ear: Execution deploy-driver-AS400 of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.1.Final:deploy-artifact failed. NullPointerException -&gt; [Help 1]<br />
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.1.Final:deploy-artifact (deploy-driver-AS400) on project project-ear: Execution deploy-driver-AS400 of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.1.Final:deploy-artifact failed.<br />
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)<br />
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)<br />
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)<br />
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)<br />
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)<br />
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)<br />
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)<br />
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)<br />
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)<br />
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)<br />
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)<br />
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
at java.lang.reflect.Method.invoke(Method.java:597)<br />
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)<br />
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)<br />
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)<br />
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)<br />
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution deploy-driver-AS400 of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.1.Final:deploy-artifact failed.<br />
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:116)<br />
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)<br />
... 19 more<br />
Caused by: java.lang.NullPointerException<br />
at org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:191)<br />
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)<br />
... 20 more</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paykin.info/java/deploying-jdbc-jboss-maven-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enums in JSF</title>
		<link>http://www.paykin.info/java/enums-in-jsf/</link>
		<comments>http://www.paykin.info/java/enums-in-jsf/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 06:00:00 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[JSF]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.paykin.info/java/?p=36</guid>
		<description><![CDATA[Finally I find the way to use enum with JSF: Suppose you have enum: public enum ActionTypeEnum { UPDATE, CREATE, COPY } In JSF you can write EL expressions in form: &#60;h:outputText value="someText" rendered="#{listAction.actionType == 'COPY'}"/&#62; The property actionType in &#8230; <a href="http://www.paykin.info/java/enums-in-jsf/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Finally I find the way to use enum with JSF:<br />
Suppose you have enum:</p>
<pre class="brush:java">public enum ActionTypeEnum {
	UPDATE,
	CREATE,
	COPY
}</pre>
<p>In JSF you can write EL expressions in form:</p>
<pre class="brush:xml">&lt;h:outputText value="someText"
	rendered="#{listAction.actionType == 'COPY'}"/&gt;</pre>
<p>The property <code>actionType</code> in managed bean <code>listAction</code> have to be of type <code>ActionTypeEnum</code>.</p>
<p>It works because each enum in have method <code>valueOf(String stringValue)</code> and JSF attempts to convert String value to enum.<br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paykin.info/java/enums-in-jsf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

