And what would be the benefit compared of one or the other solution ? Le 13 sept. 2013 18:55, "Romain Manni-Bucau" <[email protected]> a écrit :
> Maybe put it in appinf and not lib, no? > Le 13 sept. 2013 18:51, "rsheldon" <[email protected]> a écrit : > > > Thanks for the speedy response Romain. > > > > Looking at the jrebel logs I found it was able to pick up the rebel.xml > in > > the lib directory. > > > > Unfortunately the tomcat loaders doesn't like it as it expects only jars > in > > this directory. After debugging into the tomee/tomcat code I found that I > > could prevent this by adding "rebel.xml" onto the end of > > the tomcat.util.scan.DefaultJarScanner.jarsToSki property defined in > > conf/catalina.properties. A complete hack, but it worked. Here's the > error > > I was getting: > > > > WARNING: Failed to scan JAR [file:xxxx/my-ear/APP-INF/lib/rebel.xml] from > > WEB-INF/lib > > java.util.zip.ZipException: error in opening zip file > > at java.util.zip.ZipFile.open(Native Method) > > at java.util.zip.ZipFile.<init>(ZipFile.java:127) > > at java.util.jar.JarFile.<init>(JarFile.java:135) > > at java.util.jar.JarFile.<init>(JarFile.java:72) > > at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:72) > > at > > sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48) > > at > > sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:70) > > at > > > > > sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104) > > at > > > > > sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71) > > at > > org.apache.tomcat.util.scan.FileUrlJar.<init>(FileUrlJar.java:41) > > at > > org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34) > > at > > > > > org.apache.catalina.startup.ContextConfig$FragmentJarScannerCallback.scan(ContextConfig.java:2664) > > at > > > > > org.apache.tomee.loader.EmbeddedJarScanner.process(EmbeddedJarScanner.java:140) > > at > > > org.apache.tomee.loader.EmbeddedJarScanner.scan(EmbeddedJarScanner.java:83) > > at > > org.apache.tomee.loader.TomEEJarScanner.scan(TomEEJarScanner.java:180) > > at > > > > > org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1931) > > at > > > > > org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1261) > > at > > > > > org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:353) > > at > > > > > org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878) > > at > > > > > org.apache.tomee.catalina.OpenEJBContextConfig.configureStart(OpenEJBContextConfig.java:103) > > at > > > > > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376) > > at > > > > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > > at > > > > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > > at > > > > > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322) > > at > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > > at > > > > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) > > at > > > > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) > > at > > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > at java.lang.Thread.run(Thread.java:680) > > > > After that I found that jrebel was throwing classloading errors as it was > > trying to mess around with some openejb classes. I think you're right on > > the money when you say they're just supporting the basic tomcat > > functionality. I have a contact within ZeroTurnaound so I'll hit them up > > and see what their tomee support covers in more detail. Here's an example > > error: > > > > INFO: Existing thread singleton service in SystemInstance(): > > org.apache.openejb.cdi.ThreadSingletonServiceImpl@3fe9029b > > 2013-09-12 14:54:12 JRebel: Class > > 'org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler' could > > not be processed by > > > > > org.zeroturnaround.jrebel.openwebbeans.cbp.NormalScopedBeanInterceptorHandlerCBP@org.apache.catalina.loader.StandardClassLoader > > @564e4fc4 > > 2013-09-12 14:54:12 JRebel: ERROR > > org.zeroturnaround.bundled.javassist.CannotCompileException: [source > error] > > getReturnType() not found in javax.enterprise.inject.spi.Bean > > at > org.zeroturnaround.bundled.javassist.CtNewMethod.make(JRebel:79) > > at > org.zeroturnaround.bundled.javassist.CtNewMethod.make(JRebel:45) > > at > > > > > org.zeroturnaround.jrebel.openwebbeans.cbp.NormalScopedBeanInterceptorHandlerCBP.process(NormalScopedBeanInterceptorHandlerCBP.java:36) > > at > > > > > org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(JRebel:62) > > at com.zeroturnaround.javarebel.DZ.a(JRebel:235) > > at com.zeroturnaround.javarebel.DZ.a(JRebel:224) > > at com.zeroturnaround.javarebel.DZ.a(JRebel:208) > > at > > > > > com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:121) > > at com.zeroturnaround.javarebel.DO.transform(JRebel:46) > > at java.lang.ClassLoader.defineClass(ClassLoader.java) > > at > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) > > at java.net.URLClassLoader.access$000(URLClassLoader.java:58) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:197) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > > at java.lang.ClassLoader.defineClass1(Native Method) > > at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) > > at java.lang.ClassLoader.defineClass(ClassLoader.java:615) > > at > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) > > at java.net.URLClassLoader.access$000(URLClassLoader.java:58) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:197) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > > at > > > > > org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:104) > > at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:43) > > at > > > > > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:799) > > at > > > > > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:613) > > at > > > > > org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:504) > > at > > org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:410) > > at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148) > > at org.apache.openejb.OpenEJB.init(OpenEJB.java:296) > > at > > org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:245) > > at > > org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:133) > > at > > > > > org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122) > > at > > > > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > > at > > > > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > > at > > > > > org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402) > > at > > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) > > at org.apache.catalina.startup.Catalina.load(Catalina.java:640) > > at org.apache.catalina.startup.Catalina.load(Catalina.java:665) > > 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:597) > > at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281) > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455) > > Caused by: compile error: getReturnType() not found in > > javax.enterprise.inject.spi.Bean > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atMethodCallCore(JRebel:723) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atCallExpr(JRebel:688) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atCallExpr(JRebel:157) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.ast.CallExpr.accept(JRebel:46) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atMethodArgs(JRebel:221) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atMethodCallCore(JRebel:709) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atCallExpr(JRebel:688) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atCallExpr(JRebel:157) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.ast.CallExpr.accept(JRebel:46) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atMethodArgs(JRebel:221) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atMethodCallCore(JRebel:709) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atCallExpr(JRebel:688) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atCallExpr(JRebel:157) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.ast.CallExpr.accept(JRebel:46) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.CodeGen.doTypeCheck(JRebel:242) > > at > > org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(JRebel:330) > > at > > org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(JRebel:50) > > at > > org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(JRebel:351) > > at > > org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(JRebel:50) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.CodeGen.atMethodBody(JRebel:292) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.CodeGen.atMethodDecl(JRebel:274) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.ast.MethodDecl.accept(JRebel:44) > > at > > > > > org.zeroturnaround.bundled.javassist.compiler.Javac.compileMethod(JRebel:169) > > at > > org.zeroturnaround.bundled.javassist.compiler.Javac.compile(JRebel:95) > > at > org.zeroturnaround.bundled.javassist.CtNewMethod.make(JRebel:74) > > ... 51 more > > > > Once we rid ourselves of a last few MDBs we could go plain tomcat, but > > being able to deploy an ear rather than multiple war files and a bunch of > > jars into tomcat's /lib directory is very convenient. However, if we > can't > > use JRebel that could be a show-stopper for us on TomEE. Our application > > takes a while to load (lots of data caching on startup), so JRebel has > > become a very valuable part of our day-to-day development process. > > > > Thanks > > Richard > > > > > > On Fri, Sep 13, 2013 at 9:03 AM, Romain Manni-Bucau [via OpenEJB] < > > [email protected]> wrote: > > > > > Hi > > > > > > 1) APP-INF/lib/ should be supported (so it should be fine) > > > 2) when i looked their support it was more or less the tomcat one (no > > > more). Personally i used fakereplace with some success to hot replace > > > my method bodies (https://github.com/fakereplace/fakereplace) > > > Romain Manni-Bucau > > > Twitter: @rmannibucau > > > Blog: http://rmannibucau.wordpress.com/ > > > LinkedIn: http://fr.linkedin.com/in/rmannibucau > > > Github: https://github.com/rmannibucau > > > > > > > > > > > > 2013/9/12 rsheldon <[hidden email]< > > http://user/SendEmail.jtp?type=node&node=4665072&i=0>>: > > > > > > > > > > All, > > > > > > > > I'm working to migrate an enterprise application EAR from weblogic to > > > TomEE. > > > > We currently use JRebel and would like to do so with TomEE. I know > > that > > > > they support 1.5.2 (I'm using 1.6.0-SNAPSHOT) and 1.0 (although I'm > not > > > sure > > > > what their support covers) > > > > > > > > Here's my problem. We have a large number of libs in APP-INF/lib > that I > > > > would like to have JRebel monitor/reload. However, they want the > > > rebel.xml > > > > for this to live in APP-INF/classes. Weblogic supports this > directory, > > > but I > > > > can't see any mention of it for TomEE. > > > > > > > > So I have 2 questions: > > > > > > > > 1. Does/could TomEE support an APP-INF/classes directory? > > > > > > > > 2. Is anyone successfully using TomEE+JRebel+EAR, and if so, where > have > > > you > > > > put the rebel file for the libs that live in APP-INF/lib? > > > > > > > > Thanks, > > > > Richard > > > > > > > > > > > > > > > > -- > > > > View this message in context: > > > http://openejb.979440.n4.nabble.com/TomEE-JRebel-tp4665068.html > > > > Sent from the OpenEJB User mailing list archive at Nabble.com. > > > > > > > > > ------------------------------ > > > If you reply to this email, your message will be added to the > discussion > > > below: > > > > http://openejb.979440.n4.nabble.com/TomEE-JRebel-tp4665068p4665072.html > > > To unsubscribe from TomEE + JRebel, click here< > > > http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4665068&code=cnNoZWxkb243MkBnbWFpbC5jb218NDY2NTA2OHwtMTkzODkzMTIwNQ== > > > > > > . > > > NAML< > > > http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml > > > > > > > > > > > > > > > > -- > > View this message in context: > > http://openejb.979440.n4.nabble.com/TomEE-JRebel-tp4665068p4665074.html > > Sent from the OpenEJB User mailing list archive at Nabble.com. >
