Posts

Featured post

jsf - p:dataExporter throws java.lang.NoClassDefFoundError: com/lowagie/text/phrase -

i tried use data exporter control of primefaces 3.2. following code: <p:commandlink value="export" ajax="false"> <p:dataexporter type="xls" target="dtable" filename="myfile" /> </p:commandlink> <p:datatable id="dtable" ........../> when click on export link, following error: java.lang.noclassdeffounderror: com/lowagie/text/phrase i downloaded itext jar 5.2.1 , included in application, still same error. how solve it? try itext 2.1.7 not 5.2.1. http://olex.openlogic.com/packages/itext/2.1.7 i think there licence conflicts. primefaces uses 2.1.7 for excel export need apache poi. try 3.7: http://archive.apache.org/dist/poi/release/bin/ edit (you need poi-3.7*.jar , poi-ooxml-3.7*.jar )

Why won't my image display in my Java Applet? -

when use following code: public void paint(graphics g){ //displays version number , name. g.setfont(new font("courier", font.plain, 10)); g.drawstring("dcoder " + execute.execute.version, 2, 10); //displays logo in center. g.drawimage(logo, centeralign(logo.getwidth(null)), 50, this); } private int width(){ //gets , returns width of applet. int width = getsize().width; return width; } private int height(){ //gets , returns height of applet. int height = getsize().height; return height; } private int centeralign(int obwidth){ int align = (width()-obwidth)/2; return align; } in java applet, image not display until call repaint() (by resizing applet viewer window)? why won't image display? an asynchronous loaded image has handled thus. logo.getwidth(this); // indicate asynchronous imageobserver ... @override public boolean imageupdate(image img, int infoflags, ...

parsing - In perl, how to loop through file, parse line and then compare all values of the line? -

i'm new perl , trying figure out how parse lines within tab-delimited file , compare values parsed lines value , print line. for example: want print out lines have numbers greater 3. a 2.4 6.9 3.1 b 10.2 3.4 7.6 c 1.9 2.6 2.3 i output b 10.2 3.4 7.6 because b line numbers greater 3 thanks in advance use text::csv cpan module parse tab-separated file array of arrays loop on records. each record check if fields 1,2, , 3 bigger threshold value. 3 fields, use simple "if", large # of fields, use grep if fields bigger, print record stdout

java - stack overflow exception on xml transformation -

i getting following java stackoverflow error on xml transformation in weblogic server 10g hosted in sun solaris . happens particular xml tranformation , rest xml transformation works fine. xsl file used not big. i using transformation api available in rt.jar getting error xalan apache package( com.sun.org.apache.xalan.internal.xsltc.dom.simpleresulttreeimpl ) havent packaged in application. another interesting thing didnt exception when run application in weblogic 10g server hosted in windows machine, in sun solaris. can let me know why error. can let me know jar file causing exception ? weblogic have xalan.jar ? if can try upgrade jar file , see if working ? caused by: java.lang.stackoverflowerror @ com.sun.org.apache.xalan.internal.xsltc.dom.simpleresulttreeimpl.characters(simpleresulttreeimpl.java) @ com.sun.org.apache.xalan.internal.xsltc.dom.simpleresulttreeimpl.copy(simpleresulttreeimpl.java:438) @ com.sun.org.apache.xalan.internal.xsltc.runt...

java - JavaFX 2.1 and threads? -or- Ending a JavaFX application gracefully? -

i wanted simple way play mp3 file java application. after research found newest versions of java 7 se packaged javafx, thought try. question not playing mp3 files, getting javafx work in well-behaved way. so, in first experiment javafx, used code suggested in post stackoverflow ( see here ) , created, essentially, following test program: import javafx.application.application; import javafx.stage.stage; import javafx.scene.media.media; import javafx.scene.media.mediaplayer; public class progtest extends application { /*---------------------------------------------------------*\ function: main() \*---------------------------------------------------------*/ public static void main(string args[]) { launch(args); } /* end: main() */ /*---------------------------------------------------------*\ function: start() \*---------------------------------------------------------*/ @override public void start(stage stage) ...

c# - Connection string hidden somewhere? -

i have 2 databases on 1 machine has 2 different sites running on iis. lets call them site1 & site2 , db1 & db2. second site , bd copys of first one. site2 connects db2 , seems work nice when took offline db1 stoped working wierd since data created using site2 in db2. in fact of site works except 1 method we use entity framework access database , when trace code looks ok, somehow doesn't work. in our auto-generated code entity framework traced connectiong string , outcome correct initial catalog=db2; but in next line have code return ((iobjectcontextadapter) this).objectcontext.executefunction<t_reference_data>( "getreferencedata", groupnameparameter); and inner exception says: database 'db1' cannot opened because offline. all other methods seem use correct database except one. can't figure out db1 configured or hardcoded the problem (as usual) stupid hell. of guys defined db on stored procedures. when...

AttributeError: ZipFile instance has no attribute 'open' in python 2.4 -

storefile(ftpcon, file, archive.open('nonvol/'+file)) gives me attributeerror: zipfile instance has no attribute open but when change .open .read (since open() not available in 2.4) get: attributeerror: str object has no attribute read in: ftpcon.storbinary('stor ' + filename.strip(), file)