JSF-JPA error in netbeans

hi
IDE: Netbeans7.1
Server:Weblogic 10.0
JSF:2.1
JPA:toplink essential JPA 1.0
When i`m inserting JPA in my JSF project following error Shown, Any one have Idea abt it?
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
C:\Users\IS678\Documents\NetBeansProjects\GApp\nbproject\build-impl.xml:730:
Deployment error:
null
See the server log for details.
     at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:232)
     at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     at org.apache.tools.ant.Task.perform(Task.java:348)
     at org.apache.tools.ant.Target.execute(Target.java:390)
     at org.apache.tools.ant.Target.performTasks(Target.java:411)
     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
     at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
     at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
     at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
     at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Caused by: java.lang.IllegalThreadStateException
     at java.lang.ThreadGroup.addUnstarted(ThreadGroup.java:843)
     at java.lang.Thread.init(Thread.java:348)
     at java.lang.Thread.<init>(Thread.java:608)
     at java.util.concurrent.Executors$DefaultThreadFactory.newThread(Executors.java:542)
     at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672)
     at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:721)
     at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
     at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78)
     at org.netbeans.modules.j2ee.weblogic9.optional.WLStartServer.startDeploymentManager(WLStartServer.java:195)
     at org.netbeans.modules.j2ee.deployment.impl.ServerInstance._start(ServerInstance.java:1454)
     at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.startTarget(ServerInstance.java:1405)
     at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.startTarget(ServerInstance.java:1210)
     at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.start(ServerInstance.java:1087)
     at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.start(ServerInstance.java:1248)
     at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.getTargetMap(ServerInstance.java:548)
     at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.getTargets(ServerInstance.java:516)
     at org.netbeans.modules.j2ee.deployment.impl.DeploymentHelper.deployJdbcDrivers(DeploymentHelper.java:93)
     at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:180)
     ... 16 more
BUILD FAILED (total time: 10 seconds)

Are you using MS's XP OS?
I had this exact same problem with XP home edition when I had it using FAT instead of NTFS. I converted to NTFS and all has been well ever since.

Similar Messages

  • JSF Listbox Error Using Netbeans 5.5 Visul Web Pack

    Please see my post on the Java Programming Forum. I'm having a Listbox problem.
    http://forum.java.sun.com/thread.jspa?threadID=5115503&tstart=0

    The getPersons() code will give an ClassCastException error. Change it to:
       public SelectItem[] getPersons()
       ArrayList<SelectItem> people = new ArrayList<SelectItem>();
       //Start For Loop reading from database into 'item' Object
        people.add(new SelectItem(item.getID() + "",item.getName()));
       // End Loop
    /**This line.*/
       return (SelectItem[]) people.toArray(new SelectItem[]{});
       }But this might not be the problem.

  • Whenever I start the tomcat server, Im getting an error in netbeans?

    Whenever I start the tomcat server, Im getting an error in netbeans?
    Starting of Tomcat failed. '127.0.0.1' is not recognized as an internal or external command, operable program or batch file.
    Even I set the path & catalina_home in Environment variables. I start the startup.bat file and catalina.bat file also.
    I'm waiting for your quick response.

    Hi Ershad,
    I think this issue is more related to Apache Tomacat, I would suggest you ask in Apache Tomcat forum for a better support, it is appropriate and more experts will assist you.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem overriding default JSF conversion error messages

    Hello !
    I have a problem to override default JSF conversation error message. I have an inputText which is binded to BigDecimal attribute, so when I enter a character in that field I get this error message: "- Conversion failed."
    I think I need to register the message bundle in my faces config, and put the key of this error message to my properties file.. am I right ?
    Can somebody help me with this ? Which key I need to put into the properties file ?
    Miljan

    Get [Sun's Java EE tutorial |https://www.sun.com/offers/details/JavaEETutorial.xml?cid=20090723ZA_TACO_JVEE_0004] and read the relevant section so you don't have to guess what you need to do.

  • How to run order-jsf-jpa-example.zip in JDeveloper?

    What is the easiest way to make order-jsf-jpa-example.zip from the link http://www.oracle.com/technology/products/ias/toplink/jpa/examples-index.html to run in JDeveloper?
    Step by Step please.
    Thanks
    Ming Man

    You can use the JDeveloper "project from existing source" to create a new project that is based on this code.
    You can then use the built in Ant support to run the build file.

  • Jpg jsf jpa

    I want to store jpeg files through jsf , jpa to oracle database. And again to show stored jpeg in database to a jsf page.
    Please help.

    bigbbkt wrote:
    I want to store jpeg files through jsf , jpa to oracle database. You can upload files using under each the Tomahawk's <t:inputFileUpload /> component. Get the InputStream of the uploaded file and write it to the database using e.g. PreparedStatement#setBinaryStream().
    See this article for some pointers about uploading files in JSF: [http://balusc.blogspot.com/2008/02/uploading-files-with-jsf.html].
    And again to show stored jpeg in database to a jsf page.Better use an independent Servlet for this. Obtain the InputStream from the database using e.g. ResultSet#getBinaryStream() and write it to the OutputStream of the HttpServletResponse after having set the headers accordingly. Then call that Servlet in a JSF <h:graphicImage /> tag or just a plain vanilla HTML <img> tag.
    Also see this article for some pointers: [http://balusc.blogspot.com/2007/04/imageservlet.html].

  • Eclipse JPA Error

    Hello,
    I have a question, my Eclipse Indigo, shows JPA errors, but there is no error (The Project is running on server without error)
    But I want to know why Eclipse reports an error:
    >
    The identification variable 'a' is not defined in the FROM clause.
    The identification variable 'b' is not defined in the FROM clause.
    My code:
    @Entity
    @Table(name="VERTICAL_SUIVI")
    @NamedQueries({
         @NamedQuery(name = "VerticalSuivi.findByAffaire", query = "Select a from VerticalSuivi a where a.verticalTableauDescriptifRe=:affaire"),
         @NamedQuery(name = "VerticalSuivi.findLastByAffaire",
              query ="select a from VerticalSuivi a where a.idsuivi = (select max(b.idsuivi) from VerticalSuivi b group by b.verticalTableauDescriptifRe having b.verticalTableauDescriptifRe=:affaire) AND a.verticalTableauDescriptifRe=:affaire")
    Edited by: garfield335 on Apr 23, 2012 12:51 AM

    This bug has been fixed (https://bugs.eclipse.org/bugs/show_bug.cgi?id=353017), please upgrade your Eclipse to Indigo SR2.
    Best regards,
    Pascal...

  • OIM: JSF / JPA in task adapter

    * Cross Posting from Weblogic Server server forum *
    Hello
    I have a JPA / JSF application that was written to assist with DB reads / writes. The java methods are called from OIM, as task adapters.
    If I run my application from within JDeveloper, all is well. Everything behaves as you'd expect.
    If I create a deployment profile and deploy to a jar file, everything works as well. In the jar, all of the classes, as well as the META-INF/persistence.xml file are included. Running the app with 'java -classpath .:/path/to/jar com.classname.method works as expected.
    If, however, I then copy the jar to the JavaTasks directory of WLS/OIM, and try and execute the method, I get the following error:
    Target Class = com.classname.method
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpCLASSNAME.METHOD(adpCLASSMETHOD.java:120)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpCLASSMETHOD.implementation(adpCLASSMETHOD.java:62)
         at com.thortech.xl.client.events.tcBaseEvent.run(tcBaseEvent.java:196)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(tcDataObj.java:2492)
         at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(tcScheduleItem.java:2917)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(tcScheduleItem.java:547)
         at com.thortech.xl.dataobj.tcDataObj.insert(tcDataObj.java:602)
         at com.thortech.xl.dataobj.tcDataObj.save(tcDataObj.java:474)
         at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.retryTasks(tcProvisioningOperationsBean.java:4042)
         at Thor.API.Operations.tcProvisioningOperationsIntfEJB.retryTasksx(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named persistenceID: The following providers:
    org.eclipse.persistence.jpa.PersistenceProvider
    kodo.persistence.PersistenceProviderImpl
    org.apache.openjpa.persistence.PersistenceProviderImpl
    Returned null to createEntityManagerFactory.
    My persistence.xml file defines the persistenceID provider. It works fine if run from JDeveloper, or the command line. But, WLS/OIM cannot seem to find/parse the persistence.xml file when run as a task adapter.
    I have even created a DataSource within WLS, and tried to reference it that way (instead of directly via the jdbc drivers) with no luck.
    How do I get OIM to recognize the existence of the persistence.xml file in the META-INF directory of the jar that contains my classes? Do I have to add another persistence.xml file elsewhere in the WLS server to get it to be parsed?
    Thank you.

    It is there.
    Here is an extract from the persistence.xml file:
    <persistence-unit name="persistenceName">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>/jdbc/datasourceNameDS</jta-data-source>
    <class>...</class>
    <class>...</class>
    <class>...</class>
    <class>...</class>
    </persistence-unit>
    Thank you.

  • Error in netbeans IDE when creating new file

    Hai,
    I am doing a project in netbeans. When i want to create a new java class in a project i right clicked the project and from the menu i selected the java file. In that dialog box i entered the name of the java file but in the bottom of the dialog box i am getting a error message "The Target floder is Read only" due to this error the next and finish button in the dialog box where disabled. How to over come with this problem
    I changed the read only properties of all the files in the project, but it wont work
    Thanks
    Pradeep D

    Are you using MS's XP OS?
    I had this exact same problem with XP home edition when I had it using FAT instead of NTFS. I converted to NTFS and all has been well ever since.

  • Xml mapping with JPA error

    I am &#304;shak Teyran , the data manager of a team which attends to IBM XML Challenge Turkey, we are trying to build a dynamic web project in Rational Software Architect 7.5, WAS 7.0 , DB2 9.5 EE.
    the article of Vitor Rodrigues - http://www.ibm.com/developerworks/data/library/techarticle/dm-0901rodrigues/index.html - describes how to map xml to java using pureQuery however we need to do the same using JPA.. is there any difference?
    we are trying to achieve the same using JPA. but unfortunately we failed..
    for simplifying lets assume we have two tables , STUDENT ( id int, name char) and COURSES ( studentID int , and lessons xml) ... these two tables are related to each other with studentID foreign key... and we want to have student and courses java files where courses.java includes proper mapping to xml column lessons..
    i tried to make an .xsd file for xml column lessons.. and then i created its java file.. then i used JPA for creating student and courses java files but it always turns me a null pointer exception.. i dont know why.. and as result , only student.java is being created..
    i have tried following steps.
    My database connection and the tables are already present.
    1- i have created a new dynamic web site project, namely dene..
    from project facets i enabled dynamic web module, faces support (base, enhanced componnents) , Java Persistence, Javascript Toolkit, JavaServer faces, JSTL, Web 2.0 , Websphere Web(Co-existence),Websphere Web(Extended),Default Style Sheet facets.. and these facets musts be enabled for our project.
    2- i have created the CourseList.xsd and using -JAXB- i have created lessons.java
    3- i right clicked project and from the menu .. JPA tools->Generate Entities .. i choose connection and tables to generate entities but unfortunately no entity gets created ... when i only choose student table to generate the entity of, Student.java is being created however Courses.java always returns nullpointerexception..
    the stack trace of the exception is in the picture i attached.. here is its link.... [http://www.ibm.com/developerworks/forums/servlet/JiveServlet/download/430-250134-14212507-336353/hata.JPG]
    i have thought it might be because i use the openjpa and jaxb libraries of RSA.. and then i tried to load the latest versions of JAXB and openjpa .. i added all of their .jar files to the application classpath.. (if it is sufficient to add only openjpa-1.2.0.jar and jaxb-api.jar files let me know it please).. but this did not work neither..
    the only exception i get is :
    An internal error occurred during: "Generating Entities".
    java.lang.NullPointerException
    while creating lessons.java and the entity java files i am making sure that i give the same package name for both ... but i never succeeded creating courses.java..
    in RSA when i right click to project and go te JPA Tools menu there is a menu item "Configure Project for JDBC deployment" .. what is this for.. i have also tried using this and then trying to create entities but this failed too..
    then when they did not work ;
    i have decided to code the classes myself but in order to get things a little easier, i opened my DB and converted the XML column to a SMALLINT column .. just not an XML column... and then using JPA in RSA - i did not include openJPA jars in my project externally- i created the classes .. both Course.java and Student.java have been created well, because the column that was actually xml was converted to small integer..
    and if i add the related persistence and strategy lines :
    @Persistent
    @Strategy("org.apache.openjpa.xmlmapping.XmlValueHandler")
    to their proper places and editing the function and attributes data types and return types and then if i re-convert the column to XML data type in database, do you think it will work properly?
    so i really need a suggestion.. any help will be appreciated..
    what would you suggest?
    how can we achieve this goal for those two tables i mentioned above in RSA and using JPA ?

    Hi Tushar
    You will need to be more specific. Do you want an XML layout to use for importing or exporting SAP Business One objects? Maybe give us details of the specific object. Most DI API objects have a write to XML which will give you the layout for that object. You can also refer to the REFDI.CHM file under the SDK Help folder.
    Kind regards
    Peter Juby

  • JPA: Error "entity is detached" when executing a query

    Hi experts,
    I have two database tables with a foreign key constraint and generated JPA-entities for them:
    @Entity
    public class Verdeck implements Serializable {
         @EmbeddedId
         private VerdeckPK pk;
         @Column(name="ID_VERDECK")
         private String idVerdeck;
         @OneToMany(mappedBy="verdeck")
         @PersistenceContext
         private Set<Uzsb> uzsbCollection;
    @Embeddable
    public class UzsbPK implements Serializable {
         @Column(name="ID_UZSB")
         private String idUzsb;
         @Column(name="ID_PROJECT")
         private BigDecimal idProject;
    Furthermore I have a SessionBean implementing a query in one of its business methods:
    @WebMethod(operationName="getVerdeckData", exclude=false)
    public List<Verdeck> getVerdeckData (@WebParam(name="searchkey")
         BigDecimal searchkey){
         Query q = em.createQuery("SELECT v FROM Verdeck v WHERE v.pk.idProject = :searchkey")
              .setParameter("searchkey", searchkey);
              return q.getResultList();
    When calling the method via WebService-Navigator I get this error:
    "com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException: The relationship >>uzsbCollection<< of entity (com.karmann.r57schraub.jpa.Verdeck(idProject=57, idIntern=v1))cannot be loaded because the entity is detached"
    (idProject / idIntern) is the composed key of "Verdeck" and (57 / v1) is a concrete value for this key in the database table.
    If required I could give you classes VerdeckPK and UzsbPK as well.
    Could you please explain what I'm doing wrong?
    Thanks for each hint,
    Christoph

    Hi Vladimir,
    thank you for this hint! Especially for the article which provides the neccessary knowledge in background.
    But using FetchType.EAGER does not solve my problem. I get a runtime error. In defaultTrace I get the following message
    SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML: com.karmann.r57schraub.jpa.Verdeck@f9ac24 -> com.karmann.r57schraub.jpa.Uzsb@1f2a70 -> com.karmann.r57schraub.jpa.Verdeck@f9ac24]->com.sun.istack.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML: com.karmann.r57schraub.jpa.Verdeck@f9ac24 -> com.karmann.r57schraub.jpa.Uzsb@1f2a70 -> com.karmann.r57schraub.jpa.Verdeck@f9ac24#
    I already checked the records in my tables. There does not seem to be any cycle. Here's my test data:
    VERDECK
    ID_PROJECT    ID_INTERN     ID_VERDECK
    57                    v1                  vext1
    57                    v2                  vext2
    UZSB
    ID_PROJECT ID_UZSB ID_INTERN TYP_UZSB
    57 ls1 v1 <null>
    57 rs1 v1 <null>
    57 sd1 v1 <null>
    57 ls2 v2 <null>
    57 rs2 v2 <null>
    57 sd2 v2 <null>
    Do you have any more idea?
    Regards,
    Christoph

  • JPA Error:Could not get a value to be injected from the factory

    HI friends ,
    I am  trying to replicate the example JPAEXample01 using JPA in CE1 from  the blogs written by
    Sabine Heider/Adrian Görler.
    During the testing of the method create employee i am getting the following error.
    "Could not get a value to be injected from the factory."
    I tried couple of examples using the above process, still held up with same error.
    Any pointers to trouble shoot this ?
    Thanks in advance
    Chandra Dasari

    HI Isaias Cristiano Barroso,
    There are lot of enries most of them pertaining to properties set to yes or no.
    out of which therre are tow errors. the log is as follows
    Message Info: Failed (javax.management.MBeanPermission,#[:j2eeType=trace,name=EndToEndCentralMBean,],isActive,getGuidByName,getTraceLevelByName,getTraceLevelByName,importTrace,isFileExistsLocally,removeTraceFile)java.lang.reflect.InvocationTargetException
    Failed (javax.management.MBeanPermission,*,DISPLAY)java.lang.reflect.InvocationTargetException
    category: com.sap.security.core.role.PermissionData
    Location:com.sap.security.core.role.PermissionData.get(ClassLoader)
    Frankly the above log is above my understanding ,Prob it may help to you undertand my the issue
    Thanks once again

  • JPA Error "No Persistence provider for EntityManager",using org.eclipse.per

    Hello Colleagues,
    I have created JPA project, with out any error have done mapping also. with orm.xml and persistense .xml
    I am getting No Persistence provider for EntityManager error when calling Entity Manager in Entity class
    Error >>> EntityManagerFactory emf = Persistence.createEntityManagerFactory("Personalization_JPA");
    { No Persistence provider for EntityManager named Personalization_JPA }
    Persistence Provider as "org.eclipse.persistence.jpa.PersistenceProvider
    In persistence.xml for my JPA project , I have included following in respective tabs
    1) GENERAL Tab of Persistence.xml
    a) Persistence Provider as "org.eclipse.persistence.jpa.PersistenceProvider"
    b) In Managed classes included my Entity class and test application that calls the entity manager
    c) orm.xml in xml mapping files
    2) Connections Tab of Persistence.xml
    a) Transaction Type as Resource Local, not using any JTA datasourse name in database field
    3) Properties Tab of Persistence.xml
    property name="driver" value="com.sap.dbtech.jdbc.DriverSapDB"
    property name="url" value="jdbc:sapdb://localhost/w15"
    property name="username" value="SAPW15DB"
    property name="password" value="sapsapr3"
    If anything wrong is specified please kindly inform me.

    Hello colleague,
    As per your suggestion I removed Persistence Provider as "org.eclipse.persistence.jpa.PersistenceProvider", made it blank in persistence.xml, but still I get the same error saying No Persistence provider for EntityManager, please have a look at other attributes of persistence.xml
    In persistence.xml for my JPA project , I have included following in respective tabs
    1) GENERAL Tab of Persistence.xml
    a) Persistence Provider as  blank or "org.eclipse.persistence.jpa.PersistenceProvider" makes no difference
    b) In Managed classes included my Entity class and test application that calls the entity manager
    c) orm.xml in xml mapping files
    2) Connections Tab of Persistence.xml
    a) Transaction Type as Resource Local, not using any JTA datasourse name in database field
    3) Properties Tab of Persistence.xml (connecting to maxdb, so is this necessary or not )
    property name="driver" value="com.sap.dbtech.jdbc.DriverSapDB"
    property name="url" value="jdbc:sapdb://localhost/w15"
    property name="username" value="SAPW15DB"
    property name="password" value="sapsapr3"
    If anything wrong is specified please kindly inform me.

  • JPA Error with SDO_GEOMETRY conversion

    Attempted to perform a native SQL query which invokes
    the Oracle SDO_UTIL.ELLIPSE_POLYGON() function within
    a JPA context and got a ClassCastException. Here is code snippet:
    try
    javax.persistence.Query query = entityManager_.createNativeQuery(
    "select SDO_UTIL.ELLIPSE_POLYGON( 32.4, 112.6, 1124.2, 992.4, 18.0, 5.0 ) from DUAL" );
    oracle.sql.STRUCT obj = ( oracle.sql.STRUCT ) query.getSingleResult();
    }catch( Exception e ) {}
    When the query is executed this error occurs:
    ERROR: java.lang.ClassCastException: org.eclipse.persistence.internal.helper.NonSynchronizedVector cannot be
    cast to oracle.sql.STRUCT
    NOTE: using Toplink 11G
    Thanks ...
    Edited by: user11177655 on Jul 22, 2009 12:45 PM

    I assume you are getting back a List (Vector) with the Struct inside it. Try ((List)query.getSingleResult()).get(0).
    In JPA you should get the Struct back directly if the result size was 1, otherwise an Object[], this was a bug in EclipseLink 1.0 that was fixed in EclipseLink 1.1.
    You should probably upgrade to EclipseLink 1.1.
    James : http://www.eclipselink.org

  • JPA error with nested exception for more details

    Hi All,
    A strange thing is that when i can deploy javaee app successfully. But some time, it is failed and i have to wait for 10, 15 minutes then i can deploy again. When i got error, below is the error message:
    I don't know if you can find a hint.
    INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
    SEVERE: Local Exception Stack:
    Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.exceptions.DatabaseException.errorRetrieveDbMetadataThroughJDBCConnection(DatabaseException.java:361)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:602)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
                    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.sql.SQLRecoverableException: Closed Connection
                    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508)
                    at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:345)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:589)
                    ... 42 more
    SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
    SEVERE: Exception while preparing the app
    SEVERE: Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
    javax.persistence.PersistenceException: Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:517)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
                    at java.lang.Thread.run(Thread.java:619)
    Caused by: Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.exceptions.DatabaseException.errorRetrieveDbMetadataThroughJDBCConnection(DatabaseException.java:361)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:602)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                    ... 40 more
    Caused by: java.sql.SQLRecoverableException: Closed Connection
                    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508)
                    at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:345)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:589)
                    ... 42 more
    SEVERE: Exception while preparing the app : Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
    Local Exception Stack:
    Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.exceptions.DatabaseException.errorRetrieveDbMetadataThroughJDBCConnection(DatabaseException.java:361)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:602)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
                    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.sql.SQLRecoverableException: Closed Connection
                    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508)
                    at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:345)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:589)
                    ... 42 morethanks,
    -Hoang Long

    r035198x wrote:
    Yep, the appserver got hold of a usable connection but the connection was closed before the appserver had finished/committed with it. It could be that the connection was closed by the database or some firewall timeout setting.
    A good start is to investigate options of configuring your appserver's connection eviction policies including forcing a validation SQL to be executed when a connection is acquired. Make sure that such a query doesn't impact on performance and have some performance and integration testing before rolling out.i found that if i close the computer which causes this issue, hence other dev computers can deploy normally.
    "deploy" here i mean deploy to a running instance on each dev's machine.
    From this, i would guess the common database server itself rejects connection from clients.
    I will try to investigate more if i am missing something.
    And here i found a link that possibly a first good attempt:
    [http://www.eclipse.org/forums/index.php/m/505809/]
    EclipseLink automatically recovers from communication failures, but there is little we can do to diagnose the failure. We basically execute a query and have to wait for the JDBC driver, or DataSource's response, if it hangs for 10minutes, then we are waiting. You could set the JDBC timeout hint on your query, but whether the JDBC driver honors this is up to the driver. You should see the SQLException in your logs, provided your log level is warning or lower.
    If you cannot fix your firewall, they you could change your connection pool settings to use a min number of connections of 0, so there will never be idle connections. But then you will be reconnecting a lot.
    You could also use a third party connection pool or DataSource that supports a timeout setting on the pooled connections, or spawn a thread in your application the clears the connection pool every 30minutes.regards,
    -HL

Maybe you are looking for