Subsystem/Deployers
by Magesh Kumar Bojan
I am writing a deployer for SwitchYard[1], basically migrating the AS6 code to AS7. I have created some basic Subsystem code that deploys the artifact (a jar file containing switchyard.xml). Now in order to integrate with Weld (the one and only implementation, that we have in SwitchYard), I would like to migrate the AS6 deployer code to AS7. While doing so I encounter the following error:
Caused by: javax.naming.NamingException: Failed to get context with name comp
at org.jboss.as.naming.context.NamespaceObjectFactory.getObjectInstance(NamespaceObjectFactory.java:71)
at org.jboss.as.naming.NamingContext.getObjectInstance(NamingContext.java:470)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:201)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:211)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.switchyard.component.bean.deploy.BeanDeploymentMetaData.getJavaComp(BeanDeploymentMetaData.java:146)
I know the code says that the NamespaceContextSelector is null. Is this by design? What should I do to get the JNDI namespace? I transformed the code to use org.jboss.msc.service.Service and it still doesn't help. Is this a *right* way to do stuff? Do you have any advice on how to proceed with this naming issue?
I could see these dependencies in my app that was compiled from[4], it shows that I have a BeanManager @java:module/BeanManager, just the lookup fails.
service jboss.deployment.unit."m1app-0.1.0-SNAPSHOT.jar".beanmanager,
service jboss.deployment.unit."m1app-0.1.0-SNAPSHOT.jar".namespaceselector,
service jboss.naming.context.java.module."m1app-0.1.0-SNAPSHOT"."m1app-0.1.0-SNAPSHOT".ModuleName,
service jboss.naming.context.java.module."m1app-0.1.0-SNAPSHOT"."m1app-0.1.0-SNAPSHOT".BeanManager
The source for BeanDeploymentMetaData is here[2] and the source for the SwitchYard deployer stuff is here[3].
[1] http://www.jboss.org/switchyard
[2] https://github.com/jboss-switchyard/components/tree/master/bean
[3] https://github.com/mageshbk/switchyard-as7-extension
[4] https://github.com/jboss-switchyard/quickstarts
cheers,
Magesh
13 years, 8 months
Problem deploying an EJB3 MDB
by Howard Gao
Need help on this issue, thanks.
Synopsis:
A Fresh AS7 build, deploy a simple EJB3 MDB with following annotation
@MessageDriven(messageListenerInterface = EJB3MDBExample.class)
@ResourceAdapter("ejb3-rar.rar")
Starting AS7 standalone, the depoly failed but no error messages from
the console, only one line warning:
13:47:48,936 WARN [org.jboss.vfs] (MSC service thread 1-11) VFS was
unable to set the URLStreamHandlerFactory. This will have unpredictable
results
I'm not sure this is relevant. Restarting AS7 again, it spits out
14:14:13,450 ERROR [org.jboss.as] (MSC service thread 1-2) JBoss AS
7.0.0.Beta3-SNAPSHOT "TBD" started (with errors) in 2113ms - Started 112
of 148 services (10 services failed or missing dependencies, 26 services
are passive or on-demand)
Services missing dependencies:
service
jboss.deployment.unit."mdb-example.ejb3".component.EJB3MDBExample.CREATE
service
jboss.deployment.unit."mdb-example.ejb3".component.EJB3MDBExample.NAMESPACE
service
jboss.deployment.unit."mdb-example.ejb3".component.EJB3MDBExample.START
service
jboss.deployment.unit."mdb-example.ejb3".component.EJB3MDBExample.VIEW."javax.jms.MessageListener"
service
jboss.naming.context.java.comp."mdb-example.ejb3"."mdb-example.ejb3".EJB3MDBExample
service
jboss.naming.context.java.comp."mdb-example.ejb3"."mdb-example.ejb3".EJB3MDBExample.EJBContext
service
jboss.naming.context.java.comp."mdb-example.ejb3"."mdb-example.ejb3".EJB3MDBExample.TransactionSynchronizationRegistry
service
jboss.naming.context.java.comp."mdb-example.ejb3"."mdb-example.ejb3".EJB3MDBExample.UserTransaction
service
jboss.naming.context.java.comp."mdb-example.ejb3"."mdb-example.ejb3".EJB3MDBExample.Validator
service
jboss.naming.context.java.comp."mdb-example.ejb3"."mdb-example.ejb3".EJB3MDBExample.ValidatorFactory
I don't understand what that mean. Was it that I need to add some services?
Howard
13 years, 8 months
No handler for id 16
by Heiko W.Rupp
When running my upload + deploy test I all of a sudden get:
Have there been changes to the API that I need to follow?
Thanks
Heiko
[Host Controller] 09:29:51,811 INFO [org.jboss.as.server.deployment] (pool-1-thread-15) Content added at location /devel/jbas7/jboss-as-pilhuhn/build/target/jboss-7.0.0.Beta3-SNAPSHOT/domain/content/ee/38293159b29dfc69aa9f140e578a2e6b606eb0/content
[Host Controller] 09:29:51,915 ERROR [org.jboss.as.protocol.connection] (pool-1-thread-16) Failed to read a message: java.io.IOException: Management request failed. No handler found for id 16
[Host Controller] at org.jboss.as.protocol.mgmt.ManagementHeaderMessageHandler.handle(ManagementHeaderMessageHandler.java:65)
[Host Controller] at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:59)
[Host Controller] at org.jboss.as.protocol.ConnectionImpl.safeHandleMessage(ConnectionImpl.java:254)
[Host Controller] at org.jboss.as.protocol.ConnectionImpl$1$1.run(ConnectionImpl.java:213)
13 years, 8 months
Is there an easy way to find the cause of an Arquillian deployment error?
by Scott Marlow
I just noticed that the
org.jboss.as.testsuite.integration.jpa.hibernate.SessionFactoryTestCase
is failing, I thought this was passing before. Not sure when it stopped
working.
Does anyone know how I can get more details for the
"org.jboss.arquillian.spi.DeploymentException: Could not deploy to
container" error?
Thanks,
Scott
13 years, 8 months
Result "undefined"?
by Heiko W.Rupp
Hi,
[localhost:9999 /host=pintsize/server-config=server-four] :write-attribute(name=auto-start,value=false)
{
"outcome" => "success",
"result" => undefined,
Why is the result "undefined"? Shouldn't that be the value that has been written ?
"compensating-operation" => {
"operation" => "write-attribute",
"address" => [
("host" => "pintsize"),
("server-config" => "server-four")
],
"name" => "auto-start",
"value" => true
}
--
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Brendan Lane, Charlie Peters, Michael Cunningham, Charles Cachera
13 years, 8 months
ServerDeploymentManager: Problems getting the result future of a deployment action
by André Dietisheim
Hi
I actually try to get the result of a deployment and unfortunately fail
so far.
I proceed in the following manner:
I add an deployment, get the action that was created for it, and then
try to retrieve the result of this action:
...
ServerDeploymentManager manager =
ServerDeploymentManager.Factory.create(client);
InitialDeploymentPlanBuilder builder = manager.newDeploymentPlan();
builder = builder.add(file.getName(), file).addDeploy();
DeploymentAction action = builder.getLastAction();
DeploymentPlan plan = builder.build();
Future<ServerDeploymentPlanResult> planResult = manager.execute(plan);
ServerDeploymentPlanResult result = resultFuture.get(timeout,
TimeUnit.MILLISECONDS);
ServerDeploymentActionResult actionResult =
result.getDeploymentActionResult(action.getId());
....
Unfortunately actionResult is always null.
Stepping through the code did not help a lot so far: The result of the
server deployment plan seems always to hold an empty map of
actionResults (DeploymentPlanResultImpl#actionResults).
What do I miss? I'd appreciate a lot some pointers here.
Thanks
André
13 years, 8 months
Console Feedback
by Heiko Braun
Hey Ike,
I think it would be easier to navigate the UI if the entries under "Profiles"
were sorted.
So "arquillian" first, and "weld" last.
I always have to scan the entire list for "datasources"... well, until I hit
the entry ;)
btw, I don't if there are any "508 requirements" for this - Shelly would know
(maybe).
Best regards,
Jesper
13 years, 8 months
Non java: JNDI bindings and MSC services in AS7
by Jaikiran Pai
While looking into https://issues.jboss.org/browse/JBAS-9261 I realized
that we don't currently have support for non java: namespace JNDI
bindings. The example application in that JIRA has a reference to a
resource (a EJB in this case via ejb-ref and ejb-local-ref) and that
reference points to a lookup name "Blah" (which is outside of java:
namespace). Pre-AS7 days we allowed EJBs and other resources to be bound
outside of java: namespace and then allow ejb-ref to point to that
binding. Currently, in AS7 which is backed by Services for jndi
bindings, I don't see how to deal with that since we don't have Services
for non java: namespaces. Looking at this
http://community.jboss.org/wiki/JavaEEImplementationTechnicalRequirements wiki
I don't see it being covered. How do we plan to support such
deployments, in AS7? Or more specifically, will binding outside of java:
be backed by MSC services?
-Jaikiran
13 years, 8 months
AS7 Management console and OSGi
by Heiko Braun
Hi Heiko,
I'm planning to have a look at the management console you are writing for AS7 and to learn how it works, especially in the context of the OSGi component that Thomas and I have been working on.
Is there a quickstart somewhere that I could look at to start using your new management console?
Thanks!
David
13 years, 8 months