<?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>kopf.lastig &#187; Softwarentwicklung</title>
	<atom:link href="http://www.epischel.de/wordpress/tag/softwarentwicklung/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.epischel.de/wordpress</link>
	<description>Alles mögliche zu Themen wie Familie, Beruf, Medien etc. ...</description>
	<lastBuildDate>Thu, 19 Aug 2010 11:18:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Einfache Konstruktoren</title>
		<link>http://www.epischel.de/wordpress/2009/09/einfache-konstruktoren/</link>
		<comments>http://www.epischel.de/wordpress/2009/09/einfache-konstruktoren/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 11:52:04 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Softwarentwicklung]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=81</guid>
		<description><![CDATA[Gespräch mit Kollege: Gegeben Klasse A und Klasse B extends A und ich rufe im Konstruktor von A eine Methode auf, die in B überschrieben wird und die dort auf eine in B definierte Variable zugreift, dann ist diese Variable zum Zeitpunkt des Aufrufs nicht initialisiert. Das stimmt. Wozu brauchst Du das? Klasse Gruppenbaum, im [...]]]></description>
			<content:encoded><![CDATA[<p>Gespräch mit Kollege:<br />
Gegeben Klasse A und Klasse B extends A und ich rufe im Konstruktor von A eine Methode auf, die in B überschrieben wird und die dort auf eine in B definierte Variable zugreift, dann ist diese Variable zum Zeitpunkt des Aufrufs nicht initialisiert. <a href="http://www.javaworld.com/javaworld/jw-03-1998/jw-03-initialization.html?page=5">Das stimmt.</a></p>
<p>Wozu brauchst Du das?<br />
Klasse Gruppenbaum, im Konstruktor lese ich Baum aus DB.<br />
Na das ist ja nicht so gut. Konstruktoren sollten ihr Objekt in einen definierten Zustand bringen, mehr aber auch nicht. <a href="http://www.javaworld.com/javaworld/jw-03-1998/jw-03-techniques.html?page=5">Wurde schon vor langer Zeit beschrieben.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2009/09/einfache-konstruktoren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Fehlermeldung: &#8220;Too many open cursors&#8221;</title>
		<link>http://www.epischel.de/wordpress/2009/09/oracle-fehlermeldung-too-many-open-cursors/</link>
		<comments>http://www.epischel.de/wordpress/2009/09/oracle-fehlermeldung-too-many-open-cursors/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 11:47:36 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Datenbank]]></category>
		<category><![CDATA[Softwarentwicklung]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=85</guid>
		<description><![CDATA[Letztens haben wir nach Hardware- und JDBC-Treiber-Wechsel folgende Fehlermeldung bekommen: ORA-01000: too many open cursors (oder auf deutsch: maximale anzahl offener cursor überschritten) Tatsächlich gab es noch 2 Statements im Application-Server, bei das Statement nicht geschlossen wurde. Man findet die betreffenden Statements mit folgendem SQL: PLAIN TEXT SQL: &#160; SELECT &#160; &#160; &#160; &#160; c.sid, [...]]]></description>
			<content:encoded><![CDATA[<p>Letztens haben wir nach Hardware- und JDBC-Treiber-Wechsel folgende Fehlermeldung bekommen:</p>
<p>ORA-01000: too many open cursors (oder auf deutsch: maximale anzahl offener cursor überschritten)</p>
<p>Tatsächlich gab es noch 2 Statements im Application-Server, bei das Statement nicht geschlossen wurde. Man findet die betreffenden Statements mit folgendem SQL:</p>
<div class="igBar"><a href="javascript:showCodeTxt('sql-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">SQL:</span>
<div id="sql-2">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SELECT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; c.sid,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; c.address,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; c.hash_value,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; COUNT<span style="color:#006600; font-weight:bold;">&#40;</span>*<span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">"Cursor Copies"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">FROM</span>&nbsp; &nbsp; v$open_cursor c</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; c.sid,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; c.address,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; c.hash_value</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">HAVING</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; count<span style="color:#006600; font-weight:bold;">&#40;</span>*<span style="color:#006600; font-weight:bold;">&#41;</span> &gt; <span style="color:#800000;">2</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;">3</span> <span style="color: #993333; font-weight: bold;">DESC</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Unter Umständen kann man im Live-System beobachten, wie die Anzahl der offenen Cursor wächst.</p>
<p>Offensichtlich hat uns der vorherige JDBC-Treiber das nicht-Schliessen des Statements vergeben.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2009/09/oracle-fehlermeldung-too-many-open-cursors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finalizer in Java: lieber Finger weg!</title>
		<link>http://www.epischel.de/wordpress/2008/09/finalizer-in-java-lieber-finger-weg/</link>
		<comments>http://www.epischel.de/wordpress/2008/09/finalizer-in-java-lieber-finger-weg/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 16:07:18 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Softwarentwicklung]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=72</guid>
		<description><![CDATA[Laut Java-Spezifikation werden Finalizer in Java aufgerufen, bevor das entsprechende Objekt durch den Garbage Collector aus dem Speicher entfernt wird. Das klingt erst mal verlockend - hier könnte man ja automatische das Freigeben von Resourcen unterbringen. Aber! Es wird nicht garantiert, wann der Finalizer aufgerufen wird. Die freizugebenden Resourcen sind solange blockiert. Schlimmer kommt es [...]]]></description>
			<content:encoded><![CDATA[<p>Laut Java-Spezifikation werden Finalizer in Java aufgerufen, bevor das entsprechende Objekt durch den Garbage Collector aus dem Speicher entfernt wird. Das klingt erst mal verlockend - hier könnte man ja automatische das Freigeben von Resourcen unterbringen.</p>
<p><strong>Aber!</strong> Es wird nicht garantiert, wann der Finalizer aufgerufen wird. Die freizugebenden Resourcen sind solange blockiert. Schlimmer kommt es noch, wenn ein Finalizer ungewöhnlich lange für die Verarbeitung benötigt. Dann können die Resourcen, die die Objekte der anderen anstehenden Finalizer halten, nicht freigegeben werden. Dies kann zu Out-of-Filehandles oder zu Out-of-Memory-Fehlern führen, wenn die Entwickler sich auf die zeitnahe Abarbeitung von Finalizern verlassen.</p>
<p>Dies ist uns letztens passiert: Unsere Anwendung beendet sich nachweisbar nach einigen hundert Webservice-Aufrufen. Ergebnis der Problemanalyse: Ein Objekt einer Klasse des Oracle IAS scheint den Finalizer-Warteschlange zu blockieren, somit werden Objekte aus dem AXIS-(1.0)-Framework nicht finalisiert, die jedoch Referenzen auf speicherfressende DOM-Objektbäume halten. Diese DOM-Objektbäume können dadurch nicht garbage-collected werden, sammeln sich an und schliesslich kommt der Out-of-Memory-Fehler. Im generierten Webservice-Stub-Code haben wir manuell den Aufruf an den Finalizer (genauer: an die dispose-Methode) eingefügt und siehe da, dass Problem ist beseitigt.</p>
<p>An einer anderen Stelle (ebenfalls AXIS) sind wir vor 1-2 Jahren in ein ähnliches Problem gelaufen, da ging es jedoch um FileHandles oder Netzwerk-Ports. Auch da half manuelles freigeben der Resourcen.</p>
<p><strong>Fazit</strong>: Es ist besser, die Resourcen von Hand freizugeben. "Zur Sicherheit" mag man noch einen Finalizer schreiben, aber wenn dieser wiederum die Finalize-Warteschlange blockieren könnte (etwa weil auf ein Netzwerk-Timeout gewartet wird), dann sollte man auch davon die Finger lassen.</p>
<p>Tools zum Analysieren von Memory-Dumps:</p>
<ul>
<li><a href="http://www.google.de/search?hl=de&amp;q=sap+%22memory+analyzer%22">SAP Memory-Analyzer</a></li>
<li><a href="http://www.alphaworks.ibm.com/tech/heapanalyzer">IBM HeapAnalyzer</a></li>
<li><a href="http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXJAVAHOME">HP JMeter</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2008/09/finalizer-in-java-lieber-finger-weg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting &#8211; J2EE und Filesystem voll</title>
		<link>http://www.epischel.de/wordpress/2006/12/troubleshooting-j2ee-und-filesystem-voll/</link>
		<comments>http://www.epischel.de/wordpress/2006/12/troubleshooting-j2ee-und-filesystem-voll/#comments</comments>
		<pubDate>Fri, 08 Dec 2006 16:31:16 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Softwarentwicklung]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=61</guid>
		<description><![CDATA[Wir hatten folgendes Problem. Symptom: Manchmal wurden Bilder nicht geladen, Manchmal gab es Fehlermeldungen am Anfang oder Ende einer Seite. Umgebung: J2EE-Anwendung auf Oracle IAS 9.0.4 (2 OC4J-instanzen) unter Sun Java VM 1.4.2 auf HP-UX, 8 Prozessor-Maschine, als Entwicklungsumgebung. Analyse: vmstat sagt: ca. 35-40 Prozesse laufen ständig, Anteil user 15%, Anteil sys 85%, idle 0%. [...]]]></description>
			<content:encoded><![CDATA[<p>Wir hatten folgendes Problem.</p>
<p>Symptom: Manchmal wurden Bilder nicht geladen, Manchmal gab es Fehlermeldungen am Anfang oder Ende einer Seite.</p>
<p>Umgebung: J2EE-Anwendung auf Oracle IAS 9.0.4 (2 OC4J-instanzen) unter Sun Java VM 1.4.2 auf HP-UX, 8 Prozessor-Maschine, als Entwicklungsumgebung.</p>
<p>Analyse:</p>
<ol>
<li>vmstat sagt: ca. 35-40 Prozesse laufen ständig, Anteil user 15%, Anteil sys 85%, idle 0%. Memory ist nicht knapp, Paging kaum</li>
<li>top sagt: eine oc4j-Instanz verursacht die prozessorlast</li>
<li>die log-files sind leer! (0 bytes)</li>
<li>jvm-stacktrace ergibt keine weiteren auffälligkeiten (kein anwendungscode im stacktrace, mostly waits oder Input/outputs)</li>
</ol>
<p>Wir spielen das vorletzte build ein, welches am tag zuvor noch gelaufen ist.</p>
<p>Analyse:</p>
<ol>
<li>redeploy sehr langsam</li>
<li>symptom und analyseergebnisse bleiben gleich</li>
</ol>
<p>Wir rufen beim betrieb an.</p>
<p>Ergebnis: Filesystem voll!</p>
<p>nachdem der betrieb das problem behoben hatte, lief die anwendung (nach dem redeploy der aktuellen version) wieder normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2006/12/troubleshooting-j2ee-und-filesystem-voll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How a firewall can break your app</title>
		<link>http://www.epischel.de/wordpress/2006/03/how-a-firewall-can-break-your-app/</link>
		<comments>http://www.epischel.de/wordpress/2006/03/how-a-firewall-can-break-your-app/#comments</comments>
		<pubDate>Fri, 03 Mar 2006 10:45:25 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Softwarentwicklung]]></category>

		<guid isPermaLink="false">http://www.epischel.de/wordpress/?p=45</guid>
		<description><![CDATA[Picture this: after we had moved an old app from an old server to a new one, we kept getting "I/O Exception: Broken Pipe" now and then from our database connections. In the new environment, database lives on a different server than our app (as opposed to the old environment). Is there something wrong with [...]]]></description>
			<content:encoded><![CDATA[<p>Picture this: after we had moved an old app from an old server to a new one, we kept getting "I/O Exception: Broken Pipe" now and then from our database connections. In the new environment, database lives on a different server than our app (as opposed to the old environment). Is there something wrong with the network?</p>
<p>My suspects turned out right: it's the firewall between app and database. It drops "unused" tcp connections after an hour. For some security reasons, this cannot be changed.</p>
<p>As our apps is rather old, some parts of it still do not use a connection pool and so there are db connnections that "linger" around unused for an hour and are used thereafter - bang, I/O exception.</p>
<p>So watch out for that and use a connection pool. Possibly one that can shrink (i.e. throw away unused connections).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epischel.de/wordpress/2006/03/how-a-firewall-can-break-your-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
