JPA alone?

hi,
iam new to JPA, and I am wondering is JPA sit on top of Hibernate or Toplink? I heard something like JPA with hibernated implementation or JPA with toplink implimentation? What difference do I get with different implementation? Or can I have JPA alone?
thanks

Hi James,
The Java Persistence API is an API for which there are many implementations. A particular
implementation of JPA is referred to as a persistence provider. Toplink and Hibernate each
fully implement JPA so they can each be used as a persistence provider. Of course, Hibernate
also defines its own proprietary API, but that is typically not used if you are writing a JPA application.
Each Java EE 5 implementation has a default persistence provider. For the Java EE 5 SDK, the
default is toplink. For JBoss, it's Hibernate. It's also possible to "plug in" a different persistence
provider into any Java EE 5 implementation.
Like all cases where there are multiple implementations of the same API, there are differences
between them. Performance is often one such area. In addition, persistence providers differ
in their support for some of the optional features defined by the spec.
--ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • JPA/TopLink

    Hi Everyone,
    I am using JPA with vendor implementation toplink.
    For some complex queries like
    START WITH EMPLOYEE_ID = 100 CONNECT BY PRIOR EMPLOYEE_ID = MANAGER_ID ORDER SIBLINGS BY LAST_NAME, I am plannign to use TOplink api like ReadAllQuery and ExpressionBuilder.
    As per my understanding, We are using JPA to have Vendor independent api and implementaion will be provided in persistence.xml.
    If i use some toplink api's ,Tomorrow If i want to change the vendor from Toplink to hibernate. I need to change Toplink code to hibernate in my services.
    Is there anyway i can use JPA alone to get all the work done... Thanks in advance for all your suggestions.

    JPQL does not support connect by. If you need to use connect by, you must either use vendor specific functionality, or a native SQL query.
    James : http://www.eclipse.org/eclipselink/

  • Problem with standalone JPA

    I have a stand-alone, non-WLS, utility Spring-JPA jar (jar contains its own META-INF/persistence.xml) that I use across several non-WLS applications. It's using the Toplink provider and works fine. When I attempt to use this jar within a Weblogic 10 war/ear environment, I see random behaviours. Specifically, upon start up of the server environment sometimes the Spring context appears to load all the Toplink entityManager/provider components, and sometimes it does not - in those cases, it appears that an OpenJPA entityManager gets loaded first and nothing works (many errors related to missing openjpa properties). When the Toplink pieces successfully load, all works as expected. It's almost as if the application is experiencing some race condition on what entityManager/provider is being loaded upon startup/deployment of the application.
    Please help - I'm at a loss as to how to resolve this issue.
    Thanks,
    [email protected]

    Hello,
    Does this work if you set the <exclude-unlisted-classes> tag to true and list your classes in the persistence.xml as described in:
    http://www.oracle.com/technology/products/ias/toplink/jpa/howto/java-se-usage.html
    If it works, the problem might be with searching the persistence context for entities using a non-url classloader.
    Best Regards,
    Chris

  • Problem when using JPA/EJB in webservice

    I wrote a web service that use JPA/EJB to connect to Sybase (the existing tables), and deployed to OC4J, but it got the following error when the web service is invoked:
    <env:Envelope
      xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ns0="http://prjtestws_9/types/">
     <env:Body>
      <env:Fault>
       <faultcode>env:Server</faultcode>
       <faultstring>Internal Server Error (Caught exception while handling request: java.lang.NullPointerException)</faultstring>
      </env:Fault>
     </env:Body>
    </env:Envelope>
    I have checked that, the query will return some records, and also it works fine if the program executed as a stand alone application.
    Thanks in advance

    I find that I can only have ONE webservice that using JPA/EJB for an OC4J instance, if more than one then the above error will come out, and I have to restart the OC4J instance to run another webservice that using JPA/EJB.
    Is there any solution for this issue?
    Thanks

  • How to create datasource for standalone application using JPA

    In the persistence.xml configuration file, we have data source got it from web server configuration file, and created by server like Jboss or tomcat.
    I just wonder how to create this same data source via Java stand-alone application?
    I have Java standalone application embedded Jetty server running with JPA module. Question is how to setup or create data source from my Java application just like web server; which called by persistence.xml?
    Thanks,

    Hello,
    Sharepoint deployment is completely different. I don't think you can deploy any solution as wizard in prod so you have to first identify what you want to deploy.
    If you just want to deploy only web application then backup/restore process is available in sharepoint. you can use STSADM or powershell to deploy your web app.
    http://technet.microsoft.com/en-us/library/ee748618%28v=office.14%29.aspx
    If there is any custom code or .NET code then create a WSP package and deploy it on prod. If you have multiple WSP's then create a batch file (as exe package) then run this package on prod.
    http://www.ironspeed.com/Designer/9.1.1/WebHelp/Part_VI/SharePoint_Solution_Package_WSP_Deployment.htm
    Let us know in case any doubt
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • JCO Runtime error with JPAAS

    Hi,
    I am currently facing the following issue while using JCO 3
    I use the same code in stand alone java project i can connect to the system using JCO and get the results but the same when i try to use it with JPAAS inside a web application i get the following error.
    Can anyone help me out on what could be the problem?
    here is the stack trace
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory
         org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:107)
         org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:323)
         org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
         org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
         org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
         org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)
         org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:112)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
    root cause
    org.apache.cxf.interceptor.Fault: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory
         org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
         org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)
         org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:162)
         org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)
         org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
         java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         java.util.concurrent.FutureTask.run(FutureTask.java:138)
         org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
         org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
         org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
         org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
         org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
         org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
         org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)
         org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:112)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
    root cause
    java.lang.NoClassDefFoundError: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory
         com.sap.conn.jco.rt.RuntimeEnvironment.<init>(RuntimeEnvironment.java:43)
         sun.reflect.GeneratedConstructorAccessor14.newInstance(Unknown Source)
         sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         java.lang.Class.newInstance0(Class.java:355)
         java.lang.Class.newInstance(Class.java:308)
         com.sap.conn.jco.ext.Environment.getInstance(Environment.java:155)
         com.sap.conn.jco.ext.Environment.isDestinationDataProviderRegistered(Environment.java:401)
         com.sap.did.integration.direct.ABAP_System_Connect.<init>(ABAP_System_Connect.java:43)
         com.sap.did.services.impl.IntegrationServiceImpl.getOpenInvoices(IntegrationServiceImpl.java:37)
         com.sap.did.rest.impl.VendorsImpl.getVendorInvoices(VendorsImpl.java:61)
         sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:597)
         org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
         org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
         org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:162)
         org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)
         org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
         java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         java.util.concurrent.FutureTask.run(FutureTask.java:138)
         org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
         org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
         org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
         org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
         org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
         org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
         org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)
         org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:112)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
    note The full stack trace of the root cause is available in the SAP logs.
    Both the jar file and the dll file are present in the war file and still i get this error.
    Regards,
    Suhas

    I am experiencing exactly the same problems on one of two identical machines after something happened in the registry.
    The first problem that appered was an error 1325 "Favorites is not a valid short name".
    I did find the registry key involved (%userprofile%\Favorites) and fixed it.
    So now the the next one: yours.
    I think the solution can be found in the list of registry keys that Adobe Reader is accessing.
    btw Eusing registry cleaner did not find this key to be in error.
    Problem is that the Reader does not ask for an alternative location after stumbling on the key.
    Who can gnerate a list of keys accessed?

  • Hibernate/IBatis/JPA for batch applications

    We are planning on developing a batch application. Performace is a very critical part in this. Wanted to get some feed back upon which is the best framework for batch applications.
    This application would not have too many inserts/updates. It will have selects mainly.
    Can somebody suggest which framework is good Hibernate/Ibatis/JPA ?
    Thanks in advance
    Gautam

    Uppalapati wrote:
    duffymo wrote:
    "batch" usually means "transactional" to me. Why would a batch be mainly SELECTs? Makes no sense.
    Most people wouldn't use Java/JDBC for batch. Better to use the tools that are optimized for your relational database in most cases.
    sorry by stating that a little unclear. It is basically a stand-alone application. It reads messages as they comeby and process the messages. The processing of the messages require a lot of validations to be done (which are dependent upon a lot of parameters in the database and these would require selects). and finally based upon a few criteria's we write the data to the database. Are the validations static, read-only reference data? If so, you can read it once and cache it. Unless the SELECTs are truly dynamic and need to be made every time, perhaps you can save yourself some network traffic that way.
    Caching with Hibernate might make a difference, depending on how dynamic the validations are.
    and my reason for stating that it would have lots of selects is for the validation purpose and some inserts for updating the status.
    duffymo wrote:
    JPA and Hibernate will both require that you have an object model to map to your schema. Do you have that? If not, don't use either of those.
    I have an object model to map with and which is the reason why we are considering Hibernate/Jpa.OK, that's better.
    Either one will do, then. The advantage of JPA is that you don't have to commit to Hibernate, since TopLink and JDO will do as well. You can also use Glassfish or any other Java EE app server that supports EJB3 as well.
    How well do you know Hibernate and/or JPA? The other consideration is your level of skill. Choose the one you know best. Assess the risk if you're just learning and this is a critical project.
    Do you know that JDBC itself can't do the job?
    What other reasons do you have for going this way?
    %

  • Error in allocating a connection + JPA

    Hello Experts,
    I am trying my first ever JPA Program.I am using netbeans 6.0.In netbeans there is a sample application for WebJPA.In that they are calling entity from servlet.I just made a different project.I have copied all files in my project.At the time of creating persistence unit I have used DB2.But now when I am compiling my project I am getting the following errors.Seems there is some problem with connection to DB2.I have also added the correct jar files during creation of persistence unit.Please help me.Many Thanx in advance.
    *Deploying application in domain failed; Deployment Errorjava.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Failure in loading T2 native library db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path --*
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Failure in loading T2 native library db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path
    Error Code: 0
    Deployment error:
    The module has not been deployed.
    See the server log for details.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1068.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:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
    Caused by: The module has not been deployed.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:157)

    Hi garava,
    Thanks for the reply.I had followed the same path while creating Persistence Unit.I googled this error & I found a solution where I need to set the NativeLibraryPathPrefix in my JVM.
    For this I went to Servers->Glassfish V2 -> JVM-> .There I set NativeLibraryPathPrefix = D:\Program Files\IBM\SQLLIB\BIN.
    It's working now.But I can't understand what was the problem & how it got solved.
    One more issue ,suppose tom I am facing the same problem for some other XYZ database.Do I need to change this path again for that database.What this path exactly means.I read it looks for "db2jcc2.dll" in this path.What is the need of this dll if I am including jar files during creation of persistence Unit.
    Please help.Thanks in advance.

  • New update 8.7.1 CS6 ACR not working---(I own hard copy not a Trial or part of CC), I purged cache in bridge, and photoshop. NO photos will open when I double clik, or  will not open again in ACR alone.  When I double clik on raw file I get Sign In requir

    I purged cache in bridge, and photoshop. NO photos will open when I double clik, or  will not open again in ACR alone.  When I double clik on raw file I get Sign In required Notice--We will now register your TRIAL to your Adobe ID-------I am alread a SUBSCRIBER-------------Yes I get this same issue in Creative Cloud and same issue. error: Camera Raw editing is not enabled-----Camera Raw editing requires that a qualifying product has been launched at least once to enable this feature. These errors are happening inside both CS6 Bridge and CCphotoshop Bridge------NOTE----I am ALREADY signed into Creative Cloud and still get those message errors.........Need to fix ASAP.

    When you sign in to Adobe.com with the user ID and Password your using in the Creative Cloud and Photoshop does this link  https://www.adobe.com/account/my-products-services.html show that the account has a subscription?
    Also this is a user forum not a Adobe Customer Services web site.

  • Acrobat entangled in TCS2, won't run alone now that TCS2 trial is over

    Platform: Windows Vista
    Software installed and operational prior to problem: Acrobat 9, FrameMaker 9, PhotoShop, Captivate, etc.
    I recently installed the trial version of the Technical Communication Suite 2 to try out this software for my company (this included special TCS versions of FrameMaker, Acrobat, RoboHelp, and Captivate). My trial period has now expired.
    FrameMaker 9 and Captivate 4 work just the way it used to before the TCS 2 trial, but when I try to open Acrobat (from Program Files, from an existing PDF, or from within FrameMaker 9), I receive the following error message: "Adobe Acrobat was installed as part of a suite. To enable Adobe Acrobat, please start another component of this suite (such as Adobe Photoshop)."
    I assume it is attempting to open the TCS version of Acrobat, for which the trial period has expired. But why doesn't it revert to my licensed version, as FrameMaker and Captivate did? I've tried opening Photoshop, opening FM, opening Captivate, and different methods of accessing Acrobat. No dice. I really don't want to uninstall the TCS unless I have to, since we might purchase it (and also it takes an hour to uninstall or reinstall).
    Does anyone know what magic incantation I need to execute on my computer to get back to my simple Acrobat life?

    I figured out the answer using this thread:
    http://forums.adobe.com/thread/443753
    Apparently, TCS2 did uninstall my previous stand-alone version of Acrobat. I uninstalled the TCS2 version of Acrobat, which should have been enough, but Adobe products leave behind some "residue" that you can't see from the Install/Uninstall Programs dialog (at least on Windows platforms). I downloaded the Cleanup Utility and carefully deleted the extra Adobe Acrobat files that it found, and then was able to successfully install stand-alone Acrobat again. Woohoo.

  • Can't install Lightroom 5 on a second computer, I am NOT a creative cloud customer, I am a stand-alone user.  How do I enter my serial number???

    I can't install Lightroom 5 on a second computer, I am NOT a creative cloud customer, I am a stand-alone user.  But when I try to install on my laptop, it always trys to sell me the monthly membership.  How do I enter my serial number in the second copy of lightroom?  It won't ask me for it, and I cannot enter it anywhere in the settings?  I am stuck

    You probably downloaded the Cloud version.  Get the licensed version thru the following linked page...
    Lightroom - all versions
    Windows
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    Mac
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Macintosh

  • How to check the table existence in JPA

    1) is there a way I can check for existence of the table using JPA, before I read the rows.
    2) If I want to create two tables with same columns (name, time), Should I create two entity objects to insert? is there a way to use one enity class and specify a table to insert ?
    thanks
    Vamshi

    Try this:
    function findNodes(vNode){
         if (vNode.className === "field"){
              if (vNode.isPropertySpecified("name")===true){
                   var myStateName=new RegExp(vNode.name);
                   var returnValue = GFL.search(myStateName);
                   if (returnValue!=-1){
                        this.ui.oneOfChild.border.fill.color.value="192,192,192";
                        this.access="readOnly";
                   else{  
                        this.ui.oneOfChild.border.fill.color.value="255,255,255";//whatever colour is open access
                        this.access="open";
         for (var a=0;a<vNode.nodes.length;a++){
              findNodes(vNode.nodes.item(a));
    findNodes(xfa.form);
    Kyle

  • Migrating stand alone programs to web based application

    Hi,
    I have a small application consisting of .class files. I created these using Swing components and it's based on Client/ server model where it accesses Oracle Database.
    I want to deploy these programs in Java App Server so that it can be accessed thru web browser.
    Please tell me how to do it.
    Thanks in advance.
    Rajeev.
    Message was edited by:
    Rajeev.Asthana

    If this was the thing, Sun, Microsoft and IBM
    wouldn't have even giving a thought of migrating
    legacy application (I'm talking about Mainframes and
    AS/400 here). If this kind of migration is possible,
    can't we migrate a java code from stand-alone
    "version" to web enabled.
    Migration is not really a term to use to for converting a stand alone application to a web application. Unless of course again you are prepared to turn it into an applet.
    The flow and control of a web application are entirely different from a stand alone app. You will not be able to reuse Swing GUI's from a web server. I don't know how to make that any clearer.
    Hopefully you have a good design for your existing application and you can relatively easily reuse your existing business logic components.

  • Unable to deploy Web App using JPA TopLink Essentials in Tomcat5.5.17

    Hi All,
    I am trying to deploy a Web App ( used Top Link Essentials ) to Tomcat and i am getting the following Error..
    I am strating tomcat using -javaagent:/Path/To/spring-agaent.jar
    Dec 14, 2006 9:52:46 AM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already.  Could not load oracle.toplink.essentials.internal.weaving.ClassDetails.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at oracle.toplink.essentials.internal.weaving.TopLinkWeaver.transform(TopLinkWeaver.java:84)
            at org.springframework.orm.jpa.persistenceunit.ClassFileTransformerAdapter.transform(ClassFileTransformerAdapter.java:56)
            at sun.instrument.TransformerManager.transform(TransformerManager.java:122)
            at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
            at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
            at java.lang.Class.getConstructor0(Class.java:2671)
            at java.lang.Class.newInstance0(Class.java:321)
            at java.lang.Class.newInstance(Class.java:303)
            at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:396)
            at com.sun.faces.config.ConfigureListener.verifyObjects(ConfigureListener.java:1438)
            at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:509)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
            at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
            at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
            at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
            at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
            at org.apache.catalina.core.StandardService.start(StandardService.java:450)
            at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Thanks
    Sateesh

    Spring 2.0 provides custom support for TopLink Essentials in Tomcat out-of-the-box. You should follow the instructions here: http://static.springframework.org/spring/docs/2.0.x/reference/orm.html#orm-jpa-setup-lcemfb-tomcat
    Essentially, Spring provides a custom class loader for Tomcat and doesn't use an agent.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need help in creating a web application that runs on a stand alone sys.

    I am planning a small java web application complete with database. I need to know if there are any ways to deploy that application on a stand alone system and that if there is any way to make an executable for that application so that the user need not go through the process of deploying the app and starting the server whenever he restarts the system. Can anyone help me in this regard? Thanks in advance.

    Hi Alex,
    Since I had a Gmail test servlet kicking around, I ran it on the latest V3 nightly build.
    On the first run, I encountered the following nested exceptions:
    javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465
    --> java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
        --> java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
            --> java.security.UnrecoverableKeyException: Password must not be nullThe UnrecoverableKeyException is a manifestation of [https://glassfish.dev.java.net/issues/show_bug.cgi?id=6938|https://glassfish.dev.java.net/issues/show_bug.cgi?id=6938]
    I worked around this by adding the following JVM config options to domain.xml
    <jvm-options>-Djavax.net.ssl.keyStorePassword=changeit</jvm-options>
    <jvm-options>-Djavax.net.ssl.trustStorePassword=changeit</jvm-options> (Note: the default master password is "changeit")
    These lines are placed in /domain/configs/config/java-config of domain.xml for the particular server config you're using. There's only one server config in the default domain.xml shipped with V3. Then restart the server.
    I retested the code on both port 465 and 587, with and without the above config changes. Without the change, they both fail the same way, and with the change, they both work. Let me know if this helps.
    -Peter

Maybe you are looking for