I'm working on a small REST application server and I'm trying to be able to save a Java bean using DataNucleus JDO with MySQL.
My only problem is that I can't find any examples of any application that uses DataNucleus JDO and is built using Gradle.
I'm new to using Java and I have essentially no idea how to go about doing this. At this moment I'm just considering going with Hibernate JPA instead but I feel like JDO would be better for me in the long run. I would really appreciate any help pointing me in the right direction.
I followed Adrian's solution I found here with a minor edit: I modified the task to depend on processResources instead of compileJava and made classes depend on datanucleusEnhance, otherwise it didn't work for me.
I would normally tell you the error I got but I couldn't see the enhancer's error output.
The solution essentially calls an ant task to enhance the classes instead of using Gradle only. It's not the most elegant but it worked.
Related
Has anyone done Stripe Integration using Kotlin? It would be great to see some documentation about the project structure and HTTP requests!
Main problem: I am unable to find the gradle dependency for Kotlin. Does something like that even exist?
*Note: I am not using Kotlin for Android so please don't try to answer with this link.
Kotlin inter-op with Java is almost perfect. For most companies it doesn't make sense to build an adapter layer which somehow make it easier to work with their product using Kotlin. There is really no need for it.
There is no specific library for Kotlin, just keep using Stripe-Java, you'll be fine.
If compatibility issues arise, you'll most likely be able to handle them by yourself, maybe by writing a (very) small portion of your codebase in Java, but that's a remote possibility.
And remember the GitHub issue tracker is there for a reason.
I'm trying to do some crawling with Nutch and I'd like to test out Cassandra as a backend, however using the latest version of nutch and its dependencies Cassandra throws a variety of errors as you move through the inject, generate, fetch, etc. process.
The errors are all related to actual problems in code, not out of memory or configuration. I've fixed some of them by modifying code within gora-cassandra, but it's still not functional.
My question is, does a working version of these 2 projects exist? By working i mean you can run through inject, generate, fech, parse, updatedb on at least a small set of urls, without error.
Here's an example of one of the classes giving an error during fetch:
java.lang.NullPointerException
at org.apache.gora.cassandra.query.CassandraSuperColumn.getUnionIndex
I have used HBase as the backend and that just works, although HBase itself is a monster to manage so that's why i'd like to test out Cassandra. However, i'm about to give up on this as I don't think I should be having to modify gora-cassandra code just to get a basic example to run.
Thanks
According to this link it's just broken, which is about 3 months old http://lucene.472066.n3.nabble.com/Re-user-Digest-3-Jun-2017-19-27-20-0000-Issue-2758-td4339060.html
Its unclear why backends that do not work are even documented.
HBase is most widely used, followed by MongoDB... on the other end of
the spectrum, Cassandra is least used and broken. It has not been
maintained for quite some time... and yes this is reflected by use of
Super Columns. We are currently re-writing the backend as part of a
GSoC project.
I would agree with the guy making the original statement, Its unclear why backends that do not work are even documented.
Really tired of this project and its lack usable documentation.
I would like to build out a set of triggers in my database using TransactionEventHandler() functionality.
However I haven't found a working example of this for version > 3.0. I did see an example by maxdemarzi however it doesn't appear to be working in recent versions of neo4j.
If anyone has any experience with this I would really appreciate the help!
Side Note: I do realize APOC has some alpha functinality around triggers using cypher. At the moment it isn't fully fledged and I have run into some issues using it. Thus I'm looking at implementing my own plugin to handle my particular use case.
After reaching out to maxdemarzi on github he has updated his example to support neo4j v 3.1.
See the repo here: https://github.com/maxdemarzi/neo_listens
I have found one eclipse plugin (DB Importer) for Hibernate, which helps to generate annotation based Java Entity classes direct from data base. So that we no need to write any annotation configuration for hibernate Entities.It works very fine.
The tool is available here
I would like to know
Is this tool is really used in industries?
Is there any disadvantages by using this tool?
I am asking these questions because, i did not find much information regarding this tool.
Please correct me if i am asking wrong.
If you simply want to generate entities from an existing database, I think you are much better off using the hibernate tools which are created and maintained by the Hibernate team (see the reverse engineering tool).
It's been a while since I've used it but from memory you can invoke the reverse engineering from ant/maven/gradle or you can install the jboss tools eclipse plugin and invoke from eclipse. I'm sure you can allso invoke from the command line.
I am trying to created a new java project. I have tried various examples available on the web but my project works sometimes and doesn't rest of the time. It seems that there happens some error which is not thrown when hibernate is doing a secondPassCompile() after creating factory.Can someone tell me a good resource to follow or give me some pointers on where I might be going wrong?
Is there any particular reason for using Tomcat? If you are trying to learn Eclipse with Hibernate as the JPA implementation, I would suggest you use JBoss as the app server. That way you can learn EJBs along the way if you prefer. If you want to learn just Eclipse and JPA there is no need to use any server - JPA can be practised just in JavaSE.
EDIT: Recently I had to create a simple JPA project. This is what I did: Create a new Java Project in eclipse. Download Hibernate 3.6.1 from http://www.hibernate.org/downloads. From the download directory take the Hibernate.jar and from the jpa directory take the one jar there. Take all the jars from lib\required. Add the above to your buildpath. Add logback jars - classic and core jars. For the database I used HSQLDB. Just one jar hsqldb.jar. Thats it! Enjoy JPA from here onwards.
I have found the slides at http://www.coreservlets.com/ very useful when trying to get up to date with EJB3/Hibernate and JSF. Complete and yet simple enough that you do not get ovewelmed by pages and pages of sample code. I wish they had something like that for MFC.
They have materials about Hibernate, I would definitely look at them.
About the JBoss issue, it is interesting if you plan to go into EJB3 later. It is not difficult to have a basic configuration working and, on top of that, it is based in Tomcat.
That said, if you are new to Hibernate, I would definitely test it first in JavaSE and then later go with it in a server (Tomcat or whatever).