You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Newton <ne...@yahoo.com> on 2008/07/10 15:46:33 UTC
[OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
--- On Thu, 7/10/08, Milan Milanovic <mi...@yahoo.com> wrote:
> I put this in my classpath:
>
> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar;
>
> and I run sitegraph from my lib folder:
>
> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib>java
> -cp ... -jar struts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java
> -views ../../pages -output shema
>
> and I get this exception:
>
> Exception in thread "main"
> java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
> at
> org.apache.struts2.sitegraph.SiteGraph.<clinit>(SiteGraph.java:51)
>
> What is the problem here ?
You have a single jar in your classpath. It seems unlikely, at best, that this single jar contains all the dependencies for running sitegraph.
I'm also not sure what "-cp ..." will do; I'm only familiar with that notation in regards to enabling/disabling assertions in sub-packages--what is your intention with that line argument value? I'm also reasonably sure that using the "-cp" argument will override the CLASSPATH environment variable.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
Posted by Dave Newton <ne...@yahoo.com>.
You could always try modifying the manifest file and re-packaging; if that's the only version issue you're having it's unlikely that a ..n version issue would cause an issue. It could, though.
Dave
--- On Thu, 7/10/08, Milan Milanovic <mi...@yahoo.com> wrote:
> From: Milan Milanovic <mi...@yahoo.com>
> Subject: Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
> To: user@struts.apache.org
> Date: Thursday, July 10, 2008, 1:34 PM
> Dear Dave,
>
>
> newton.dave wrote:
> >
> > --- On Thu, 7/10/08, Milan Milanovic
> <mi...@yahoo.com> wrote:
> >> Oh, it uses commons-logging-1.0.3.jar but I'm
> using
> >> commons-logging-1.0.4.jar in my applications lib
> directory.
> >> So, I need to delete 1.0.4 and copy 1.0.3 in my
> lib ?
> >
> > Wouldn't it have been quicker to try it?
> >
>
> Actually no, I would have to change some else libraries
> too, because I don't
> use those versions :-(.
>
>
> newton.dave wrote:
> >
> > If it can't find a file listed it will obviously
> fail--if the file isn't
> > available it won't be able to contribute any
> classes to the classpath, no?
> >
>
> Quite right ;-). I give up, it's too complicated, when
> someone create
> Eclipse plug-in, I'll use it...or maybe when I find
> time I'll create it ;-).
>
> --
> Thx anyway, Milan
>
>
>
> newton.dave wrote:
> >
> > Dave
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18388059.html
> Sent from the Struts - User mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration
vizualization
Posted by Milan Milanovic <mi...@yahoo.com>.
Dear Dave,
newton.dave wrote:
>
> --- On Thu, 7/10/08, Milan Milanovic <mi...@yahoo.com> wrote:
>> Oh, it uses commons-logging-1.0.3.jar but I'm using
>> commons-logging-1.0.4.jar in my applications lib directory.
>> So, I need to delete 1.0.4 and copy 1.0.3 in my lib ?
>
> Wouldn't it have been quicker to try it?
>
Actually no, I would have to change some else libraries too, because I don't
use those versions :-(.
newton.dave wrote:
>
> If it can't find a file listed it will obviously fail--if the file isn't
> available it won't be able to contribute any classes to the classpath, no?
>
Quite right ;-). I give up, it's too complicated, when someone create
Eclipse plug-in, I'll use it...or maybe when I find time I'll create it ;-).
--
Thx anyway, Milan
newton.dave wrote:
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18388059.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
Posted by Dave Newton <ne...@yahoo.com>.
--- On Thu, 7/10/08, Milan Milanovic <mi...@yahoo.com> wrote:
> Oh, it uses commons-logging-1.0.3.jar but I'm using
> commons-logging-1.0.4.jar in my applications lib directory.
> So, I need to delete 1.0.4 and copy 1.0.3 in my lib ?
Wouldn't it have been quicker to try it?
If it can't find a file listed it will obviously fail--if the file isn't available it won't be able to contribute any classes to the classpath, no?
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration
vizualization
Posted by Milan Milanovic <mi...@yahoo.com>.
Dear Dave,
newton.dave wrote:
>
> --- On Thu, 7/10/08, Milan Milanovic <mi...@yahoo.com> wrote:
>> I noticed this, but my Sitegraph plugin in the same
>> directory as the dependent jars so I don't need to
>> put them into classpath?
>
> Oh, it looks like the sitegraph plugin puts its requirements in its
> manifest file, so never mind about all that classpath stuff. Remove the
> -cp option altogether.
>
> (I'm not sure the -cp option is valid with a -jar option anyway,
> actually.)
>
O.K.
newton.dave wrote:
>
> Are you using the appropriate versions of the required libraries? The
> "Class-Path" entry in the sitegraph plugin lists all possible dependencies
> (jar files with version numbers).
>
Oh, it uses commons-logging-1.0.3.jar but I'm using
commons-logging-1.0.4.jar in my applications lib directory. So, I need to
delete 1.0.4 and copy 1.0.3 in my lib ?
newton.dave wrote:
>
> Which version of S2 are you using?
>
> Dave
>
2.0.11.1
--
Thx, Milan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
--
View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18385724.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
Posted by Dave Newton <ne...@yahoo.com>.
--- On Thu, 7/10/08, Milan Milanovic <mi...@yahoo.com> wrote:
> I noticed this, but my Sitegraph plugin in the same
> directory as the dependent jars so I don't need to
> put them into classpath?
Oh, it looks like the sitegraph plugin puts its requirements in its manifest file, so never mind about all that classpath stuff. Remove the -cp option altogether.
(I'm not sure the -cp option is valid with a -jar option anyway, actually.)
Are you using the appropriate versions of the required libraries? The "Class-Path" entry in the sitegraph plugin lists all possible dependencies (jar files with version numbers).
Which version of S2 are you using?
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration
vizualization
Posted by Milan Milanovic <mi...@yahoo.com>.
Dear Dave,
newton.dave wrote:
>
> So... you didn't use "x.x.x", and you didn't add "[-ns NAMESPACE]", which
> are obviously placeholders. So is the "...". It should be replaced with
> (a) nothing, removing the -cp, and rely on the CLASSPATH environment
> variable, (b) use -cp and use the CLASSPATH as -cp's argument, or (c) put
> all the required libraries as -cp arguments (not recommended; too much
> work).
>
> As I said before: using -cp will cause your classpath environment variable
> to be ignored (IIRC, I could be wrong about that, but avoiding the
> confusion is easy. Or so I thought.)
>
As I wrote above in the thread I removed -cp and I'm just using my System
environment CLASSPATH variable.
newton.dave wrote:
> Apparently the large red box on the SiteGraph plugin page [1] containing
> the following text remains unnoticed:
>
> "You must either supply the correct classpath when invoking the SiteGraph
> tool or place the Sitegraph plugin in the same directory as the dependent
> jars. Specifically, the XWork jar, Struts jar, and their dependencies must
> be included in the classpath. Futhermore, you must also include your
> Action class files referenced in struts.xml. Without the proper class path
> entries, SiteGraph will not function properly."
>
> PUT ***ALL*** THE REQUIRED JARS IN YOUR CLASSPATH. I don't know what else
> to tell you or how else to say it so you'll understand.
>
> (You've installed GraphViz, right?)
>
>
I noticed this, but my Sitegraph plugin in the same directory as the
dependent jars so I don't need to put them into classpath ?
Yes, I installed GrahViz and I have its .exe in PATH variable.
--
Milan
newton.dave wrote:
>
> --- On Thu, 7/10/08, Milan Milanovic <mi...@yahoo.com> wrote:
>> this is how it is given at SiteGraph page:
>>
>> java -cp ... -jar struts2-sitegraph-plugin-x.x.x.jar
>> -config CONFIG_DIR
>> -views VIEWS_DIRS
>> -output OUTPUT
>> [-ns NAMESPACE]
>
> So... you didn't use "x.x.x", and you didn't add "[-ns NAMESPACE]", which
> are obviously placeholders. So is the "...". It should be replaced with
> (a) nothing, removing the -cp, and rely on the CLASSPATH environment
> variable, (b) use -cp and use the CLASSPATH as -cp's argument, or (c) put
> all the required libraries as -cp arguments (not recommended; too much
> work).
>
> As I said before: using -cp will cause your classpath environment variable
> to be ignored (IIRC, I could be wrong about that, but avoiding the
> confusion is easy. Or so I thought.)
>
> Apparently the large red box on the SiteGraph plugin page [1] containing
> the following text remains unnoticed:
>
> "You must either supply the correct classpath when invoking the SiteGraph
> tool or place the Sitegraph plugin in the same directory as the dependent
> jars. Specifically, the XWork jar, Struts jar, and their dependencies must
> be included in the classpath. Futhermore, you must also include your
> Action class files referenced in struts.xml. Without the proper class path
> entries, SiteGraph will not function properly."
>
> PUT ***ALL*** THE REQUIRED JARS IN YOUR CLASSPATH. I don't know what else
> to tell you or how else to say it so you'll understand.
>
> (You've installed GraphViz, right?)
>
> Good luck,
> Dave
>
> [1] http://struts.apache.org/2.x/docs/sitegraph-plugin.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18384293.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
Posted by Dave Newton <ne...@yahoo.com>.
--- On Thu, 7/10/08, Milan Milanovic <mi...@yahoo.com> wrote:
> this is how it is given at SiteGraph page:
>
> java -cp ... -jar struts2-sitegraph-plugin-x.x.x.jar
> -config CONFIG_DIR
> -views VIEWS_DIRS
> -output OUTPUT
> [-ns NAMESPACE]
So... you didn't use "x.x.x", and you didn't add "[-ns NAMESPACE]", which are obviously placeholders. So is the "...". It should be replaced with (a) nothing, removing the -cp, and rely on the CLASSPATH environment variable, (b) use -cp and use the CLASSPATH as -cp's argument, or (c) put all the required libraries as -cp arguments (not recommended; too much work).
As I said before: using -cp will cause your classpath environment variable to be ignored (IIRC, I could be wrong about that, but avoiding the confusion is easy. Or so I thought.)
Apparently the large red box on the SiteGraph plugin page [1] containing the following text remains unnoticed:
"You must either supply the correct classpath when invoking the SiteGraph tool or place the Sitegraph plugin in the same directory as the dependent jars. Specifically, the XWork jar, Struts jar, and their dependencies must be included in the classpath. Futhermore, you must also include your Action class files referenced in struts.xml. Without the proper class path entries, SiteGraph will not function properly."
PUT ***ALL*** THE REQUIRED JARS IN YOUR CLASSPATH. I don't know what else to tell you or how else to say it so you'll understand.
(You've installed GraphViz, right?)
Good luck,
Dave
[1] http://struts.apache.org/2.x/docs/sitegraph-plugin.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration
vizualization
Posted by Milan Milanovic <mi...@yahoo.com>.
Dear Dave,
this is how it is given at SiteGraph page:
java -cp ... -jar struts2-sitegraph-plugin-x.x.x.jar
-config CONFIG_DIR
-views VIEWS_DIRS
-output OUTPUT
[-ns NAMESPACE]
--
Milan
newton.dave wrote:
>
> --- On Thu, 7/10/08, Milan Milanovic <mi...@yahoo.com> wrote:
>> I put this in my classpath:
>>
>> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar;
>>
>> and I run sitegraph from my lib folder:
>>
>> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib>java
>> -cp ... -jar struts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java
>> -views ../../pages -output shema
>>
>> and I get this exception:
>>
>> Exception in thread "main"
>> java.lang.NoClassDefFoundError:
>> org/apache/commons/logging/LogFactory
>> at
>> org.apache.struts2.sitegraph.SiteGraph.<clinit>(SiteGraph.java:51)
>>
>> What is the problem here ?
>
> You have a single jar in your classpath. It seems unlikely, at best, that
> this single jar contains all the dependencies for running sitegraph.
>
> I'm also not sure what "-cp ..." will do; I'm only familiar with that
> notation in regards to enabling/disabling assertions in sub-packages--what
> is your intention with that line argument value? I'm also reasonably sure
> that using the "-cp" argument will override the CLASSPATH environment
> variable.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18383461.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org