How to Enable Eclipselink Dynamic Weaving in Tomcat?

I'd like to enable dynamic weaving in Tomcat 7 but all efforts thus far have been unsuccessful. I have been able to do so from a J2SE command-line app.
JAVA_OPTS="-Xbootclasspath/a:<path to>/javax.persistence_2.0.4.v201112161009.jar -javaagent:<path to>/eclipselink.jar"
With the persistence jar appended to the boot classpath, I get no errors nor does weaving occur. Google revealed others elsewhere with similar issues.
I can statically weave if I must but at least for development, dynamic would be much preferred.
Any suggestions?
Thanks.

My understanding from http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial was that Tomcat was not a Java EE 5 compatible server. This means that Tomcat isn't creating the EMF for the application, and so there is no way for the provider to register the ClassTransformer used for weaving with the application classloader before it has loaded the application entity classes. Placing the agent and persistence unit on the classpath of the server only registers the transformer with the server classloader, not the classloader that gets used to load the application.
I don't know anyone to look to far into it or how far they got before deciding just to use static weaving. You might also be able to use Spring with in Tomcat as the JPA container and configure Tomcat to use its custom application classloader - which it can then be instrumented with a transformer for weaving as described here:
http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch14s06.html
If you are interested, if it works with Spring using a custom classloader it should be possible, but I don't know Tomcat or Spring internals to be of much assistance. If you decide to look into it, see the EclipseLink PersistenceProvider class createContainerEntityManagerFactory method for what containers call to get the transformer to register with the classloader.
Best Regards,
Chris

Similar Messages

  • How to enable listbox dynamically in servlets

    Hi everybody,
    Iam working on Servlets.Iam using two text boxes 1 for accept_qty and other for reject_qty.On entering on the rejected_qty I should be able to enable the rejected_reason which is a List box
    Is there any way to getr me out of this trouble.The values should not goto another servlet.
    I disabled List box using the 'disabled'.
    Thanx guys.

    can u plz tell me how I could do that in JSP/HTML
    I'll try to do that in Servlets later

  • How to enable servlet reloded feature in Tomcat 4.0&5.0

    Hi
    actually i am stoping & starting web server again &b again , need temporary for development servlet reloaded feature enable where this property exist
    thanks in advanced
    Harnal

    u hv to edit the server.xml file under the /conf folder
    edit the reloadable = true for your context path
    <Context path="/plan" docBase="/webapps/plan"
    debug="0" reloadable="true" crossContext="true">

  • How do I make dynamic text look static while the HMTL tagging is enabled?

    Hi all,
    I am using flash 8 with AS 2.0.
    I have a dynamic text field where I am setting it's text value through a variable. Now, I need this dynamic text field content to look like static font on runtime. I tried embedding the text field but that makes my file so heavy and most importantly, it disables the HTML tagging on the text field.
    Please suggest me on how to make a dynamic text field content look static on runtime while the HTML tagging is enabled and working fine.
    Thanks.

    I am sorry. But the attachment was not intended for what you
    thought my friend.
    It was there so that there are no confusions for what I mean by look of dynamic and static text fields.

  • How to enable dynamic query in weblogic 7.0?

     

    Hi,
    The documentation explains how to enable dynamic queries and set a
    method-permission to control access. If you find the information at the
    following link insufficient, let me know.
    http://e-docs.bea.com/wls/docs70/ejb/cmp.html#1089703
    You enable dynamic queries in your weblogic-ejb-jar.xml file with the following:
    <enable-dynamic-queries>True</enable-dynamic-queries>
    You can set a method permission as follows:
    <security-role>
    <role-name>Admin</role-name>
    </security-role>
    <method-permission>
    <role-name> Admin </role-name>
    <method>
    <ejb-name> EmployeeEJB </ejb-name>
    <method-name> createQuery </method-name>
    </method>
    </method-permission>
    - Matt
    Sanjeev Chopra wrote:
    also posting to EJB newsgroup
    "CottonXu" <[email protected]> wrote in message
    news:[email protected]..
    How to enable dynamic query in weblogic 7.0? The documentation accompanieswith
    Bea doesn't explain it in detail. How to set <method-permission> inejb-jar.xml?
    Thanks in advance.

  • How to enable a partner application for Single Sign-On?

    Can someone please advise me on how to enable my existing J2EE web application for the Oracle Single Sign-On?
    My requirement is i want to provide the single sign-on authentication service to my J2EE web application. For this, I would like to make my application as a partner application similar like the OracleAS Portal.
    I am using Oracle 10g ( OralceAS, Oracle Infra, OID ...)
    I found the following service/APIs which Oracle provides. I am not sure which one is suitable for me.
    1. mod_osso ( Static)
    --- In this case, I have to make a entry in mod_osso.config file to protect the URL. should I have to register the URL again through single sign on admin page ("Administer Partner Application") after make a entry in config file?
    2. mod_osso ( Dynamic directive)
    -- in this case, I have to modify the code by providing the directives like 401, 499.. etc. So i don't prefer this as i don't want to touch my app.
    --If I go with this option, should i have to register the URL with Single sign on server through SSO admin page ( as mentioned in the above step#1) ?
    3. SSO SDK
    - Since it was deprecated and need java coding, i am prefer this option.
    -- however, if i go with this option, i will develop code by using SDK. in this case i need to register the URL in SSO server through admin page.. am i right?
    Note:- OSSO server integrated with Active Directory for the authentication.
    Thanks,
    -Senthil

    sharon38_74 wrote:
    they said that our internal application needs to send a "login request" to etran via SSL with the user's information encoded in base 64 format. etran captures the HTTP header containing user authentication and authorization information, and parses the required information from the HTTP header.
    My question is that how I set user information in HTTP header? From my understanding, once I am able to set the user information in HTTP header, it is in base 64 format?Your application need to act like a proxy. You can invoke a HTTP request programmatically using java.net.URLConnection. You can set request headers using URLConnection#setRequestProperty(). Also see the API docs: [http://java.sun.com/javase/6/docs/api/java/net/URLConnection.html]. You only need to know the header field name where to set the Base64-encoded value in. You need to Base64-encode the value yourself.

  • How to enable the EL in jsp page

    hi can u tell 'how to enable the EL in jsp page'?

    *I am getting below exception in tomcat when i inclued +<%@ page isScriptingEnabled="true" isELEnabled="true"%>+*
    org.apache.jasper.JasperException: /index.jsp(1,1) Page directive has invalid attribute: isScriptingEnabled
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
         org.apache.jasper.compiler.JspUtil.checkAttributes(JspUtil.java:311)
         org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:106)
         org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
         org.apache.jasper.compiler.Validator.validate(Validator.java:1700)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • Please help. Sound eahancements feature in my Xperia Z1 is disabled. How to enable it?

    Sound eahancements feature in my Xperia Z1 is disabled since the phone was turned on first time. I have updated the software also but still this faeture is disabled. Rest feature like Clear audio+ and dynamic normaliser are working fine.
    Please tell me how to enable Sound enhancements in Xperia Z1?

    That's normal you have to select either 
    ClearAudio+   (Auto)
    or 
    Sound enhancements (manual)
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • How to enable DDE communication and Network DDE DSDM on windows 7

    How to enable DDE communication and Network DDE DSDM on windows 7

    Hi,
    For Network DDE to function, NetDDE.EXE needs to be installed and running on both machines before attempting to conduct a Network DDE conversation. NetDDE.exe is a Windows Service system file that is used to communicate the shared dynamic data exchange used
    by Network DDE. It has no graphical user interface (it runs as a background Windows service).
    For more information, please refer to this article:
    http://www.citect-webhelp.schneider-electric.com/vijeo/Content/Starting_network_DDE_services.html
    http://support.ge-ip.com/support/index?page=kbchannel&id=S:KB15377&actp=search
    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Karen Hu
    TechNet Community Support

  • How to make Visitor Tracking in embedded Tomcat.

    Hi, Please help me.
    I want to know how to make visitor tracking in embedded Tomcat. If you know, how to catch all the incoming clients to Tomcat, please tell me. I don't know how to catch them.

    enable logging on the server

  • How to enable JCo logging

    I know I've seen this somewhere, but now that I need it, I can't find it.  I've spent two hours searching all the forums.  Can someone tell me how I enable JCo logging?  I have a JCO/Java program that works fine from the command line, but doesn't work when I try to use it in a Tomcat servlet.  None of the log files that I can find have any errors in them, but it appears that the call to JCO.createClient fails in the servlet.  I've read all of the posts about putting the JCo jar file in the servlet's lib directory and copying sapjcorfc.dll to Tomcat's bin directory, but no luck.  I'm hoping that there is some way that I can get JCo to give me a log that will indicate what is going wrong.  Thank you for your help.

    <b>SAP Note 723562</b>
    2. Runtime loading mechanism
    When an application references a JCo class for the first time it will be loaded by the associated class loader. During this process JCo's static initializer will be executed. This routine will search and load the JCo JNI library by using the following algorithm:
    1. Try to load the sapjcorfc library from the same directory where the sapjco.jar file or the JCo class files are located.
    2. Search the sapjcorfc library along the directory path defined in the java.library.path system property from left to right and if found load it from there.
                Note: If this property is not set manually, the JVM will usually set the OS specific library path environment variable as the default java.library.path system property at startup.
    1. Let the JVM handle the loading of the sapjcorfc library by delegating this task to its System.loadLibrary(String) method.
    JCo's JNI library is linked with the native RFC library. So when it is loaded the operating system will try to resolve its dependencies by loading the native RFC library, too. Usually, this will be done by searching for the first occurrence of the rfccm | librfc32 library along the directory path defined by the OS specific library path environment variable from left to right and load it.
    If the sapjcorfc library and/or the rfccm | librfc32 library cannot be loaded, you will get an ExceptionInInitializerError from the JCO. <clinit> method saying that it could not load the middleware layer com.sap.mw.jco.rfc.MiddlewareRFC. This error message may be caused for one of the following reasons:
    The sapjcorfc library cannot be found by using the above described algorithm, because you unintentionally installed it to the wrong directory or forgot to specify its directory in the OS specific library path environment variable or alternatively in the java.library.path system property.
    The rfccm | librfc32 library cannot be found because you unintentionally installed it to the wrong directory or forgot to specify its directory in the OS specific library path environment variable.
    The version of the sapjcorfc library found via the sapjco.jar directory or the java.library.path system property is not the required version (the version numbers and dates of the JCo middleware and the JCo library must be equal).
    The version of the rfccm | librfc32 library found via the OS specific library path environment variable is too old (for example you forgot to copy the librfc32.dll to the <WinDir>\system32 directory and an older version is loaded from there).
    The sapjcorfc library, the rfccm | librfc32 library or both lack the execute permission flag.
    The sapjcorfc library, the rfccm | librfc32 library or both do not have the same bit width as the JVM.
    The sapjcorfc library, the rfccm | librfc32 library or both were from a different JCo distribution and are not for use with your operating system and/or your hardware processor.
    The sapjcorfc library, the rfccm | librfc32 library or both require a higher operating system version.

  • How to enable WiFi transfer from Canon Legria HF M52 to iMac

    My iMac is a late 2012 model with Mountain Lion (v. 10.8.3).
    Recently I bought a Canon Legria HF M52 camcorder which is WiFi enabled, and is capable of transferring videos (AVCHD/MP4) wireless. The camera package included software for WiFi transfer on Windows PC, but not for Mac. However, still, according to the instruction manual, it should be possible to transfer files wireless to Mac using the Mac as a FTP server. Though, following the instruction manual, I`m still not being able to transfer files from my camera to my Mac.
    1. I know for a fact that the camera is correctly connected to the WiFi network, as I`ve managed to transfer files onto a friend´s Windows PC.
    2. Video files are easily transferred to Mac using the USB cable (but the CABLE is what I want to avoid), both AVCHD/MP4.
    3. Since Mountain Lion no longer has the option to enable/activate FTP server under "System Preferences/Sharing", I have enabled FTP via "Terminal" as described in this link; http://support.apple.com/kb/ht4704.
    4. Camera setup:
         - Use iMac IP address as "FTP server", 192.xxx.x.x (dynamic IP, so it is changed in camera setup if IP address is changed upon iMac reboot).
         - Port 21 (as dictated by the camera`s instruction manual).
         - Username / password as for the iMac admin account.
         - Destination folder; /User/Movies
    5. I have verified connectivity from MBA to iMac connecting via IP address / username and password.
    Still, when I try to transfer files from the camera, I get an error message while attempting to connect to the iMac; "An error occured during FTP communication. File transfer was not completed". Have made several attempts to reboot both iMac and camera.
    Any tips on how to enable my iMac to receive video files wireless?

    I guess those programs are intented for outgoing connections, not incoming connections?
    Well, anyways, I managed to solve the problem. Just summing up in case others meet the same problem:
    - Went to Apple Store and bought/installed "OS X Server".
    - Followed the install wizard for the OS X Server.
    - Under "FTP" in OS X Server, turned "On".
    - Under sys prefs/sharing; make sure "Sharing" is activated (which already had been done in my case).
    - Add folder, e.g. "Movies", and enable "read/write" for "everybody" (already done in my case).
    - Back to the OS X Server; changed share to "Movies".
    (you can change share options in OS X Server as well, the same way as under sys prefs.).
    - Now over to the Canon camcorder;
         - Use the IP address for the Mac as the FTP server. Port 21.
         - Set up username/password as for the Mac admin account (not sure if required though).
         - Target folder just set to "/" (files transferred directly to "Movies").
    With this setup, both AVCHD/MP4 movies were transferred easily to my mac.

  • How to enable SSL in order to access web appln. deployed in CE using https?

    Hi,
    I am new to Netweaver and this forum. Not sure if I am posting my question in right forum category. Please let me know otherwise.
    Question -
    I would like to know how to enable SSL in order to access the deployed web application in Netweaver environment using https instead of http.
    System Info:
    Netweaver 7.1
    Database: SAP DB (KERNEL    7.7.04   BUILD 021-123-186-883)
    OS: Linux (amd64) 2.6.18-194.el5
    Note: I have general idea about how to enable SSL in a non-SAP application server like tomcat using valid certificate (like enabling SSL in tomcat and adding certificate to server & Java keystore). But since I am new to Netweaver, not sure how to enable the same in Netweaver environment.
    Any help would be much appreciated.
    Thanks
    Edited by: Gopi.j on Oct 15, 2010 8:04 PM

    hi
    check the following sap help.
    http://help.sap.com/saphelp_nwce71core/helpdata/en/f1/2de3be0382df45a398d3f9fb86a36a/frameset.htm
    Best regards,
    John

  • How is performance of Appache Web Server  + Tomcat?

    I am wondering how the performance of Appache web server + Tomcat => Java enabled web server is ?
    such as handling multiple users, heavy web traffic, JSP-JavaBean performance...in a real industrial setting?
    If "Appache web server + Tomcat" is an excellent choice, why companies still spend big bucks on things like WebLogic, JRun, etc?
    Thanks in advance for any light thrown on this topic.
    --Tim                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Thanks for your reply. I think that I did not make myself clear. I meant that if a small company just wants to build a web application for internal/intranet use (which only utilizes JSP/JavaBean and Servlet features). No EJB, no JMS, etc. Will Appache web server + Tomcat suffice, say for scores of users to access this application concurrently?
    Thanks again.
    --Tim                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to enable MAT using 865G Neo2-LS (MS-6728) ?

    Hi Everybody,
    Does anyone know how to enable MAT using 865G Neo2-LS (MS-6728) ?  Since my situation is not work :-
    MB : 865G Neo2-LS (MS-6728)
    Bios : updated v1.3 (062403)
    Init Display : PCI / AGP (do not select any int. vga combination)
    Primary display card : PCI display card (not AGP)
    But in fact, the "Dynamic Overclocking" item still do not appear in Frequecy / Voltage menu.  Therefore, I cannot enable any MAT mode even I use PCI display and disabled onboard display !
    Does any expert can help me, please ?!  
    P.S. Should I use APG display card instead of PCI display card to get MAT available ?

    Hi Everybody,
    Does anyone know how to enable MAT using 865G Neo2-LS (MS-6728) ?  Since my situation is not work :-
    MB : 865G Neo2-LS (MS-6728)
    Bios : updated v1.3 (062403)
    Init Display : PCI / AGP (do not select any int. vga combination)
    Primary display card : PCI display card (not AGP)
    But in fact, the "Dynamic Overclocking" item still do not appear in Frequecy / Voltage menu.  Therefore, I cannot enable any MAT mode even I use PCI display and disabled onboard display !
    Does any expert can help me, please ?!  
    P.S. Should I use APG display card instead of PCI display card to get MAT available ?

Maybe you are looking for

  • What type of iviews can be used with WPC?

    Can  BSP, WebDynpro ABAP and JAVA  can be added using WPC? Are there any limitations? How about Object Base navigation?

  • CS6 Master Collection & AdobeCC

    Hi there.  I'm sure the question has already been asked...but I can't seem to find the best answer to following question. Do I need to uninstall my Adobe CS6 Master Collection off my MacBookPro?  OR will AdobeCC automatically detect that I already ha

  • Gray color prints as brown using Photoshop CS6

    I reformatted my computer and installed a fresh copy of Windows 7 service pack 1 and installed Photoshop CS6 and when I print my work the color gray prints as brown and the yellow green has a shade of brown in it as well so its darker. I did calibrat

  • Trceval

    A whitepaper named as Oracle Forms Server Troubleshooting tells me a TRCEVAL utility, which can analyse SQL*NET trace file. But I did not found it under my Oracle Developer directory, and can not get results by searching OTN. Anyone can help me to ge

  • Starting Adobe LiveCycle Designer 8.2

    Hi All, I know this sounds like a silly question but after installing the Adobe LiveCycle Designer 8.2 on my pc i cant find any startup icon or any entry in programs. I can find the install folder C:\Program Files (x86)\Adobe\Designer 8.2 but in the