I have been trying to find some documention on whether it's possible to run ServiceMix with IntelliJ for running/debugging purposes?
Does anyone know how to do this/point me to some kind of guide?
Thanks.
I'm debugging servicemix app with remtoe debugging.
Run server with "debug" parameter ($SERVICEMIX_HOME/bin/servicemix debug) and connect to it with Remote Run/Debug configuration in Idea.
Servicemix starts debug on default 5005 port so simply change the SM server host name in Idea configuration.
Related
can you please describe me how to setup a development environment with intellij IDEA for restcomm-smsc to debug run compile build and doing breakpoints etc.
i am using ubuntu 14.04.
i could run the smsc gateway from the binary package and do the simulator tests but when it comes to do some coding and debugging and building stuff, i cannot creat e the correct development environment for restcomm-smsc source code.
i really appreciate if you can guide me simply how to do it?
Thanks a lot
BR
Gokhan
Do you want to debug application deployed on JBoss? If so you need to simply add/uncomment JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=n" in run.sh/standalone.sh.
In intellij Run -> Edit Configurations -> Remote and provide jboss IP and port from JAVA_OPTS.
I deploy my application using Maven on Liferay 7 (on Tomcat 8). But I need to debug it. How to configure my debug? Because, when I start maven with debug mode, it builds and stops. I have no ideas how to deal with it
Maven with debug mode is only targeted to debug maven build processes. If you want to debug your portlet you should follow the next steps:
Run Menu Entry > Edit Configurations > Add New Remote Configuration > Configure your host and debug port
You have to check too that JPDA port is enabled your Tomcat (you can enable it in your startup.sh/startup.bat script adding jpda in the final line)
exec "$PRGDIR"/"$EXECUTABLE" jpda start "$#"
Quick generic answer (someone with actual IntelliJ experience can probably give more details):
You start tomcat, that has Liferay deployed. Follow the advice you have for "how to debug tomcat applications". The caveat is that you might need to point IntelliJ to the source files for some (all) of the modules in Liferay - which is a huge task (being composed out of 500 modules. For eclipse I'm aware of a fix, for IntelliJ I'm not aware. I'm pretty sure such a beast exists though.
It will be easier (e.g. quick) if you only need your own modules' source.
I am using maven project in eclipse mars . My Project is not building in the eclipse so i am compiling my project through dos mode. I not being able to debug the code.so somebody please help me to solve issue
You can debug a tomcat server even if you don't run it inside Eclipse, using remote debug.
Please take a look at Remote debugging Tomcat with Eclipse or this blog for Intellij / this one for Eclipse
The idea is to start your tomcat server in debug mode then connecting your debugger to the "remote" (even if on your local PC) JVM (The JVM of the server).
I am running a sample "hello world" spring maven project from my machine and debugger port is allowing to run or debug the class also browser gives blank screen
To debug a maven project:
start a maven project in debug mode using 'mvnDebug' command instead of 'mvn'.
For your case should be:
mvnDebug jetty:run
It should open a debug port of 8000 by default on your machine.
tell your IDE to remotely connect to the running JVM of your server like you did in the picture (make sure you got the correct port).
The connection refused happens because there is no actual running JVM listening on 8081, as described in your picture.
You mentioned that you get a blank screen in the browser. Maybe you also have a misconfiguration in your pom file. The myspringlearning plugin definition doesn't seem right. You should just make sure you:
have a maven webapp project in your pom.xml (packaging should be war)
the jetty plugin should automatically pick it by default, on port 8080, just 'mvn jetty:run' in your project root
I am a newbie to IntelliJ IDEA. I was trying to deploy a web app in Tomcat.
It failed to deploy and i was not able to see any errors in the log console.
After much searching, I was able to find out the log files at
~/Library/Caches/IntelliJIdea10/tomcat/_p1/logs/ folder.
There were a bunch of log files here and one of the files contained the error. I then could solve the issue and proceed.
I was a user of eclipse and this error would have come directly in the log console in eclipse. However this is not the case in IntelliJ IDEA. Can somebody please explain what I am missing here?
Also, it would be nice if somebody could point out how the integration with Tomcat is done in IDEA (for better understanding). Note: I am using IntelliJ IDEA 10.5.2 Ultimate edition on Mac OS 10.6.8.
IntelliJ IDEA instructs Tomcat to use temporary directory as CATALINA_BASE where it places context configuration with the Artifact path from your project settings, it doesn't copy your web application into webapps directory.
In the Tomcat Run/Debug configuration there is Logs tab where you can specify custom logs to show in IDEA console, it should work out of the box, but probably you have customized logging in Tomcat configuration or in the application itself. Or maybe Tomcat 7 logging configuration is different and doesn't work with IDEA in which case you should submit a bug.
Here's some info for Windows users....if you check the boxes for 'Show console when stdout/stderr change', you may find that the Output tab does not show up even if stdout/stderr change.
For me, this was due to directory structure for the project containing spaces.
When I renamed the directory structure so that it did not contain spaces the Output tab showed up.
Found solution here: Cannot deploy project to tomcat inside intellij IDEA 14. Applications Context was incorrect.
Run/Debug Configurations -> Deployment tab -> Applications Context