You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kiran Badi <ki...@poonam.org> on 2014/10/03 03:59:47 UTC

Struts 2 /Glassfish to Tomcat migration

I am migration my glassfish struts 2 based application to Tomcat 7.055.

I am coming across 2 issues, first one is below exception while starting
Tomcat

java.lang.UnsatisfiedLinkError: C:\Apache Software
Foundation\apache-tomcat-7.0.55\bin\tcnative-1.dll: Can't load IA 64-bit
.dll on a AMD 64-bit platform

these are java information,

Using CATALINA_BASE:   "C:\Apache Software Foundation\apache-tomcat-7.0.55"
Using CATALINA_HOME:   "C:\Apache Software Foundation\apache-tomcat-7.0.55"
Using CATALINA_TMPDIR: "C:\Apache Software
Foundation\apache-tomcat-7.0.55\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.7.0_13"


Though the server starts and I can access the home page,
but it seems like struts.xml file is getting ignored and i am getting 404
for all jsp which are under web-inf.

Is their any migration guide from glassfish 4x to Tomcat ?

I was thinking that copying struts.xml to config directory and setting
dispatcher servlet should be sufficient.I am missing anything here.

Re: Struts 2 /Glassfish to Tomcat migration

Posted by Kiran Badi <ki...@poonam.org>.
Thanks Chris. I was able to fix the issue.

On Fri, Oct 3, 2014 at 10:52 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Kiran,
>
> On 10/3/14 8:02 PM, Kiran Badi wrote:
> > Thanks Chris for replying.I did resolve the 404  issue,it's error
> > on my part. One of view jsp was in incorrect folder so it was
> > throwing 404 error.Fixed it and now it works fine.
> >
> > I do not recall as how I installed this tomcat probably I
> > downloaded the zip file and then integrated that installation with
> > netbeans.
>
> The Tomcat server zip distribution does not contain any .dll files.
> You either downloaded and installed the .dll files yourself or you
> used the Windows Installer package which includes these libraries.
>
> > x86-64 do I need to download this file from apache tomcat site ?
> > how do I use this file ? edit the environment variables ?
>
> You should have several .dll files if you have a single one. Take a
> look at them to determine which is the correct one for your
> architecture and put it in whatever your java.library.path is, named
> tcnative-1.dll.
>
> Or, if you don't want or need the APR connector, then disable the
> APRLifecycleListener in server.xml and the JVM won't even try to load it.
>
> - -chris
>
> > On Thu, Oct 2, 2014 at 10:38 PM, Christopher Schultz <
> > chris@christopherschultz.net> wrote:
> >
> > Kiran,
> >
> > On 10/2/14 9:59 PM, Kiran Badi wrote:
> >>>> I am migration my glassfish struts 2 based application to
> >>>> Tomcat 7.055.
> >>>>
> >>>> I am coming across 2 issues, first one is below exception
> >>>> while starting Tomcat
> >>>>
> >>>> java.lang.UnsatisfiedLinkError: C:\Apache Software
> >>>> Foundation\apache-tomcat-7.0.55\bin\tcnative-1.dll: Can't
> >>>> load IA 64-bit .dll on a AMD 64-bit platform
> >
> > You have the IA-64 library in your path, and you need the x86-64
> > library instead. How did you install Tomcat? If you used the
> > binary installer, it should have correctly detected your
> > architecture and used the correct library. If you installed it
> > manually, you should have a selection of tcnative .dll files. fine
> > the x86-64 one and use that.
> >
> >>>> these are java information,
> >>>>
> >>>> Using CATALINA_BASE:   "C:\Apache Software
> >>>> Foundation\apache-tomcat-7.0.55" Using CATALINA_HOME:
> >>>> "C:\Apache Software Foundation\apache-tomcat-7.0.55" Using
> >>>> CATALINA_TMPDIR: "C:\Apache Software
> >>>> Foundation\apache-tomcat-7.0.55\temp" Using JRE_HOME:
> >>>> "C:\Program Files\Java\jdk1.7.0_13"
> >>>>
> >>>> Though the server starts and I can access the home page, but
> >>>> it seems like struts.xml file is getting ignored and i am
> >>>> getting 404 for all jsp which are under web-inf.
> >
> > The inability to start the APR connector won't have any effect on
> > this.
> >
> > How are you trying to access your .jsp files within WEB-INF? Via a
> > direct URL or some kind of internal forward from another URL?
> >
> >>>> Is their any migration guide from glassfish 4x to Tomcat ?
> >
> > You shouldn't have to do too much to migrate, as long as you don't
> > have anything GlassFish-specific in your webapp. You should be able
> > to take your existing WAR file and drop it into Tomcat's webapps/
> > directory. That should get you 90% of the way. If you use
> > JNDI-based resources, you'll have additional configuration, but I
> > won't get into that unless you actually need it.
> >
> >>>> I was thinking that copying struts.xml to config directory
> >>>> and setting dispatcher servlet should be sufficient. I am
> >>>> missing anything here.
> >
> > What is "config directory" and how did you "set [the] dispatcher
> > servlet"?
> >
> > -chris
> >>
> >> ---------------------------------------------------------------------
> >>
> >>
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJUL2DnAAoJEBzwKT+lPKRYvwYP/jLLJRkE2jmiTwfyvMZZ9M/J
> a/E6rgdVFzIZnjxx2T1FG6D+Hd95RXP7rxdfdxlJdZurmvjsC/4lISiZlrSD1FUw
> NQPUS2A8EkfWNsN8PbaAGFAOWZp/6tkET11wYHGvTJ664MX9ENdyjgK5dCx4yIDn
> QbQHKDrEa472hpkIMZms1V6yhgU8dr+I22Sf12oIy8WcYc5i5T4e9RSXB7N6nh1R
> WYZktR9VpKK6Mrg4R108Oztyc61YKelYNa/bmP7uhW0BGX+QItP4htC8KYZVVROi
> cSkoQvTRvO0sKmCdUXnCGStpEPGKcFq711wxB0k4+ToLgtAJzMC8eXBkx1UTNhU2
> VwuHiZxP4ISh9MV0A7RSW+nTFbG5QMgClnj/eLa448R3bbukXmGDkCkzWyg8JKlZ
> mRAeS7xXVt2daaSXz7t4bX2hn+T88TRHgvgyVxKhieVqHQsCastifpL8cmHdI+Dn
> gp7Z0qcr6gGbFUlnmXx7VqazFP58CPWaGLPWB2YMEt7s7r72h0tCgqxZFQFnhh8f
> pELvVO3DlAtMWOeJj3OzBt/Z9xHN+iCcvI52bcQGvUhnge1R6g9DksfkBX1j7bOq
> mIsrXKoKFdLJQ6rC28eFmwV/+LnOaDMEsPOabvgaIUBo+zoKn7a4ZQDtErVBZVkw
> LNEuu2cPUwTMErBoVG7m
> =YdbI
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Struts 2 /Glassfish to Tomcat migration

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Kiran,

On 10/3/14 8:02 PM, Kiran Badi wrote:
> Thanks Chris for replying.I did resolve the 404  issue,it's error
> on my part. One of view jsp was in incorrect folder so it was
> throwing 404 error.Fixed it and now it works fine.
> 
> I do not recall as how I installed this tomcat probably I
> downloaded the zip file and then integrated that installation with
> netbeans.

The Tomcat server zip distribution does not contain any .dll files.
You either downloaded and installed the .dll files yourself or you
used the Windows Installer package which includes these libraries.

> x86-64 do I need to download this file from apache tomcat site ?
> how do I use this file ? edit the environment variables ?

You should have several .dll files if you have a single one. Take a
look at them to determine which is the correct one for your
architecture and put it in whatever your java.library.path is, named
tcnative-1.dll.

Or, if you don't want or need the APR connector, then disable the
APRLifecycleListener in server.xml and the JVM won't even try to load it.

- -chris

> On Thu, Oct 2, 2014 at 10:38 PM, Christopher Schultz < 
> chris@christopherschultz.net> wrote:
> 
> Kiran,
> 
> On 10/2/14 9:59 PM, Kiran Badi wrote:
>>>> I am migration my glassfish struts 2 based application to
>>>> Tomcat 7.055.
>>>> 
>>>> I am coming across 2 issues, first one is below exception
>>>> while starting Tomcat
>>>> 
>>>> java.lang.UnsatisfiedLinkError: C:\Apache Software 
>>>> Foundation\apache-tomcat-7.0.55\bin\tcnative-1.dll: Can't
>>>> load IA 64-bit .dll on a AMD 64-bit platform
> 
> You have the IA-64 library in your path, and you need the x86-64 
> library instead. How did you install Tomcat? If you used the
> binary installer, it should have correctly detected your
> architecture and used the correct library. If you installed it
> manually, you should have a selection of tcnative .dll files. fine
> the x86-64 one and use that.
> 
>>>> these are java information,
>>>> 
>>>> Using CATALINA_BASE:   "C:\Apache Software 
>>>> Foundation\apache-tomcat-7.0.55" Using CATALINA_HOME:
>>>> "C:\Apache Software Foundation\apache-tomcat-7.0.55" Using
>>>> CATALINA_TMPDIR: "C:\Apache Software
>>>> Foundation\apache-tomcat-7.0.55\temp" Using JRE_HOME:
>>>> "C:\Program Files\Java\jdk1.7.0_13"
>>>> 
>>>> Though the server starts and I can access the home page, but
>>>> it seems like struts.xml file is getting ignored and i am
>>>> getting 404 for all jsp which are under web-inf.
> 
> The inability to start the APR connector won't have any effect on
> this.
> 
> How are you trying to access your .jsp files within WEB-INF? Via a 
> direct URL or some kind of internal forward from another URL?
> 
>>>> Is their any migration guide from glassfish 4x to Tomcat ?
> 
> You shouldn't have to do too much to migrate, as long as you don't 
> have anything GlassFish-specific in your webapp. You should be able
> to take your existing WAR file and drop it into Tomcat's webapps/ 
> directory. That should get you 90% of the way. If you use
> JNDI-based resources, you'll have additional configuration, but I
> won't get into that unless you actually need it.
> 
>>>> I was thinking that copying struts.xml to config directory
>>>> and setting dispatcher servlet should be sufficient. I am
>>>> missing anything here.
> 
> What is "config directory" and how did you "set [the] dispatcher
> servlet"?
> 
> -chris
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUL2DnAAoJEBzwKT+lPKRYvwYP/jLLJRkE2jmiTwfyvMZZ9M/J
a/E6rgdVFzIZnjxx2T1FG6D+Hd95RXP7rxdfdxlJdZurmvjsC/4lISiZlrSD1FUw
NQPUS2A8EkfWNsN8PbaAGFAOWZp/6tkET11wYHGvTJ664MX9ENdyjgK5dCx4yIDn
QbQHKDrEa472hpkIMZms1V6yhgU8dr+I22Sf12oIy8WcYc5i5T4e9RSXB7N6nh1R
WYZktR9VpKK6Mrg4R108Oztyc61YKelYNa/bmP7uhW0BGX+QItP4htC8KYZVVROi
cSkoQvTRvO0sKmCdUXnCGStpEPGKcFq711wxB0k4+ToLgtAJzMC8eXBkx1UTNhU2
VwuHiZxP4ISh9MV0A7RSW+nTFbG5QMgClnj/eLa448R3bbukXmGDkCkzWyg8JKlZ
mRAeS7xXVt2daaSXz7t4bX2hn+T88TRHgvgyVxKhieVqHQsCastifpL8cmHdI+Dn
gp7Z0qcr6gGbFUlnmXx7VqazFP58CPWaGLPWB2YMEt7s7r72h0tCgqxZFQFnhh8f
pELvVO3DlAtMWOeJj3OzBt/Z9xHN+iCcvI52bcQGvUhnge1R6g9DksfkBX1j7bOq
mIsrXKoKFdLJQ6rC28eFmwV/+LnOaDMEsPOabvgaIUBo+zoKn7a4ZQDtErVBZVkw
LNEuu2cPUwTMErBoVG7m
=YdbI
-----END PGP SIGNATURE-----

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


Re: Struts 2 /Glassfish to Tomcat migration

Posted by Kiran Badi <ki...@poonam.org>.
Thanks Chris for replying.I did resolve the 404  issue,it's error on my
part. One of view jsp was in incorrect folder so it was throwing 404
error.Fixed it and now it works fine.

I do not recall as how I installed this tomcat probably I downloaded the
zip file and then integrated that installation with netbeans.


x86-64 do I need to download this file from apache tomcat site ? how do I
use this file ? edit the environment variables ?

On Thu, Oct 2, 2014 at 10:38 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Kiran,
>
> On 10/2/14 9:59 PM, Kiran Badi wrote:
> > I am migration my glassfish struts 2 based application to Tomcat
> > 7.055.
> >
> > I am coming across 2 issues, first one is below exception while
> > starting Tomcat
> >
> > java.lang.UnsatisfiedLinkError: C:\Apache Software
> > Foundation\apache-tomcat-7.0.55\bin\tcnative-1.dll: Can't load IA
> > 64-bit .dll on a AMD 64-bit platform
>
> You have the IA-64 library in your path, and you need the x86-64
> library instead. How did you install Tomcat? If you used the binary
> installer, it should have correctly detected your architecture and
> used the correct library. If you installed it manually, you should
> have a selection of tcnative .dll files. fine the x86-64 one and use that.
>
> > these are java information,
> >
> > Using CATALINA_BASE:   "C:\Apache Software
> > Foundation\apache-tomcat-7.0.55" Using CATALINA_HOME:   "C:\Apache
> > Software Foundation\apache-tomcat-7.0.55" Using CATALINA_TMPDIR:
> > "C:\Apache Software Foundation\apache-tomcat-7.0.55\temp" Using
> > JRE_HOME:        "C:\Program Files\Java\jdk1.7.0_13"
> >
> > Though the server starts and I can access the home page, but it
> > seems like struts.xml file is getting ignored and i am getting 404
> > for all jsp which are under web-inf.
>
> The inability to start the APR connector won't have any effect on this.
>
> How are you trying to access your .jsp files within WEB-INF? Via a
> direct URL or some kind of internal forward from another URL?
>
> > Is their any migration guide from glassfish 4x to Tomcat ?
>
> You shouldn't have to do too much to migrate, as long as you don't
> have anything GlassFish-specific in your webapp. You should be able to
> take your existing WAR file and drop it into Tomcat's webapps/
> directory. That should get you 90% of the way. If you use JNDI-based
> resources, you'll have additional configuration, but I won't get into
> that unless you actually need it.
>
> > I was thinking that copying struts.xml to config directory and
> > setting dispatcher servlet should be sufficient. I am missing
> > anything here.
>
> What is "config directory" and how did you "set [the] dispatcher servlet"?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJULgw0AAoJEBzwKT+lPKRYoI8P/2N1QNVZK1ZfvPqNNY2sALE0
> 4obJMM/vKtzDsKrJmJ+kaTfSAt1Cnd6fOP3VCFUYrfkKGWUjOfTczxN6c2RgvJbV
> R8Y9nwUhevgb2Y36slZ2Kda6g2XmxH5WR8PU/qEF8qRu+ZM7BSkKAkfUz+lrbrC2
> a4MD02LmiQXaXEyxsFzOcW+Ig9iMUi4gpCA5hJw9SJtObedeW9rfQDrNJVpMd559
> FFUdGE6hz2/+3JcTV+gYutYrS0sGuPrTL/WA+X7OYTdPheU6R9JmiK8OmLBA6COg
> aNBT6k/Bm29NgTQVAXATkomI7fBCV3HRYlIH7eA1oZgMPgSKf6PTdrfKaAvZZfz0
> qxXl9dD7gXgssNN59CxxDu2xHlYv11RMN/vlVodpdWWHWkttetigpQi1wL3dDfJd
> uBzi8vl8DXVcs+44sZ+lPNa07VjHRxR8zElqTppQ9f500ozQN+5j18LYtOKefoOZ
> HmQ1lhs721hN5XzWP1xQRZGFNVg1fb0tBFVf/n2TT3n9DhiQhXpy029xKYkUBa9q
> Ch2iFzQN1HbLimBVuUlKx2fDjy8P6BWUfN0I1T9kSPLwZwtSZy8V0JuSuaOdkNby
> kQ6PQBV5CMQNdMNcNE5rIDUA66YyLOMXMYnN/pQaT5JIoeTJL0b2jVNweFGcdukp
> ANyaJNqtL6SuIS7DUmvE
> =QXr1
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Struts 2 /Glassfish to Tomcat migration

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Kiran,

On 10/2/14 9:59 PM, Kiran Badi wrote:
> I am migration my glassfish struts 2 based application to Tomcat
> 7.055.
> 
> I am coming across 2 issues, first one is below exception while
> starting Tomcat
> 
> java.lang.UnsatisfiedLinkError: C:\Apache Software 
> Foundation\apache-tomcat-7.0.55\bin\tcnative-1.dll: Can't load IA
> 64-bit .dll on a AMD 64-bit platform

You have the IA-64 library in your path, and you need the x86-64
library instead. How did you install Tomcat? If you used the binary
installer, it should have correctly detected your architecture and
used the correct library. If you installed it manually, you should
have a selection of tcnative .dll files. fine the x86-64 one and use that.

> these are java information,
> 
> Using CATALINA_BASE:   "C:\Apache Software
> Foundation\apache-tomcat-7.0.55" Using CATALINA_HOME:   "C:\Apache
> Software Foundation\apache-tomcat-7.0.55" Using CATALINA_TMPDIR:
> "C:\Apache Software Foundation\apache-tomcat-7.0.55\temp" Using
> JRE_HOME:        "C:\Program Files\Java\jdk1.7.0_13"
> 
> Though the server starts and I can access the home page, but it
> seems like struts.xml file is getting ignored and i am getting 404 
> for all jsp which are under web-inf.

The inability to start the APR connector won't have any effect on this.

How are you trying to access your .jsp files within WEB-INF? Via a
direct URL or some kind of internal forward from another URL?

> Is their any migration guide from glassfish 4x to Tomcat ?

You shouldn't have to do too much to migrate, as long as you don't
have anything GlassFish-specific in your webapp. You should be able to
take your existing WAR file and drop it into Tomcat's webapps/
directory. That should get you 90% of the way. If you use JNDI-based
resources, you'll have additional configuration, but I won't get into
that unless you actually need it.

> I was thinking that copying struts.xml to config directory and
> setting dispatcher servlet should be sufficient. I am missing
> anything here.

What is "config directory" and how did you "set [the] dispatcher servlet"?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJULgw0AAoJEBzwKT+lPKRYoI8P/2N1QNVZK1ZfvPqNNY2sALE0
4obJMM/vKtzDsKrJmJ+kaTfSAt1Cnd6fOP3VCFUYrfkKGWUjOfTczxN6c2RgvJbV
R8Y9nwUhevgb2Y36slZ2Kda6g2XmxH5WR8PU/qEF8qRu+ZM7BSkKAkfUz+lrbrC2
a4MD02LmiQXaXEyxsFzOcW+Ig9iMUi4gpCA5hJw9SJtObedeW9rfQDrNJVpMd559
FFUdGE6hz2/+3JcTV+gYutYrS0sGuPrTL/WA+X7OYTdPheU6R9JmiK8OmLBA6COg
aNBT6k/Bm29NgTQVAXATkomI7fBCV3HRYlIH7eA1oZgMPgSKf6PTdrfKaAvZZfz0
qxXl9dD7gXgssNN59CxxDu2xHlYv11RMN/vlVodpdWWHWkttetigpQi1wL3dDfJd
uBzi8vl8DXVcs+44sZ+lPNa07VjHRxR8zElqTppQ9f500ozQN+5j18LYtOKefoOZ
HmQ1lhs721hN5XzWP1xQRZGFNVg1fb0tBFVf/n2TT3n9DhiQhXpy029xKYkUBa9q
Ch2iFzQN1HbLimBVuUlKx2fDjy8P6BWUfN0I1T9kSPLwZwtSZy8V0JuSuaOdkNby
kQ6PQBV5CMQNdMNcNE5rIDUA66YyLOMXMYnN/pQaT5JIoeTJL0b2jVNweFGcdukp
ANyaJNqtL6SuIS7DUmvE
=QXr1
-----END PGP SIGNATURE-----

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