• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting "reflect.InvocationTargetException:" in Unix and not in Windows

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I had deployed a war file on Tamcat4.1 on Unix system. when i click on a link on the application(struts application), I'm getting below error message:
---------------------------------------
|ERROR|com.pro.gde.ui.administration.profil.action.ActionRechercherProfil|(Log4JCategoryLog.java:188)|Dispatch[/rechercherProfil] to method afficher returned an exception
java.lang.reflect.InvocationTargetException:
java.lang.NoSuchMethodError
at com.pro.gde.domaine.administration.connexion.ObjetBDConnexion.findAll(Unknown Source)
at com.pro.gde.domaine.administration.connexion.ObjetBDConnexion.find(Unknown Source)
at com.pro.gde.domaine.administration.connexion.FabriqueConnexion.find(Unknown Source)
at com.pro.gde.service.ServiceTableRef.rechercherConnexions(Unknown Source)
at com.pro.gde.ui.administration.profil.action.ActionRechercherProfil.afficher(Unknown Source)
at com.pro.gde.ui.administration.profil.action.ActionRechercherProfil.rechercher(Unknown Source)
at com.pro.gde.ui.administration.profil.action.ActionRechercherProfil.afficher(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:209)
at org.apache.struts.actions.DispatchAction.perform(DispatchAction.java:289)
at org.apache.struts.action.Action.execute(Action.java:369)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:437)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:264)
at org.apache.struts.action.ActionServlet.process(Unknown Source)
at org.apache.struts.action.ActionServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:720)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invo
---------------------------------------

Could you please advice what could be the reason?

I have build the war file using Ant , jdk1.4. and it is working fine in windows machine.
In Unix machine too, all the modules are working EXCEPT this link which throws error. So i doubt it could be JDBC error.

please suggest .. its very urgent.

 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have something out of sync. You're getting a NoSuchMethodException when trying to dynamically locate the com.pro.gde.domaine.administration.connexion.ObjetBDConnexion.findAll() method. That usually means that the module in the server is older than the one you compiled with, and may indicate that you included the class in both the server common lib directory and in your WAR.
 
yuva rani
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for quick response. Just to add more details.
prior to getting the below error
---------------------
|ERROR|com.pro.gde.ui.administration.profil.action.ActionRechercherProfil|(Log4JCategoryLog.java:188)|Dispatch[/rechercherProfil] to method afficher returned an exception
java.lang.reflect.InvocationTargetException:
java.lang.NoSuchMethodError
at com.pro.gde.domaine.administration.connexion.ObjetBDConnexion.findAll(Unknown Source)
---------------------

i get repeatedly log messages as
---------------------------
2009-08-24 13:35:11,305|[http-8087-Processor3]|DEBUG|ast.solution.sql.pool.PoolManager|(Log4JCategoryLog.java:132)|Obtaining a connection to the pool REFSID
2009-08-24 13:35:11,306|[http-8087-Processor3]|DEBUG|ast.solution.sql.RequestManager|(Log4JCategoryLog.java:132)|Retrieving a connection from the pool
2009-08-24 13:35:11,309|[http-8087-Processor3]|DEBUG|ast.solution.sql.pool.PoolManager|(Log4JCategoryLog.java:132)|Releasing a connection to the pool REFSID
2009-08-24 13:35:11,311|[http-8087-Processor3]|DEBUG|ast.solution.sql.RequestManager|(Log4JCategoryLog.java:132)|Return of the connection to the pool
2009-08-24 13:35:11,312|[http-8087-Processor3]|DEBUG|ast.solution.sql.RequestManager|(Log4JCategoryLog.java:115)|Connections created = 6 - Connections released = 112
2009-08-24 13:35:11,313|[http-8087-Processor3]|DEBUG|ast.solution.sql.pool.PoolManager|(Log4JCategoryLog.java:132)|Obtaining a connection to the pool REFSID
2009-08-24 13:35:11,314|[http-8087-Processor3]|DEBUG|ast.solution.sql.RequestManager|(Log4JCategoryLog.java:132)|Retrieving a connection from the pool
2009-08-24 13:35:11,317|[http-8087-Processor3]|DEBUG|ast.solution.sql.pool.PoolManager|(Log4JCategoryLog.java:132)|Releasing a connection to the pool REFSID
2009-08-24 13:35:11,318|[http-8087-Processor3]|DEBUG|ast.solution.sql.RequestManager|(Log4JCategoryLog.java:132)|Return of the connection to the pool
2009-08-24 13:35:11,319|[http-8087-Processor3]|DEBUG|ast.solution.sql.RequestManager|(Log4JCategoryLog.java:115)|Connections created = 6 - Connections released = 113

------------------------

Also in server common lib, i have following files
activation.jar
ant.jar
ant-launcher.jar
classes12.jar
commons-collections-3.2.jar
commons-dbcp-1.2.2.jar
commons-logging-api-1.1.1.jar
commons-pool-1.4.jar
jasper-compiler.jar
jasper-runtime.jar
jdbc2_0-stdext.jar
jndi.jar
jta.jar
mail.jar
naming-common.jar
naming-factory.jar
naming-resources.jar
servlet.jar
teradata.jar
terajdbc4.jar
-------------------------------------
While building using Ant, i used
servletJar = C:/apache-tomcat-4.1.40-LE-jdk14/common/lib/servlet.jar
JDBCJar = C:/apache-tomcat-4.1.40-LE-jdk14/common/lib/classes12.jar
activationJar = C:/apache-tomcat-4.1.40-LE-jdk14/common/lib/activation.jar
mailJar = C:/apache-tomcat-4.1.40-LE-jdk14/common/lib/mail.jar
------------------------------------

please let me know what changes has to be done. Is it due to JDBC, or any clean up has to done.
please advice ..
 
yuva rani
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much. it worked. I just recreated the java file where the error was thrown. Build new war file and deployed on unix box. It worked!!
 
yuva rani
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm again facing the same issue when i deployed second time.
Is there any permanent solution for this.
please assist. I'm going mad with this error.
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat 4 has passed its end of life and is no longer supported.

You are including Oracle jdbc classes in your WAR and 2 different Teradata JDBC jars in your server. Since I've never worked with Teradata, I don't know if that's proper or not. I'm not sure that it's safe to put the javamail jars in the server common directory.

Originally, I thought "com.pro.gde.domaine.administration.connexion.ObjetBDConnexion" was part of a JDBC driver jar, but now I realize that it's probably part of the DAO layer of your web application.

The same answer still applies, however. If you have a JAR containing this class in one of your 3 Tomcat lib directories, remove it. Make sure that if you have this class in a JAR used by your webapp that the JAR you compile with is the same one that you copy to your WAR's WEB-INF/lib directory. Make sure you're not using both a JAR version of this class and a non-jar (class file in WEB-INF/classes) version of this class. Somewhere you've got more than one copy of this class and one of them is out of date.
 
yuva rani
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the issue is finally resolved.
Thanks for your valuable inputs.

I had complied with jdk1.4_18 in local system(windows). I had the same version on Unix server too. But as said I was facing issue with couples of links (module). i installed jdk 1.4_19 on unix and it is working fine now.
don't whats happening !!!

Now one more issue has popped up:
while fetching table names in a page using the connection details from application itself, following error is thrown while setting connection using
DriverManager.getConnection (url,desc.getLogin(),desc.getPassword()));
-------------------
ason.solution.exception.ExceptionFonctionnelle
at com.pro.gde.domaine.administration.connexion.JdbcGdeOracleImpl.<init>(Unknown Source)
at com.pro.gde.domaine.administration.connexion.FabriqueJdbcGde.getJdbcGde(Unknown Source)
at com.pro.gde.ui.commun.GdeDispatchActionBase.putJdbcEnSession(Unknown Source)
at com.pro.gde.ui.administration.connexion.action.ActionInputLoginPassword.afficher(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:209)
at org.apache.struts.actions.DispatchAction.perform(DispatchAction.java:289)
at org.apache.struts.action.Action.execute(Action.java:369)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:437)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:264)
at org.apache.struts.action.ActionServlet.process(Unknown Source)
at org.apache.struts.action.ActionServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:720)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:534)
-------------------------------

please suggest if still there is sync problem with the enviroment.
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic