You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by testwreq wreq <te...@gmail.com> on 2010/07/14 15:35:54 UTC

java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

I have a piece of code that retrieves data from oracle database XML type. It
works on tomcat installation on ubuntu. But fails on CentOS. Any ideas?


java.lang.NoSuchMethodError: method java.util.Collections.emptyMap
with signature ()Ljava.util.Map; was not found.
	javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
	javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
	gdb.UnmarshallerAPI.unmarshalAdvisors(UnmarshallerAPI.java:80)
	gdb.ReportBeanStudent.studentSearchByNameWithDetails(ReportBeanStudent.java:581)
	gdb.ProcessInput.listInfoAboutStudentsinDetail(ProcessInput.java:688)
	gdb.ProcessInput.doPost(ProcessInput.java:116)
	javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so)
	javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so)

Thanks,vm

Re: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

Posted by testwreq wreq <te...@gmail.com>.
How can I set the JRE_HOME? Why is it null?

I am very new to this. Please point me to fix this.

On Wed, Jul 14, 2010 at 10:38 AM, Martin Gainty <mg...@hotmail.com> wrote:

>
> try
>
> Collection.isEmpty()==true
>
> OR
> Collection.size()==0
>
>
> take your pick
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>
> > Date: Wed, 14 Jul 2010 09:56:34 -0400
> > Subject: Re: java.lang.NoSuchMethodError: method
> java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not
> found.
> > From: kschneider@gmail.com
> > To: users@tomcat.apache.org
>  >
> > You wouldn't happen to be using JDK 1.4 on CentOS, would you? The
> > emptyMap method showed up in JDK 1.5...
> >
> > On Wed, Jul 14, 2010 at 9:35 AM, testwreq wreq <te...@gmail.com>
> wrote:
> > > I have a piece of code that retrieves data from oracle database XML
> type. It
> > > works on tomcat installation on ubuntu. But fails on CentOS. Any ideas?
> > >
> > >
> > > java.lang.NoSuchMethodError: method java.util.Collections.emptyMap
> > > with signature ()Ljava.util.Map; was not found.
> > >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
> > >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
> > >        gdb.UnmarshallerAPI.unmarshalAdvisors(UnmarshallerAPI.java:80)
> > >
>  gdb.ReportBeanStudent.studentSearchByNameWithDetails(ReportBeanStudent.java:581)
> > >
>  gdb.ProcessInput.listInfoAboutStudentsinDetail(ProcessInput.java:688)
> > >        gdb.ProcessInput.doPost(ProcessInput.java:116)
> > >        javax.servlet.http.HttpServlet.service(
> tomcat5-servlet-2.4-api-5.5.23.jar.so)
> > >        javax.servlet.http.HttpServlet.service(
> tomcat5-servlet-2.4-api-5.5.23.jar.so)
> > >
> > > Thanks,vm
> >
> > --
> > Kris Schneider
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
>
> _________________________________________________________________
> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
> Hotmail.
>
> http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
>

RE: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

Posted by Martin Gainty <mg...@hotmail.com>.
try

Collection.isEmpty()==true

OR
Collection.size()==0


take your pick
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 

> Date: Wed, 14 Jul 2010 09:56:34 -0400
> Subject: Re: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.
> From: kschneider@gmail.com
> To: users@tomcat.apache.org
> 
> You wouldn't happen to be using JDK 1.4 on CentOS, would you? The
> emptyMap method showed up in JDK 1.5...
> 
> On Wed, Jul 14, 2010 at 9:35 AM, testwreq wreq <te...@gmail.com> wrote:
> > I have a piece of code that retrieves data from oracle database XML type. It
> > works on tomcat installation on ubuntu. But fails on CentOS. Any ideas?
> >
> >
> > java.lang.NoSuchMethodError: method java.util.Collections.emptyMap
> > with signature ()Ljava.util.Map; was not found.
> >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
> >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
> >        gdb.UnmarshallerAPI.unmarshalAdvisors(UnmarshallerAPI.java:80)
> >        gdb.ReportBeanStudent.studentSearchByNameWithDetails(ReportBeanStudent.java:581)
> >        gdb.ProcessInput.listInfoAboutStudentsinDetail(ProcessInput.java:688)
> >        gdb.ProcessInput.doPost(ProcessInput.java:116)
> >        javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so)
> >        javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so)
> >
> > Thanks,vm
> 
> -- 
> Kris Schneider
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

Re: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

Posted by testwreq wreq <te...@gmail.com>.
It seems there is something wrong with the setup. How do I set the JRE_HOME?
Also, /gcj-4.1.2
On Wed, Jul 14, 2010 at 10:46 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: testwreq wreq [mailto:testwreq@gmail.com]
> > Subject: Re: java.lang.NoSuchMethodError: method
> > java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not
> > found.
> >
> > 2. JRE_HOME is not set to anything
>
> Which is a problem.
>
> > production environments was not found on the java.library.path:
> > /usr/lib64/gcj-4.1.2
>
> Oops.  You're using gcj, which is wholly inappropriate for serious Java
> work.  Remove it from your system if you can.  Regardless, make sure
> JRE_HOME or JAVA_HOME is set to a real JVM before your start Tomcat.
>
>  - 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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: testwreq wreq [mailto:testwreq@gmail.com]
> Subject: Re: java.lang.NoSuchMethodError: method
> java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not
> found.
> 
> 2. JRE_HOME is not set to anything

Which is a problem.

> production environments was not found on the java.library.path:
> /usr/lib64/gcj-4.1.2

Oops.  You're using gcj, which is wholly inappropriate for serious Java work.  Remove it from your system if you can.  Regardless, make sure JRE_HOME or JAVA_HOME is set to a real JVM before your start Tomcat.

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

Posted by testwreq wreq <te...@gmail.com>.
1. Error is complaining on the following lines of the code.
                Vector advVec=new Vector();
                if (rs.getObject("ADVISOR") != null)
                {
                    XMLType poxml = (XMLType) rs.getObject("advisor");
                    String advisorstring = poxml.getStringVal();
                  //  System.out.println("the advisor string in
reportbeanstudent is " + advisorstring);
                   // if (!((advisorstring.equalsIgnoreCase("<?xml
version=\"1.0\"?><Advisors></Advisors>")) ||
(advisorstring.equalsIgnoreCase("<?xml version=\"1.0\" encoding=\"UTF-8\"
standalone=\"yes\"?><Advisors/>"))))
                    //{

2. JRE_HOME is not set to anything
Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
Created MBeanServer with ID: w8eg0f:gbjiotn1.0:www2.cs.sunysb.edu:1
12-Jul-10 12:18:03 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/usr/lib64/gcj-4.1.2


On Wed, Jul 14, 2010 at 10:27 AM, Kris Schneider <ks...@gmail.com>wrote:

> Well, it looks like this is the line of code being executed:
>
> return
> newInstance(contextPath,classLoader,Collections.<String,Object>emptyMap());
>
> Tomcat normally dumps out at least the value of its JRE_HOME env var
> upon startup, can you verify that it's really using 1.6?
>
> On Wed, Jul 14, 2010 at 10:11 AM, testwreq wreq <te...@gmail.com>
> wrote:
> > It is jdk 1.6 from SUN
> > java -version
> > java version "1.6.0_20"
> > Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> > Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
> >
> >
> > On Wed, Jul 14, 2010 at 9:56 AM, Kris Schneider <kschneider@gmail.com
> >wrote:
> >
> >> You wouldn't happen to be using JDK 1.4 on CentOS, would you? The
> >> emptyMap method showed up in JDK 1.5...
> >>
> >> On Wed, Jul 14, 2010 at 9:35 AM, testwreq wreq <te...@gmail.com>
> wrote:
> >> > I have a piece of code that retrieves data from oracle database XML
> type.
> >> It
> >> > works on tomcat installation on ubuntu. But fails on CentOS. Any
> ideas?
> >> >
> >> >
> >> > java.lang.NoSuchMethodError: method java.util.Collections.emptyMap
> >> > with signature ()Ljava.util.Map; was not found.
> >> >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
> >> >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
> >> >        gdb.UnmarshallerAPI.unmarshalAdvisors(UnmarshallerAPI.java:80)
> >> >
> >>
>  gdb.ReportBeanStudent.studentSearchByNameWithDetails(ReportBeanStudent.java:581)
> >> >
> >>  gdb.ProcessInput.listInfoAboutStudentsinDetail(ProcessInput.java:688)
> >> >        gdb.ProcessInput.doPost(ProcessInput.java:116)
> >> >        javax.servlet.http.HttpServlet.service(
> >> tomcat5-servlet-2.4-api-5.5.23.jar.so)
> >> >        javax.servlet.http.HttpServlet.service(
> >> tomcat5-servlet-2.4-api-5.5.23.jar.so)
> >> >
> >> > Thanks,vm
> >>
> >> --
> >> Kris Schneider
>
> --
> Kris Schneider
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

Posted by Kris Schneider <ks...@gmail.com>.
Well, it looks like this is the line of code being executed:

return newInstance(contextPath,classLoader,Collections.<String,Object>emptyMap());

Tomcat normally dumps out at least the value of its JRE_HOME env var
upon startup, can you verify that it's really using 1.6?

On Wed, Jul 14, 2010 at 10:11 AM, testwreq wreq <te...@gmail.com> wrote:
> It is jdk 1.6 from SUN
> java -version
> java version "1.6.0_20"
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
>
>
> On Wed, Jul 14, 2010 at 9:56 AM, Kris Schneider <ks...@gmail.com>wrote:
>
>> You wouldn't happen to be using JDK 1.4 on CentOS, would you? The
>> emptyMap method showed up in JDK 1.5...
>>
>> On Wed, Jul 14, 2010 at 9:35 AM, testwreq wreq <te...@gmail.com> wrote:
>> > I have a piece of code that retrieves data from oracle database XML type.
>> It
>> > works on tomcat installation on ubuntu. But fails on CentOS. Any ideas?
>> >
>> >
>> > java.lang.NoSuchMethodError: method java.util.Collections.emptyMap
>> > with signature ()Ljava.util.Map; was not found.
>> >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
>> >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
>> >        gdb.UnmarshallerAPI.unmarshalAdvisors(UnmarshallerAPI.java:80)
>> >
>>  gdb.ReportBeanStudent.studentSearchByNameWithDetails(ReportBeanStudent.java:581)
>> >
>>  gdb.ProcessInput.listInfoAboutStudentsinDetail(ProcessInput.java:688)
>> >        gdb.ProcessInput.doPost(ProcessInput.java:116)
>> >        javax.servlet.http.HttpServlet.service(
>> tomcat5-servlet-2.4-api-5.5.23.jar.so)
>> >        javax.servlet.http.HttpServlet.service(
>> tomcat5-servlet-2.4-api-5.5.23.jar.so)
>> >
>> > Thanks,vm
>>
>> --
>> Kris Schneider

-- 
Kris Schneider

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


Re: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

Posted by testwreq wreq <te...@gmail.com>.
It is jdk 1.6 from SUN
java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)


On Wed, Jul 14, 2010 at 9:56 AM, Kris Schneider <ks...@gmail.com>wrote:

> You wouldn't happen to be using JDK 1.4 on CentOS, would you? The
> emptyMap method showed up in JDK 1.5...
>
> On Wed, Jul 14, 2010 at 9:35 AM, testwreq wreq <te...@gmail.com> wrote:
> > I have a piece of code that retrieves data from oracle database XML type.
> It
> > works on tomcat installation on ubuntu. But fails on CentOS. Any ideas?
> >
> >
> > java.lang.NoSuchMethodError: method java.util.Collections.emptyMap
> > with signature ()Ljava.util.Map; was not found.
> >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
> >        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
> >        gdb.UnmarshallerAPI.unmarshalAdvisors(UnmarshallerAPI.java:80)
> >
>  gdb.ReportBeanStudent.studentSearchByNameWithDetails(ReportBeanStudent.java:581)
> >
>  gdb.ProcessInput.listInfoAboutStudentsinDetail(ProcessInput.java:688)
> >        gdb.ProcessInput.doPost(ProcessInput.java:116)
> >        javax.servlet.http.HttpServlet.service(
> tomcat5-servlet-2.4-api-5.5.23.jar.so)
> >        javax.servlet.http.HttpServlet.service(
> tomcat5-servlet-2.4-api-5.5.23.jar.so)
> >
> > Thanks,vm
>
> --
> Kris Schneider
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: java.lang.NoSuchMethodError: method java.util.Collections.emptyMap with signature ()Ljava.util.Map; was not found.

Posted by Kris Schneider <ks...@gmail.com>.
You wouldn't happen to be using JDK 1.4 on CentOS, would you? The
emptyMap method showed up in JDK 1.5...

On Wed, Jul 14, 2010 at 9:35 AM, testwreq wreq <te...@gmail.com> wrote:
> I have a piece of code that retrieves data from oracle database XML type. It
> works on tomcat installation on ubuntu. But fails on CentOS. Any ideas?
>
>
> java.lang.NoSuchMethodError: method java.util.Collections.emptyMap
> with signature ()Ljava.util.Map; was not found.
>        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
>        javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
>        gdb.UnmarshallerAPI.unmarshalAdvisors(UnmarshallerAPI.java:80)
>        gdb.ReportBeanStudent.studentSearchByNameWithDetails(ReportBeanStudent.java:581)
>        gdb.ProcessInput.listInfoAboutStudentsinDetail(ProcessInput.java:688)
>        gdb.ProcessInput.doPost(ProcessInput.java:116)
>        javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so)
>        javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.23.jar.so)
>
> Thanks,vm

-- 
Kris Schneider

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