I'm currently working on a Swing project that uses hsqldb 2.3 as an optional database...
This project has a map, and geotools also uses hsqldb, however it uses hsqldb 1.8.
I tried to put them both working together but I get this exception:
"Caused by: java.lang.ClassNotFoundException: org.hsqldb.jdbc.jdbcDataSource"
I checked the source code, and I believe the reason it happens is because on 2.3 the "jdbc" word is in upper case:
"org.hsqldb.jdbc.JDBCDataSource"
I don't know what to do from here. If I add both jars I will get a class conflict error.
Any suggestion is welcome....
It seems there are also some other dependencies on hsqldb 1.8. You can start by modifying GeoTools and changing references to the new class. The SQL statements in GeoTools scripts are generally compatible but some usage may need updating. You will find out if you get an error when the scripts are run.
https://github.com/geotools/geotools/tree/master/modules/plugin/epsg-hsql/src/main/java/org/geotools/referencing/factory/epsg
Note there is some use of CREATE ALIAS in source code which may be redundant and can be removed.
See the resources directory in the same source tree for the SQL.
Related
I am using LibGDX 1.9.8 and attempting to add ParticleEffects made with the ParticleEditor.
I try to load a new effect with:
torchFX.load(Gdx.files.internal("effects/torch.p"), Gdx.files.internal("effects"));
But I am getting the below error
Exception in thread "LWJGL Application" java.lang.RuntimeException: Error parsing emitter: torch
at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:1160)
at com.badlogic.gdx.graphics.g2d.ParticleEmitter.<init>(ParticleEmitter.java:103)
at com.badlogic.gdx.graphics.g2d.ParticleEffect.newEmitter(ParticleEffect.java:227)
at com.badlogic.gdx.graphics.g2d.ParticleEffect.loadEmitters(ParticleEffect.java:173)
at com.badlogic.gdx.graphics.g2d.ParticleEffect.load(ParticleEffect.java:153)
at com.bbg.dc.AssetLoader.getTorchFX(AssetLoader.java:92)
at com.bbg.dc.scenes.GameScene.setupMap(GameScene.java:202)
at com.bbg.dc.scenes.GameScene.switchMap(GameScene.java:159)
at com.bbg.dc.scenes.GameScene.start(GameScene.java:139)
at com.bbg.dc.DCGame.changeScene(DCGame.java:160)
at com.bbg.dc.scenes.MainMenu.buttonPressed(MainMenu.java:33)
at com.bbg.dc.iface.Button.update(Button.java:98)
at com.bbg.dc.iface.Scene.update(Scene.java:180)
at com.bbg.dc.scenes.MainMenu.update(MainMenu.java:49)
at com.bbg.dc.DCGame.render(DCGame.java:129)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
Caused by: java.lang.IllegalArgumentException: No enum constant com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape.false
at java.lang.Enum.valueOf(Enum.java:238)
at com.badlogic.gdx.graphics.g2d.ParticleEmitter$SpawnShape.valueOf(ParticleEmitter.java:1637)
at com.badlogic.gdx.graphics.g2d.ParticleEmitter$SpawnShapeValue.load(ParticleEmitter.java:1622)
at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:1107)
... 16 more
I have already made sure to have the particle.png in the effects directory. I have tried it with my own custom particle effect as well as the ParticleEditor default. I have tried altering the SpawnShape to no avail. I have been coming to SO for answers for years and this is the first problem I couldn't solve by searching. I have also just updated all my jars to latest 1.9.8 and latest version of ParticleEditor. Any ideas?
I solved this by running ParticleEditor from the same gdx-tools.jar as my project uses. I assumed the runnable jar in the runnables folder in the libgdx repo was identical, but it is not. You must use the same tools.jar for both.
I had a very similar issue, looking at an older file which worked and a newer file I noticed there were a number of entries in the newer one which was not present in the working file.
Namely the line;
independent: false
Deleting all instances on this seemed to do the trick for me.
I assume it's an updated feature not present in the current stable version of libgdx (1.9.8 at the time of writing). It may be available in the nightly version.
Looks like a property that's been added to the tweens on each individual property.
It would be useful if the older builds of the tools were more easily accessible.
I'm working with a struts 2.3.4.1 and am using the struts2-jasperreports-plugin to display a pre-compiled report. Fonts have been giving me issues, which I found was supposedly fixed in Jasperreports 6 (specifically issues with Calibri). Because I'm on a legacy system running java 6, the last version I can use is 6.2.2. But when I try to display my report, I get java.lang.NoSuchMethodError: net.sf.jasperreports.engine.util.JRLoader.loadObject(Ljava/lang/String;)Ljava/lang/Object;
org.apache.struts2.views.jasperreports.JasperReportsResult.doExecute(JasperReportsResult.java:323), which seems to be a function called by the struts2-jasperreports-plugin that doesn't exist in jasperreports 6+. I've been looking around, but cannot find out if/how to change this behavior and am beginning to think that I need to update the version of my plugin.
Is there a way to change the function called by the plugin, or am I going to need to change the version of struts to get the behavior I expect? Is it possible to write an adapter for a plugin?
After some more troubleshooting, I found https://stackoverflow.com/a/37864625/892327 in which an adapter was made using existing code, which I got from https://web.archive.org/web/20180523111530/http://grepcode.com/file/repo1.maven.org/maven2/net.sf.jasperreports/jasperreports/6.1.0/net/sf/jasperreports/engine/util/JRLoader.java/, and added the missing loadObject(String fileName) function as an adapter for the loadFromFile(String fileName). Which cleared the NoSuchMethodError.
However, the original issue java.lang.ArrayIndexOutOfBoundsException: 0 sun.font.ExtendedTextSourceLabel.createCharinfo(ExtendedTextSourceLabel.java:592 returned, which was "fixed" by changing the version of Java I was running, found at Error generating JasperReport in Development mode.
Because I'm working with a legacy system that runs on Java 6, I've given up since the original issue is JRE based and not a bad Jasperreports library or struts plugin.
I am currently trying to run the following project (https://github.com/ilija139/PDTB-Parser). The text file I used to run the project, is the wsj_2300.txt, which can be found in the "output" directory. Unfortunately without any success. The project is based on the Stanford CoreNLP. What I found out until now:
I can't use CoreNLP version 3.5.2 (the latest version) due to the fact, that the project is based on the older dependencies. By using Universal Dependencies, I get the following error message "No head rule defined for MWE using class edu.stanford.nlp.trees.SemanticHeadFinder in (MWE (JJ such) (IN as))". However, the following answer from Stackowerflow (PrintTree - No head rule defined for MWE - Bug with version 3.5.2) about the same problem could not solve the problem! If anyone knows how to fix it, please let me know.
Nevertheless, due to the fact, that the PDTB parser was last updated 1 year ago, I simply used 2 older versions (3.5.1 and then 3.4.1), expecting that the project run as said by Thematrixme (PrintTree - No head rule defined for MWE - Bug with version 3.5.2). Unfortunately, only the first problem was solved and another one appeared. A simple "String index out of range: -1 ()" in the function "buildDependencyTrees" due to the fact, that no "root" could be found in the dependencies.
I tried to fix the problem by simply excluding that the node is build, but then I get an "indexOutOfBoundsException" at the next dependency, because no child could be found... Does anyone know what I need to do or which CoreNLP version/model I need to use to let this program run correctly as mentioned in the Manual?
Thank you very much
I am not sure how you are using the parser. But you can get Stanford CoreNLP 3.5.2 to create the older Stanford Dependencies by setting "parse.originalDependencies" to "true" in the Properties object you use to make a pipeline. Or if you're running from the command line just include the flag "-parse.originalDependencies" If you're using the neural net dependency parse you would use the Stanford Dependencies model instead by setting the property "depparse.model" to "edu/stanford/nlp/models/parser/nndep/english_SD.gz"
If you let me know how specifically you are creating parses I can tell you exactly what setting to use to get the older dependencies.
I m developing a plugin in Eclipse using Java , as plugin requirement I need to retrieve database table values in to my java class(Presently I m using SQL Server2008 database). I also added the jtds1.2.5.jar in libraries , still I m not able to get the results
can any one help me
Thanks in advance
The plug-in's classpath must be specified using the MANIFEST.MF file, whether that means a .jar file you're including in the plug-in or other plug-ins you depend upon. If NoClassDefFoundErrors are not why you can't get your JDBC results, it would help to give more information on the errors you're encountering.
im following the zentask tutorial and wrote a junit test,
the test wont run from the eclipse IDE its giving the following exception
javax.persistence.PersistenceException: java.lang.IllegalStateException: Class [class play.db.ebean.Model] is enhanced and [class models.User] is not - (you can not mix!!)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.setEntityBeanClass(BeanDescriptorManager.java:1475)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.createByteCode(BeanDescriptorManager.java:1138)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.readDeployAssociations(BeanDescriptorManager.java:1058)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.readEntityDeploymentAssociations(BeanDescriptorManager.java:565)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.deploy(BeanDescriptorManager.java:252)
at com.avaje.ebeaninternal.server.core.InternalConfiguration.<init>(InternalConfiguration.java:124)
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:210)
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:64)
I read a bit and found that for some people
editing the buils.scala adding the following line inside main helped : ebeanEnabled := true
to me it didnt nither closeing the ide running play clean compile
any ideas???
There is blog post about setting up unit tests to run in IDEs. It suggests to add following command-line to java used when running tests:
-javaagent:/path/to/ebean/ebean-2.7.3-agent.jar
Seems that Play not ships with ebean agent, it should be downloaded from Ebean website first (in main ebean package).
I not tried it.
Ebean user guide also mentions it (15.5.2 javaagent section), there is even example for configuring Eclipse.
Also, to speed up enhancement maybe this will be better:
-javaagent:/path/to/ebean/ebean-2.7.3-agent.jar;packages=models.*
So it will only look into models.* (default package for ORM models in Play).
You can use the Avaje Ebean Eclipse Plugin:
http://www.avaje.org/eclipseupdate/site.xml
After the installation, activate Ebean enhancement by right clicking on your project and selecting Enable Ebean Enhancement.
i got this error when i tried to remove the public modifier from the declaration of one of classes extending Model.
i was using a model to make a "through" table (a many to many relationship with additional information), so protected access makes sense. perhaps there's another way to do this, but the play javadoc is pretty sparse.