Re: Run Tomcat as native image

2023-12-19 Thread Jun Suzuki
2023年12月19日(火) 16:11 Jun Suzuki :
>
> 2023年12月19日(火) 1:18 Rémy Maucherat :
> >
> > On Mon, Dec 18, 2023 at 1:28 PM Jun Suzuki  wrote:
> > >
> > > Hello all,
> > >
> > > I'm now following the guide of
> > > https://tomcat.apache.org/tomcat-11.0-doc/graal.html to build Tomcat
> > > into native image.
> > > The original thread I posted before has become too long to be easily
> > > understood, so please let me raise a new thread to clarify.
> > > I break down the contents from the guide into a step-by-step
> > > procedure, and I would appreciate it if you can verify the steps and
> > > check for the issues.
> > >
> > > [Environment]: Tomcat 10.0.27, Ant 1.10.14, Maven 3.6.3, GraalVM EE 
> > > 21.x+Java17
> > > [Steps]:
> > > 1. Download the stuffed folder according to the guide.
> > > 2. Edit the original pom to align with the Tomcat and JDK version:
> > > 
> > > UTF-8
> > > org.apache.catalina.startup.Tomcat
> > > 10.0.27
> > > 
> > > ..
> > > 
> > > org.apache.maven.plugins
> > > maven-compiler-plugin
> > > 3.11.0
> > > 
> > > 11
> > > 
> > >   
> > > 3.  Copy conf and webapps folders from Tomcat to the stuffed folder.
> > > 4.  Edit the logging properties(Deleted all Juli-related statements to
> > > avoid runtime error)
> > >  handlers = java.util.logging.ConsoleHandler
> > >  .handlers = java.util.logging.ConsoleHandler
> > >  .
> > >  java.util.logging.ConsoleHandler.level = FINE
> > >  # java.util.logging.ConsoleHandler.formatter =
> > > org.apache.juli.OneLineFormatter
> > >  java.util.logging.ConsoleHandler.encoding = UTF-8
> > > 5.  Build and packaging.
> > >  mvn package
> > >  ant -Dwebapp.name=ROOT -f webapp-jspc.ant.xml
> > >  ant -Dwebapp.name=manager -f webapp-jspc.ant.xml
> > >  ant -Dwebapp.name=examples -f webapp-jspc.ant.xml
> > >
> > > Until here everything was running fine without error. And when I
> > > executed the next command, error message displayed as below:
> > > mvn package
> > > ..
> > > [INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @
> > > tomcat-stuffed ---
> > > [INFO] Changes detected - recompiling the module! :source
> > > [INFO] Compiling 130 source files with javac [debug release 17] to
> > > target/classes
> > > [INFO] 
> > > /home/opc/project/tomcat-native/stuffed/src/main/java/manager/org/apache/jsp/WEB_002dINF/jsp/sessionsList_jsp.java:
> > > Some input files use unchecked or unsafe operations.
> > > [INFO] 
> > > /home/opc/project/tomcat-native/stuffed/src/main/java/manager/org/apache/jsp/WEB_002dINF/jsp/sessionsList_jsp.java:
> > > Recompile with -Xlint:unchecked for details.
> > > [INFO] Some messages have been simplified; recompile with
> > > -Xdiags:verbose to get full output
> > > [INFO] -
> > > [ERROR] COMPILATION ERROR :
> > > [INFO] -
> > > [ERROR] 
> > > /home/opc/project/tomcat-native/stuffed/src/main/java/examples/org/apache/jsp/jsp/tagplugin/choose_jsp.java:[162,210]
> > > cannot access javax.servlet.jsp.tagext.TagSupport
> > >   class file for javax.servlet.jsp.tagext.TagSupport not found
> > > [ERROR] 
> > > /home/opc/project/tomcat-native/stuffed/src/main/java/examples/org/apache/jsp/jsp/tagplugin/choose_jsp.java:[165,35]
> > > cannot access javax.servlet.jsp.tagext.Tag
> > >   class file for javax.servlet.jsp.tagext.Tag not found
> > > ..
> > >
> > > Could you please help to indicate what I have missed from the above steps?
> > > And I would really appreciate it if you could offer some kind of
> > > step-by-step hands-on examples about how to practice to run Tomcat as
> > > native image.
> >
> > This seems unrelated, you are apparently trying to run an EE8 webapp
> > (the examples from Tomcat 9) on a EE10 container. The package names
> > for the APIs changed to jakarta.*.
> >
> > Rémy
> >
>
> Thank you for the comments.
> To avoid excessive trial and error, is it possible to provide a
> combination of tested versions that ensure default Tomcat examples
> running in native image without error?
> Could you please indicate the version of Tomcat, GraalVM(EE or CE),
> JDK, maven, ant?  I want to use these specific versions you pointed to
> make sure default Tomcat examples will run normally in term of native
> image without additional customization.
> Thank you in advance.
> Jun

Hi, I have accomplished each steps from the guide to packaging a
simple war file(containing a single servlet which is entry point from
web access) without error, except for last step of executing produced
native 

Re: mod_jk logging issue

2023-12-19 Thread Rainer Jung

Hi there,

Am 19.12.23 um 18:05 schrieb EML:
Hi - I'm running mod_jk with an Apache front-end, and I'm having an 
issue with the JkShmFile files.


Every time Apache restarts mod_jk creates two new files 
(jk-runtime-status.PID and jk-runtime-status.PID.lock). These are never 
cleaned up; the log directory simply fills up with these files. This 
happens whether or not I explicitly set JkShmFile in the Apache conf.


That should no happen. There is a cleanup routine registered, which 
should delete the files during shutdown. And that's the behavior that I 
normally observe.


Is there some way I can persuade mod_jk to use a single file pair, 
without the PID suffix, or to delete the previous file pair on a 
restart? I'm not doing any load sharing.


If you must remove the PID, you can patch the code and build it 
yourself. The ID is added in file common/jk_shm.c in the following line:


sprintf(jk_shmem.filename, "%s.%" JK_PID_T_FMT, fname, getpid());

You could replace it by:

sprintf(jk_shmem.filename, "%s", fname);

If you compile the code yourself, please us the latest version 1.2.49.

As I mentioned, a normal shutdown should already remove the files. A 
reload should not change the pid and thereby the files. A restart in the 
sense of stop-then-start should also remove the old files.


I'm on Ubuntu 22.04, Apache 2.4.52. The mod_jk version is possibly 
1.2.48-1.


Thanks.


Regards,

Rainer

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



mod_jk logging issue

2023-12-19 Thread EML
Hi - I'm running mod_jk with an Apache front-end, and I'm having an 
issue with the JkShmFile files.


Every time Apache restarts mod_jk creates two new files 
(jk-runtime-status.PID and jk-runtime-status.PID.lock). These are never 
cleaned up; the log directory simply fills up with these files. This 
happens whether or not I explicitly set JkShmFile in the Apache conf.


Is there some way I can persuade mod_jk to use a single file pair, 
without the PID suffix, or to delete the previous file pair on a 
restart? I'm not doing any load sharing.


I'm on Ubuntu 22.04, Apache 2.4.52. The mod_jk version is possibly 1.2.48-1.

Thanks.



Re: EOL for Tomcat 9.0.x and Tomcat 10.1.x

2023-12-19 Thread Mark Thomas

On 19/12/2023 12:32, Kaluva S wrote:

Hi,
We are planning to migrate from tomcat 9.0.x to Tomcat 10.1.x but want to
know about EOL  for both the releases. On the official tomcat website, we
couldn't find any information about this.
If anyone knows, please share so that we will plan accordingly.


There are currently no firm EOL dates for either 9.0.x or 10.1.x.

Based on past experience, 9.0.x is likely to be EOL some time around 31 
March 2027 and 10.1.x is likely to be EOL some time around 31 March 2030.


However those dates are driven by the expected stability dates of Tomcat 
12 and Tomcat 13 (neither of which have even been started yet) and which 
in turn depend on the release dates for Jakarta EE 12 and Jakarta EE 13 
which also have not been started. So the dates above really are just a 
best guess at this point.


Further, since 9.x is the last branch to support Java EE, it is our 
intention to continue 9.x support beyond the 9.0.x EOL. The current 
expectation is that there would be a 9.10.x release branch that would 
track 10.1.x with the minimal changes required to implemented to Java EE 
API rather than the Jakarta EE API.


When 10.1.x reaches EOL so will 9.10.x which would then be replaced by 
9.11.x which would track 11.0.x. And so on for as long as there was 
(sufficient) demand for Java EE support. Sufficient is deliberately 
subjective. It will depend on the level of demand and the effort 
required. As volunteers, there is only so long we can support things for.


Mark

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



EOL for Tomcat 9.0.x and Tomcat 10.1.x

2023-12-19 Thread Kaluva S
Hi,
We are planning to migrate from tomcat 9.0.x to Tomcat 10.1.x but want to
know about EOL  for both the releases. On the official tomcat website, we
couldn't find any information about this.
If anyone knows, please share so that we will plan accordingly.

Thanks in advance,
Sreenivas K.