Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[PROFILER4J:0] Could not transform class

Help
2006-09-28
2013-04-24
  • Benjamin Klatt
    Benjamin Klatt
    2006-09-28

    Hi all,

    I'm trying to profile an application that requires to connect to a database. I just need to profile my own packages so configured just two rules:
    com.mypackage.* (*) -> accept
    * (*) -> reject
    While the start of the application is profiled fine,  I get an error when the database driver classes seems to be loaded:
    ---
    [PROFILER4J:0] Could not transform class net.sourceforge.jtds.jdbc.SharedNamedPi
    pe
    [PROFILER4J:0]  at javassist.bytecode.Descriptor.getParameterTypes(Descriptor.ja
    [PROFILER4J:0]  at net.sf.profiler4j.agent.BytecodeTransformer.makeName(Bytecode
    [PROFILER4J:0]  at net.sf.profiler4j.agent.BytecodeTransformer.transform(Bytecod
    [PROFILER4J:0]  at net.sf.profiler4j.agent.Transformer.transform(Transformer.jav
    [PROFILER4J:0]  at com.poet.ps.xs.cm.catalogexporter.exporter.CatalogExporter.op
    [PROFILER4J:0]  at com.poet.ps.xs.cm.catalogexporter.exporter.CatalogExporter.ru
    [PROFILER4J:0] Profiler stoppedread.run(Unknown Source)
    ---

    Shouldn't they been excluded?
    Does anyone got an idea how to fix this?

    Thanks
    Benjamin

     
    • Hi Benjamin,

      That´s really weird since you excluded the classes. Would you please fill a bug attaching your configuration file (from profiler4j) and the log generated till the error

      * If possible, use the option verbosity=2

      I´ll create a test case here using the jtds driver.

      Thanks for your interest.
      --Antonio

       
    • Matthias
      Matthias
      2006-11-16

      Hello Antonio,

      Is this bug fixed? It seems, that i have the same problem.

      ---- here´s the tomcat-log -----
      .......
      .......
      [PROFILER4J:2]    instrumenting +getProperty(java.lang.String)
      [PROFILER4J:2]    instrumenting +getProperties()
      [PROFILER4J:0] Could not transform class org.jpox.store.rdbms.RDBMSManager
      [PROFILER4J:0] javassist.NotFoundException: javax.resource.spi.security.PasswordCredential[PROFILER4J:0]        at javassist.ClassPool.get(ClassPool.java:389)[PROFILER4J:0]    at javassist.bytecode.Descriptor.toCtClass(Descriptor.java:549)[PROFILER4J:0]       at javassist.bytecode.Descriptor.getParameterTypes(Descriptor.java:396)[PROFILER4J:0]   at javassist.CtBehavior.getParameterTypes(CtBehavior.java:176)[PROFILER4J:0]        at net.sf.profiler4j.agent.BytecodeTransformer.makeName(BytecodeTransformer.java:188)[PROFILER4J:0]     at net.sf.profiler4j.agent.BytecodeTransformer.transform(BytecodeTransformer.java:94)[PROFILER4J:0]         at net.sf.profiler4j.agent.Transformer.transform(Transformer.java:56)[PROFILER4J:0]     at sun.instrument.TransformerManager.transform(TransformerManager.java:122)[PROFILER4J:0]   at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)[PROFILER4J:0]     at java.lang.ClassLoader.defineClass1(Native Method)[PROFILER4J:0]      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)[PROFILER4J:0]    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)[PROFILER4J:0]        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)[PROFILER4J:0]       at java.net.URLClassLoader.access$100(URLClassLoader.java:56)[PROFILER4J:0]     at java.net.URLClassLoader$1.run(URLClassLoader.java:195)[PROFILER4J:0]         at java.security.AccessController.doPrivileged(Native Method)[PROFILER4J:0]         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)[PROFILER4J:0]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)[PROFILER4J:0]      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)[PROFILER4J:0]  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)[PROFILER4J:0]  at java.lang.Class.forName0(Native Method)[PROFILER4J:0]    at java.lang.Class.forName(Class.java:164)[PROFILER4J:0]        at org.jpox.ClassNameConstants.class$(ClassNameConstants.java:42)[PROFILER4J:0]         at org.jpox.ClassNameConstants.<clinit>(ClassNameConstants.java:46)[PROFILER4J:0]   at org.jpox.JDOClassLoaderResolver.classForName(JDOClassLoaderResolver.java:127)[PROFILER4J:0]  at org.jpox.plugin.PluginRegistryFactory.newInstance(PluginRegistryFactory.java:87)[PROFILER4J:0]   at org.jpox.plugin.PluginRegistryFactory.newPluginRegistry(PluginRegistryFactory.java:58)[PROFILER4J:0]         at org.jpox.plugin.PluginManager.<init>(PluginManager.java:46)[PROFILER4J:0]        at org.jpox.PMFContext.<init>(PMFContext.java:96)[PROFILER4J:0]         at org.jpox.AbstractPersistenceManagerFactory.<init>(AbstractPersistenceManagerFactory.java:115)[PROFILER4J:0]      at org.jpox.PersistenceManagerFactoryImpl.<init>(PersistenceManagerFactoryImpl.java:108)[PROFILER4J:0]  at org.jpox.PersistenceManagerFactoryImpl.getPersistenceManagerFactory(PersistenceManagerFactoryImpl.java:92)[PROFILER4J:0]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[PROFILER4J:0]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[PROFILER4J:0]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[PROFILER4J:0]  at java.lang.reflect.Method.invoke(Method.java:585)[PROFILER4J:0]  at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:534)[PROFILER4J:0]    at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:478)[PROFILER4J:0]   at at.company.product.persistence.jdo.PersistenceHelper.createPMF(PersistenceHelper.java:85)[PROFILER4J:0]     at at.company.product.persistence.jdo.PersistenceHelper.<init>(PersistenceHelper.java:33)[PROFILER4J:0]    at at.company.product.persistence.jdo.PersistenceHelper.instance(PersistenceHelper.java:38)[PROFILER4J:0]      at at.company.product.persistence.jdo.PersistenceHelper.getDetachAllPersistenceManager(PersistenceHelper.java:48)[PROFILER4J:0]        at at.company.product.persistence.jdo.aware.QueryCapables.getPersistenceManager(QueryCapables.java:77)[PROFILER4J:0]       at at.company.product.persistence.jdo.aware.QueryCapables.query(QueryCapables.java:144)[PROFILER4J:0]  at at.company.product.persistence.jdo.PersistenceProxy.listSettings(PersistenceProxy.java:226)[PROFILER4J:0]       at at.company.product.ui.listeners.SettingChanged.getSettings(SettingChanged.java:91)[PROFILER4J:0]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[PROFILER4J:0]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[PROFILER4J:0]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[PROFILER4J:0]  at java.lang.reflect.Method.invoke(Method.java:585)[PROFILER4J:0]       at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:454)[PROFILER4J:0]      at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)[PROFILER4J:0]      at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)[PROFILER4J:0]    at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)[PROFILER4J:0]     at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)[PROFILER4J:0]         at javax.faces.component.UISelectItems.getValue(UISelectItems.java:55)[PROFILER4J:0]    at org.apache.myfaces.shared_tomahawk.util.SelectItemsIterator.hasNext(SelectItemsIterator.java:102)[PROFILER4J:0]  at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:478)[PROFILER4J:0]       at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:454)[PROFILER4J:0]   at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:278)[PROFILER4J:0]       at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:252)[PROFILER4J:0]     at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:54)[PROFILER4J:0]     at org.apache.myfaces.renderkit.html.ext.HtmlMenuRenderer.encodeEnd(HtmlMenuRenderer.java:57)[PROFILER4J:0]         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)[PROFILER4J:0]      at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:443)[PROFILER4J:0]     at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)[PROFILER4J:0]   at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)[PROFILER4J:0]     at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)[PROFILER4J:0] at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:443)[PROFILER4J:0]  at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)[PROFILER4J:0]       at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)[PROFILER4J:0]         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)[PROFILER4J:0]  at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:443)[PROFILER4J:0]         at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:420)[PROFILER4J:0]  at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:441)[PROFILER4J:0]     at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)[PROFILER4J:0]   at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)[PROFILER4J:0]     at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)[PROFILER4J:0]      at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)[PROFILER4J:0]       at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)[PROFILER4J:0]    at org.apache.myfaces.shared_tomahawk.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:54)[PROFILER4J:0]  at org.apache.jsp.menu_jsp._jspx_meth_t_panelGrid_0(menu_jsp.java:531)[PROFILER4J:0]    at org.apache.jsp.menu_jsp._jspx_meth_h_form_0(menu_jsp.java:468)[PROFILER4J:0]     at org.apache.jsp.menu_jsp._jspx_meth_f_view_0(menu_jsp.java:246)[PROFILER4J:0]         at org.apache.jsp.menu_jsp._jspService(menu_jsp.java:160)[PROFILER4J:0]    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)[PROFILER4J:0]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)[PROFILER4J:0]   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)[PROFILER4J:0]    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)[PROFILER4J:0]       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)[PROFILER4J:0]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)[PROFILER4J:0]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)[PROFILER4J:0]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)[PROFILER4J:0]      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)[PROFILER4J:0]      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)[PROFILER4J:0]  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)[PROFILER4J:0]   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)[PROFILER4J:0]         at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)[PROFILER4J:0]        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)[PROFILER4J:0]      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)[PROFILER4J:0]      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)[PROFILER4J:0]         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)[PROFILER4J:0]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)[PROFILER4J:0]  at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)[PROFILER4J:0]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)[PROFILER4J:0]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)[PROFILER4J:0]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)[PROFILER4J:0]        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)[PROFILER4J:0]    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)[PROFILER4J:0]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)[PROFILER4J:0]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)[PROFILER4J:0]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)[PROFILER4J:0]    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)[PROFILER4J:0]         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)[PROFILER4J:0]     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)[PROFILER4J:0]         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)[PROFILER4J:0]        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)[PROFILER4J:0]         at java.lang.Thread.run(Thread.java:613)[PROFILER4J:0] Profiler stopped
      -------------------

      -------- here´s my project-file ------------
      <?xml version="1.0" encoding="UTF-8"?>
      <Profiler4jProject>
        <Host>localhost</Host>
        <Port>7890</Port>
        <Rules access="PACKAGE" beanProps="true">
          <Rule action="REJECT">org.jpox.store.rdbms.RDBMSManager(*)</Rule>
          <Rule action="ACCEPT">at.company.product.*(*)</Rule>
          <Rule action="REJECT">*(*)</Rule>
        </Rules>
      </Profiler4jProject>
      ----------------------------------------

       
    • Laran Evans
      Laran Evans
      2007-10-17

      I have a similar issue. Project file is below.

      [PROFILER4J:0] Could not transform class edu.iu.uis.eden.messaging.serviceconnectors.JmsConnector
      [PROFILER4J:0] javassist.NotFoundException: javax.jms.ConnectionFactory[PROFILER4J:0]   at javassist.ClassPool.get(ClassPool.java:389)[PROFILER4J:0]    at javassist.bytecode.Descriptor.toCtClass(Descriptor.java:549)[PROFILER4J:0]   at javassist.bytecode.Descriptor.getParameterTypes(Descriptor.java:396)[PROFILER4J:0]   at javassist.CtBehavior.getParameterTypes(CtBehavior.java:176)[PROFILER4J:0]    at net.sf.profiler4j.agent.BytecodeTransformer.makeName(BytecodeTransformer.java:188)[PROFILER4J:0]     at net.sf.profiler4j.agent.BytecodeTransformer.transform(BytecodeTransformer.java:94)[PROFILER4J:0]     at net.sf.profiler4j.agent.Transformer.transform(Transformer.java:56)[PROFILER4J:0]     at sun.instrument.TransformerManager.transform(TransformerManager.java:122)[PROFILER4J:0]       at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)[PROFILER4J:0]     at java.lang.ClassLoader.defineClass1(Native Method)[PROFILER4J:0]      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)[PROFILER4J:0]        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)[PROFILER4J:0]        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)[PROFILER4J:0]    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)[PROFILER4J:0]     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)[PROFILER4J:0]    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)[PROFILER4J:0]    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)[PROFILER4J:0]  at edu.iu.uis.eden.messaging.RemoteResourceServiceLocatorImpl.registerClient(RemoteResourceServiceLocatorImpl.java:208)[PROFILER4J:0]   at edu.iu.uis.eden.messaging.RemoteResourceServiceLocatorImpl.run(RemoteResourceServiceLocatorImpl.java:192)[PROFILER4J:0]      at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:431)[PROFILER4J:0]      at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.runAndReset(FutureTask.java:198)[PROFILER4J:0]     at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:189)[PROFILER4J:0]       at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:213)[PROFILER4J:0]      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)[PROFILER4J:0]   at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)[PROFILER4J:0]      at java.lang.Thread.run(Thread.java:613)[PROFILER4J:0] Profiler stopped
      rrdhcp152-409:/java/servers/apache-tomcat-5.5.16/bin laran$

      <?xml version="1.0" encoding="UTF-8"?>
      <Profiler4jProject>
        <Host>localhost</Host>
        <Port>7890</Port>
        <Rules access="PRIVATE" beanProps="true">
          <Rule action="REJECT">org.apache.*(*)</Rule>
          <Rule action="REJECT">org.jboss.*(*)</Rule>
          <Rule action="REJECT">net.sf.jasperreports.*(*)</Rule>
          <Rule action="REJECT">bsh.*(*)</Rule>
          <Rule action="REJECT">EDU.oswego.*(*)</Rule>
          <Rule action="REJECT">org.eclipse.*(*)</Rule>
          <Rule action="REJECT">org.hsqldb.*(*)</Rule>
          <Rule action="REJECT">javax.jms.*(*)</Rule>
          <Rule action="REJECT">edu.iu.uis.eden.messaging.serviceconnectors.*(*)</Rule>
          <Rule action="ACCEPT">*(*)</Rule>
        </Rules>
      </Profiler4jProject>

       
    • Nicky Sandhu
      Nicky Sandhu
      2009-05-05

      The filtering seems to be fixed in the not released version 1.0-beta3 ?