Re: java.lang.NoSuchMethodError - Reg

2007-01-12 Thread Manu George

Hi Kamal,
 Can you mention what version of Geronimo you are using.
Also can you explain how you are looking up this datasource. Have you
configured a resource-ref? Have you created the datasource in console
etc. Also helpful to put the plans and a snippet of the code where the
lookup is done

Thanks
Manu

On 1/11/07, Kamalanathan Raman [EMAIL PROTECTED] wrote:







Thanks Manu for replying. When I give that dep:hidden-classes ,
iam getting this particular error . can u suggest how to get rid of this .
Iam attaching the stack trace of the error.



16:40:51,128 FATAL [DatasourceConnectionProvider] Could not find datasource:
wlbx-ds

javax.naming.NameNotFoundException: wlbx-ds

  at
com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown
Source)

  at
com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown
Source)

  at javax.naming.InitialContext.lookup(Unknown Source)

  at
net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:45)

  at
net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83)

  at
net.sf.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:153)

  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.getConnection(DAOFactory.java:135)

  at
com.symcor.wlbx.dao.DB2OrganizationDAO.getOrgProfile(DB2OrganizationDAO.java:995)

  at
com.symcor.wlbx.dao.DB2OrganizationDAO.getLBXList(DB2OrganizationDAO.java:1168)

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

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

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



Thanks and Regards,

Kamal



-Original Message-
 From: Manu George [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 11, 2007 4:10 PM
 To: user@geronimo.apache.org
 Subject: Re: java.lang.NoSuchMethodError - Reg




Hi Kamal,

Sorry abt that . I gave you a wrong example.You need to

add
dep:hidden-classesdep:filterorg.objectweb.asm.ClassWriter/dep:filter/dep:hidden-classes

this information is in geronimo-module-1.1.xsd in the schema directory



Thanks

Manu



On 1/11/07, Kamalanathan Raman [EMAIL PROTECTED] wrote:









 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
'[EMAIL PROTECTED]://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:groupIdgeronimo/dep:groupId




  dep:artifactIdgeronimo-mail/dep:artifactId




  dep:version1.1.1/dep:version




   dep:typejar/dep:type



 /dep:dependency







 dep:dependency




  dep:groupIdgeronimo/dep:groupId





dep:artifactIdgeronimo-javamail-transport/dep:artifactId




  dep:version1.1.1/dep:version




   dep:typejar/dep:type



 /dep:dependency



 /dep:dependencies




dep:hidden-classesorg.objectweb.asm.ClassWriter/dep:hidden-classes



 dep:non-overridable-classes/



 /dep:environment







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



 attribute
name=transportProtocolsmtp/attribute



 attribute name=useDefaultfalse/attribute



 attribute name=hostlocalhost/attribute



 attribute name=properties



 mail.debug=true



 mail.smtp.port=25



 [EMAIL PROTECTED]



 /attribute



 /gbean







 /application







 Thanks and Regards,



 Kamal



   





 From: Manu George [mailto:[EMAIL PROTECTED]

  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

Re: java.lang.NoSuchMethodError - Reg

2007-01-11 Thread Manu George

Hi Kamal,
   Sorry abt that . I gave you a wrong example.You need to
add 
dep:hidden-classesdep:filterorg.objectweb.asm.ClassWriter/dep:filter/dep:hidden-classes
this information is in geronimo-module-1.1.xsd in the schema directory

Thanks
Manu

On 1/11/07, Kamalanathan Raman [EMAIL PROTECTED] wrote:





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 '[EMAIL 
PROTECTED]://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:groupIdgeronimo/dep:groupId


dep:artifactIdgeronimo-mail/dep:artifactId


dep:version1.1.1/dep:version

 
dep:typejar/dep:type

/dep:dependency



dep:dependency


dep:groupIdgeronimo/dep:groupId


dep:artifactIdgeronimo-javamail-transport/dep:artifactId


dep:version1.1.1/dep:version

 
dep:typejar/dep:type

/dep:dependency

/dep:dependencies

   
dep:hidden-classesorg.objectweb.asm.ClassWriter/dep:hidden-classes

dep:non-overridable-classes/

/dep:environment



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

attribute name=transportProtocolsmtp/attribute

attribute name=useDefaultfalse/attribute

attribute name=hostlocalhost/attribute

attribute name=properties

mail.debug=true

mail.smtp.port=25

[EMAIL PROTECTED]

/attribute

/gbean



/application



Thanks and Regards,

Kamal

  




From: Manu George [mailto:[EMAIL PROTECTED]
 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;
   dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.1 

 dep:moduleId
   dep:groupIdsample/dep:groupId
   dep:artifactIddaytrader-oracle-tomcat/dep:artifactId
   dep:version1.1/dep:version
   dep:typecar/dep:type
 /dep:moduleId
 dep:dependencies
   dep:dependency
 dep:groupIdgeronimo/dep:groupId
 dep:artifactIdj2ee-server/dep:artifactId
 dep:typecar/dep:type
   /dep:dependency
 dep:hidden-classesorg.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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED]
 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

Re: java.lang.NoSuchMethodError - Reg

2007-01-11 Thread Manu George

Hi Kamal,
  It would be better to give org.objectweb.asm in the filter
tag so that all the classes of asm are hidden.

Thanks
Manu

On 1/11/07, Manu George [EMAIL PROTECTED] wrote:

Hi Kamal,
Sorry abt that . I gave you a wrong example.You need to
add 
dep:hidden-classesdep:filterorg.objectweb.asm.ClassWriter/dep:filter/dep:hidden-classes
this information is in geronimo-module-1.1.xsd in the schema directory

Thanks
Manu

On 1/11/07, Kamalanathan Raman [EMAIL PROTECTED] wrote:




 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 '[EMAIL 
PROTECTED]://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:groupIdgeronimo/dep:groupId

 
dep:artifactIdgeronimo-mail/dep:artifactId

 
dep:version1.1.1/dep:version

  
dep:typejar/dep:type

 /dep:dependency



 dep:dependency

 
dep:groupIdgeronimo/dep:groupId

 
dep:artifactIdgeronimo-javamail-transport/dep:artifactId

 
dep:version1.1.1/dep:version

  
dep:typejar/dep:type

 /dep:dependency

 /dep:dependencies


dep:hidden-classesorg.objectweb.asm.ClassWriter/dep:hidden-classes

 dep:non-overridable-classes/

 /dep:environment



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

 attribute name=transportProtocolsmtp/attribute

 attribute name=useDefaultfalse/attribute

 attribute name=hostlocalhost/attribute

 attribute name=properties

 mail.debug=true

 mail.smtp.port=25

 [EMAIL PROTECTED]

 /attribute

 /gbean



 /application



 Thanks and Regards,

 Kamal

   


 From: Manu George [mailto:[EMAIL PROTECTED]
  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;
dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.1 

  dep:moduleId
dep:groupIdsample/dep:groupId
dep:artifactIddaytrader-oracle-tomcat/dep:artifactId
dep:version1.1/dep:version
dep:typecar/dep:type
  /dep:moduleId
  dep:dependencies
dep:dependency
  dep:groupIdgeronimo/dep:groupId
  dep:artifactIdj2ee-server/dep:artifactId
  dep:typecar/dep:type
/dep:dependency
  dep:hidden-classesorg.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 [EMAIL PROTECTED] 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