IntelliJ - Unable to start Tomcat 8. Starts fine via comand line - java

I'm a complete noob to IntelliJ and Tomcat 8. I managed to configured Tomcat 7 in IntelliJ in the same manner (as configuring TC8) and it works normally. Also, TC8 works when I start it up using command-line.
Here's what IntelliJ tells me when I try to run TC8:
"Application Server was not connected before run configuration stop,
reason: java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.CommunicationException [Root exception is
java.rmi.ConnectIOException: error during JRMP connection
establishment; nested exception is: java.net.SocketException:
Connection reset]"
Logs:
C:\apache-tomcat-8.0.8\bin\catalina.bat run Using CATALINA_BASE:
"C:\Program Files\Apache Software Foundation\Tomcat 8.0" Using
CATALINA_HOME: "C:\apache-tomcat-8.0.8" Using CATALINA_TMPDIR:
"C:\apache-tomcat-8.0.8\temp" Using JRE_HOME: "C:\Program
Files\Java\jre8" Using CLASSPATH:
"C:\apache-tomcat-8.0.8\bin\bootstrap.jar;C:\apache-tomcat-8.0.8\bin\tomcat-juli.jar"
Jun 06, 2014 1:22:08 AM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [C:\Program
Files\Apache Software Foundation\Tomcat 8.0\conf\server.xml] Jun 06,
2014 1:22:08 AM org.apache.catalina.startup.Catalina load WARNING:
Unable to load server configuration from [C:\Program Files\Apache
Software Foundation\Tomcat 8.0\conf\server.xml] Jun 06, 2014 1:22:08
AM org.apache.catalina.startup.Catalina start SEVERE: Cannot start
server. Server instance is not configured. Disconnected from server

Follow these steps :
Configure new Tomcat Server :
After configure click on OK.
Then on that one + symbol is there click on it i.e. in Green color, it shows :
then last step is to configure it for application :
from deployment tab add exploded file of application then configure that in which browser you want to open application then click OK, if you want to change more settings then you can.
Then try click on Green Button that will run your application.

Related

404 page when run as web application project

I want to create a basic Google Web Application project and i get an 404 Page not found error.
I followed several tutorials and what i do is this:
Open eclipse - File - New - Other - Web Application Project (under Google) - name it - (it doesn't matter if i check "Use GWT" or not the result is the same - Finish.
Right now i have a newly created web application project, so i can test it in localhost. I right click it, run as - web application project (with google icon). After it finishes in my console i have this:
Mar 22, 2017 10:13:58 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector#0.0.0.0:8888
Mar 22, 2017 10:13:58 AM com.google.appengine.tools.development.AbstractModule startup
INFO: Module instance default is running at http://localhost:8888/
Mar 22, 2017 10:13:58 AM com.google.appengine.tools.development.AbstractModule startup
INFO: The admin console is running at http://localhost:8888/_ah/admin
Mar 22, 2017 12:13:58 PM com.google.appengine.tools.development.DevAppServerImpl doStart
INFO: Dev App Server is now running
I open Chrome and go to localhost and i get:
HTTP ERROR: 404
Problem accessing /.
Reason:
NOT_FOUND
Powered by Jetty://
I must specify that i am deploying behind a proxy server. I tried also to run it without proxy, same result. All my settings are correct, because if i create a Dynamic Web Project and i deploy it on a Tomcat server, that one works fine.
The solution that worked for me is this. Check your Java facet. It has to be 1.7. Mine was 1.8.
Thank you.

Where can I find the exception stack traces in OpenShift Tomcat Cartridge

So I deployed a WAR file containing my jHipster app (Angularjs+Spring boot) on openshift Tomcat 7 Cartridge. I can open reach my application with no problems (the front end) but once I try to login (interaction with the backend) i get an error.
Normally I check the exception stacktrace in the console of Eclipse IDE if I am debugging my application locally.
I checked the logs in app-root/logs/jbossews.log but I only see that my app is deployed logs. like :
INFO: Deploying web application archive /var/lib/openshift/57582f677628e108ba000096/app-root/runtime/dependencies/jbossews/webapps/ROOT.war
Jun 10, 2016 10:43:18 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/57582f677628e108ba000096/app-root/runtime/dependencies/jbossews/webapps/ROOT.war has finished in 29,121 ms
Jun 10, 2016 10:43:18 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.8.28.129-8080"]
Jun 10, 2016 10:43:18 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 29501 ms
Not my application exceptions.
Is there any configuration that I should add to get my application exceptions in the logs ?
Hard to tell without seeing your configuration but there is a "OPENSHIFT_LOG_DIR" environment variable in every Openshift gear and you can use that to write your log files to the designated log directory.
Example in your spring-boot application.yml file, you can add
logging:
path: ${OPENSHIFT_LOG_DIR}
file: myApplication.log

Cannot properly deploy WAR file created by Eclipse to Tomcat

I'm gonna tell you about all steps I've done. I'll also give some pictures to make my problem more easy to understand. Any recommendation will be nice.
Neccessary to say that I use
Tomcat 6 (Instaled on C:\Program Files\Apache Software Foundation\Tomcat 6.0)
Eclipse 3.7 (Indigo)
Google plugin for eclipse 3.7 (for working with GWT)
In eclipse I have created a Server
I have $CATALINA_HOME set at C:\Program Files\Apache Software Foundation\Tomcat 6.0
I should say also that there is an exception when I try to run Tomcat from Eclipse (I mean R-click on server -> start).
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
12 бер 2013 17:01:38 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
12 бер 2013 17:01:38 org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: C:\Program Files\Apache Software Foundation\Tomcat 6.0\work\Catalina\localhost\docs is unusable.
12 бер 2013 17:01:38 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory helloserver
12 бер 2013 17:01:38 org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: C:\Program Files\Apache Software Foundation\Tomcat 6.0\work\Catalina\localhost\helloserver is unusable.
12 бер 2013 17:01:38 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
12 бер 2013 17:01:38 org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory manager
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost\manager.xml (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:145)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1051)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
12 бер 2013 17:01:38 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
12 бер 2013 17:01:38 org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: C:\Program Files\Apache Software Foundation\Tomcat 6.0\work\Catalina\localhost\_ is unusable.
12 бер 2013 17:01:38 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
12 бер 2013 17:01:38 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
12 бер 2013 17:01:38 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/28 config=null
12 бер 2013 17:01:38 org.apache.catalina.startup.Catalina start
INFO: Server startup in 722 ms
I checked that I have no directories in the conf directory.
Okay look what I do next (I use this manual http://courses.coreservlets.com/Course-Materials/pdf/ajax/GWT-Intro.pdf):
1) Create a new Web Application Project (GWT). It works fine on Jetty
2) Than I need to export a WAR file.
3) The first problem (and the main one I think): that WAR file doesn't go to C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps. But it goes to c:\Users\username\AppData\Local\VirtualStore\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ . Moreover than I try to create a dynamic web project and try to run it on the server (r-click -> run as -> run on server). And than it is deployed in the same directory (I mean c:\Users\username\AppData\Local\VirtualStore\Program Files\Apache Software Foundation\Tomcat 6.0\webapps). I fail to see why! What is the reason?
4) Then I try to export WAR file (I mean GWT Project again) on the desktop. It goes fine and then I manually put the war file to C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps (Tomcat is still working).
5) Another problem is that Tomcat doesn't unpackage WAR file. And I get no result trying to load it in a web browser (http://localhost:8080/helloserver). And than I manually unpackage WAR file and put the helloserver directory to webapps and it works! All works fine.
The initial error in the log file tends to indicate that you don't have the tomcat manager application installed (or perhaps it is installed, but just incorrectly configured / disabled).
Try to verify if the manager application is functional by browsing
http://youmachine.domain:8080/manager/html
And if you can log in and see the list of installed web applications, then you know your tomcat manager application is functional.
I'm going to take a guess and suppose that the subsequent problems come from attempts (either initiated by you in trying to get it to work, or initiated as a fallback by windows / eclipse) to use a file copying deployment scheme, and it's getting redirected since that's a local to the application storage scheme.
You really want to upload the WAR via the manager application, don't bother trying to fix the copy scheme, as it runs amok with the virtual application storage configuration scheme on latter windows systems.

How do I debug GlassFish 3 using Eclipse Helios?

I am using the GlassFish 3 server adapter with Eclipse Helios 3.6. I can start the server using the Servers view in Eclipse, and things run just fine - but I am not able to debug my code.
After using the GF Admin Console to enable debugging (Configuration → JVM Settings → Debug, then restart the server), clicking Debug (Ctrl+Alt+D) gives me an error window:
I'm guessing this is because Eclipse can't connect to the JVM's debug port (9009 by default).
What is the proper way to set up GlassFish 3 debugging in Helios?
Edit
Re: #The Elite Gentleman, there aren't any errors that show up in the console. Here's an example:
Nov 29, 2010 11:47:42 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
C:\Program Files\Java\jdk1.6.0_22\bin\java.exe
-cp
C:/glassfishv3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=C:\glassfishv3\glassfish\domains\myDomain/logs/jvm.log
-Xmx512m
-client
-javaagent:C:/glassfishv3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true
-Dosgi.shell.telnet.maxconn=1
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=C:\glassfishv3\glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=C:\glassfishv3\glassfish\domains\myDomain/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=C:\glassfishv3\glassfish\domains\myDomain/config/server.policy
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=C:\glassfishv3\glassfish\domains\myDomain
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dosgi.shell.telnet.ip=127.0.0.1
-Djava.endorsed.dirs=C:\glassfishv3\glassfish/modules/endorsed;C:\glassfishv3\glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=C:\glassfishv3\glassfish
-Djava.ext.dirs=C:\Program Files\Java\jdk1.6.0_22/lib/ext;C:\Program Files\Java\jdk1.6.0_22/jre/lib/ext;C:\glassfishv3\glassfish\domains\myDomain/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=C:\glassfishv3\glassfish\domains\myDomain/config/cacerts.jks
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=C:\glassfishv3\glassfish\domains\myDomain/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dfelix.fileinstall.debug=1
-Dorg.glassfish.web.rfc2109_cookie_names_enforced=false
-Djava.library.path=C:/glassfishv3/glassfish/lib;C:/Program Files/Java/jdk1.6.0_22/bin;C:/glassfishv3/glassfish;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;C:/Program Files/Java/jdk1.6.0_22/jre/bin/server;C:/Program Files/Java/jdk1.6.0_22/jre/bin;C:/Program Files/Java/jdk1.6.0_22/jre/lib/amd64;C:/Python26/Scripts;C:/Python26;C:/Windows/System32/wbem;C:/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static;C:/Program Files (x86)/Common Files/Roxio Shared/DLLShared;C:/Program Files (x86)/Common Files/Roxio Shared/10.0/DLLShared;C:/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn;C:/Program Files/Microsoft SQL Server/100/Tools/Binn;C:/Program Files/Microsoft SQL Server/100/DTS/Binn;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn/VSShell/Common7/IDE;C:/Program Files (x86)/Microsoft SQL Server/100/DTS/Binn;C:/Program Files (x86)/PuTTY;C:/Program Files (x86)/jboss-4.2.2.GA/bin;C:/Program Files/MySQL/MySQL Server 5.0/bin;C:/Program Files/IBM/SQLLIB/BIN;C:/Program Files/IBM/SQLLIB/FUNCTION;C:/Program Files/IBM/SQLLIB/samples/repl;C:/Program Files/TortoiseSVN/bin;C:/jboss-5.1.0.GA/bin;C:/Program Files (x86)/QuickTime/QTSystem;C:/Program Files (x86)/Git/cmd;C:/Program Files/SlikSvn/bin;C:/glassfishv3/glassfish/%APPDATA%/Python/Scripts;C:/Program Files (x86)/Apache/apache-ant-1.7.0/bin;C:/Program Files (x86)/CVSNT/C:/jboss-5.1.0.GA/bin;C:/Program Files (x86)/Java/jdk1.6.0_14;C:/Program Files (x86)/Apache/apache-maven-2.1.0/bin;C:/glassfishv3/glassfish/bin
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
myDomain
-asadmin-args
start-domain,,,--domaindir,,,C:\glassfishv3\glassfish\domains,,,--debug,,,--verbose=true,,,myDomain
-instancename
server
-verbose
true
-debug
true
-asadmin-classpath
C:/glassfishv3/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-upgrade
false
-domaindir
C:/glassfishv3/glassfish/domains/myDomain
-read-stdin
true
Nov 29, 2010 11:47:43 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 4 msec.
INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.0.1 (build 22)
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Mon Nov 29 11:47:46 EST 2010
INFO: Starting Grizzly Framework 1.9.18-o - Mon Nov 29 11:47:46 EST 2010
INFO: Grizzly Framework 1.9.18-o started in: 40ms listening on port 7676
INFO: Grizzly Framework 1.9.18-o started in: 50ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 90ms listening on port 80
INFO: Grizzly Framework 1.9.18-o started in: 60ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 67ms listening on port 8181
INFO: The Admin Console is already installed, but not yet loaded.
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Realm jdbc of classtype com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Created HTTP listener http-listener-1 on port 80
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Created virtual server __asadmin
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
|#]
INFO: Virtual server server loaded system default web module
INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/richfaces-showcase'
INFO: Selected fallback cache factory
INFO: Creating LRUMap cache instance using parameters: {org.richfaces.enableControlSkinningClasses=false, javax.faces.PROJECT_STAGE=Development, com.sun.faces.validateXml=true, com.sun.faces.forceLoadConfiguration=true, javax.faces.STATE_SAVING_METHOD=server, org.richfaces.enableControlSkinning=true, javax.faces.FACELETS_LIBRARIES=/WEB-INF/app-tags.taglib.xml, org.richfaces.skin=#{skinBean.skin}}
INFO: Creating LRUMap cache instance of 512 items capacity
INFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0-SNAPSHOT SVN r.20127
INFO: Monitoring jndi:/server/richfaces-showcase/WEB-INF/faces-config.xml for modifications
INFO: Loading application richfaces-showcase at /richfaces-showcase
INFO: Loading application richfaces-showcase at /richfaces-showcase
INFO: Loading richfaces-showcase Application done is 7895 ms
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Portable JNDI names for EJB UserBean : [java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/UserBean, java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/UserBean!com.lapis.retailerportal.demo.ejb.UserBean]
INFO: Portable JNDI names for EJB DbTestBean : [java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/DbTestBean!com.lapis.retailerportal.demo.ejb.DbTestBean, java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/DbTestBean]
INFO: Portable JNDI names for EJB NewsBean : [java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/NewsBean!com.lapis.retailerportal.demo.ejb.NewsBean, java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/NewsBean]
INFO: Portable JNDI names for EJB GameConfigBean : [java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/GameConfigBean!com.lapis.retailerportal.demo.ejb.GameConfigBean, java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/GameConfigBean]
INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/RetailerPortalDemo'
INFO: com.lapis.retailerportal.demo.entity.Retailer actually got transformed
INFO: Selected fallback cache factory
INFO: Creating LRUMap cache instance using parameters: {javax.faces.PROJECT_STAGE=Development, com.sun.faces.validateXml=true, com.sun.faces.forceLoadConfiguration=true, org.richfaces.skin=tweaked}
INFO: Creating LRUMap cache instance of 512 items capacity
INFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0.20101110-M4 SVN r.20021
INFO: com.lapis.retailerportal.demo.entity.GameConfig actually got transformed
INFO: com.lapis.retailerportal.demo.entity.NewsItem actually got transformed
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: file:/C:/glassfishv3/glassfish/domains/myDomain/eclipseApps/RetailerPortalDemo/RetailerPortalDemo_Bean_jar/_RPD_Persistence_CTX login successful
INFO: Loading application RetailerPortalDemo#RetailerPortalDemo_Web.war at RetailerPortalDemo
INFO: Loading application RetailerPortalDemo#RetailerPortalDemo_Web.war at RetailerPortalDemo
INFO: Loading RetailerPortalDemo Application done is 5656 ms
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(2386ms) startup services(14265ms) total(16651ms)
INFO: Binding RMI port to *:8686
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://192.168.5.10:8686/jndi/rmi://192.168.5.10:8686/jmxrmi
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\glassfishv3\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\mjball\AppData\Local\Temp\fileinstall-2104459395405070416, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\glassfishv3\glassfish\domains\myDomain\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\mjball\AppData\Local\Temp\fileinstall-286375592969619901, felix.fileinstall.filter = null}
INFO: Started bundle: file:/C:/glassfishv3/glassfish/modules/autostart/osgi-web-container.jar
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed C:\glassfishv3\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\glassfishv3\glassfish\domains\myDomain\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\mjball\AppData\Local\Temp\fileinstall--3209587030652226629, felix.fileinstall.filter = null}
Edit 2
I was able to successfully debug in Eclipse by starting GlassFish externally, e.g.
> asadmin start-domain myDomain
and then creating a custom Debug Configuration:
So why can't the GlassFish server adapter do this?
Edit 3 - Problem solved
Originally, I had added GlassFish support through the GlassFish Tools plugin. I uninstalled the plugin, and added GlassFish support using Servers → New → Server → Download additional server adapters. Now I can debug. Woohoo!
You should start Glassfish with the debug instead of the run option inside the Servers view.
Same problem that you and it was driving me crazy.
My configuration is eclipse indigo over windows 7 and glassfish 3.1.1. The jdk I'm using is 1.7x64. I downloaded the glassfish server tools through the new server window.
I have solved it (it currently works, who knows what's happening in the near future) downloading and installing jdk1.6.30. I haven't uninstalled jdk1.7, but I've configured my eclipse project to use jdk1.6 instead.
Hi all I found solution for debugging problem. In my case Eclipse Indigo and linux x64 it works. More details in other thread about the same error https://stackoverflow.com/a/14551690/1976844

Java web-app debugging not possible due to direct undeploy on debug

When i try to debug my webapp it starts up the tomcat server and the application, but shuts down the debugger shortly before the app gets usable. I see the debugging toolbar for a second before it vanishes again, though the app keeps running.
Tomcat-log:
Listening for transport dt_socket at address: 11555
23.03.2010 01:24:35 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
23.03.2010 01:24:35 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
23.03.2010 01:24:35 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 847 ms
23.03.2010 01:24:35 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
23.03.2010 01:24:35 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
23.03.2010 01:24:41 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8084
23.03.2010 01:24:41 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
23.03.2010 01:24:41 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/78 config=null
23.03.2010 01:24:41 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5855 ms
23.03.2010 01:24:42 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context []
23.03.2010 01:24:45 org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/] has already been started
Debugging log:
Attached JPDA debugger to localhost:11555
Checking data source definitions for missing JDBC drivers...
Deploying JDBC driver to /Applications/NetBeans/apache-tomcat-6.0.20/lib/mysql-connector-java-5.1.6-bin.jar
Stopping Tomcat process...
Waiting for Tomcat...
Tomcat server stopped.
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
Undeploying ...
OK - Undeployed application at context path /
In-place deployment at /path/to/project/dir/build/web
deploy?config=file%3A%2Fvar%2Ffolders%2FZP%2FZPbqxGrbHFaUlXzAfgWV1%2B%2B%2B%2BTQ%2F-Tmp-%2Fcontext734173871283203218.xml&path=/
OK - Deployed application at context path /
start?path=/
Start is in progress...
OK - Started application at context path /
debug-display-browser:
Browsing: http://localhost:8084/
connect-client-debugger:
BUILD SUCCESSFUL (total time: 18 seconds)
System is Netbeans 6.8 on MacOS 10.6.2.
You should see if the TC server is still in debug mode. The easiest way to do that is to Debug->Attach Debugger to localhost;11555. If it is still running 'debuggable', you will be able to do a fair bit of debugging that way.
I had similar problem where debugging started but kind of stopped immediately. The application was deployed however. I was not even able to attach to debugger manually, even if the Tomcat was running in debug mode. By creating a simple debuggable hello world project and starting debugging it also made debugger to break to my "problem project"'s break points as well.. But this was not really way to work.
My problem was "solved" by dropping mysql-connector-java.jar from my web project. I don't see any reasoning, but it simply works now. FYI also, the Netbean's Tomcat config's property "Enable JDBC driver deployment" did not have effect.
My environment was Netbeans 6.9.1 and project type was maven2, run on on Win7.

Categories