Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to setup remote debugger [PAXCONSTRUCT-134] #54

Open
ops4j-issues opened this issue May 25, 2010 · 1 comment
Open

Unable to setup remote debugger [PAXCONSTRUCT-134] #54

ops4j-issues opened this issue May 25, 2010 · 1 comment
Labels

Comments

@ops4j-issues
Copy link

Caspar MacRae created PAXCONSTRUCT-134

Hi,

From my pax construct project's top level POM, I have the following pax runner parameters defined:

 
						<param>--platform=felix</param>
						<param>--org.osgi.framework.bootdelegation=javax.*, com.sun.*, sun.*</param>
						<param>--profiles=log,felix.config,felix.ds,felix.event,war,web,felix.webconsole</param>
						<param>--shell=gogo</param>

When I try to add the remote debugging line:

 
						<param> --vmo="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787"</param>

I get:

 
Exception in thread "main" java.lang.NoClassDefFoundError: "-Xdebug
Caused by: java.lang.ClassNotFoundException: "-Xdebug
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: "-Xdebug.  Program will exit.

Noticing the leading quote on -Xdebug I tried alternate single quotes and XML quotes and wrapping that param line in CDATA, all to no avail.

I tried downgrading the pax-runner using mvn pax:update -Dversion=1.3 (which incidentally slightly mangled my POM - a repository <url> tag with CDATA was removed and whitespace reformatted), running the project caused an unidentified null pointer exception so I rolled forward to 1.4 (same POM mangling occurred).

I've tried adding the params --executor=inProcess with --absoluteFilePaths, in this case I don't get the NoClassDefFoundError error but am unable to attach the debugger (and with the suspend flag set to true, it doesn't suspend so am guessing it's ignored).

I don't think this is a problem with the underlying pax-runner as I can launch the cmd line script version with the -Xdebug parameter no problem, so as a possible workaround I'd be eternally grateful if someone point me to the documentation or could tell me how (and i'll wiki it) to get the standalone pax-runner.sh to run my pax-construct project.

thanks.


Affects: 1.4
Votes: 0, Watches: 1

@ops4j-issues
Copy link
Author

Andreas Pieber commented

Mhm, can you try to use exactly the following command:

<param>--vmOptions=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</param>

this works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant