geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kamalanathan Raman" <Kamalanathan_Ra...@infosys.com>
Subject RE: java.lang.NoSuchMethodError - Reg
Date Thu, 11 Jan 2007 10:20:49 GMT
Hi Manu,

 

Iam attaching the Geronimo-application.xml , if I attach the
<dep:hidden-classes> attribute , its throwing 

Caused by: org.apache.xmlbeans.XmlException: Invalid deployment
descriptor: [error: cvc-complex-type.2.3: Element
'hidden-classes@http://geronimo.apache.org/xml/ns/deployment-1.1' with
element-only content type cannot have text content.]

Descriptor: <xml-fragment
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">

So kindly correct me where I have gone wrong.

 

<?xml version="1.0" encoding="UTF-8" ?> 

    <application
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">

            <dep:environment
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">

                        <dep:dependencies>

                                    <dep:dependency>

 
<dep:groupId>geronimo</dep:groupId>

 
<dep:artifactId>geronimo-mail</dep:artifactId>

 
<dep:version>1.1.1</dep:version>

 
<dep:type>jar</dep:type>

                                    </dep:dependency>

                                    

                                    <dep:dependency>

 
<dep:groupId>geronimo</dep:groupId>

 
<dep:artifactId>geronimo-javamail-transport</dep:artifactId>

 
<dep:version>1.1.1</dep:version>

 
<dep:type>jar</dep:type>

                                    </dep:dependency>

                        </dep:dependencies>

 
<dep:hidden-classes>org.objectweb.asm.ClassWriter</dep:hidden-classes>

            <dep:non-overridable-classes/> 

                        </dep:environment>

 

    <gbean name="mail/MailSession"
class="org.apache.geronimo.mail.MailGBean">

        <attribute name="transportProtocol">smtp</attribute>

        <attribute name="useDefault">false</attribute>

        <attribute name="host">localhost</attribute>

        <attribute name="properties">

            mail.debug=true

            mail.smtp.port=25

            mail.from=symwas@wimdev01.symprod.com

        </attribute> 

    </gbean>

 

</application>

 

Thanks and Regards,

Kamal

________________________________

From: Manu George [mailto:manu.t.george@gmail.com] 
Sent: Thursday, January 11, 2007 2:29 PM
To: user@geronimo.apache.org
Subject: Re: java.lang.NoSuchMethodError - Reg

 

Hi,

hidden-classes

Lists packages or classes that may be in a parent class loader, but
should not be exposed from there to the web application. This is
typically used when the web application wants to use a different version
of a library that one of its parent configurations (or Geronimo itself)
uses. For example, Geronimo 1.0 uses Log4J 1.2.8. If the web application
wanted to use a newer version, it could include the newer version in
WEB-INF/lib and then add org.apache.log4j to the list of hidden-classes
so that the Log4J classes could not be loaded from a parent class
loader.

This is the explanation in Aaron Mulders book. The url for the book is -
http://www.chariotsolutions.com/geronimo/geronimo-1.1/geronimo-html-one-
page.html

eg below

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="
http://geronimo.apache.org/xml/ns/j2ee/application-1.1
<http://geronimo.apache.org/xml/ns/j2ee/application-1.1> ">
  <dep:environment
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1 ">
    <dep:moduleId>
      <dep:groupId>sample</dep:groupId>
      <dep:artifactId>daytrader-oracle-tomcat</dep:artifactId>
      <dep:version>1.1</dep:version> 
      <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>geronimo</dep:groupId>
        <dep:artifactId>j2ee-server</dep:artifactId> 
        <dep:type>car</dep:type>
      </dep:dependency>
    <dep:hidden-classes>org.apache.log4j</dep:hidden-classes>
    <dep:non-overridable-classes/> 
  </dep:environment>

This will block all child packages and classes under org.apache.log4j 
from being exposed to the application. Hope this helps

thanks
Manu




On 1/11/07, Kamalanathan Raman <Kamalanathan_Raman@infosys.com> wrote:

Hi Manu,

 

Thanks for replying . Can u send a sample code as to how to use the
hidden class attribute.

 

Thanks and Regards,

Kamal

 

________________________________

From: Manu George [mailto:manu.t.george@gmail.com] 
Sent: Thursday, January 11, 2007 2:02 PM
To: user@geronimo.apache.org
Subject: Re: java.lang.NoSuchMethodError - Reg

 

Hi,
       It can be due to a wrong version of that class loaded in the
classloader . i.e another version of the class without that method may
be present. You should use the hidden classes attribute of the plan to
hide the conflicting classes/packages. i.e. the ones used by geronimo
and your app. This will make the classloader not see the classes loaded
by geronimo. 

Thanks
Manu

On 1/11/07, Kamalanathan Raman <Kamalanathan_Raman@infosys.com> wrote:

Hi ,

 

      When I run my deployed application. I get this following error ,
got struck up in this error for long time , can any one help me out in
solving this issue.I have attached the stack trace of the error. Thanks
in advance for ur reply

 

 

13:44:45,813 INFO  [Configuration] processing foreign key constraints

13:44:45,891 ERROR [[/wlbx]] StandardWrapper.Throwable 

java.lang.NoSuchMethodError:
org.objectweb.asm.ClassWriter.visitMethod(ILjava/lang/String;Ljava/lang/
String;[Ljava/lang/String;)Lorg/objectweb/asm/CodeVisitor; 

      at net.sf.cglib.ASMBackend.begin_constructor( ASMBackend.java:297
) 

      at net.sf.cglib.CodeGenerator.begin_constructor(
CodeGenerator.java:281 ) 

      at net.sf.cglib.CodeGenerator.begin_constructor(
CodeGenerator.java:274 ) 

      at net.sf.cglib.CodeGenerator.generateNullConstructor(
CodeGenerator.java:970 ) 

      at net.sf.cglib.KeyFactoryGenerator.generate(
KeyFactoryGenerator.java:105 ) 

      at net.sf.cglib.CodeGenerator.define( CodeGenerator.java:163 ) 

      at net.sf.cglib.KeyFactory.create( KeyFactory.java:114 ) 

      at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(
SessionFactoryImpl.java:297 ) 

      at net.sf.hibernate.cfg.Configuration.buildSessionFactory(
Configuration.java:627) 

      at com.symcor.wlbx.util.ServiceLocator.getDataSource(
ServiceLocator.java:196 ) 

      at
com.symcor.wlbx.web.servlet.ReportServlet.initializeResourceLookups(Repo
rtServlet.java:912 )

      at com.symcor.wlbx.web.servlet.ReportServlet.init(
ReportServlet.java:668 ) 

      at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:1105 ) 

      at org.apache.catalina.core.StandardWrapper.load(
StandardWrapper.java:932 ) 

      at org.apache.catalina.core.StandardContext.loadOnStartup(
StandardContext.java:3915 ) 

      at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4176 ) 

      at
org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoSt
andardContext.java:67 )

      at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.inv
oke( GeronimoStandardContext.java:337 ) 

      at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(Geronim
oBeforeAfterValve.java:31 )

      at org.apache.geronimo.tomcat.GeronimoStandardContext.start(
GeronimoStandardContext.java:192 ) 

      at org.apache.catalina.core.ContainerBase.addChildInternal(
ContainerBase.java:759 ) 

      at org.apache.catalina.core.ContainerBase.addChild(
ContainerBase.java:739 ) 

      at org.apache.catalina.core.StandardHost.addChild(
StandardHost.java:524 ) 

      at org.apache.geronimo.tomcat.TomcatContainer.addContext(
TomcatContainer.java:313 ) 

      at
org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.i
nvoke(<generated>)

      at net.sf.cglib.reflect.FastMethod.invoke( FastMethod.java:53 ) 

      at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInv
oker.java:38 )

      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(
GBeanOperation.java:122 ) 

13:44:45,891 ERROR [[/wlbx]] Servlet /wlbx threw load() exception 

java.lang.NoSuchMethodError:
org.objectweb.asm.ClassWriter.visitMethod(ILjava/lang/String;Ljava/lang/
String;[Ljava/lang/String;)Lorg/objectweb/asm/CodeVisitor; 

      at net.sf.cglib.ASMBackend.begin_constructor( ASMBackend.java:297
) 

      at net.sf.cglib.CodeGenerator.begin_constructor(
CodeGenerator.java:281 ) 

      at net.sf.cglib.CodeGenerator.begin_constructor(
CodeGenerator.java:274 ) 

      at net.sf.cglib.CodeGenerator.generateNullConstructor(
CodeGenerator.java:970 ) 

      at net.sf.cglib.KeyFactoryGenerator.generate(
KeyFactoryGenerator.java:105 ) 

      at net.sf.cglib.CodeGenerator.define( CodeGenerator.java:163) 

      at net.sf.cglib.KeyFactory.create( KeyFactory.java:114 ) 

      at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(
SessionFactoryImpl.java:297 ) 

      at net.sf.hibernate.cfg.Configuration.buildSessionFactory(
Configuration.java:627 ) 

      at com.symcor.wlbx.util.ServiceLocator.getDataSource(
ServiceLocator.java:196 ) 

      at
com.symcor.wlbx.web.servlet.ReportServlet.initializeResourceLookups(
ReportServlet.java:912 ) 

      at com.symcor.wlbx.web.servlet.ReportServlet.init(
ReportServlet.java:668 ) 

      at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:1105 ) 

      at org.apache.catalina.core.StandardWrapper.load(
StandardWrapper.java:932 ) 

      at org.apache.catalina.core.StandardContext.loadOnStartup(
StandardContext.java:3915 ) 

      at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4176 ) 

      at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(
GeronimoStandardContext.java:67 ) 

      at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.inv
oke(GeronimoStandardContext.java:337 )

      at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(Geronim
oBeforeAfterValve.java:31 )

      at org.apache.geronimo.tomcat.GeronimoStandardContext.start(
GeronimoStandardContext.java:192 ) 

      at org.apache.catalina.core.ContainerBase.addChildInternal(
ContainerBase.java:759 ) 

      at org.apache.catalina.core.ContainerBase.addChild(
ContainerBase.java:739 ) 

      at org.apache.catalina.core.StandardHost.addChild(
StandardHost.java:524 ) 

      at org.apache.geronimo.tomcat.TomcatContainer.addContext(
TomcatContainer.java:313 ) 

      at
org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.i
nvoke(<generated>)

      at net.sf.cglib.reflect.FastMethod.invoke( FastMethod.java:53 ) 

      at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInv
oker.java:38 )

      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(
GBeanOperation.java:122 ) 

13:44:45,969 INFO  [PropertyMessageResources] Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true

13:44:45,969 INFO  [PropertyMessageResources] Initializing,
config='org.apache.struts.action.ActionResources', returnNull=true

13:44:46,751 INFO  [PropertyMessageResources] Initializing,
config='ApplicationResources', returnNull=true

13:44:46,813 INFO  [ValidatorPlugIn] Loading validation rules file from
'/WEB-INF/validator-rules.xml'

13:44:46,938 INFO  [ValidatorPlugIn] Loading validation rules file from
'/WEB-INF/validation.xml'

13:44:47,125 INFO  [ImportFTPClient] Default save path is @FTP_TO_PATH@\

java.lang.NumberFormatException : For input string:
"@IMPORT_TASK_PERIOD@"

      at java.lang.NumberFormatException.forInputString(Unknown Source)

      at java.lang.Long.parseLong(Unknown Source) 

      at java.lang.Long.<init>(Unknown Source) 

      at com.symcor.wlbx.web.servlet.ImportServlet.init(
ImportServlet.java:137 ) 

      at javax.servlet.GenericServlet.init( GenericServlet.java:168 ) 

      at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:1105 ) 

      at org.apache.catalina.core.StandardWrapper.load(
StandardWrapper.java:932 ) 

      at org.apache.catalina.core.StandardContext.loadOnStartup(
StandardContext.java:3915 ) 

      at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4176 ) 

      at
org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoSt
andardContext.java:67 )

      at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.inv
oke(GeronimoStandardContext.java:337 )

      at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(Geronim
oBeforeAfterValve.java:31 )

      at org.apache.geronimo.tomcat.GeronimoStandardContext.start(
GeronimoStandardContext.java:192 ) 

      at org.apache.catalina.core.ContainerBase.addChildInternal(
ContainerBase.java:759 ) 

      at org.apache.catalina.core.ContainerBase.addChild(
ContainerBase.java:739 ) 

      at org.apache.catalina.core.StandardHost.addChild(
StandardHost.java:524 ) 

      at org.apache.geronimo.tomcat.TomcatContainer.addContext(
TomcatContainer.java:313 ) 

      at
org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.i
nvoke(<generated>)

      at net.sf.cglib.reflect.FastMethod.invoke( FastMethod.java:53 )

      at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(
FastMethodInvoker.java:38 )

java.lang.NoClassDefFoundError 

      at net.sf.hibernate.cfg.Configuration.buildSessionFactory(
Configuration.java:627 ) 

      at com.symcor.wlbx.util.ServiceLocator.getDataSource(
ServiceLocator.java:196 ) 

      at com.symcor.wlbx.dao.core.DataSourceUtils.getDataSourceFromJNDI(
DataSourceUtils.java:62 )

      at com.symcor.wlbx.dao.core.DAOFactory.getDAOFactory(
DAOFactory.java:105 ) 

      at com.symcor.wlbx.dao.imp.ImportProfileTask.loadCachedData(
ImportProfileTask.java:156 ) 

      at com.symcor.wlbx.dao.imp.ImportProfileTask.<init>(
ImportProfileTask.java:233 ) 

      at com.symcor.wlbx.web.servlet.ImportServlet.init(
ImportServlet.java:144 ) 

      at javax.servlet.GenericServlet.init( GenericServlet.java:168 ) 

      at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:1105 ) 

      at org.apache.catalina.core.StandardWrapper.load(
StandardWrapper.java:932 ) 

      at org.apache.catalina.core.StandardContext.loadOnStartup(
StandardContext.java:3915 ) 

      at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4176 ) 

      at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(
GeronimoStandardContext.java:67 ) 

      at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.inv
oke(GeronimoStandardContext.java:337 )

      at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(Geronim
oBeforeAfterValve.java:31 )

      at org.apache.geronimo.tomcat.GeronimoStandardContext.start(
GeronimoStandardContext.java:192 ) 

      at org.apache.catalina.core.ContainerBase.addChildInternal(
ContainerBase.java:759 ) 

      at org.apache.catalina.core.ContainerBase.addChild(
ContainerBase.java:739 ) 

      at org.apache.catalina.core.StandardHost.addChild(
StandardHost.java:524 ) 

      at org.apache.geronimo.tomcat.TomcatContainer.addContext(
TomcatContainer.java:313 ) 

      at
org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.i
nvoke(<generated>)

      at net.sf.cglib.reflect.FastMethod.invoke( FastMethod.java:53 ) 

      at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInv
oker.java:38 )

      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(
GBeanOperation.java:122 )

 

Thanks and Regards,

Kamal

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the original
message. Further, you are not to copy, disclose, or distribute this
e-mail or its contents to any other person and any such actions are
unlawful. This e-mail may contain viruses. Infosys has taken every
reasonable precaution to minimize this risk, but is not liable for any
damage you may sustain as a result of any virus in this e-mail. You
should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content
of all messages sent to or from this e-mail address. Messages sent to or
from this e-mail address may be stored on the Infosys e-mail system. 
***INFOSYS******** End of Disclaimer ********INFOSYS***

 

 


Mime
View raw message