Eclipse 3.5.2 Does Not Hit Breakpoints when Remote Debugging on Tomcat 6» - scala

This is a local-to-local debug setup, from an Eclipse instance to Tomcat on localhost.
I've tried starting tomcat from both /etc/init.d/tomcat6 start and from /usr/share/tomcat6/bin/catalina.sh jpda start (ie from the startup command and from CATALINA_HOME command), no change in result.
The JAVA_OPTS to Tomcat are
JAVA_OPTS="-Djava.awt.headless=true
-Xmx256m -XX:+UseConcMarkSweepGC -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n"
Eclipse project is a simple Scala Lift (2.8.1/2.3) web project generated from the default Lift Maven archetype (this has worked in debug before, so it's not the archetype's fault).
Eclipse Remote Debugging configuration is default, except port changed to 8888. Source path includes project directory.
Maven is used for build/deploy, so a mvn clean and mvn tomcat:redeploy is done after breakpoints are set.
Remote Debug session is launched, connects to Tomcat as seen in screenshot.
Tomcat does seem to be in debug mode, as evidenced by catalina.out:
16:19:37.865 [http-127.0.0.1-8080-1]
DEBUG comet_trace - AJAX Request:
C8436967E450AD62D37654BBB3B5FCB9
Map(F27626326198LU12KZ -> List(foo), q
-> List(f0), limit -> List(10), timestamp -> List(1306271977857))
16:19:37.866 [http-127.0.0.1-8080-1]
DEBUG comet_trace - AJAX Response:
C8436967E450AD62D37654BBB3B5FCB9
PlainTextResponse(,List(),200)
16:19:37.870 [http-127.0.0.1-8080-1]
INFO net.liftweb.util.TimeHelpers -
Service request (GET)
/bsa2/search/ajax_request returned
200, took 11 Milliseconds
16:19:44.312 [http-127.0.0.1-8080-1] DEBUG
comet_trace - AJAX Request:
C8436967E450AD62D37654BBB3B5FCB9
Map(F27626326198LU12KZ -> List(foo), q
-> List(), limit -> List(10), timestamp -> List(1306271984133))
Web site is accessed with browser on the normal Tomcat URL (eg http://localhost:8080/test/cleanproject).
No breakpoint is ever reached.

Related

how to debug play framework 2.5 in eclipse

Enviroment
OS : OS X EL Capitan
IDE: Luna Release (4.4.0)
Activator : activator-dist-1.3.10.
My step.
--> But at the last step, I can't connect to vm. Wating for vm connect at port 999.
Please help me !
In your debug configuration you have to set Connection Type to Standard (Socket Attach) (in the screenshot you have selected Standard (Socket Listen).
open your eclipse
Navigate to Help->eclipsemarketplace
Search scala
Then install two plugins:-
1) ScalaStyle 0.7.0
2) Scala Ide 4.2.x
run below command in console from your project directory
Note: before debug first run this command
activator -jvm-debug 9999 run
now right click on project
go to
Debug as -> debug configuration click new and insert project name
set port number to 9999
now select Scala debugger(socket attach)(Scala debugger will come only if you have installed those plugin mentioned above) from dropdown
and click on debug

How to configure encoding for TestNG output in Intellij IDEA?

I'm runnig my tests on local environment using TestNG (6.8.8) plugin in IntelliJ IDEA (14.0.1) and got bad encoding of log generated by log4j:
[TestNG] Running:
C:\Users\user\.IdeaIC14\system\temp-testng-customsuite.xml
INFO com.common.reporter.ScreenShot# 33: Удаляем все файлы из папки C:\Workspace\tests\target\Custom suite\..\html\screenshots
TRACE com.common.driver.DriverFactory# 137: os.name = windows 7
TRACE com.common.driver.DriverFactory# 140: РўРёРї РћРЎ - windows
Starting ChromeDriver (v2.11.298604 (75ea2fdb5c87f133a8e1b8da16f6091fb7d5321e)) on port 20843
Only local connections are allowed.
I have tried configure VM options through Run/Debug Configurations and added options like described here - Character encoding in IDEA output of AssertionError but both solutions did not help.
It works fine when running using mvn.
Any ides how could be this issue solved?

Felix 4.4.0 Web Console Configurations

Felix Web Console -> Configurations doesn't work.
I've started Apache Felix 4.4.0 with bundles:
org.apache.felix.eventadmin-1.3.2.jar
commons-io-2.4.jar
osgi.cmpn-4.2.jar
org.apache.felix.http.bundle-2.2.2.jar
commons-fileupload-1.3.1.jar
org.apache.felix.fileinstall-3.2.6.jar
org.apache.felix.configadmin-1.8.0.jar
org.apache.felix.webconsole-4.2.2-all.jar
My problems:
Web Console starts but when I select 'Status -> Configurations' I get: 'Status: No Configurations available'.
'OSGi -> Configuration' view doesn't work.
I get the same with: g! deploy org.apache.felix.webconsole.
Thanks for help
zibi

gwt : URL was not found. eclpse/

What i have to do to proper run my app under eclipse as a web app ?
My application is working fine under tomcat but when i start this in eclipse using 'run as web app' then i've got many massages like this :
'The requested URL /com.xxx.xxx.xxx/xxxx was not found on this server.'
Those messages are from firebug plugin.
please help.
In eclipse check Run Configuration .
Do right click of project : Run As->Run Configuration->Web Application->Arguments
-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl Gwtdevtest.html -logLevel INFO -codeServerPort 9997 -port 8888 -war D:\project_backup\sample-workspace2.0\gwtdevtest\war com.test.gwtdev.Gwtdevtest
As per your project path and module, do changes in arguments.

GWT Maven : Module 'xxx' may need to be (re)compiled

Problem: Keep getting "module 'xxx' may need to be (re)compiled".
Steps:
Importing a sample GWT-Maven project into eclipse ("MobileWebApp" - from the GWT SDK).
GWT|compile the project.
Running in production mode (without the codesvr parameter, i.e. using "localhost:8888/MobileWebApp.html").
Notes:
I am fairly new to both GWT and Maven.
I read GWT module may need to be (re)compiled REDUX.
Dev mode does work (I am able to debug the application).
Detailed Steps:
Copying the "MobileWebApp" folder from the "samples" folder inside the GWT SDK (version 2.5.1) to my eclipse workspace.
Importing the project: File->Import->Existing Maven Projects (pointing to the "MobileWebApp" folder where the pom.xml exists.
Configuring the project following these steps: https://developers.google.com/eclipse/docs/faq?hl=iw#gwt_with_maven
At this point I am able to run the app as "Web Application" and debug it.
Running GWT|Compile: The nocache.js stuff is being placed in the target folder.
Now, when i try to run the app in production mode I am getting the (re)compile error.
Logs:
"DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
DataNucleus Enhancer completed with success for 0 classes. Timings : input=713 ms, enhance=0 ms,
total=713 ms. Consult the log for full details
DataNucleus Enhancer completed and no classes were enhanced. Consult the log for full details"
"Compiling module com.google.gwt.sample.mobilewebapp.MobileWebApp
Validating units:
Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Compiling 6 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compiling permutation 5...
Compile of permutations succeeded
Linking into D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\mobilewebapp
Invoking Linker AppCacheLinker
Be sure your landing page's tag declares a manifest:
Link succeeded
Compilation succeeded -- 152.077s"
"Initializing App Engine server
06/07/2013 20:12:33 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
06/07/2013 20:12:33 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\WEB-INF/appengine-web.xml
06/07/2013 20:12:33 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\WEB-INF/web.xml
06/07/2013 20:12:34 com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
06/07/2013 20:12:36 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector#0.0.0.0:8888
06/07/2013 20:12:36 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at localhost:8888/
06/07/2013 20:12:36 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at localhost:8888/_ah/admin
Linking modules
Bootstrap link for command-line module 'com.google.gwt.sample.mobilewebapp.MobileWebApp'
Linking module 'mobilewebapp'
Invoking Linker AppCacheLinker
DevMode warning: Clobbering appcache.nocache.manifest to allow debugging. Recompile before deploying your app!
Be sure your landing page's tag declares a manifest:
06/07/2013 20:13:38 com.google.apphosting.utils.jetty.AppEngineAuthentication$AppEngineAuthenticator authenticate
INFO: Got /MobileWebApp.html but no one was logged in, redirecting."
Pom.xml: https://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/mobilewebapp/
Thanks ahead.
Answering my own question:
1) from command: "mvn gwt:run".
2) Google|GWT compile.
P.S. As much as I am happy figuring that out (after agonizing couple of days) I would still like to know the reasons of why I have to - first lunch the app then compile it. Very strange - in my humble opinion.
offtopic: This sample app was supposed to be "offline executable" (from mobile, at the very least) - so how exactly do I test it? I tried (after running the app once or twice from mobile device, so that it will be cached) to switch to airplane mode and navigating to the app (just like he demonstrated) but, obviously(?), the server is not reachable.. Do I need to enable something specific for it to work? (my mobile device is Google-Nexus-4)
Multiple steps:
Update Project properties -> deployment Assembly using Deploy GWT maven project with eclipse deploys webapp directory instead of target/project directory
mvn clean package
mvn gwt:compile
In eclipse, click on 'GWT Compile Project' -> Advacned -> Remove '-war src/main/webapp' argument and hit compile.
Output should be like this -
Linking into target/project-1.0-SNAPSHOT/ModuleName
Now the deployment should work fine.