[Microcontainer] - Re: BeanMetaData and management
by bob.mcwhirter
Thanks for the response Ales--
So, my "nothing" result was me applying @JMX to the wrong class, one not instantiated by MC.
My "already installed" error occurs when I get the @JMX annotation on the correct class, but give my object a bogus MC bean name (in this case "jboss.rails:name=oddthesis").
The error I was getting is here, in case you're interested. "Already installed" was somewhat confusing of an error to get.
http://oddthesis.pastebin.com/f46537bdf
I was expecting to find a JMX object named "jboss.rails:name=oddthesis"
Once I named it more simply "jboss.rails.oddthesis" (using unit.getSimpleName(), if that's recommended?), it deployed just fine, and I can find my mbean under "jboss.pojo" domain successfully.
I see I can set the 'name' parameter on @JMX, but is there another way to dynamically set the JMX object-name (to include some bit of unit.getSimpleName() perhaps) like I think the @ManagementObjectID annotation supports on that side of things? Ultimately, I think I'd like to end up with "jboss.rails:name=#{unit.getSimpleName()}" or similar.
Or should I give up, admit JMX is dead, and move on?
Thanks!
Bob
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191752#4191752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191752
17 years, 5 months
[Javassist user questions] - Javassist class loader vs. Apache Commons logging
by dietice
Hi all,
I want to instrument an application that uses the Apache Commons logging component. I use the Javassist class loader and have added my own translator. However, the logging library seems to rely on the class loader hierarchy; the application crashes with the attached exception.
Do you have any experience combining Javassist and the Apache Commons logging component?
Regards,
Michael
anonymous wrote :
| org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
| at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
| at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
| at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
| at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
| at org.java.plugin.ObjectFactory.newInstance(ObjectFactory.java:80)
| at org.java.plugin.ObjectFactory.newInstance(ObjectFactory.java:51)
| at net.sf.jabref.plugin.PluginCore.initialize(PluginCore.java:72)
| at net.sf.jabref.plugin.PluginCore.getManager(PluginCore.java:180)
| at net.sf.jabref.imports.ImportFormatReader.resetImportFormats(ImportFormatReader.java:74)
| at net.sf.jabref.JabRef.(JabRef.java:103)
| at net.sf.jabref.JabRef.main(JabRef.java:79)
| 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:597)
| at net.sf.jabref.JabRefMain.main(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:597)
| at javassist.Loader.run(Loader.java:290)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191744#4191744
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191744
17 years, 5 months
[EJB 3.0] - Re: JBoss AS 5.0.0.CR2, EJB 3.0 (Failed to load users/passwo
by grdzeli_kaci
thank you for your quick reply,
here is my oracle-xa--ds.xml file :
| <datasources>
| <xa-datasource>
| <jndi-name>XAOracleDS</jndi-name>
| <track-connection-by-tx/>
| <isSameRM-override-value>false</isSameRM-override-value>
| <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:oracle:thin:@192.168.9.151:1521:DEVSTR</xa-datasource-property>
| <xa-datasource-property name="User">ccare</xa-datasource-property>
| <xa-datasource-property name="Password">ccare</xa-datasource-property>
|
| <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
| <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-check
| <!-- Checks the Oracle error codes and messages for fatal errors -->
|
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
| <!--
| <no-tx-separate-pools/>
| -->
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <application-managed-security>true</application-managed-security>
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
| </xa-datasource>
|
| <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
| name="jboss.jca:service=OracleXAExceptionFormatter">
| <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
| </mbean>
|
| </datasources>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191743#4191743
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191743
17 years, 5 months