[JBoss Microcontainer] - Re: How to stop my WAR loading JBoss's provided 3rd party classes?
by Ales Justin
Ales Justin [http://community.jboss.org/people/alesj] created the discussion
"Re: How to stop my WAR loading JBoss's provided 3rd party classes?"
To view the discussion, visit: http://community.jboss.org/message/578573#578573
--------------------------------------------------------------
> > Perhaps filter out the "org.hibernate.validator"?
> I'll try something, but I'm not sure what to try exactly. Looks like adding NegatingClassFilter for org.hibernate as after-filter isn't the way so I'm not sure which way to go to block some packages/classes completely regardless their presence anywhere or not.
> There should really be some "fully blocking" approach possible (and simply).
The same negating filter should also work for after phase.
The fully blocking filter is NothingClassFilter.
> EDIT: I tried to setup filters on org.hibernate.validator package several ways - before-filter was always NegatingClassFilter on that package, after-filter was once NegatingClassFilter, once just PackageClassFilter, also tried RecursivePackageFilter for both before-filter and after-filter in the end but to no avail.
Hmm, yeah, I think that was a typo on my end, we need RecursivePackageFilter.
But apart from that I don't see what can go wrong.
Could you debug a bit more?
Or do you have some test case / example to share?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578573#578573]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[IronJacamar] - 'No ConnectorMetaData found for mdf' when embedding rar in ear
by Dwayne Schultz
Dwayne Schultz [http://community.jboss.org/people/dwayne%40schultz.net] created the discussion
"'No ConnectorMetaData found for mdf' when embedding rar in ear"
To view the discussion, visit: http://community.jboss.org/message/578231#578231
--------------------------------------------------------------
Hello,
I am having some difficulty when trying to embed a rar inside an ear. When the rar and ear are deployed separately, they seem to work fine. This is the exception I get when the rar is embedded:
14:59:31,195 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=dropboxmq_xyz.ear,jar=dropboxmq_xyz.jar,name=dropboxmq/XyzMDB,service=EJB3) to KernelDeployment of: dropboxmq_xyz.jar
14:59:31,226 ERROR [AbstractKernelController] Error installing to Real: name=vfs:///Users/dwayne/system/jboss-6.0.0.20100911-M5/server/default/deploy/dropboxmq_xyz.ear state=PreReal mode=Manual requiredState=Real: org.jboss.deployers.spi.DeploymentException: Error during deploy: vfs:///Users/dwayne/system/jboss-6.0.0.20100911-M5/server/default/deploy/dropboxmq_xyz.ear
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.Alpha7]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185) [:2.2.0.Alpha7]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.Alpha7]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.Alpha7]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.Alpha7]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.Alpha7]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.Alpha7]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.Alpha7]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.20100911-M5]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130) [:0.1.0.Alpha1]
at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:148) [:0.1.0.Alpha1]
at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.1.0.Alpha1]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.profileservice.dependency.ProfileServiceController.activate(ProfileServiceController.java:188) [:0.1.0.Alpha1]
at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:170) [:0.1.0.Alpha1]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:117) [:0.1.0.Alpha1]
at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:89) [:0.1.0.Alpha1]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:97) [:0.1.0.Alpha1]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:130) [:6.0.0.20100911-M5]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.20100911-M5]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_22]
Caused by: java.lang.IllegalStateException: No ConnectorMetaData found for mdf rarName: dropboxmq_xyz.ear#dropboxmq.rar
at org.jboss.resource.deployers.builder.ManagedConnectionFactoryBuilder.buildConstructor(ManagedConnectionFactoryBuilder.java:104) [:6.0.0.20100911-M5]
at org.jboss.resource.deployers.builder.AbstractBuilder.buildService(AbstractBuilder.java:56) [:6.0.0.20100911-M5]
at org.jboss.resource.deployers.builder.AbstractBuilder.build(AbstractBuilder.java:65) [:6.0.0.20100911-M5]
at org.jboss.resource.deployers.ManagedConnectionFactoryDeployer.deploy(ManagedConnectionFactoryDeployer.java:179) [:6.0.0.20100911-M5]
at org.jboss.resource.deployers.ManagedConnectionFactoryDeployer.deploy(ManagedConnectionFactoryDeployer.java:52) [:6.0.0.20100911-M5]
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.Alpha7]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.Alpha7]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha7]
... 41 more
14:59:31,373 INFO [service] Removing bootstrap log handlers
14:59:31.443|ERROR|org.jboss.profileservice.bootstrap|Thread-2 Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS IN ERROR:
Deployment "vfs:///Users/dwayne/system/jboss-6.0.0.20100911-M5/server/default/deploy/dropboxmq_xyz.ear" is in error due to the following reason(s): java.lang.IllegalStateException: No ConnectorMetaData found for mdf rarName: dropboxmq_xyz.ear#dropboxmq.rar
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228)
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905)
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87)
at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:118)
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:133)
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56)
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827)
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417)
at java.lang.Thread.run(Thread.java:680)
Here is the structure of my ear:
$ find .
.
./dropboxmq.rar
./dropboxmq_xyz.jar
./lib
./lib/commons-logging-1.1.1.jar
./lib/log4j-1.2.16.jar
./META-INF
./META-INF/application.xml
./META-INF/dropboxmq-ds.xml
./META-INF/jboss-app.xml
Here is my application.xml:
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">
<display-name>DropboxMQ</display-name>
<module>
<connector>dropboxmq.rar</connector>
</module>
<module>
<ejb>dropboxmq_xyz.jar</ejb>
</module>
</application>
Here is my jboss-app.xml:
<jboss-app>
<loader-repository>
net.sf.dropboxmq:archive=dropboxmq_xyz.ear
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
<module>
<service>META-INF/dropboxmq-ds.xml</service>
</module>
</jboss-app>
Here is my -ds.xml:
<connection-factories>
<tx-connection-factory>
<jndi-name>jms/XAConnectionFactory</jndi-name>
<xa-transaction/>
<rar-name>dropboxmq_xyz.ear#dropboxmq.rar</rar-name>
<connection-definition>javax.jms.XAConnectionFactory</connection-definition>
<config-property name="JmsProviderAdapterJNDI" type="java.lang.String">DropboxMQ</config-property>
</tx-connection-factory>
</connection-factories>
And finally, here is my MDB:
package net.sf.dropboxmq.adaptors;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.ejb3.annotation.ResourceAdapter;
@MessageDriven( name = "dropboxmq/XyzMDB", messageListenerInterface = MessageListener.class,
activationConfig =
{
@ActivationConfigProperty( propertyName = "destinationType", propertyValue = "javax.jms.Queue" ),
@ActivationConfigProperty( propertyName = "destination", propertyValue = "queue/xyz" )
} )
@ResourceAdapter( "dropboxmq_xyz.ear#dropboxmq.rar" )
public class XyzMDB implements MessageListener
{
private static final Log log = LogFactory.getLog( XyzMDB.class );
@Override public void onMessage( final Message message )
{
log.info( "Message received" );
}
}
I see some references to similar errors but nothing looks current or relevant. Any help is appreciated!
Dwayne
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578231#578231]
Start a new discussion in IronJacamar at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[JBoss Microcontainer] - Re: How to stop my WAR loading JBoss's provided 3rd party classes?
by Ales Justin
Ales Justin [http://community.jboss.org/people/alesj] created the discussion
"Re: How to stop my WAR loading JBoss's provided 3rd party classes?"
To view the discussion, visit: http://community.jboss.org/message/578473#578473
--------------------------------------------------------------
> I tried both with bundled Validator and without it, but no difference. In verbose:class output I could see only loading of certain Validator classes from common/lib/hibernate-validator.jar and hibernate-validator-legacy.jar.
Validator should be bundled as well.
> Also note that even without specifying that filter the Hibernate 3.5.6 was being used so even here there's no difference.One interesting thing is that we don't actually use the Validator in our app, but it looks like since it's on the classpath and gets loaded it interfers with the app.
If the Hibernate was/is part of war' lib/ dir then this makes sense.
If not, then it's strange. :-)
> Isn't some sort of jboss-classloading.xml setup required for this case? I wonder if I don't have to setup an ear level one specifying the MyDomain as domain and then another in each of the wars specifying the MyDomain as parent domain (I'm not sure how the domain inheritance works here - if wars inherit the ear domain as their parent or not).
The war' parent classloader is (unless explicity set differently) ear' root classloader.
And of course this classloader -- via jboss-classloading-domain.xml -- is in its own filtered domain
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578473#578473]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[Beginner's Corner] - Re: More JBoss-AS 5 clusters and more Apache Virtual Hosts
by Willem Noorduin
Willem Noorduin [http://community.jboss.org/people/willemnoorduin] created the discussion
"Re: More JBoss-AS 5 clusters and more Apache Virtual Hosts"
To view the discussion, visit: http://community.jboss.org/message/577472#577472
--------------------------------------------------------------
* The jvmRoute is set via an environment variable jboss.jvmRoute, which is set in our startscript to be the hostename of the server. Since these are different, the appserver1 entry in jvmRoute is a typo (I had to edit company stuff out). In our production test case, the jvmRoutes are different
* We are indeed using ports-default and ports-01 (ports-02, ports-03, etc) settings when starting up the JBoss-AS instances, so that you have http://appserver1:8080 http://appserver1:8080 and http://appserver2:8180 http://appserver2:8180 available
The resaon we cannot use virtual nics is that we don't have that many IP's available (the 192.68.x.y is of course an example here, in real life we have to use routable IP-addresses). Questions are thus:
1. Have you tried to make the configuration work (or not work) with the ports-?? options from JBoss, or just with each cluster it's own IP-address ?
2. Is it possible to make a configuration we are using to work ? I find it strange if it's not, bacause the whole mod_cluster / JBoss ports mechanism is designed in the first place to make this easier.
3. Is there any other documentation available (other than getting the minimal-configuratiun to work) ?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577472#577472]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[JBoss Microcontainer] - Re: How to stop my WAR loading JBoss's provided 3rd party classes?
by Ales Justin
Ales Justin [http://community.jboss.org/people/alesj] created the discussion
"Re: How to stop my WAR loading JBoss's provided 3rd party classes?"
To view the discussion, visit: http://community.jboss.org/message/578455#578455
--------------------------------------------------------------
> however I'm still getting an exceptions related to hibernate validator which appears to be related to the differences between hibernate bundled in the ear - 3.5.6 - and hibernate in JBoss 6.0.0.Final - 3.6.0 + hibernate Validator 4.1.0 - see below.
> org.hibernate.AnnotationException: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
> at org.hibernate.cfg.AnnotationConfiguration.applyHibernateValidatorLegacyConstraintsOnDDL(AnnotationConfiguration.java:455) [:3.5.6-Final]
It looks like your Hibernate is kicking in, but the problem is now Validator.
You're saying you're also bundling Hibernate Validator that matches Hibernate 3.5.6-Final' usage?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578455#578455]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months