<?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>Developers, Developers, Developers! &#187; GlassFish</title>
	<atom:link href="http://maksim.sorokin.dk/it/tag/glassfish/feed/" rel="self" type="application/rss+xml" />
	<link>http://maksim.sorokin.dk/it</link>
	<description>Maksim Sorokin IT Blog</description>
	<lastBuildDate>Sun, 05 Feb 2012 19:37:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>GlassFish v3 Windows Service</title>
		<link>http://maksim.sorokin.dk/it/2010/11/13/glassfish-v3-windows-service/</link>
		<comments>http://maksim.sorokin.dk/it/2010/11/13/glassfish-v3-windows-service/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 10:17:25 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=413</guid>
		<description><![CDATA[GlassFish v3 provides a way to create a service. However, one may encounter the following problem: C:\Sun\glassfishv3\glassfish\bin&#38;gt;asadmin create-service Error while trying to install GlassFish as a Windows Service. The return value was: -1073741515. STDERR: STDOUT: Usage: asadmin [asadmin-utility-options] create-service [--name ] [--serviceproperties ] [--dry-run[=]] [--force[=]] [--domaindir ] [-?&#124;--help[=]] [domain_name] Command create-service failed. To fix this [...]]]></description>
			<content:encoded><![CDATA[<p>GlassFish v3 provides a way to create a service. However, one may encounter the following problem:</p>
<pre class="brush: plain; title: ;">
C:\Sun\glassfishv3\glassfish\bin&amp;gt;asadmin create-service
Error while trying to install GlassFish as a Windows Service.
The return value was: -1073741515.
STDERR:
STDOUT:
Usage: asadmin [asadmin-utility-options] create-service [--name ]
        [--serviceproperties ]
        [--dry-run[=]]
        [--force[=]] [--domaindir ]
        [-?|--help[=]] [domain_name]
Command create-service failed.
</pre>
<p>To fix this problem you need to install <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&amp;displaylang=en">Microsoft .NET Framework Version 2.0 Redistributable Package (x86)</a>. After installing you don't event need to reboot machine. Just run <code>asadmin create-service</code> again:</p>
<pre class="brush: plain; title: ;">
C:\Sun\glassfishv3\glassfish\bin&amp;gt;asadmin create-service
Found the Windows Service and successfully uninstalled it.
The Windows Service was created successfully.  It is ready to be started.  Here
are the details:
ID of the service: domain1
Display Name of the service:domain1 GlassFish Server
Domain Directory: C:\Sun\glassfishv3\glassfish\domains\domain1
Configuration file for Windows Services Wrapper: C:\Sun\glassfishv3\glassfish\do
mains\domain1\bin\domain1Service.xml
The service can be controlled using the Windows Services Manager or you can use
the
Windows Services Wrapper instead:
Start Command:  C:\Sun\glassfishv3\glassfish\domains\domain1\bin\domain1Service.
exe  start
Stop Command:   C:\Sun\glassfishv3\glassfish\domains\domain1\bin\domain1Service.
exe  stop
Uninstall Command:  C:\Sun\glassfishv3\glassfish\domains\domain1\bin\domain1Serv
ice.exe  uninstall
Install Command:  C:\Sun\glassfishv3\glassfish\domains\domain1\bin\domain1Servic
e.exe  install

This message is also available in a file named PlatformServices.log in the domai
n's root directory
Command create-service executed successfully.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/11/13/glassfish-v3-windows-service/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Basic Authentication in GlassFish 3</title>
		<link>http://maksim.sorokin.dk/it/2010/10/13/basic-authentication-in-glassfish-3/</link>
		<comments>http://maksim.sorokin.dk/it/2010/10/13/basic-authentication-in-glassfish-3/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 16:23:44 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[basic authentication]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=389</guid>
		<description><![CDATA[Here is asmall basic authentication how-to for a web application in GlassFish 3. Open GlassFish Administrative Console. Go to Security-&#62;Realms-&#62;file. Change Assign Groups to Users. In the top of the page click Manage Users. Click New. Specify User ID and Password. In Group List fill Users. In your web.xml add the following: &#60;web-app&#62; ... &#60;security-constraint&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is asmall basic authentication how-to for a web application in GlassFish 3.</p>
<p>Open GlassFish Administrative Console. Go to <span id="more-389"></span><em>Security-&gt;Realms-&gt;file</em>.<br />
Change <em>Assign Groups</em> to <em>Users</em>.<br />
In the top of the page click <em>Manage Users</em>.<br />
Click <em>New</em>. Specify <em>User ID</em> and <em>Password</em>. In <em>Group List</em> fill <em>Users</em>.</p>
<p>In your <code>web.xml</code> add the following:</p>
<pre class="brush: xml; title: ;">
&lt;web-app&gt;
...

  &lt;security-constraint&gt;
    &lt;web-resource-collection&gt;
        &lt;web-resource-name&gt;Secure Application&lt;/web-resource-name&gt;
        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
        &lt;http-method&gt;GET&lt;/http-method&gt;
        &lt;http-method&gt;POST&lt;/http-method&gt;
    &lt;/web-resource-collection&gt;

    &lt;auth-constraint&gt;
        &lt;role-name&gt;Users&lt;/role-name&gt;
    &lt;/auth-constraint&gt;
  &lt;/security-constraint&gt;

  &lt;login-config&gt;
    &lt;auth-method&gt;BASIC&lt;/auth-method&gt;
	&lt;realm-name&gt;file&lt;/realm-name&gt;
  &lt;/login-config&gt;

  &lt;security-role&gt;
	&lt;role-name&gt;Users&lt;/role-name&gt;
  &lt;/security-role&gt;
...
&lt;/web-app&gt;
</pre>
<p>If you do not have <code>sun-web.xml</code> file, create one and place it the same folder as <code>web.xml</code>.<br />
Define the following in <code>sun-web.xml</code>:</p>
<pre class="brush: xml; title: ;">
&lt;sun-web-app error-url=&quot;&quot;&gt;
...
  &lt;security-role-mapping&gt;
    &lt;role-name&gt;Users&lt;/role-name&gt;
    &lt;group-name&gt;Users&lt;/group-name&gt;
  &lt;/security-role-mapping&gt;
&lt;/sun-web-app&gt;
</pre>
<p>Note, that <code>sun-web.xml</code> has additional section <code>security-role-mapping</code>.</p>
<p>UPD.: Thanks to user "chrome" for clarifying needed section in <code>sun-web.xml</code> file.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/10/13/basic-authentication-in-glassfish-3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>[PACKT] Java EE 6 with GlassFish 3 Application Server</title>
		<link>http://maksim.sorokin.dk/it/2010/08/28/packt-java-ee-6-with-glassfish-3-application-server-2/</link>
		<comments>http://maksim.sorokin.dk/it/2010/08/28/packt-java-ee-6-with-glassfish-3-application-server-2/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 10:33:08 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[Java EE 6]]></category>
		<category><![CDATA[PACKT]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=366</guid>
		<description><![CDATA[Java EE 6 with GlassFish 3 Application Server is another nice book from PACKT publishing. It covers GlassFish administration. Then it talks about Java web technologies -- servlets, JSP, JSP STL, JSF. Also discusses database connections, Java Messaging Service, security of applications (you can find more about it in GlassFish Security book). The books also [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://maksim.sorokin.dk/it/wp-content/uploads/2010/08/java-ee-6-with-glassfish-3-application-server.jpg" alt="" width="300" height="225" class="alignleft size-full wp-image-367" /><a href="http://www.packtpub.com/java-ee-6-applications-with-glassfish-3-application-server/book?utm_source=maksim.sorokin.dk&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_004037">Java EE 6 with GlassFish 3 Application Server</a> is another nice book from PACKT publishing.</p>
<p>It covers GlassFish administration. Then it talks about Java web technologies -- servlets, JSP, JSP STL, JSF. Also discusses database connections, Java Messaging Service, security of applications (you can find more about it in <a href="http://maksim.sorokin.dk/it/2010/07/25/glassfish-security-packt/">GlassFish Security</a> book). The books also talks about EJBs and new possibilities in Java EE 6 -- contexts and dependency injection. In the last part it discusses JAX-WS and JAX-RS web services. And everything is accompanied with information how to do that with GlassFish application server.</p>
<p>I would very much recommend it to novice Java EE developers or just to developers, who want to have a glance on Java EE web technologies, JMS, Java EE 6 dependency injection, web services and how all that is configured in GlassFish application server. I would say, it is a crash course into Java EE.</p>
<p>The book is not covering each section is deep detail. But gives a broad view on different Java EE possibilities.</p>
<p>The book is full of working examples! What I very much like about it, is that it not only talks about the latest Java EE 6 technologies. But also briefly covers how application can be configured in order to work with older standards.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/08/28/packt-java-ee-6-with-glassfish-3-application-server-2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>[PACKT] Java EE 6 with GlassFish 3 Application Server</title>
		<link>http://maksim.sorokin.dk/it/2010/08/12/packt-java-ee-6-with-glassfish-3-application-server/</link>
		<comments>http://maksim.sorokin.dk/it/2010/08/12/packt-java-ee-6-with-glassfish-3-application-server/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 20:58:50 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[Java EE 6]]></category>
		<category><![CDATA[PACKT]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=321</guid>
		<description><![CDATA[Just received my new PACKT book Java EE 6 with GlassFish 3 Application Server. From the table of contents I conclude that this book gives quite broad view on Java EE technologies and how to use them with GlassFish v3 application server. Although it is not covering some particular technology very detailed. First chapter is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://maksim.sorokin.dk/it/wp-content/uploads/2010/08/Java_ee_with_GlassFish_v3.png" alt="" width="125" height="152" class="alignleft size-full wp-image-322" /> Just received my new PACKT book <a href="http://www.packtpub.com/java-ee-6-applications-with-glassfish-3-application-server/book?utm_source=maksim.sorokin.dk&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_004037">Java EE 6 with GlassFish 3 Application Server</a>.</p>
<p>From the table of contents I conclude that this book gives quite broad view on Java EE technologies and how to use them with GlassFish v3 application server. Although it is not covering some particular technology very detailed.</p>
<p>First chapter is about GlassFish -- how to setup it and configure. The following ones are about Java web technologies: servlets, JavaServer Pages, JSP Standard Tag Library, JavaServer Faces. Next, books talks about Java Messaging Service and security. Last chapter are the most interesting, in my opinion: Enterprise JavaBeans, Contexts and Dependency Injection and Web Services.</p>
<p>Anxious to read it!</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/08/12/packt-java-ee-6-with-glassfish-3-application-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GlassFish Security [PACKT]</title>
		<link>http://maksim.sorokin.dk/it/2010/07/25/glassfish-security-packt/</link>
		<comments>http://maksim.sorokin.dk/it/2010/07/25/glassfish-security-packt/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 17:39:37 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[Java EE 6]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=299</guid>
		<description><![CDATA[GlassFish Security by PACKT is lying on my table. What I can say about it? Pretty nice book about security. I still wonder, why it has name "GlassFish" in the title. It covers a lot of interesting topics about Java EE security and talks about other software, which can help to secure Java applications, such [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-300" src="http://maksim.sorokin.dk/it/wp-content/uploads/2010/07/GlassFish_Security.jpg" alt="" width="300" height="225" /> <a href="https://www.packtpub.com/glassfish-security-with-java-ee/book">GlassFish Security by PACKT</a> is lying on my table. What I can say about it? Pretty nice book about security. I still wonder, why it has name "GlassFish" in the title. It covers a lot of interesting topics about Java EE security and talks about other software, which can help to secure Java applications, such as <a href="http://www.opends.org/">OpenDS</a> or <a href="https://opensso.dev.java.net/">OpenSSO</a>.</p>
<p>So if you are just about to design or develop complex Java EE application, I would recommend to take a look into this book to at least grasp the ideas about security management. Beside this, book also covers topics of easy security policies migration, which also may be somewhat interesting in our changing world.</p>
<p>And again, thanks PACKT for publishing yet another wonderful book!</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/07/25/glassfish-security-packt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enable Directory Listings in GlassFish</title>
		<link>http://maksim.sorokin.dk/it/2010/07/03/enable-directory-listings-in-glassfish/</link>
		<comments>http://maksim.sorokin.dk/it/2010/07/03/enable-directory-listings-in-glassfish/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 08:24:30 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=268</guid>
		<description><![CDATA[There is a default-web.xml file in GlassFish which configure some stuff behind the scenes. This file can be found in domains-&#62;domain-&#62;config folder. By default, in GlassFish v3 directory listing is disabled. But one can easily enable it by modifying default-web.xml file: &#60;init-param&#62; &#60;param-name&#62;debug&#60;/param-name&#62; &#60;param-value&#62;0&#60;/param-value&#62; &#60;/init-param&#62; Or if there is no possibility to modify the default-web.xml [...]]]></description>
			<content:encoded><![CDATA[<p>There is a <code>default-web.xml</code> file in GlassFish which configure some stuff behind the scenes. This file can be found in domains-&gt;domain-&gt;config folder.</p>
<p>By default, in GlassFish v3 directory listing is disabled. But one can easily enable it by modifying <code>default-web.xml</code> file:</p>
<pre class="brush: xml; title: ;">
&lt;init-param&gt;
  &lt;param-name&gt;debug&lt;/param-name&gt;
  &lt;param-value&gt;0&lt;/param-value&gt;
&lt;/init-param&gt;
</pre>
<p>Or if there is no possibility to modify the <code>default-web.xml</code> directly, <span id="more-268"></span>add the following to your <code>web.xml</code>:</p>
<pre class="brush: xml; title: ;">
  &lt;!-- Allow directory listing --&gt;
  &lt;servlet&gt;
    &lt;servlet-name&gt;default&lt;/servlet-name&gt;
    &lt;servlet-class&gt;org.apache.catalina.servlets.DefaultServlet&lt;/servlet-class&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;debug&lt;/param-name&gt;
      &lt;param-value&gt;0&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;listings&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;default&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/07/03/enable-directory-listings-in-glassfish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GlassFish 3.0.1 Released!</title>
		<link>http://maksim.sorokin.dk/it/2010/07/01/glassfish-3-0-1-released/</link>
		<comments>http://maksim.sorokin.dk/it/2010/07/01/glassfish-3-0-1-released/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 16:12:27 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=266</guid>
		<description><![CDATA[Actually, while I was messing around with other stuff, I didn't notice, that new GlassFish v3.0.1 was released! Finally, there is a possibility to migrate from nightly builds and use more stable version.]]></description>
			<content:encoded><![CDATA[<p>Actually, while I was messing around with other stuff, I didn't notice, that <a href="https://glassfish.dev.java.net/public/downloadsindex.html">new GlassFish v3.0.1 was released</a>! Finally, there is a possibility to migrate from nightly builds and use more stable version.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/07/01/glassfish-3-0-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing GlassFish Port Number with asadmin</title>
		<link>http://maksim.sorokin.dk/it/2010/06/29/changing-glassfish-port-number-with-asadmin/</link>
		<comments>http://maksim.sorokin.dk/it/2010/06/29/changing-glassfish-port-number-with-asadmin/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 15:52:46 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GlassFish]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=258</guid>
		<description><![CDATA[It's easy to change GlassFish port number through Administration Console. But how to do it through command line? Yes, we have asadmin utility. But there is no obvious way to "reconfigure" existing network listener.. But here is a possible solution. Delete network listener and add another one! Here is a code sample changing existing default [...]]]></description>
			<content:encoded><![CDATA[<p>It's easy to change GlassFish port number through Administration Console. But how to do it through command line? Yes, we have <code>asadmin</code> utility. But there is no obvious way to "reconfigure" existing network listener..</p>
<p>But here is a possible <span id="more-258"></span> solution. Delete network listener and add another one! Here is a code sample changing existing default network listener with new one on port 8081:</p>
<pre class="brush: plain; title: ;">
asadmin delete-network-listener http-listener-1
asadmin delete-protocol http-listener-1
asadmin create-http-listener --default-virtual-server server --listenerport 8081 --listeneraddress 0.0.0.0 http-listener-1
</pre>
<p>The first line deletes existing network listener. And the second line deletes associated protocol. And the last line creates another network listener on port 8081.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/06/29/changing-glassfish-port-number-with-asadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Masoud Kalali and Java EE Security</title>
		<link>http://maksim.sorokin.dk/it/2010/05/25/masoud-kalali-and-java-ee-security/</link>
		<comments>http://maksim.sorokin.dk/it/2010/05/25/masoud-kalali-and-java-ee-security/#comments</comments>
		<pubDate>Tue, 25 May 2010 10:28:29 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=203</guid>
		<description><![CDATA[Guess who wrote recent DZone Refcardz #99. It was the same guy, who wrote GlassFish Security&#62; book. His name is Masoud Kalali and he has own blog about Java.]]></description>
			<content:encoded><![CDATA[<p>Guess who wrote recent <a href="http://refcardz.dzone.com/user/register?t=1274460706">DZone Refcardz #99</a>. It was the same guy, who wrote <a href="http://www.packtpub.com/glassfish-security-with-java-ee/book?utm_source=maksim.sorokin.dk&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_003418">GlassFish Security&gt; book. His name is Masoud Kalali and he has own </a><a href="http://www.java.net/blogs/kalali/">blog</a> about Java.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/05/25/masoud-kalali-and-java-ee-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>java.lang.NoClassDefFoundError: Files</title>
		<link>http://maksim.sorokin.dk/it/2010/05/21/java-lang-noclassdeffounderror-files/</link>
		<comments>http://maksim.sorokin.dk/it/2010/05/21/java-lang-noclassdeffounderror-files/#comments</comments>
		<pubDate>Fri, 21 May 2010 16:50:24 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=201</guid>
		<description><![CDATA[If you encounter the following kind of Exception, you probably configured %JAVA_HOME% variable incorrectly: java.lang.NoClassDefFoundError: Files Caused by: java.lang.ClassNotFoundException: Files at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) Could not find the main class: Files. Program will exit. Exception in thread &#34;main&#34; For example, this could happen during [...]]]></description>
			<content:encoded><![CDATA[<p>If you encounter the following kind of Exception, you probably <span id="more-201"></span> configured <code>%JAVA_HOME%</code> variable incorrectly:</p>
<pre class="brush: plain; title: ;">java.lang.NoClassDefFoundError: Files
Caused by: java.lang.ClassNotFoundException: Files
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: Files.  Program will exit.
Exception in thread &quot;main&quot;</pre>
<p>For example, this could happen during GlassFish startup. The solution is to fix <code>%JAVA_HOME%</code> environment variable, so it would point to correct Java installation location.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/05/21/java-lang-noclassdeffounderror-files/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

