Madhu Garimilla [
https://community.jboss.org/people/madhu.garimilla] created the
discussion
"Re: How to add a resource-adapter programatically?"
To view the discussion, visit:
https://community.jboss.org/message/824563#824563
--------------------------------------------------------------
Hi Ramesh,
I tried with below code to add a file data source programmatically.
Admin admin =
AdminFactory.getInstance().createAdmin("localhost",9999,"admin","admin".toCharArray());
Properties p = new Properties();
p.setProperty("class-name","org.teiid.resource.adapter.file.FileManagedConnectionFactory");
p.setProperty("pool-name", "marketdata-file");
p.setProperty("max-pool-size", "4");
p.setProperty("enabled", "true");
p.setProperty("use-java-context", "true");
p.setProperty("ParentDirectory", "../data/");
p.setProperty("AllowParentPaths", "true");
admin.createDataSource("java:/marketdata-file","teiid-connector-file.rar",p);
This shows up the below error in jboss console. Am i missing anything here? How do i avoid
this error.
15:32:52,571 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed
to start service jboss.ra.deployment."teiid-connector-file.r
ar_1": org.jboss.msc.service.StartException in service
jboss.ra.deployment."teiid-connector-file.rar_1":
org.jboss.jca.core.spi.mdr.NotFoundException:
IJ000855: teiid-connector-file isn't registered
at
org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:127)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.7.0_03]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.7.0_03]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
Caused by: org.jboss.jca.core.spi.mdr.NotFoundException: IJ000855: teiid-connector-file
isn't registered
at
org.jboss.jca.core.mdr.SimpleMetadataRepository.getResourceAdapter(SimpleMetadataRepository.java:150)
at
org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:87)
... 5 more
15:32:52,673 INFO [org.jboss.as.controller] (management-handler-thread - 22) JBAS014774:
Service status report
JBAS014777: Services which failed to start: service
jboss.ra.deployment."teiid-connector-file.rar_1":
org.jboss.msc.service.StartException in s
ervice jboss.ra.deployment."teiid-connector-file.rar_1":
org.jboss.jca.core.spi.mdr.NotFoundException: IJ000855: teiid-connector-file isn't
registered
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/824563#824563]
Start a new discussion in JNDI and Naming at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]