RE: programmatically determining connector startup failures

2012-02-10 Thread Erick Lichtas
Mark,

Thanks for the reply!  I am aware that there are changes to this in Tomcat 7 
and will definitely get there, but will wait until we move to JSF 2.x (which is 
hopefully sooner than later).  

Unfortunately the start flag in the Connector will be true if connector.start() 
is called, regardless of the success of the operation, so isAvailable() will 
always return true in my case.

Regards

E R I C K   L I C H T A S
Linoma Software
Senior Software Engineer
p. 402.944.4242 x714
f. 402.944.4243
www.LinomaSoftware.com
www.GoAnywhereMFT.com


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Friday, February 10, 2012 9:55 AM
To: Tomcat Users List
Subject: Re: programmatically determining connector startup failures

On 10/02/2012 15:38, Erick Lichtas wrote:
> Hi everyone,
> 
> I'm using tomcat 6.0.32 on Windows 7.  I have an application where I 
> programmatically start and stop a separate web application from within 
> an already running tomcat application.  I do this by creating a new 
> StandardService, setting the server as
> service.setServer(ServerFactory.getServer()) and creating/loading the 
> connectors, engine, etc... all before calling service.start() to fire 
> everything up.
> 
> Everything is working great, but I'm running into a small snag.
> Should a connector of the service run into issues such as binding to a 
> port, the StandardService.start() seems to swallow the exception.
> It gets logged, but my caller to service.start() has no way handling 
> that failure.
> 
> StandardService.java (~line 539) try { ((Lifecycle) 
> connectors[i]).start(); } catch (Exception e) { 
> log.error(sm.getString( "standardService.connector.startFailed",
> connectors[i]), e); }
> 
> I've also looked into registering a LifecycleListener on the 
> connector, but that doesn't won't tell me whether or not the start had 
> completed.

connector.isAvailable() ?

> Are there any other options, other than extending and for the most 
> part duplicating the StandardService class, that might give me the 
> ability to detect a failed connector startup?

Upgrade to 7.0.x where all this was completely re-written?

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



programmatically determining connector startup failures

2012-02-10 Thread Erick Lichtas
Hi everyone,

I'm using tomcat 6.0.32 on Windows 7.  I have an application where I 
programmatically start and stop a separate web application from within an 
already running tomcat application.  I do this by creating a new 
StandardService, setting the server as 
service.setServer(ServerFactory.getServer()) and creating/loading the 
connectors, engine, etc... all before calling service.start() to fire 
everything up.

Everything is working great, but I'm running into a small snag.  Should a 
connector of the service run into issues such as binding to a port, the 
StandardService.start() seems to swallow the exception.  It gets logged, but my 
caller to service.start() has no way handling that failure.

StandardService.java (~line 539)
try {
((Lifecycle) connectors[i]).start();
} catch (Exception e) {
log.error(sm.getString(
"standardService.connector.startFailed",
connectors[i]), e);
}

I've also looked into registering a LifecycleListener on the connector, but 
that doesn't won't tell me whether or not the start had completed.

Are there any other options, other than extending and for the most part 
duplicating the StandardService class, that might give me the ability to detect 
a failed connector startup?

Regards,

E R I C K   L I C H T A S
Linoma Software
Senior Software Engineer
p. 402.944.4242 x714
f. 402.944.4243
www.LinomaSoftware.com
www.GoAnywhereMFT.com



RE: Issues with Tomcat 6.0.26

2010-03-13 Thread Erick Lichtas
Thank you!  This does resolve the issues.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, March 12, 2010 5:56 PM
To: Tomcat Users List
Subject: RE: Issues with Tomcat 6.0.26

> From: Erick Lichtas [mailto:elich...@linoma.com]
> Subject: RE: Issues with Tomcat 6.0.26
> 
> 5)Start the tomcat server and navigate to
> http://host:8080/myfaces-example-simple-1.1.9/sample1.jsf.
> You will notice that the many EL expressions are not resolved
> properly.

Once the WEB-INF/web.xml is updated to say 2.5, it seems to work fine.
You'll have to clear out your work directory after updating the
xsi:schemaLocation and version settings to observe the difference.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4940 (20100312) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4940 (20100312) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Issues with Tomcat 6.0.26

2010-03-12 Thread Erick Lichtas
You can reproduce the issues we're seeing by deploying the
tomahawk-examples-1.1.9-bin.zip war file and making a few adjustments to it
to bring it up to date with JSF 1.2.  Once the following modification are
made to the examples web app, you will notice that it works fine under
tomcat 6.0.24 but no longer resolves simple EL expression in 6.0.26

1)  Deploy the 'myfaces-example-simple-1.1.9.war' file from
tomahawk-examples-1.1.9-bin.zip
(http://www.apache.org/dyn/closer.cgi/myfaces/binaries/tomahawk-examples-1.1
.9-bin.zip) to tomcat 6.0.26

2)  Navigate to myfaces-example-simple-1.1.9\WEB-INF\lib

3)  Remove the following JAR files:
myfaces-api-1.1.7.jar
myfaces-impl-1.1.7.jar
tomahawk-1.1.9.jar

4)  Add the following jar files
myfaces-api-1.2.8.jar
myfaces-impl-1.2.8.jar
tomahawk12-1.1.9.jar
commons-discovery-0.4.jar

5)  Start the tomcat server and navigate to
http://host:8080/myfaces-example-simple-1.1.9/sample1.jsf.  You will notice
that the many EL expressions are not resolved properly.

6)  Do the same for 6.0.24 and the screen will render as expected.

Thanks,

Erick

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Friday, March 12, 2010 4:00 PM
To: Tomcat Users List
Subject: Re: Issues with Tomcat 6.0.26

2010/3/12 Sai Pullabhotla :
> I forgot to mention the version numbers in my previous mail. Here they
are:
>
> Richfaces 3.3.1
> MyFaces 1.2.4
> Tomahawk 1.1.6
>

I have just downloaded trinidad-1.2.13-example.zip and
its trinidad-demo-1.2.13.war works for me in 6.0.26.

Cannot find usable tomahawk or richfaces examples:

tomahawk-examples-1.1.8-bin.zip is for MyFaces 1.1 / Servlet 2.4,
irrelevant here
richfaces-examples-3.3.2.SR1.zip (photoalbum) requires JBoss


In short, parsing in Tomcat 6.0.26 was made more strict to the version
of specification that your web application, your tag library and the
tag that you are calling are using.

The change was to address bug 48668. Most likely this commit is what
affected you:
http://svn.apache.org/viewvc?rev=920916&view=rev

Please make sure that
1) Your web.xml adheres to the Servlet 2.5 specification
I.e., starts with

http://java.sun.com/xml/ns/javaee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
 version="2.5">

2) The TLD file for the tag library that you are using adheres to the
JSP 2.1 specification.

>  http://java.sun.com/xml/ns/javaee
>  http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
>xmlns="http://java.sun.com/xml/ns/javaee";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.1">

Yes, that is JSP 2.1

Note, that  element in web.xml can be used to specify
different location for the TLD file. If the file is not specified in
web.xml, make sure that  element value in your TLD file matches
URI that you used for your tags. That is, to make sure that you are
looking on the actual TLD file that was used.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


__ Information from ESET NOD32 Antivirus, version of virus signature
database 4940 (20100312) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4940 (20100312) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Issues with Tomcat 6.0.26

2010-03-12 Thread Erick Lichtas
I am noticing the same problems when upgrading to 6.0.26 from 6.0.18.  I am
currently using Richfaces and Tomahawk components for JSF 1.2.

Is there a bug open for this behavior?

-Original Message-
From: Martin Dubuc [mailto:martind1...@gmail.com] 
Sent: Friday, March 12, 2010 2:22 PM
To: Tomcat Users List
Subject: Re: Issues with Tomcat 6.0.26

I am running into same issue on my side using the latest Tomcat 6.0.26 and
JSF. I am using Mojarra 1.2 patch 14 and RichFaces 3.3.2 SR1. I didn't have
any issues with 6.0.24.

Not sure what changed in 6.0.26, but it might have broken JSF 1.2 support.

Hopefully, someone can recommend a workaround.

Martin

On Fri, Mar 12, 2010 at 2:16 PM, Sai Pullabhotla <
sai.pullabho...@jmethods.com> wrote:

> Thanks for the reply, Konstantin.
>
> If I understood your question correctly, you are asking about the
> headers in the taglib for richfaces. I pulled it from the jar file and
> here it is:
>
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
>   xmlns="http://java.sun.com/xml/ns/javaee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.1">
>
> which appears to be JSP 2.1.
>
> Just so you know, we do not have these issues running under Tomcat
> 6.0.18. In 6.0.24 we just have one issue which is the bug# 48627.
>
> With 6.0.26, these new issues popped up. Any insight is greatly
> appreciated.
>
>
> Thanks & Regards,
> Sai Pullabhotla
>
>
>
>
>
> On Fri, Mar 12, 2010 at 10:42 AM, Konstantin Kolinko
>  wrote:
> > 2010/3/12 Sai Pullabhotla :
> >> 
> >>  >> styleClass="#{node.selected ? 'SelectedCategoryNode' :
> >> 'CategoryNode'}" actionListener="#{categoryTree.nodeClicked}">
> >>
> >
> > What versions of the said libraries you are using?
> >
> > The TLD files for rich: and h: prefixes  -- what JSP specification
> > version they are using?
> > It must be 2.1, not 2.0
> >
> > Best regards,
> > Konstantin Kolinko
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4940 (20100312) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4940 (20100312) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org