Comments (11)
What happens if you modify JSP file or cleanup the work directory (directory with translated JSPs)?
from hotswapagent.
The .java and .class files are re-created, but the error persists.
from hotswapagent.
Oh my bad. Do you want the full stack trace of the exception?
from hotswapagent.
yes!
from hotswapagent.
I'm very sorry for the delay, but I've been really busy. Here it's the stack trace: http://negora.com/bugs/hotswap-agent/50/myweb.output . I've tried to upload it here, but it seems that it only accepts images. Weird.
By the way, if you want I can upload the project of NetBeans IDE. Although as I mentioned before, it's just a JSP and a class that instantiates itself (in order to force the use of two different class loaders in both "sides").
from hotswapagent.
Please upload the netbeans project, I will test it.
from hotswapagent.
Here it's the project: http://negora.com/bugs/hotswap-agent/50/myweb.zip . Thank you!
from hotswapagent.
Can you elaborate on your project setup? I had some issues to run the project with netbeans:
- -XXaltjvm=dcevm was ignored, because Netbeans by default add another JAVA_OPTS option
-server
whitch override-XXaltjvm
- netbeans feature "deploy on save" is on by default - if you leave this on, after each change the application is compleatly redeployed and hotswap agent is not needed at all. I have tested the application with "Deploy on save" and it worked correctly.
In debug mode wihtout "Deploy on save" I have used "Apply changes" after class modification and it worked as well. Change of JSP file was not triggered (it needs hotswap-agent.propertieswebappDir to set, but it is not supported for Wildfly yet).
from hotswapagent.
Hello Edudant:
I'm sorry, but I did several mistakes in my previous message:
- I should have disabled the option "Compile on save" in the NetBeans IDE project. It has often given me several problems. In my opinion it's better to submit the changes manually to reproduce this type of problem.
- I forgot to mention that I run the Wildfly instance apart from NetBeans IDE, running it in the command line and deploying the exploded WAR file by hand.
The last point is what makes a difference. I've discovered that NeBeans IDE (its Wildfly plug-in really) adds a line to the Wildfly execution in debug mode: -Djboss.modules.system.pkgs=org.jboss.byteman . I've just read that Byteman is a Java agent that allows complex hot-modifications to the bytecode ( http://byteman.jboss.org/ ). I guess that the Wildfly plug-in uses it to give the users the extra function of doing hot-changes that aren't allowed by the default JVM (such as adding a non-static method, for example), without requiring other external agents like HotSwap Agent.
I've run Wildfly from NetBeans IDE with and WITHOUT HotSwap Agent, and the result has been the same: I've been able to submit "forbidden" hot-changes to my classes. So I guess that Byteman overrides HotSwap Agent in some way.
So, to test Wildfly with HotSwap Agent, you need to run Wildfly apart, from the command line. In Linux:
export JAVA_OPTS='-server -Xms128m -Xmx512m'
export JAVA_OPTS="$JAVA_OPTS -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787"
export JAVA_OPTS="$JAVA_OPTS -XXaltjvm=dcevm -javaagent:$HOTSWAP_AGENT/hotswap-agent.jar"
"$WILDFLY_HOME"/bin/standalone.sh
Once you've started the server, create a link to the building directory of your project in the deployments directory of Wildfly, and deploy the project:
cd "$WILDFLY_HOME/standalone/deployments/"
ln -s "$NETBEANS_PROJECTS/myweb/build/web" myweb.war
touch myweb.war.dodeploy
Run http://localhost:8080/myweb from your Web browser. Everything will be OK. Now, from NetBeans IDE, click on the menu "Debug → Attach debugger..." and connect to the port 8787, where the JVM that runs Wildfly is listening. Alter the class myweb.Test, adding a line into the constructor:
private Test () {
System.out.println ("Constructing Test ().");
}
Apply the changes choosing "Debug > Apply code changes". Reload the page in the Web browser and the exception will pop up.
from hotswapagent.
I just wanted to clarify that I may be mistaken about Byteman. Because sometimes it accepts "forbidden" changes whereas others it doesn't (in the same class, in the same line :S ) . I don't know the reason.
Anyway, that doesn't matters with regard to HotSwap Agent: If you run Wildfly from NetBeans IDE, it's ignored anyway. If you run Wildfly apart, it fails with the linkage error commented before. I'm interested in this last point. Thank you!
from hotswapagent.
Please reopen if still valid.
from hotswapagent.
Related Issues (20)
- IllegalAccessError with JDK 17
- MyBatis Plus Dynamic Sql Hotswap do not work
- cannot create release HOT 1
- Caused by: compile error: no such class: ManagedBean
- No match for watchkey event
- Does the solution of JetBrainsRuntime 11 + HotswapAgent can work? HOT 1
- Getting error every build HOT 1
- Errors thrown when starting jbr_jcef-17.0.7 Minecraft Paper server. HOT 4
- IntelliJ plugin or other easy way to launch from IntelliJ HOT 1
- Can HotswapAgent support add @Resource/@Autowired fields in springboot based project? HOT 6
- JacksonPlugin ConcurrentModificationException
- What is the ProxyReplacerTransformer in the Spring plugin used for? HOT 1
- HotswapAgent IDEA plugin Could not identify JBR17's dcevm HOT 1
- bug: my Spring Boot project will OOM after running for a day
- Can not get a JavaCompiler instance with jbr_17.0.7 HOT 1
- Executing ReloadJavaProxyCommand caused an infinite loop HOT 5
- What is the ProxyReplacerTransformer in the Spring plugin used for? HOT 1
- How do I run this from gradle / openjdk? (Exception on changes) HOT 2
- NullPointerException: Cannot invoke "java.net.URL.getFile()" because the return value of "org.hotswap.agent.javassist.ClassPool.find(String)" is null HOT 3
- Application run failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hotswapagent.