Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Bug in jetty 9.x

Hi Joakim Erdfelt,

We have separate Home and Base directory.


We need to deploy war(with out dependency jars) in webapps folder and dependency jars in lib/ext folder.

This is working when we use Jetty 8, it is not working when we use 9.x.

I tried with your example which you provided in mail

https://github.com/jetty-project/weld-example-base

But this has war with all jars. Our requirement is not this.

Please help us.

Adding all the screen shots in attachments.


On Fri, Jan 30, 2015 at 6:35 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
It is not recommended to work in the jetty distribution directory.
In fact, if you do, it even tells you.

[joakim@lapetus jetty-distribution-9.2.7.v20150116]$ java -jar start.jar 
2015-01-30 06:00:36.155:INFO::main: Logging initialized @346ms
2015-01-30 06:00:36.198:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended.  See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2015-01-30 06:00:36.320:INFO:oejs.Server:main: jetty-9.2.7.v20150116

Make your own ${jetty.base}

Somewhere outside of the jetty distribution.
Its just a directory with a start.ini, and only what you want/need for a configuration.

Read the documentation, as any effort to explain this in email would be essentially copy/pasting the documentation.

If you want to see an example jetty.base, here's one setup for playing with the numberguess example for weld (aka CDI)



--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Fri, Jan 30, 2015 at 2:05 AM, Mohan Ramu <rmdmohan27@xxxxxxxxx> wrote:

Hi Joakim


We checked the below solution given by the you.

In Jetty 9.2.7, the default jetty_base and jetty_home point to the same folder as below:

 

Jetty Environment:

-----------------

jetty.version = 9.2.7.v20150116

jetty.home = C:\jetty-distribution-9.2.7.v20150116

jetty.base = C:\jetty-distribution-9.2.7.v20150116

Hence, when we put the dependency jars in lib/ext, its still not being considered.

 

For this reason, I tried changing the jetty base folder as below:

 

java -jar start.jar \jetty.base=C:\jetty-distribution-9.2.7.v20150116\demo-base

 

Added the dependant jars in C:\jetty-distribution-9.2.7.v20150116\demo-base\lib\ext, put the war file in C:\jetty-distribution-8.1.16.v20140903\webapps and I still get java.lang.ClassNotFoundException for the classes that are in the jars.



Can please look into this issue and provide us solution.




On Fri, Jan 30, 2015 at 12:40 PM, Mohan Ramu <rmdmohan27@xxxxxxxxx> wrote:


Thanks Joakim,

We will try with the changes that you provided and update you.

Thanks again.

 
From: Joakim Erdfelt [mailto:joakim@xxxxxxxxxxx]
Sent: Thursday, January 29, 2015 06:11 PM
To: Jetty @ Eclipse developer discussion list <jetty-dev@xxxxxxxxxxx>
Cc: jetty-dev-request@xxxxxxxxxxx <jetty-dev-request@xxxxxxxxxxx>; Mohan Ramu
Subject: Re: [jetty-dev] Bug in jetty 9.x
 
Oh, and put your jars into ${jetty.base}/lib/ext/   (NOT in ${jetty.home}/lib/ext/)

Use the configuration isolation difference between ${jetty.base} and ${jetty.home}
Don't modify files or directories in ${jetty.home} and your life will be easier in the long run.

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Thu, Jan 29, 2015 at 5:40 AM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
There's nothing magic about lib/ext that makes those jars available to a webapp's classloader.
In Jetty 7, Jetty 8, and Jetty 9 the webapp classloader would isolate those lib/ext jars from that webapp.

Now, having said that, lib/ext is a popular and misused place to shove server side jars for things like JNDI resources (such as those needed to setup DataSource specific JNDI resources).

If that's what you want, then add this line to your `${jetty.base}/start.ini` (NOT your `${jetty.home}/stat.ini`)

--module=ext



--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Wed, Jan 28, 2015 at 11:15 PM, Mohan Ramu <rmdmohan27@xxxxxxxxx> wrote:
Hi ,

We have requirement for separating war with out dependency and jars in lib folder or jar of jars. When i try to deploy all the jar of jars or lib folder in ext that is throwing class not found exception. But the same thing is working when i use jetty 8.x. 
Jett 9.x is not supporting for deployment of dependency jars in lib/ext.

 
Thanks & Regards,
 
Mohan.R
Mob:9538977984
 
 

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***



--
Dear ,
 
 
Thanks & Regards,
 
Mohan.R
Mob:9538977984
 
 



--
Dear ,
 
 
Thanks & Regards,
 
Mohan.R
Mob:9538977984
 
 




--
Dear ,
 
 
Thanks & Regards,
 
Mohan.R
Mob:9538977984
 
 

Attachment: jetty.PNG
Description: PNG image

Attachment: jetty1.PNG
Description: PNG image


Back to the top