Giter VIP home page Giter VIP logo

Comments (3)

jon-bell avatar jon-bell commented on July 17, 2024

Can you give more precise steps to reproduce? What command did you use to instrument the JRE, and what command did you use to start Tomcat?

from phosphor.

dencat avatar dencat commented on July 17, 2024

OS: Ubuntu 16.04 x64

Instrument the JRE:

java -jar Phosphor-0.0.4-SNAPSHOT.jar -controlTrack $JAVA_HOME java_inst

Download and extract tomcat:

wget https://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.17/bin/apache-tomcat-9.0.17.tar.gz
tar xzf apache-tomcat-9.0.17.tar.gz
cd apache-tomcat-9.0.17/bin

Set environment variables:

export JAVA_HOME=PATH_TO_java_inst
export JRE_HOME=PATH_TO_java_inst
export JAVA_OPTS=" -Xbootclasspath/a:PATH_TO_Phosphor-0.0.4-SNAPSHOT.jar  -javaagent:PATH_TO_Phosphor-0.0.4-SNAPSHOT.jar "

Run tomcat:

./startup.sh 

Then see log:

cat ../logs/catalina.out
java.lang.IllegalArgumentException: argument type mismatch
	at java.lang.Throwable.fillInStackTrace$$PHOSPHORTAGGED(Throwable.java)
	at java.lang.Throwable.fillInStackTrace$$PHOSPHORTAGGED(Throwable.java:783)
	at java.lang.Throwable.<init>(Throwable.java:265)
	at java.lang.Exception.<init>(Exception.java:66)
	at java.lang.RuntimeException.<init>(RuntimeException.java:62)
	at java.lang.IllegalArgumentException.<init>(IllegalArgumentException.java:52)
	at java.lang.IllegalArgumentException.<init>(IllegalArgumentException.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke0$$PHOSPHORTAGGED(NativeMethodAccessorImpl.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke$$PHOSPHORTAGGED(NativeMethodAccessorImpl.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke$$PHOSPHORTAGGED(DelegatingMethodAccessorImpl.java:43)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
	at java.lang.reflect.Method.invoke$$PHOSPHORTAGGED(Method.java:498)
	at org.apache.catalina.startup.Bootstrap.setAwait$$PHOSPHORTAGGED(Bootstrap.java:422)
	at org.apache.catalina.startup.Bootstrap.main$$PHOSPHORTAGGED(Bootstrap.java:490)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java)

Bootstrap.java#L422:

        Method method =
            catalinaDaemon.getClass().getMethod("setAwait", paramTypes);
        method.invoke(catalinaDaemon, paramValues);

it seems something wrong with reflection

from phosphor.

jon-bell avatar jon-bell commented on July 17, 2024

Should be all fixed now in master - big thanks to @katherine-hough for doing most of the heavy lifting.

FYI - if you pre-instrument tomcat: java -jar Phosphor-0.0.4-SNAPSHOT.jar -controlTrack apache-tomcat apache-tomcat-inst you'll find that it runs much, much much faster!

from phosphor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.