[Management, JMX/JBoss] - Re: Can not load MBeanServerBuilderImpl
by a.skoog
I received the same error starting the minimal confiuguration of JBoss 4.2.0.GA using java 1.6.0 and then trying to use JConsole to access the process via JMX.
12:08:54,515 INFO [Server] Starting JBoss (MX MicroKernel)...
| 12:08:54,531 INFO [Server] Release ID: JBoss [Trinity] 4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)
| 12:08:54,531 INFO [Server] Home Dir: C:\opt\jboss-4.2.0.GA
| 12:08:54,531 INFO [Server] Home URL: file:/C:/opt/jboss-4.2.0.GA/
| 12:08:54,531 INFO [Server] Patch URL: null
| 12:08:54,546 INFO [Server] Server Name: minimal
| 12:08:54,546 INFO [Server] Server Home Dir: C:\opt\jboss-4.2.0.GA\server\minimal
| 12:08:54,546 INFO [Server] Server Home URL: file:/C:/opt/jboss-4.2.0.GA/server/minimal/
| 12:08:54,546 INFO [Server] Server Log Dir: C:\opt\jboss-4.2.0.GA\server\minimal\log
| 12:08:54,562 INFO [Server] Server Temp Dir: C:\opt\jboss-4.2.0.GA\server\minimal\tmp
| 12:08:54,562 INFO [Server] Root Deployment Filename: jboss-service.xml
| 12:08:54,843 INFO [ServerInfo] Java version: 1.6.0_01,Sun Microsystems Inc.
| 12:08:54,859 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.6.0_01-b06,Sun Microsystems Inc.
| 12:08:54,859 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
| 12:08:55,109 INFO [Server] Core system initialized
| 12:08:55,562 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
| 12:08:55,843 INFO [Server] JBoss (MX MicroKernel) [4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)] Started in 1s:281ms
| 12:09:06,500 ERROR [STDERR] javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.mx.server.MBeanServerBuilderImpl: java.lang.ClassNotFoundException: org.jboss.mx.server.MBeanS
| 12:09:06,515 ERROR [STDERR] at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:480)
| 12:09:06,515 ERROR [STDERR] at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:511)
| 12:09:06,515 ERROR [STDERR] at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:298)
| 12:09:06,515 ERROR [STDERR] at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:213)
| 12:09:06,515 ERROR [STDERR] at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:174)
| 12:09:06,515 ERROR [STDERR] at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302)
| 12:09:06,515 ERROR [STDERR] at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504)
| 12:09:06,515 ERROR [STDERR] at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:412)
| 12:09:06,515 ERROR [STDERR] at sun.management.Agent.startAgent(Agent.java:135)
| 12:09:06,515 ERROR [STDERR] at sun.management.Agent.agentmain(Agent.java:95)
| 12:09:06,515 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 12:09:06,531 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 12:09:06,531 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 12:09:06,531 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
| 12:09:06,531 ERROR [STDERR] at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:325)
| 12:09:06,531 ERROR [STDERR] at sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:348)
| 12:09:06,531 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: org.jboss.mx.server.MBeanServerBuilderImpl
| 12:09:06,531 ERROR [STDERR] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| 12:09:06,531 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
| 12:09:06,531 ERROR [STDERR] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| 12:09:06,531 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| 12:09:06,531 ERROR [STDERR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
| 12:09:06,531 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| 12:09:06,546 ERROR [STDERR] at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:423)
| 12:09:06,546 ERROR [STDERR] at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:465)
| 12:09:06,546 ERROR [STDERR] ... 15 more
| 12:09:06,546 ERROR [STDERR] Agenten orsakade ett undantag : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.mx.server.MBeanServerBuilderImpl: java.lang.ClassNotFoundExcep
| Exception in thread "Attach Listener" 12:09:06,546 ERROR [STDERR] java.lang.reflect.InvocationTargetException
| 12:09:06,546 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 12:09:06,546 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 12:09:06,546 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 12:09:06,546 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
| 12:09:06,546 ERROR [STDERR] at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:325)
| 12:09:06,546 ERROR [STDERR] at sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:348)
| 12:09:06,546 ERROR [STDERR] Caused by: java.lang.RuntimeException: javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.mx.server.MBeanServerBuilderImpl: java.lang.ClassNotFou
| 12:09:06,562 ERROR [STDERR] at sun.management.Agent.error(Agent.java:309)
| 12:09:06,562 ERROR [STDERR] at sun.management.Agent.startAgent(Agent.java:153)
| 12:09:06,562 ERROR [STDERR] at sun.management.Agent.agentmain(Agent.java:95)
| 12:09:06,562 ERROR [STDERR] ... 6 more
| 12:09:06,562 ERROR [STDERR] Caused by: javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.mx.server.MBeanServerBuilderImpl: java.lang.ClassNotFoundException: org.jboss.mx.se
| 12:09:06,562 ERROR [STDERR] at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:480)
| 12:09:06,562 ERROR [STDERR] at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:511)
| 12:09:06,562 ERROR [STDERR] at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:298)
| 12:09:06,562 ERROR [STDERR] at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:213)
| 12:09:06,562 ERROR [STDERR] at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:174)
| 12:09:06,562 ERROR [STDERR] at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302)
| 12:09:06,562 ERROR [STDERR] at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504)
| 12:09:06,562 ERROR [STDERR] at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:412)
| 12:09:06,562 ERROR [STDERR] at sun.management.Agent.startAgent(Agent.java:135)
| 12:09:06,562 ERROR [STDERR] ... 7 more
| 12:09:06,562 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: org.jboss.mx.server.MBeanServerBuilderImpl
| 12:09:06,562 ERROR [STDERR] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| 12:09:06,562 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
| 12:09:06,562 ERROR [STDERR] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| 12:09:06,562 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| 12:09:06,562 ERROR [STDERR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
| 12:09:06,562 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| 12:09:06,562 ERROR [STDERR] at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:423)
| 12:09:06,562 ERROR [STDERR] at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:465)
| 12:09:06,562 ERROR [STDERR] ... 15 more
| Agent failed to start!
Any hints of what may be wrong
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056375#4056375
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056375
18Â years, 10Â months
[JBoss Seam] - Re: value of selectItems not posted in the form?
by idylle
Here are my beans :
The entity bean (just the attributes) :
| @Entity
| @Table(name = "collectivites", schema = "public")
| public class Collectivites implements java.io.Serializable {
|
| private int colidt;
| private Typcol typcol;
| private Departements departements;
| private String colnom;
| private String coltel;
| private String colfax;
| private String coladr;
| private String colcp;
| private String colnmc;
| private String coltlc;
| private Integer colpop;
| private String colaff;
| private String colvil;
|
| public Collectivites() {
| }
|
| + getter and setter
| ...
|
The query bean :
| @Name("collectivitesList")
| public class CollectivitesList extends EntityQuery {
|
|
| private static final String[] RESTRICTIONS = {
| "lower(collectivites.colnom) like concat('%',lower(#{collectivitesList.collectivites.colnom}),'%')",
| "lower(collectivites.coltel) like concat(lower(#{collectivitesList.collectivites.coltel}),'%')",
| "lower(collectivites.colfax) like concat(lower(#{collectivitesList.collectivites.colfax}),'%')",
| "lower(collectivites.coladr) like concat(lower(#{collectivitesList.collectivites.coladr}),'%')",
| "lower(collectivites.colcp) like concat(lower(#{collectivitesList.collectivites.colcp}),'%')",
| "lower(collectivites.colnmc) like concat(lower(#{collectivitesList.collectivites.colnmc}),'%')",
| "lower(collectivites.coltlc) like concat(lower(#{collectivitesList.collectivites.coltlc}),'%')",
| "lower(collectivites.colvil) like concat('%',lower(#{collectivitesList.collectivites.colvil}),'%')",
| "collectivites.colaff like concat(#{collectivitesList.collectivites.colaff},'%')",
| "collectivites.typcol like concat(#{collectivitesList.collectivites.typcol},'%')",};
|
| private Collectivites collectivites = new Collectivites();
|
| @Override
| public String getEjbql() {
| return "select collectivites from Collectivites collectivites";
| }
|
| @Override
| public Integer getMaxResults() {
| return 25;
| }
|
| public Collectivites getCollectivites() {
| return collectivites;
| }
|
| @Override
| public List<String> getRestrictions() {
| return Arrays.asList(RESTRICTIONS);
| }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056372#4056372
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056372
18Â years, 10Â months
[JBossWS] - Re: Problem with inheritance and JBossWS
by hannes.koller
I tried to post this in JIRA but it told me I dont have permission to comment on the issue so here it goes:
I am experiencing the same problem described by original Reporter: Subclass information gets lost when the SOAP message is created....but not always.. if the class contains a variable of JAXBElement then the inheritance seems to work correctly for all attributes in the class.
Example (constructed to explain my point, sorry if not 100% correct but the WSDL I am really dealing with is quite huge).
| <complexType name="SomeType">
| <complexContent>
| <sequence>
| <element name="someElement" type="tns:SomeElement" minOccurs="0" maxOccurs="1"nillable="true"/>
| <element name="classB" type="tns:ClassB" minOccurs="1" maxOccurs="1" nillable="true" />
| </sequence>
| </complexContent>
| </complexType>
|
Note that the minOccurrs="0" together with nillable="true" in someElement will cause wsconsume to create the JAXBElement<..> variable i was talking about:
| public class SomeType{
|
| @XmlElementRef(name = "someElement", namespace = "http://some.namespace.com", type = JAXBElement.class)
| protected JAXBElement<SomeElement> someElement;
| @XmlElement(required = true, nillable = true)
| protected ClassB classB;
| ....
|
In this example inheritance for the classB Attribute works as expected. Whereas if I alter the wsdl and set the minOccurrs of someElement to 1 thus having wsconsume create the following class:
| public class SomeType{
|
| @XmlElement(required=true, nillable=true)
| protected SomeElement someElement;
| @XmlElement(required = true, nillable = true)
| protected ClassB classB;
| ...
|
|
then inheritance on classB breaks.
Not sure why this is happening, but I thought this observation might help to track down the cause of this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056371#4056371
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056371
18Â years, 10Â months
[Persistence, JBoss/CMP, Hibernate, Database] - SqlResultSetMapping
by stupar.aleksandar
Hi,
I have run into a problem using SqlResultSetMapping.
I have defined next SqlResultSetMapping:
@SqlResultSetMapping(name ="Proba",
| entities = {(a)EntityResult(entityClass=ReportAllTemp.class,
| fields = {
| @FieldResult(name = "locationId",column = "LOCATION_ID"),
| @FieldResult(name = "locationName",column = "LOCATION_NAME"),
| @FieldResult(name = "month",column = "MONTH"),
| @FieldResult(name = "personId",column = "PERSON_ID"),
| @FieldResult(name = "projectId",column = "PROJECT_ID"),
| @FieldResult(name = "projectName",column = "PROJECT_NAME"),
| @FieldResult(name = "taskId",column = "TASK_ID"),
| @FieldResult(name = "taskName",column = "TASK_NAME"),
| @FieldResult(name = "workHours",column = "WORK_HOURS")
| }
| )}
| )
and I'm using in like this:
Query q =em.createNativeQuery("select r.* from report_all ","Proba");
| List reports = q.getResultList();
| return reports;
I thought that it was all ok but Hibernate throws an exception and
JBOSS says INVALID COLUMN NAME even all columns are defined in report_all.
Thank you in front.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056370#4056370
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056370
18Â years, 10Â months
[JBoss Seam] - Re: a4j vs valuechangelistener
by Sammy8306
Indeed. Ok, after some more experimenting I have:
| <a:region>
| <ui:repeat id="listt" var="listvar" value="#{NewBlogEntryComponent.blogEntry_be.tags}">
| <h:outputText value="#{listvar} "/>
| <a:commandButton value="Delete" reRender="foo" action="#{NewBlogEntryComponent.remove(listvar)}"/>
| <br />
| </a:repeat>
| <br />
| <s:decorate>
| <h:selectOneMenu id="tags1" value="#{dev.nulll}" valueChangeListener="#{NewBlogEntryComponent.listener}">
| <s:selectItems var="field" label="#{field.toString}" value="#{AllTag}" noSelectionLabel="Please select : " />
| <s:convertEntity/>
| <a:support event="onchange" reRender="listt" bypassUpdates="true" />
| </h:selectOneMenu>
| </s:decorate>
| </a:region>
|
This actually works (as in: the list gets updated perfectly), but... my ui:repeat is not re-rendered. The page must be reloaded manually to reflect the new data. I tried switching it to an a:repeat which I found somewhere in the A4J docs, allegedly it should do the magic, but that didn't work. Am I missing something?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056369#4056369
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056369
18Â years, 10Â months
[JBoss Messaging] - Re: Lookup for JmsXA returning null
by mskonda
Hello Tim, this is what I did and it works!!
| /**
| * Method that receives the messages on the specific destination and persist
| * them into a database table all in one transaction.
| *
| * If the transction is committed, the message is consumed from the
| * destination and acknowledged and a row appears in the database.
| *
| * If the transaciton is rolled back, the message still apears on the
| * destination and the row does not get persisted in the database
| *
| * @param destination
| * @param isDurable
| * @throws Exception
| */
| public void receiveAndPersistCommit() throws Exception
| {
|
| /*
| * Create XAConnection and XASession objects
| */
| XAConnection c = jbcf.createXAConnection();
| XASession xaSession = c.createXASession();
|
| /*
| * Obtain a Messaging (JMS) XA Resource
| */
| MessagingXAResource msgRes =
| (MessagingXAResource) xaSession.getXAResource();
|
| /*
| * Create a sybase resource
| */
| SybaseXAResource sybaseRes = new SybaseXAResource();
| javax.sql.XAConnection sybaseXaConn = sybaseRes.getXAConnection();
|
| /*
| * Obtain a sybase XA Resource
| */
| XAResource sybaseXaResource = sybaseXaConn.getXAResource();
|
| /*
| * Strat the transaction manager
| */
| tm.begin();
|
| /*
| * Obtain a reference to the transaction object
| */
| Transaction tx = tm.getTransaction();
|
| logger.info("Enlisting resources");
|
| /*
| * Enlist the resources
| */
| tx.enlistResource(msgRes);
| tx.enlistResource(sybaseXaResource);
|
| /*
| * Start the connection. Unless you start, you won't see messages
| * being consumedd (usual culprit)
| */
| c.start();
|
| logger.info("Connection started");
|
| /*
| * Create a message consumer
| */
| MessageConsumer mc = xaSession.createConsumer(XATEST_QUEUE_1_DEST);
|
| logger.info("Consumer started ");
|
| Message msg = mc.receiveNoWait();
|
| if (msg != null)
| {
| logger.info("Message received: " + ((TextMessage) msg).getText());
| }
| else
| {
| logger.info("No message");
| }
|
| java.sql.Connection sybaseConn = sybaseXaConn.getConnection();
| java.sql.Statement stmt = sybaseConn.createStatement();
|
| logger.info("Inserting values into table");
| /*
| * Execute the insert statement
| */
| int i = stmt.executeUpdate("INSERT INTO XATEST VALUES('test-"
| + System.currentTimeMillis() / 1000 + "')");
| logger.info("Rows affected: " + i);
|
| /*
| * Unless you commit, the changes are not going to be affected
| */
| tx.commit();
| logger.info("Transaction committed");
|
| logger.info("Closing connections");
| /*
| * Close all connections
| */
| closeConnection(c);
| sybaseConn.close();
| }
|
Important to note is - I'm looking a ConnectionFactory but casting it to JBossConnectionFactory to obtain a XAConnection/XASession and hence MessagingResource. Also, I'm using a static method to create a transaction manager as shown below in setUp method:
| public void setUp()
| {
| try
| {
| initialContext = new InitialContext();
| /*
| * Lookup for ConnectionFactory
| */
| jbcf = (JBossConnectionFactory) initialContext
| .lookup("ConnectionFactory");
| logger.info("found JBconnection factory: " + jbcf);
|
| /*
| * Create a Transaction Manager
| */
|
| tm = com.arjuna.ats.jta.TransactionManager.transactionManager();
|
| /*
| * Deploy required destinations for this test
| */
|
| deployDestination(XATEST_QUEUE_1);
|
| logger.info("Deployed " + XATEST_QUEUE_1);
|
| XATEST_QUEUE_1_DEST =
| (Destination) initialContext.lookup(XATEST_QUEUE_1);
| deployDestination(XATEST_TOPIC_1);
|
| logger.info("Deployed " + XATEST_TOPIC_1);
| XATEST_TOPIC_1_DEST =
| (Destination) initialContext.lookup(XATEST_TOPIC_1);
| }
| catch (NamingException e)
| {
| logger.error("NamingException while looking up cf/tm: "
| + e.getMessage());
| }
| catch (Exception e)
| {
| logger.error("Exception in setup: " + e.getMessage());
| }
| }
|
The sendAndPerssitCommit works too.
Thanks for all your input Tim. Let me know if there's any obvious pitfalls.
Thanks
Madhu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056366#4056366
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056366
18Â years, 10Â months