[JCA/JBoss] - Re: Classloading and sharing classes between .ear and .rar
by rupertlssmith
No particular reason for putting the -dm.xml in the .ear. Right now I'd be happy to get it working any old way. Regardless of neatness of the solution, it should still work when its in the .ear? I've now moved it out of the .ear and into the /deploy directory but I get an error:
Do I need to be carefull to deploy the .ear first and then the -ds.xml file? Trying again....
ERROR org.jboss.deployment.scanner.URLDeploymentScanner Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.jca:service=ManagedConnectionFactory,name=index_connection_factory
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Could not find ManagedConnectionFactory class: uk.co.thebadgerset.index.ra.ManagedConnectionFactoryImpl
I Depend On:
jboss.jca:service=RARDeployment,name='index-ra-test-0.1.ear#index-ra-0.1.rar'
Depends On Me:
jboss.jca:service=ManagedConnectionPool,name=index_connection_factory
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:service=ManagedConnectionFactory,name=index_connection_factory
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Could not find ManagedConnectionFactory class: uk.co.thebadgerset.index.ra.ManagedConnectionFactoryImpl
I Depend On:
jboss.jca:service=RARDeployment,name='index-ra-test-0.1.ear#index-ra-0.1.rar'
Depends On Me:
jboss.jca:service=ManagedConnectionPool,name=index_connection_factory
Thu Aug 03 20:21:07 BST 2006 main 3882 localhost localhost:1535
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962985#3962985
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962985
19 years, 9 months
[Beginners Corner] - Problem with web service client
by trifonov
Hi,
I followed adminguide.pdf and created simple web service similar to 'Hello, world'. I can see it in Registered Service Endpoints. I followed the same quide to create a simple client to test the web service. Here is the code:
package org.jboss.ws.client;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
import org.jboss.ws.hello.Hello;
public class HelloClient {
public static void main(String[] args) throws Exception{
String urlstr = args[0];
String argument = args[1];
System.out.println("Contacting web service at " + urlstr);
URL url = new URL(urlstr);
QName qname = new QName("http://hello.ws.jboss.org/", "HelloService");
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(url, qname);
Hello hello = (Hello) service.getPort(Hello.class);
System.out.println("hello.hello(" + argument + ")");
System.out.println("output:" + hello.hello(argument));
}
}
But it always fails at this line "ServiceFactory factory = ServiceFactory.newInstance();"
I made some debug and I found that it looks for System.property named 'javax.xml.rpc.ServiceFactory' but there si no property like that. After that it looks for file named 'jaxrpc.properties' and it didn't find anything and throws an exception. The file doesn't exist on the file system. So, I'm lost, I don't know what can be the problem. Maybe some settings? Any help is appreciated.
Regards,
Trifonov
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962982#3962982
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962982
19 years, 9 months
[JCA/JBoss] - Re: Classloading and sharing classes between .ear and .rar
by rupertlssmith
Presumably you mean in the scenario where the .rar is put inside the .ear file? I wasn't but I have now changed my MANIFEST to include references to them. It is stil not working.
To give a clearer picture, the relevant parts of my .ear file now looks like:
index-ra-test-0.1.ear:
|
|-index-ra-ds.xml (the JBoss service descriptor for the ra)
|-index-ra-client-0.1.jar (the client interface for the resource adapter)
|-index-ra-0.1.rar (a resource adapter for the search engine)
|-META-INF/application.xml
|-META-INF/jboss-app.xml
|-common-0.1.jar (my common lib)
|-index-0.1.jar (the index - a text search engine)
|...(more stuff, including EJB module that calls index-ra-0.1.rar using client interface in index-ra-client.jar).
The index-ra-0.1.rar file contains META-INF/MANIFEST.MF with class path:
Class-Path: index-0.1.jar common-0.1.jar index-ra-client-0.1.jar
refering to the shared jars.
The application.xml contains:
index-ra-0.1.rar
and the jboss-app.xml contains:
index-ra-ds.xml
The index-ra-ds.xml contains:
<!-- Non-transactional Index resource adaptor service configuration. -->
<connection-factories>
<tx-connection-factory>
<adapter-display-name>IndexResourceAdapter</adapter-display-name>
<jndi-name>index_connection_factory</jndi-name>
<local-transaction/>
<rar-name>index-ra-0.1.rar</rar-name>
<connection-definition>
uk.co.thebadgerset.index.ra.IndexConnectionFactory
</connection-definition>
</tx-connection-factory>
</connection-factories>
Some highlights from the debug trace are:
DEBUG org.jboss.deployment.EARDeployer Extracted deployable content: index-ra-ds.xml
DEBUG org.jboss.deployment.EARDeployer Extracted deployable content: index-ra-0.1.rar
DEBUG org.jboss.deployment.MainDeployer Starting deployment (init step) of package at: file:/C:/projects/index-ra-test/target/jboss/myjboss/tmp/deploy/tmp50591index-ra-test-0.1.ear-contents/index-ra-0.1.rar
DEBUG org.jboss.deployment.MainDeployer using deployer org.jboss.resource.deployment.RARDeployer@1649a55
DEBUG org.jboss.deployment.MainDeployer Starting deployment (init step) of package at: file:/C:/projects/index-ra-test/target/jboss/myjboss/tmp/deploy/tmp50591index-ra-test-0.1.ear-contents/index-ra-ds.xml
DEBUG org.jboss.deployment.MainDeployer using deployer org.jboss.deployment.XSLSubDeployer@367013
DEBUG uk.co.thebadgerset.index.ra.ResourceAdapterImpl public void start(BootstrapContext context): called
So I can see my resource adapters start method being called. It doesn't seem to bind the service to its JNDI name, as when I look it up from the session bean:
Context nc = new InitialContext();
IndexConnectionFactory cf =
(IndexConnectionFactory)nc.lookup("java:comp/env/ra/index/index_connection_factory");
I get a naming exception. Bear in mind that I have set up a resource reference (XDoclet tag from the source):
@jboss:resource-ref res-ref-name="ra/index/index_connection_factory"
jndi-name="java:/index_connection_factory"
So I would expect the connection factory to be at java:/index_connection_factory.
I'm wondering if there is something wrong with my -ds.xml file? Does the rar-name need to be:
<rar-name>index-ra-test-0.1.ear#index-ra-0.1.rar</rar-name>
as described in the Wiki? Or this only when the -ds.xml file is not in the .ear? I tried that too but it didn't work.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962978#3962978
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962978
19 years, 9 months
[JBoss jBPM] - deploying portlets - changes between 2.2 and 2.4?
by taiji3
I recently started experimenting with JBoss and installed a few months ago the 2.2 version. Through try and error and looking at samples, I figured out how to code simple portlets and successfully deploy them with the required xml files.
Now I have downloaded the latest 2.4 version and find that - though my portlets run - I get something like the following at deploy time:
16:37:25,549 INFO [PortletAppDeployment] These instances have been found in -object.xml, you should put them in the file /home/jet/jboss-portal-2.4.0-CR3/server/default/./tmp/deploy/tmp64904HelloTherePortlet-exp.war/WEB-INF/portlet-instances.xml
16:37:25,550 INFO [PortletAppDeployment] <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<instance-id>HelloTherePortletInstance</instance-id>
<portlet-ref>HelloTherePortlet</portlet-ref>
Has there been a change in the way deployment xml files should be written? I have not been able to find any resource that explains what files JBoss requires/desires and how they should look.
And help would be immensely appreciated!
(After previewing this post, some of it is being interpreted as xml and so not showing up, but I think it is clear enough as it is.)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962977#3962977
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962977
19 years, 9 months