[Installation, Configuration & DEPLOYMENT] - Administering web-app settings (web.xml vs JNDI)
by ahalsup
We're migrating from Oracle's OC4J to JBoss AS. So far, I love JBoss.
However, we have a number of webapps that rely on OC4J's ability to override context-parameter values defined in the web.xml. The orion-web.xml file can be deployed separately from the WAR, making it an attractive mechanism for storing settings that differ depending on the target environment (i.e. DEV, TEST, and PROD).
We used to provide 3 separate (pre-configured) WARs to the administrators. 1 WAR for each of the target environments. This turned into a mess and wasted time as the deployment servers are accessed remotely via (slow) VPN. The ability to provide a single executable (WAR) while giving the admins the ability to override critical settings defined in the web.xml was very nice.
The jboss-web.xml provides no similar override feature for context-parameter values. To achieve a similar affect in JBoss, I have created an MBean: JndiPropertyBinder. The JBoss admin can edit a jndi-property-binding-service.xml file in the /deploy directory. The XML file defines the JNDI name to bind a bunch of name/value pairs. The application can then consult JNDI at runtime. The web.xml file defines the required resources via standard "resource-env-ref" tags. The XML file looks something like this:
| <mbean code="andy.jboss.mbean.JndiPropertyBinder" name="andy.jndi:service=JndiPropertyBinder_MyApp">
| <attribute name="JNDIName">java:/JndiPropertyBinder/MyApp</attribute>
| <attribute name="Properties">
| reportsServerUrl=http://www.myserver.com/oracle/reports
| reverseProxySpoof=true
| allowDocUploads=false
| </attribute>
| <depends>jboss:service=Naming</depends>
| </mbean>
|
The only change to the web-app code is that the values are now obtained from JNDI rather than from the ServletContext.
Does anyone have any suggestions for other ways to do this? Are other folks actually still building separate WAR/EAR artifacts for each target environment (DEV, TEST, and PROD)?
Many thanks,
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124244#4124244
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124244
18 years, 3 months
[JBossCache] - JGroups ClassCastException
by iudoka
I'm having a problem with JBoss Cache after migrating to Java 1.6. Everything runs fine in 1.5, but now I'm getting this strange ClassCastException when I try to start the cache:
anonymous wrote : org.jgroups.ChannelException: failed loading class
| at org.jgroups.conf.ClassConfigurator.init(ClassConfigurator.java:92)
| at org.jgroups.conf.ClassConfigurator.getInstance(ClassConfigurator.java:112)
| at org.jgroups.stack.ProtocolStack.(ProtocolStack.java:48)
| at org.jgroups.JChannel.(JChannel.java:254)
| at org.jgroups.JChannel.(JChannel.java:234)
| at org.jboss.cache.TreeCache._createService(TreeCache.java:1474)
| at org.jboss.cache.TreeCache.startService(TreeCache.java:1529)
| at org.jboss.cache.aop.PojoCache.startService(PojoCache.java:94)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
| at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:172)
| at com.tite.medicalworks.gui.DatasourceGUIProxy.init(DatasourceGUIProxy.java:282)
| at com.tite.medicalworks.gui.DatasourceGUIProxy.(DatasourceGUIProxy.java:234)
| at com.tite.medicalworks.gui.DatasourceGUIProxy.getInstance(DatasourceGUIProxy.java:370)
| at com.tite.medicalworks.MedicalWorks$2.run(MedicalWorks.java:93)
| at com.tite.medicalworks.gui.MyProgressBar.showDialog(MyProgressBar.java:181)
| at com.tite.medicalworks.MedicalWorks.createAndShowSplashScreen(MedicalWorks.java:155)
| at com.tite.medicalworks.MedicalWorks.main(MedicalWorks.java:130)
| Caused by: java.lang.ClassNotFoundException: [Ljava.lang.Object;
| at org.jgroups.util.Util.loadClass(Util.java:1215)
| at org.jgroups.conf.ClassMap.getClassForMap(ClassMap.java:55)
| at org.jgroups.conf.ClassConfigurator.init(ClassConfigurator.java:74)
| ... 16 more
I've updated to the latest version of JGroups (2.2.9.4) and yet I still can't start the cache. Before I updated to the latest version of JGroups I was getting a different exception which complained about not being to find the Address class. I've search around the web and it seems others have run into the same problem, but there is no solution that I have been able to find, if anybody has an idea what could be the problem, please let me know, I'd truly appreciate it.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124237#4124237
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124237
18 years, 3 months
[JBossWS] - strange: NoClassDefFoundError: org/jboss/wsf/spi/invocation/
by beligum
Hi all,
Please help me with this one: I've been trying to solve it all night.
I "patched" a fresh installed EAP-server (AS 4.2.0) (jboss developer studio) with jbossws 2.0.0 and am trying to deploy a webservices-enabled EAR.
All goes well, until I get this error:
| 03:51:26,409 ERROR [MainDeployer] Could not start deployment: file:/home/bram/Programs/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/tumbolia-ear.ear/tumbolia-ejb.jar/
| java.lang.NoClassDefFoundError: org/jboss/wsf/spi/invocation/RequestHandler
| at java.lang.ClassLoader.findBootstrapClass(Native Method)
| at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:891)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:301)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
| at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193)
| at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
| at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.jboss.wsf.spi.deployment.EndpointHandlerDeployer.getRequestHandler(EndpointHandlerDeployer.java:76)
| at org.jboss.wsf.spi.deployment.EndpointHandlerDeployer.create(EndpointHandlerDeployer.java:66)
| at org.jboss.wsf.spi.deployment.BasicDeployerManager.deploy(BasicDeployerManager.java:69)
| at org.jboss.wsf.container.jboss42.MainDeployerHook.deploy(MainDeployerHook.java:46)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy34.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
|
Any ideas?
I must say that I'm starting the server from within developer studio.
b.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124235#4124235
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124235
18 years, 3 months