[
https://issues.jboss.org/browse/TEIID-3959?page=com.atlassian.jira.plugin...
]
Durgadatta Sahu edited comment on TEIID-3959 at 2/10/16 12:52 AM:
------------------------------------------------------------------
Thank you Steven !!
I am not using teiid designer . only using dynamic vdb to create UDF.
As you specified I create a TESTUDF.vdb, zip file with following structure,
/META-INF
vdb.xml
/lib
testudf.jar
The content of vdb.xml is as follows, Here I have removed the module reference property,
<?xml version="1.0" encoding="utf-8"?>
<vdb name="DDS_TEST_VDB" version="1">
<model name="modelsource" type='VIRTUAL' >
<metadata type="DDL">
<![CDATA[
create virtual function getDouble(key Long) returns Double
options (
java_class 'com.my.app.Demo',
java_method 'getValue'
);
]]>
</metadata>
</model>
</vdb>
But now same error is coming ,
1:01:20,571 INFO [org.teiid.RUNTIME] (teiid-async-threads - 5) TEIID50030 VDB UDFVDB.1
model "modelsource" metadata loaded. End Time: 2/10/16 11:01 AM
11:01:20,581 ERROR [stderr] (teiid-async-threads - 5) Exception in thread
"teiid-async-threads - 5" org.teiid.metadata.MetadataException: TEIID30387 Could
not load UDF "doADD", since its invocation class "com.my.app.Demo"
could not be found.
11:01:20,591 ERROR [stderr] (teiid-async-threads - 5) at
org.teiid.query.function.FunctionTree.createFunctionDescriptor(FunctionTree.java:325
2- Is there any way to specify the module slot name in VDB property file, so that it will
access corresponding version module ?
Thanks,
Durga
was (Author: durgadatta):
Thank you Steven !!
I am not using teiid designer . only using dynamic vdb to create UDF.
As you specified I create a TESTUDF.vdb, zip file with following structure,
/META-INF
vdb.xml
/lib
testudf.jar
The content of vdb.xml is as follows, Here I have removed the module reference property,
<?xml version="1.0" encoding="utf-8"?>
<vdb name="DDS_TEST_VDB" version="1">
<model name="modelsource" type='VIRTUAL' >
<metadata type="DDL">
<![CDATA[
create virtual function getDouble(key Long) returns Double
options (
java_class 'com.my.app.Demo',
java_method 'getValue'
);
]]>
</metadata>
</model>
</vdb>
But now same error is coming ,
1:01:20,571 INFO [org.teiid.RUNTIME] (teiid-async-threads - 5) TEIID50030 VDB UDFVDB.1
model "modelsource" metadata loaded. End Time: 2/10/16 11:01 AM
11:01:20,581 ERROR [stderr] (teiid-async-threads - 5) Exception in thread
"teiid-async-threads - 5" org.teiid.metadata.MetadataException: TEIID30387 Could
not load UDF "doADD", since its invocation class "com.my.app.Demo"
could not be found.
11:01:20,591 ERROR [stderr] (teiid-async-threads - 5) at
org.teiid.query.function.FunctionTree.createFunctionDescriptor(FunctionTree.java:325
Thanks,
Durga
dynamic VDB, Not loading UDF , Showing class Not Found .
-----------------------------------------------------------
Key: TEIID-3959
URL:
https://issues.jboss.org/browse/TEIID-3959
Project: Teiid
Issue Type: Feature Request
Affects Versions: 8.12.2
Environment: Windows 7, 64 bit
Reporter: Durgadatta Sahu
Assignee: Steven Hawkins
Hi I am new to TEIID , and trying to deploy UDF and corresponding JAR at run time .
It is showing following exception:-
10:46:47,729 INFO [org.teiid.RUNTIME] (teiid-async-threads - 6) TEIID50030 VDB
DDS_TEST_VDB.1 model "modelsource" metadata loaded. End Time: 2/6/16 10:46 AM
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) Exception in thread
"teiid-async-threads - 6" org.teiid.metadata.MetadataException: TEIID30387 Could
not load UDF "getDouble", since its invocation class "com.my.app.Demo"
could not be found.
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.query.function.FunctionTree.createFunctionDescriptor(FunctionTree.java:325)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.query.function.FunctionTree.addFunction(FunctionTree.java:212)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.query.function.FunctionTree.<init>(FunctionTree.java:102)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.deployers.CompositeVDB.buildTransformationMetaData(CompositeVDB.java:93)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.deployers.CompositeVDB.metadataLoadFinished(CompositeVDB.java:286)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.deployers.VDBRepository.finishDeployment(VDBRepository.java:297)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.runtime.AbstractVDBDeployer.metadataLoaded(AbstractVDBDeployer.java:244)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.jboss.VDBService.access$1200(VDBService.java:81)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.jboss.VDBService$6.run(VDBService.java:416)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.jboss.VDBService$7.run(VDBService.java:446)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
java.lang.Thread.run(Thread.java:745)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.jboss.threads.JBossThread.run(JBossThread.java:122)
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) Caused by:
java.lang.ClassNotFoundException: com.my.app.Demo from [Module
"deployment.udfa-vdb.xml:main" from Service Module Loader]
10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at
java.lang.Class.forName0(Native Method)
10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at
java.lang.Class.forName(Class.java:340)
10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.query.function.UDFSource.getInvocationClass(UDFSource.java:43)
10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at
org.teiid.query.function.FunctionTree.createFunctionDescriptor(FunctionTree.java:315)
10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) ... 13 more
===============================
I have crated a dynamic VDB and define UDF details as follows
<?xml version="1.0" encoding="utf-8"?>
<vdb name="DDS_TEST_VDB" version="1">
<model name="modelsource" type='VIRTUAL' >
<property name ="lib" value
="com.my.app"></property>
<metadata type="DDL">
<![CDATA[
create virtual function getDouble(key Long) returns Double
options (
java_class 'com.my.app.Demo',
java_method 'getValue'
);
]]>
</metadata>
</model>
</vdb>
And I have deployed my jar file and module.xml in following path,
\teiid-8.12.2-server\teiid-8.12.2\modules\com\my\app\main\
module.xml :
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.my.app">
<resources>
<resource-root path="myapp.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
</dependencies>
</module>
Thanks,
Durga
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)