Search Results

Search found 12 results on 1 pages for 'phmr'.

Page 1/1 | 1 

  • How to setup an hibernate project using annotations compliant with JPA2.0

    - by phmr
    I would like to setup an hibernate project, for this I use the lastest hibernate 3.5-Final. BTW my IDE is Netbeans. The problem is that each time a run the application, it seems to start from a fresh database whatever db backend I use (I tried hsqldb & sqlite): here is my persistence.xml <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="PMMPU" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>model.Extrait</class> <class>model.Mot</class> <class>model.Prefixe</class> <class>model.Suffixe</class> <class>model.Texte</class> <properties> <property name="hibernate.dialect" value="dialect.SQLiteDialect"/> <property name="hibernate.connection.username" value=""/> <property name="hibernate.connection.driver_class" value="org.sqlite.JDBC"/> <property name="hibernate.connection.password" value=""/> <property name="hibernate.connection.url" value="jdbc:sqlite:test.db"/> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/> <property name="hibernate.hbm2ddl.auto" value="update"/> </properties> </persistence-unit> </persistence> I tried to change hibernate.hbm2ddl.auto value. I got a HibernateUtil class which takes care of creating the emf & em: public class HibernateUtil { private static EntityManagerFactory emf = null; private static EntityManager em = null; public static EntityManagerFactory getEmf() { if(emf == null) emf = Persistence.createEntityManagerFactory("PMMPU"); return emf; } public static EntityManager getEm() { if(em == null) em = getEmf().createEntityManager(); return em; } What did a I do wrong ? edit1: further research with mysql lead me to think that the problem is related to sqlite & hsqldb interaction with hibernate 3.5

    Read the article

  • JPA 2.0, hiberante 3.5, jars & persistence.xml location

    - by phmr
    I'm building a desktop application using hibernate 3.5 & JPA 2.0. I have 2 jars, the lib, which defines every entity and DAO, packages looks like this : org.my.package.models org.my.package.models.dao org.my.package.models.utils In org.my.package.utils I defined my hibernate utility class for getting EM & EMF instances, which means the lib is bound to a Persistence Unit name but that's not a problem for now (anyway you can recommend me a better way to manage that) the second jars is built as follow: org.my.package.app META-INF is defined on the root of the project which means in my jar I can find this directories directly in the root: META-INF/ META-INF/persistence.xml org/ org/my/ ... org/my/package/app/Main.class META-INF/ When I run the app, hibernate doesn't managed to find persistence.xml it throws an exception something like "package or class for PersistenceUnitName not found". I googled a bit about the problem but I can't get the source code organisation right. Any help ?

    Read the article

  • HG takes too much time to push

    - by phmr
    I commited a lot of files locally (including binary files removing & adding...) and now when I try to push it takes a lot of time. Actually I messed up my local repo history. How could I avoid this mistake in the future ? Can I transform a set of local revision 1-2-3-4 to 1-2 with 2 being the final revision of the local clone ?

    Read the article

  • Is it possible to use ActiveObjects (or another ORM) with an embedded database & JWS technology ?

    - by phmr
    I would like to embed a database in my JWS application. As a matter of fact I have to use HSQL or SQLite. Hibernate may support (HSQL or SQLite, does it ?) but the workflow is rather complex for my application but maybe it's the way to go for my needs. In ActiveObjects database shoould be "linked" to by a path because of JDBC, but is it possible to specify a database that is inside a JAR and how ?

    Read the article

  • How could I embed a html/css/js view in a webstart application

    - by phmr
    I would like to use a html/css/js view in my webstart project without requesting all permissions. I figured out that I could use the java HTTPServer to process the requests but I need a way to avoid using real sockets, so that the HTTPServer instantiation doesn't ask for some permission. Do you know any projects that achieve that ? and if not, what should I do to get an HTTPServer completely working locally (without hitting boundaries...) ? edit: maybe an HTTPServer is too much, I maybe only need a HttpHandler..

    Read the article

  • what does mean "SQL Error: 30000, SQLState: XSAI3" ?

    - by phmr
    I'm using javadb/derbydb 10.5.3.0 with hibernate 3.5-Final I get this error at the end of EM initialisation : 4427 [SwingWorker-pool-1-thread-1] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 30000, SQLState: XSAI3 4427 [SwingWorker-pool-1-thread-1] ERROR org.hibernate.util.JDBCExceptionReporter - Feature not implemented. SQL Error 30000 doesn't seem to be documented http://developers.sun.com/docs/javadb/10.3.3.0/ref/ref-single.html#rrefexcept71493

    Read the article

  • Is possible to make sexy GUI with javaFX & swing ?

    - by phmr
    I would like to do a "sexy" / user-friendly / appealing GUI in java. Swing is a limited in terms of "skin" customisation. I'm thinking about JavaFX but I don't it yet, what can I achieve with this technology ? how hard is it ? do you have examples of real-life examples of Swing/JavaFX integration ? I would like to do something in this spirit of this, which is built on the .NET framework: original link: http://www.patrickpayet.com/net/?p=329

    Read the article

  • How to handle choice field with JPA 2, Hibernate 3.5

    - by phmr
    I have an entity with Integer attributes that looks like this in proto code: class MyEntity: String name Integer frequency Integer type def getFrequency() def getType() get* accessors return strings according to this table. value(type) HumanReadableString(type) 1 BSD 2 Apache 3 GPL min frequency max frequency HumanReadableString(frequency) 0 1000 rare 1000 2000 frequent 2001 3000 sexy It should be possible to get all possible values that an attribute can take, example: getChoices(MyEntity, "type") returns ("rare", "frequent", "sexy") It should be possible to get the bound value from the string: getValue(MyEntity, "frequency", "sexy") returns (2000,3000)

    Read the article

  • How do I permanently remove (obliterate) files from history?

    - by phmr
    I commited a lot of files locally (including binary files removing & adding...) and now when I try to push it takes a lot of time. Actually I messed up my local repo history. How could I avoid this mistake in the future ? Can I transform a set of local revision 1-2-3-4 to 1-2 with 2 being the final revision of the local clone ?

    Read the article

1