While creating a jfreechart im getting following error and I am not sure whats the reason for it..any help??
Exception in thread "main" java.lang.NoSuchMethodError: org.jfree.ui.RectangleInsets.<init>(DDDD)V
at org.jfree.chart.axis.Axis.<clinit>(Axis.java:146)
at org.jfree.chart.StandardChartTheme.<init>(StandardChartTheme.java:227)
at org.jfree.chart.ChartFactory.<clinit>(ChartFactory.java:229)
at modules.images.Chart.createChart(Chart.java:67)
at modules.images.Chart.<init>(Chart.java:59)
at modules.images.Chart.main(Chart.java:506)
Make sure you have jcommon-1.0.0.jar (or a later version) on your classpath.
Related
I am fetching some problem when I trying to print Arabic letter by using DirectPrint bean. This is a pjc. English fonts are printed fine, but when I want to print Arabic there is showing a exception below:
Exception in thread "main" java.lang.RuntimeException: Not yet implemented
at org.pdfbox.pdmodel.font.PDType0Font.drawString(PDType0Font.java:75)
at org.pdfbox.pdfviewer.PageDrawer.showCharacter(PageDrawer.java:160)
at org.pdfbox.util.PDFStreamEngine.showString(PDFStreamEngine.java:409)
at org.pdfbox.util.operator.ShowTextGlyph.process(ShowTextGlyph.java:80)
at org.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:452)
at org.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:215)
at org.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:174)
at org.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:104)
at org.pdfbox.pdmodel.PDPage.print(PDPage.java:741)
at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1936)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1431)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1247)
at dsd.printing.DirectPrint.main(DirectPrint.java:842)
Please help to solve this issue.
Seems like the Arabic characters are not implemented to be converted by the pdfbox library you're using.
What version of PDFBox you are using? What I see from here:
Exception in thread "main" java.lang.RuntimeException: Not yet implemented
at org.pdfbox.pdmodel.font.PDType0Font.drawString(PDType0Font.java:75)
That it says PDType0Font class and drawString method straightly throws 'Not yet implemented' exception but i.e. if I check one of the latest version (i.e. 1.8.10) I can see the method implemented: here
If I would be I would try to change the version of pdfbox library and try again.
EDIT: Thanks to Tilman, latest version info from his comment: 2.0 has been released friday, it should be available for maven: mvnrepository.com/artifact/org.apache.pdfbox/pdfbox
Hi everyone I'm fairly new to biojava and trying to implement this piece of code:
AtomCache cache = new AtomCache();
cache.setPath("/tmp/");
FileParsingParameters params = cache.getFileParsingParams();
params.setLoadChemCompInfo(true);
StructureIO.setAtomCache(cache);
Structure strucuture = StructureIO.getStructure("4HHB");
after executing these lines im getting the following error message:
Exception in thread "main" java.lang.NoSuchFieldError: lineSplit
at org.biojava.bio.structure.align.util.UserConfiguration.(UserConfiguration.java:87)
at org.biojava.bio.structure.align.util.AtomCache.(AtomCache.java:115)
at protein_structure.main(protein_structure.java:27)
Java Result: 1
I cant figure out the reason for this error, I downloaded the pdb files for the proteins that Im working with (in this case "4HHB" in the /tmp/ directory but still the same error is showing up. can anyone tell me how Atomcache function works? Thanks
I am using JBoss-7.1.0 with JDK-7. I am getting the following stacktrace:
java.lang.ClassCastException: java.util.logging.LoggingProxyImpl cannot be cast to sun.util.logging.LoggingProxy
Can any one know solution to this exception?
https://access.redhat.com/site/discussions/792203
The solution was to add 'path name="sun/util/logging"/' to jboss\modules\system\layers\base\sun\jdk\main\module.
I'm trying to compile the following project: https://github.com/pplante/droidtowers
(the December 02 version, which is the last one that works). I managed to get all the dependencies etc and it compiles both under eclipse and IntelliJ-IDEA (which is the original project). However, when running under eclipse the following error appears at this line:
Array<GridObject> rooms = new Array<GridObject>(gameGrid.getInstancesOf(Room.class).items);
This crashes the game after a new game is started, past the Main Menu.
Now, I know that the Room class extends GridObject, and this runs fine under IntelliJ. I can't wrap my head around what can be the problem, or difference between both executables, so any help would be welcome. Maybe there's a default in the compiler overriden in the IDEA project? (I made the eclipse project from scratch).
This is using the latest Java, and android sdk.
ADDENDUM: Here's the full stacktrace:
ago 05, 2013 3:14:57 PM com.happydroids.platform.DesktopUncaughtExceptionHandler uncaughtException
SEVERE: Uncaught exception!
com.badlogic.gdx.utils.GdxRuntimeException: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.happydroids.droidtowers.entities.GridObject;
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:111)
Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.happydroids.droidtowers.entities.GridObject;
at com.happydroids.droidtowers.controllers.AvatarLayer.setupInitialAvatars(AvatarLayer.java:191)
at com.happydroids.droidtowers.scenes.TowerScene.create(TowerScene.java:145)
at com.happydroids.droidtowers.scenes.components.SceneManager.pushScene(SceneManager.java:39)
at com.happydroids.droidtowers.scenes.components.SceneManager.changeScene(SceneManager.java:26)
at com.happydroids.droidtowers.scenes.LoadTowerSplashScene.render(LoadTowerSplashScene.java:29)
at com.happydroids.droidtowers.DroidTowersGame.render(DroidTowersGame.java:216)
at com.happydroids.droidtowers.LwjglApplicationShim.render(LwjglApplicationShim.java:50)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:190)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:108)
com.badlogic.gdx.utils.GdxRuntimeException: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.happydroids.droidtowers.entities.GridObject;
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:111)
Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.happydroids.droidtowers.entities.GridObject;
at com.happydroids.droidtowers.controllers.AvatarLayer.setupInitialAvatars(AvatarLayer.java:191)
at com.happydroids.droidtowers.scenes.TowerScene.create(TowerScene.java:145)
at com.happydroids.droidtowers.scenes.components.SceneManager.pushScene(SceneManager.java:39)
at com.happydroids.droidtowers.scenes.components.SceneManager.changeScene(SceneManager.java:26)
at com.happydroids.droidtowers.scenes.LoadTowerSplashScene.render(LoadTowerSplashScene.java:29)
at com.happydroids.droidtowers.DroidTowersGame.render(DroidTowersGame.java:216)
at com.happydroids.droidtowers.LwjglApplicationShim.render(LwjglApplicationShim.java:50)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:190)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:108)
Well, can't say I "fixed" the error (apparently that's just the way generics work or something) but I removed ".items" and it worked, because it was redundant: it was basically taking a function that returns Array<GridObject>, it was converting it to an array GridObject[], then using a constructor to convert it back to a type Array<GridObject>.
The biggest mistery now is why IDEA didn't return an error at all. Could be some obscure compiler setting.
I found this java source code for a brick breaker game online. I downloaded it and tried to run it but it gives me a NullPointerException. What is giving this exception and how do I fix it? Thanks.
http://zetcode.com/tutorials/javagamestutorial/breakout/
Here is the stacktrace:
Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:181)
at Ball.<init>(Ball.java:16)
at Board.gameInit(Board.java:48)
at Board.addNotify(Board.java:43)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at java.awt.Container.addNotify(Container.java:2578)
at javax.swing.JComponent.addNotify(JComponent.java:4685)
at javax.swing.JRootPane.addNotify(JRootPane.java:739)
at java.awt.Container.addNotify(Container.java:2578)
at java.awt.Window.addNotify(Window.java:663)
at java.awt.Frame.addNotify(Frame.java:470)
at java.awt.Window.show(Window.java:859)
at java.awt.Component.show(Component.java:1584)
at java.awt.Component.setVisible(Component.java:1536)
at java.awt.Window.setVisible(Window.java:842)
at Breakout.<init>(Breakout.java:14)
at Breakout.main(Breakout.java:18)
Exception in thread "Timer-0" java.lang.NullPointerException
at Board$ScheduleTask.run(Board.java:110)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Apparently this code is supposed to work, but it isn't.
You probably didn't download the images as well, or at least didn't put them in the right folder. Make sure you put the images here:
Browse to Ball.java, go two folder levels up, create there a folder called images and put there your images.