I do not dare to uninstall Java 17 and 11 to reproduce the former error.

Anyway, I'll try to explain what has happened when migrating the
development of a Netbeans java servlet app project using Tomcat 10 from
Windows 10 to Windows 11:

Initially, a *java.lang.NoSuchMethodError: java.net.URLEncoder.encode *was
raised. At this point, Shaun Heiser, to whom I thanked so much, told me the
problem was around different versions of Java. His advice for using Java
11, and probably 17 opened the way to solve the problem. I tried first Java
11, end the error turned to be the next:

*ant -f C:\\web_reserves -Dnb.internal.action.name
<http://Dnb.internal.action.name>=rebuild -DforceRedeploy=false
-Dbrowser.context=C:\\web_reserves clean dist*























*init:undeploy-clean:deps-clean:do-clean:Deleting directory
C:\web_reserves\buildDeleting directory
C:\web_reserves\distcheck-clean:clean:init:deps-module-jar:deps-ear-jar:deps-jar:Created
dir: C:\web_reserves\build\web\WEB-INF\classesCreated dir:
C:\web_reserves\build\web\META-INFCopying 1 file to
C:\web_reserves\build\web\META-INFCopying 23 files to
C:\web_reserves\build\weblibrary-inclusion-in-archive:Copying 1 file to
C:\web_reserves\build\web\WEB-INF\liblibrary-inclusion-in-manifest:Created
dir: C:\web_reserves\build\emptyCreated dir:
C:\web_reserves\build\generated-sources\ap-source-outputCompiling 17 source
files to C:\web_reserves\build\web\WEB-INF\classeserror: option
-Xbootclasspath/p: not allowed with target 17BUILD FAILED (total time: 1
second)*

Since I didn't (and I don't yet) know where the option -Xbootclasspath/p is
set. I tried with Java 17, and nothing changed. The error was exactly the
same.

At this point, I thought to reset the Java to Java 8, as initially was.
And, miraculously, the error was away.

Is seems like older Java versions used someway newer Java methods, in such
a way that if you have installed the last Java version on your laptop, you
will safe troubles even when using previous versions.


That is all I can say. As you can see, I do not know why, but the problem
is gone and the app runs ok.

Thanks for your attention and your time.


Carles

Missatge de Rob Sargent <rsarg...@xmission.com> del dia ds., 31 de des.
2022 a les 4:02:

>
>
> On 12/30/22 17:59, Shawn Heisey wrote:
> > On 12/30/22 17:03, Carles Franquesa wrote:
> >> Once downloaded, installed, and configured in the settings of the
> >> netbeans project, the error has changed, what always is very hopeful.
> >>
> >> Now, the thing is that the compiler gives this new output:
> >>
> >> image.png
> >>
> >> Tried to modify the compiler options in the project properties,
> >> image.png
> >> but, obviously, is not the place.
> >>
> >> Do you now where should I modify the compiler option Xbootclasspath?
> >>
> >> And I feel sorry for not having checked exactly "URLEncoder.encode
> >> TomcatManagerImpl". Trust me when I say I have been googling so far
> >> as extenuation...
> >
> > The mailing list ate your image attachments.  Nobody can see them.
> >
> > You need to put the images on a file sharing site and provide a URL
> > like you did for the first message on the thread.
> >
> > The later message says you got it working, so I guess the images are
> > no longer needed.
> >
> Better yet, copy as text, paste here.  You're just dealing with compiler
> output and a config file after all.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to