Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » How to display command line of an application that does not start?
How to display command line of an application that does not start? [message #986893] Thu, 22 November 2012 04:48 Go to next message
Holger Brands is currently offline Holger Brands
Messages: 11
Registered: September 2012
Junior Member
My AspectJ load-time Weaving App does not start anymore in Eclipse 3.8 on Windows 7:

"Exception occurred executing command line.
Cannot run program "C:\Program Files (x86)\Java\jdk1.6.0_35\bin\javaw.exe" (in directory "D:\workspace\trunk\edrewe-app"): CreateProcess error=206, Der Dateiname oder die Erweiterung ist zu lang"

I think I hit bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327193
Please fix it also for 3.8.x/4.2.x.

How can I inspect or display the command line that is used to launch the app?

I'm aware of FAQ
http://wiki.eclipse.org/FAQ_How_do_I_find_out_the_command-line_arguments_of_a_launched_program%3F
but that doesn't help in this case.

Do you know any workarounds for bug 327193 in Eclipse 3.8?

Thanks,
Holger
Re: How to display command line of an application that does not start? [message #986991 is a reply to message #986893] Thu, 22 November 2012 12:28 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew Eisenberg
Messages: 368
Registered: July 2009
Senior Member
Not sure what is going on here. Can you send me over a project that reproduces this problem? Also, take a look at your error log and paste here any relevant errors.
Re: How to display command line of an application that does not start? [message #987075 is a reply to message #986991] Fri, 23 November 2012 05:13 Go to previous messageGo to next message
Holger Brands is currently offline Holger Brands
Messages: 11
Registered: September 2012
Junior Member
Hm, I'm puzzled.
After playing with excluding and including Maven dependencies,
it started working again. I can't say exactly what has changed, to make it work again.

Anyway, I now had a look at the command line of the AspectJ load-time Weaving App and it's currently 31820 characters long, so it's huge.
I noticed that there are many, many JAR dependencies in the aj classpath (-Daj.class.path), a lot of them not in the current Maven classpath container.

I wonder, how the aj.class.path is constructed?

Another observation is, that the source tab in the launch configuration of the AspectJ load-time Weaving App also shows a lot more dependencies than the regular Maven classpath container.
How are the entries in the source lookup path constructed?

I have the feeling, that both the aj classpath and the source lookup path contain Maven dependencies that are located in a Maven profile, that is not active, e.g. those dependencies should not be included in my opinion.

We activate/deactive this profile via the Eclipse Maven project properties "Maven|Active Maven Profiles". After changing the profiles this way, we do an update project configuration.
Perhaps there is a problem dealing with Maven profiles?
Re: How to display command line of an application that does not start? [message #987129 is a reply to message #987075] Fri, 23 November 2012 12:05 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew Eisenberg
Messages: 368
Registered: July 2009
Senior Member
Quote:
I have the feeling, that both the aj classpath and the source lookup path contain Maven dependencies that are located in a Maven profile, that is not active, e.g. those dependencies should not be included in my opinion.


This is certainly possible. Can you share a project with me that reproduces this?
Re: How to display command line of an application that does not start? [message #987137 is a reply to message #987129] Fri, 23 November 2012 12:43 Go to previous messageGo to next message
Holger Brands is currently offline Holger Brands
Messages: 11
Registered: September 2012
Junior Member
Quote:
This is certainly possible. Can you share a project with me that reproduces this?


Sorry, it's a big closed-source commercial project that I cannot share.

So, you don't have any (test) project at SpringSource/VMware or Eclipse that exhibits this behaviour?

If not, I could try to reproduce this with a test project when I get some time,
but I cannot promise anything...
Re: How to display command line of an application that does not start? [message #987157 is a reply to message #987137] Fri, 23 November 2012 16:45 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew Eisenberg
Messages: 368
Registered: July 2009
Senior Member
No. We don't. I can try to reproduce, but I'm not exactly sure what you are seeing, so it would be hard.

Just to make sure I udnerstand the problem...you are seeing entries in your aspect path that are coming from a disabled profile?
Re: How to display command line of an application that does not start? [message #987292 is a reply to message #987157] Sun, 25 November 2012 13:41 Go to previous messageGo to next message
Holger Brands is currently offline Holger Brands
Messages: 11
Registered: September 2012
Junior Member
Yes, that's my impression.

Unfortunately, I wasn't able to reproduce this situation with a simpler test workspace yet.
Re: How to display command line of an application that does not start? [message #987305 is a reply to message #987292] Sun, 25 November 2012 16:20 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew Eisenberg
Messages: 368
Registered: July 2009
Senior Member
I naively tried to reproduce, but didn't see anything odd yet. I'll try again on Monday.
Re: How to display command line of an application that does not start? [message #987370 is a reply to message #987305] Mon, 26 November 2012 05:29 Go to previous messageGo to next message
Holger Brands is currently offline Holger Brands
Messages: 11
Registered: September 2012
Junior Member
After taking yet another look at the original workspace, I think my assumption was wrong. The dependency that is located in the disabled Maven profile is also defined as optional dependency of a third project that is itself a dependency. So it seems to be the problem, that an optional dependency and its transitive dependencies are pulled in.

So, we have this situation in the workspace:

Project A (is the load time weaving app with the disabled maven profile)

Project A has a compile-time dependency to project B in the workspace.

Project B has an *optional* compile-time dependency to project C in the workspace.

Project C has a lot of other compile-time dependencies.

(Resolving dependencies from workspace projects is enabled in all projects.)

What I'm seeing is that the aspect classpath (-Daj.class.path) and the normal classpath (-classpath) on the commandline of project A contains the project C dependency and the transitive dependencies of C.

As far as I understand optional dependencies in Maven, this should not happen. Project C and its dependencies should not be included in the classpaths of A.

The dependeny hierachy view of the m2e POM editor does not seem to have this problem.

Sorry for the wrong assumption concerning the disabled Maven profile.
I try to reproduce this with a test workspace tonight, unless you can reproduce it earlier.

Thanks,
Holger
Re: How to display command line of an application that does not start? [message #987464 is a reply to message #987370] Mon, 26 November 2012 12:25 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew Eisenberg
Messages: 368
Registered: July 2009
Senior Member
Thanks for the clarification. I think I see what you are talking about. I set up the 3 projects as you describe.

1. I look at the maven classpath container of project A and it (correctly) does not show the dependency to C.
2. When I do an LTW launch using a main method in project A, project C and deps are added to classpath.

Is this what you are seeing?

The reason this is happening is that AJDT is not aware of maven optional dependencies. So, this is to be expected. However, this is not correct, as you say. I raised a bug for it, here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=395093
Re: How to display command line of an application that does not start? [message #987483 is a reply to message #987464] Mon, 26 November 2012 15:12 Go to previous messageGo to next message
Holger Brands is currently offline Holger Brands
Messages: 11
Registered: September 2012
Junior Member
Quote:
Is this what you are seeing?


Yes, exactly.
I'm glad, that you could reproduce the issue.

Resolving this issue would reduce the chance of producing a classpath, that is too large, e.g. longer than 32,768 characters on Windows.

Thanks,
Holger
Re: How to display command line of an application that does not start? [message #1062885 is a reply to message #987370] Tue, 11 June 2013 05:04 Go to previous message
konglong konglong is currently offline konglong konglong
Messages: 2
Registered: June 2013
Junior Member
Not sure what is going on here.


Previous Topic:Duplicate classes when using maven weave dependencies
Next Topic:XML POS Tagger
Goto Forum:
  


Current Time: Thu Aug 21 10:06:44 EDT 2014

Powered by FUDForum. Page generated in 0.03058 seconds