[EJB 3.0] - embed EJB3/surefire:JBossMXServerConfig classnotfound
by dhartford
There have been several listings in various mailing groups (Maven and Jboss) related to a JbossMXserverConfig ClassNotFoundException problem when trying to do automated testing (usually through maven/surefire plugin).
There exists a Jboss JIRA for this subject:
http://jira.jboss.com/jira/browse/EJBTHREE-534
However, the workaround is mentioned but since RC6, this hasn't been done and we are at RC9 - this would lead some people to believe that the workaround isn't a good idea.
Has anyone looked into this and maybe found a better workaround? As for the maven-surefire-plugin, I've tried forking it out and a couple other configurations without success.
| <configuration>
| <forkMode>pertest</forkMode>
| <childDelegation>true</childDelegation>
| </configuration>
|
Error:
| <error type="java.lang.RuntimeException" message="java.lang.ExceptionInInitializerError">java.lang.RuntimeException: java.lang.ExceptionInInitializerError
| at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:391)
| at com.ghsinc.junit.EmbeddedEjb3TestCase.startupEmbeddedJboss(EmbeddedEjb3TestCase.java:25)
| at com.ghsinc.junit.EmbeddedEjb3TestCase.setUp(EmbeddedEjb3TestCase.java:17)
| at junit.framework.TestCase.runBare(TestCase.java:125)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| 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:585)
| at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:160)
| at org.apache.maven.surefire.Surefire.run(Surefire.java:81)
| 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:585)
| at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:218)
| at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:777)
| Caused by: java.lang.ExceptionInInitializerError
| at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.loadMBeanServer(EJB3StandaloneBootstrap.java:407)
| at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:376)
| ... 23 more
| Caused by: org.jboss.util.NestedRuntimeException: Cannot load class org.jboss.mx.server.JBossMXServerConfig; - nested throwable: (java.lang.ClassNotFoundException: org.jboss.mx.server.JBossMXServerConfig)
| at org.jboss.util.Classes.instantiate(Classes.java:531)
| at org.jboss.mx.server.ServerConfig.getInstance(ServerConfig.java:74)
| at javax.management.MBeanServerFactory.&clinit&(MBeanServerFactory.java:79)
| ... 25 more
| Caused by: java.lang.ClassNotFoundException: org.jboss.mx.server.JBossMXServerConfig
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:88)
| at org.jboss.util.Classes.loadClass(Classes.java:631)
| at org.jboss.util.Classes.loadClass(Classes.java:570)
| at org.jboss.util.Classes.instantiate(Classes.java:527)
| ... 27 more
| </error>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981054#3981054
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981054
19 years, 6 months
[JBoss Portal] - Re: Some problems with JBoss Portal 2.6 DR version...
by roy.russo@jboss.com
"wtff" wrote :
| I don't experience performance or load problems when I access the http://www.netvibes.com/ demo with my Internet Explorer. They seem to employ the same javascript DnD library but I can drag the windows around smoothly.
|
I have the same setup as you, and don't see these problems, but Windows does seem to degrade over time. Netvibes uses part of what we use, but not the entire scriptaculous lib.
"wtff" wrote :
| As a possible future improvement, one could also try to increase the responsiveness for minimizing/maximizing portlet windows by doing this on the client side (as in the netvibes demo) and only send the event as such to the server via AJAX?
|
Its planned for 3.0. The portlet 2.0 spec will likely impact this, so we chose to hold off, so we don't have to do the work twice. We will end up with a AJAX-portal, ala netvibes, with all the extra goodies.
"wtff" wrote :
| Can you say whether the 2.6 final version will come with a navigation portlet that has a hirarchical menu-bar?
|
Submenus in the tabs? I'm looking in to that (again) this week. Sortable tabs, I will have to look at, as well.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981052#3981052
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981052
19 years, 6 months
[JBoss Portal] - Problem with multiples wars
by eroscc
Hello
I have a problem with multiples wars.
My JboosPortal version is: 2.2.1RC3
My classes are shared, but my jboss-web.xml is:
| <class-loading java2ClassLoadingCompliance="false">
| <loader-repository>
| com.sumersoft:loader=demo
| <loader-repository-config>
| java2ParentDelegation=false
| </loader- repository-config>
| </loader-repository>
| </class-loading>
|
I see the problem when I try load one .properties that it is inside of war.
Each war it has a different file .properties, with equals name but with
different content.
In my class that load .properties this code is used:
| public class CommonInformationPortal implements ServletContextListener {
|
| private static Properties properties = null;
|
| public static void load()
| {
| try{
| if(properties == null)
| {
| properties = new Properties();
| properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("CommonInformation.properties"));
| }
| }
| catch(Exception e)
| {
| return;
| }
| }
|
|
| public static String getProperty(String property) {
| try{
| return properties.getProperty(property);
| }
| catch(Exception e)
| {
| return null;
| }
| }
| }
|
But always return the ClassLoader of last deployed war.
So the file .properties read is always the file of last deployed war.
I try use ServletContextListener the load of file .properties is ok, but when I get any propertie of this file is returned propertie of last deployed war.
How i can resolve this problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981045#3981045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981045
19 years, 6 months