Netbeans Error Package Javax.persistence Does Not Exist
Contents |
-> Java EE Users View previous topic ::
Package Javax.persistence Does Not Exist Intellij
View next topic Author Message KhaozJoined: 01 Sep 2008Posts: 8
Package Javax.persistence Does Not Exist Play Framework
Posted: Tue Oct 07, 2008 1:29 am Post subject: javaee tutorial: i'm stuck! I'm trygin to do the steps
Package Javax.persistence Does Not Exist Ant
described here: http://java.sun.com/javaee/5/docs/tutorial/doc/bnaff.html To deploy the bookstore1 application, but: Code: init: deps-module-jar: init: deps-jar: Compiling 11 source files to /home/khaoz/projetos/java/javaeetutorial5/examples/web/bookstore/build/classes /home/khaoz/projetos/java/javaeetutorial5/examples/web/bookstore/src/com/sun/bookstore/database/Book.java:13: package javax.persistence does not exist import javax.persistence.Entity; /home/khaoz/projetos/java/javaeetutorial5/examples/web/bookstore/src/com/sun/bookstore/database/Book.java:14: package javax.persistence does not exist import javax.persistence.Id; /home/khaoz/projetos/java/javaeetutorial5/examples/web/bookstore/src/com/sun/bookstore/database/Book.java:15: package javax.persistence package javax.persistence does not exist eclipse does not exist import javax.persistence.Table; /home/khaoz/projetos/java/javaeetutorial5/examples/web/bookstore/src/com/sun/bookstore/database/Book.java:18: cannot find symbol symbol: class Entity @Entity /home/khaoz/projetos/java/javaeetutorial5/examples/web/bookstore/src/com/sun/bookstore/database/Book.java:19: cannot find symbol symbol: class Table @Table(name = "WEB_BOOKSTORE_BOOKS") /home/khaoz/projetos/java/javaeetutorial5/examples/web/bookstore/src/com/sun/bookstore/database/Book.java:55: cannot find symbol symbol : class Id location: class com.sun.bookstore.database.Book @Id 6 errors BUILD FAILED (total time: 0 seconds) You will say that i'm need to add TopLink essentianls. I have made this without success. Under Libraries in bookstore1 project i have: bookstore - dist/bookstore.jar JDK 1.6 (Default) GlassFish V2 Under GlassFish V2 a javaee.jar exists wich also contains a javax.persistence package. Back to top KhaozJoined: 01 Sep 2008Posts: 8 Posted: Tue Oct 07, 2008 2:27 am Post subject: If i use ant && ant deploy Everyth
here for a quick overview of the site Help Center Detailed answers to javax.persistence jar file any questions you might have Meta Discuss the workings and package org.hibernate.annotations does not exist policies of this site About Us Learn more about Stack Overflow the company Business Learn more package javax.persistence does not exist maven dependency about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community http://forums.netbeans.org/topic3026.html Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up playframework - package javax.persistence does not exist up vote 2 down vote favorite I have Issue with using database I was going with this tutorial http://vimeo.com/58969923# (one http://stackoverflow.com/questions/20426271/playframework-package-javax-persistence-does-not-exist from playframework.com page) in the model: play-2.2.1/jcirs/app/models/MedicalIncident.java public class MedicalIncident extends Model{} I am trying to use Entity. For that I have to import: javax.persistence.* and play.db.ebean.* but none of them can be found. The error is package javax.persistence does not exist What should I do? Use any other database engine? Or should download some dependency. I would like to go with playframework best way. Please help. My configuration application.conf: db.default.driver=org.h2.Driver db.default.url="jdbc:h2:mem:play" ebean.default="models.*" stack trace: [jcirs] $ run 8081 --- (Running the application from SBT, auto-reloading is enabled) --- [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:8081 (Server started, use Ctrl+D to stop and go back to the console...) [info] Compiling 5 Scala sources and 5 Java sources to /home/daniel/play-2.2.1/jcirs/target/scala-2.10/classes... [error] /home/daniel/play-2.2.1/jcirs/app/models/MedicalIncident.java:4: error: package javax.persistence does not exist [error] import javax.persistence.*; [error] ^ [error] /home/daniel/play-2.2.1/jcirs/app/models/MedicalIncident.java:6: error: package play.db.ebean does not exist [error] import play.db.ebean.*; [error] ^ [error] /home/daniel/play-2.2.1/jcirs/app/models/MedicalIncident.java:14: error: cannot find symbol
search in one of my setsExclude this search from one of my sets http://markmail.org/message/27e7vigvu4wqsy33 11 messages in org.netbeans.nbusersRe: Solved! [nbusers] Package javax....FromSent OnAttachmentsFranklin https://coderanch.com/t/163599/java-EJB-OCEEJBD/certification/Cabin-java-package-javax-persistence PhanJul 26, 2007 10:39 pm Alex Lam S.L.Jul 26, 2007 10:48 pm Wade ChandlerJul 26, 2007 11:21 pm Franklin PhanJul 27, 2007 12:50 am Franklin PhanJul 27, 2007 10:12 am Wade ChandlerJul 27, 2007 11:10 am Wade ChandlerJul 27, 2007 11:38 am Franklin PhanJul 27, 2007 9:46 does not pm HandyGeekJul 27, 2007 9:59 pm.jpgHandyGeekJul 28, 2007 9:18 am TadFrysingerAug 2, 2007 2:43 pm Subject:Re: Solved! [nbusers] Package javax.persistence does not existFrom:HandyGeek (thom...@comcast.net)Date:Jul 28, 2007 9:18:51 amList:org.netbeans.nbusersSolved! In a previous email from Oddvard Myrnes where I asked this same issue he wrote (thanks Oddvard!): The JPA libraries are in the oracle toplink package. does not exist The way you add them is to do this: 1. File -> New File -> Persistence -> New Persistence UNIT 2. Follow the Wizard; make note that you select the Create option for the PU. 3. The system then adds the library for you. HandyGeek wrote: I am working through the JPA example: https://glassfish.dev.java.net/javaee5/persistence/persistence-example.html#merge_and_remove - I cannot resolve the missing javax.persistence package. The jar files exist as they are included in the example code. I have googled for the last 5 hours and with bloodshot eyes and a headache, it is time for me to ask the experts. I attached a screen shot of my NB6M10 screen for clarity, if needed. Thanks in advance! David ------------------------------------------------------------------------ Thu 19:42:53 | cache-2.a | 0.08 seconds | © 2007-2014 MarkLogic Corporation. All rights reserved. Home | Browse | FAQ | Advertising | Blog | Feedback | MarkMail™ Legalese | About MarkLogic Server
Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: EJB Certification (OCEEJBD) Help ...Cabin.java:3: package javax.persistence does not exist Meherdad Bomanbehram Ranch Hand Posts: 142 I like... posted 8 years ago Hi all , I am using notepad to create my .java files so that I get through practice . I compile using the cmd prompt . the server I use is glassfish . The example I am trying out are from the Enterprise JavaBeans 3.0 5th edition by O'Reilly. the source code is as below package com.titan.domain; import javax.persistence.*; @Entity @Table(name="CABIN") public class Cabin implements java.io.Serializable { private int id; private String name; private int deckLevel; private int shipId; private int bedCount; @Id @Column(name="ID") public int getId(){return id;} public void setId(int pk){id = pk;} @Column(name="NAME") public String getName() {return name;} public void setName(String str){name=str;} } I tried to compile with javac -d . Cabin.java the Errors I got were Cabin.java:3: package javax.persistence does not exist import javax.persistence.*; ^ Cabin.java:5: cannot find symbol symbol: class Entity @Entity ^ Cabin.java:6: cannot find symbol symbol: class Table @Table(name="CABIN") ^ Cabin.java:15: cannot find symbol symbol : class Id location: class com.titan.domain.Cabin @Id ^ Cabin.java:16: cannot find symbol symbol : class Column location: class com.titan.domain.Cabin @Column(name="ID") ^ Cabin.java:20: cannot find symbol symbol : class Column location: class com.titan.domain.Cabin @Column(name="NAME") ^ 6 errors Please could some one guide m as to what i should do . I do not want to use an IDE like netbeans / Eclipse as I want to practice what goes where . Many Thanks Dinuka Arsakularatne Ranch Hand Posts: 198 posted 8 years ago you need to include all the jar files that comes with your app server into your classpath enviroment variable if who i am is what i have, and what i have is lost, then who am i?
SCJP 5.0
SCWCD 1.4
SCBCD preparing Meherdad Bomanbehram Ranch Hand Posts: 142 I like... posted 8 years ago Thanks Dinuka Does any one know which jars and where they are . Dustin Johnson Greenhorn Posts: 22 posted 8 years ago The jars you need to include are these: commons-codec.jar commons-httpclient.jar commons-logging.jar concurrent.jar getopt.jar jboss-common.jar jboss-jmx.jar jboss-system.jar jboss-xml-binding.jar log4j-boot.jar These were located in my C:\Program Files\Jb