DB2的Domino OSGI驱动程序插件

时间:2015-09-16 13:43:49

标签: java osgi xpages lotus-domino

我们创建了一个OSGI插件来包装DB2驱动程序并在我们的Domino服务器上使用它。我们的目标是在REST服务中使用基于CustomService Bean类的驱动程序,以及稍后在XPage中直接使用它。

查看" XPages Exentension Library"本书帮助我们完成了插件。我们将它包装在feature Project中,并通过创建更新站点并从那里导入到UpdateSite.nsf将其安装在Domino Server上。

安装插件后,我们检查了

告诉http osgi ss com.rsc -

结果:

id State       Bundle
14 RESOLVED    com.rsc.lotus.JDBC.DB2_1.0.1.20150914100

我们将jdbc文件添加到包含连接详细信息的web-inf文件夹中。当我们现在尝试使用

建立连接时
Connection conn = JdbcUtil.createNamedConnection(FacesContext.getCurrentInstance(), "db2");

它失败并显示以下堆栈跟踪:

    JVM: java.sql.SQLException
JVM:  at com.ibm.xsp.extlib.relational.jdbc.jndi.JndiDataSourceProxy.getConnection(JndiDataSourceProxy.java:139)
JVM:  at com.ibm.xsp.extlib.relational.util.JdbcUtil.createNamedConnection(JdbcUtil.java:86)
JVM:  at com.rsc.lotus.services.sales.model.DataAccessFacade.connectTest(DataAccessFacade.java:60)
JVM:  at com.rsc.lotus.services.sales.SalesService.renderService(SalesService.java:52)
JVM:  at com.ibm.xsp.extlib.component.rest.CustomService$ScriptServiceEngine.renderService(CustomService.java:259)
JVM:  at com.ibm.domino.services.HttpServiceEngine.processRequest(HttpServiceEngine.java:170)
JVM:  at com.ibm.xsp.extlib.component.rest.UIBaseRestService._processAjaxRequest(UIBaseRestService.java:258)
JVM:  at com.ibm.xsp.extlib.component.rest.UIBaseRestService.processAjaxRequest(UIBaseRestService.java:235)
JVM:  at com.ibm.xsp.util.AjaxUtilEx.renderAjaxPartialLifecycle(AjaxUtilEx.java:206)
JVM:  at com.ibm.xsp.webapp.FacesServletEx.renderAjaxPartial(FacesServletEx.java:249)
JVM:  at com.ibm.xsp.webapp.FacesServletEx.serviceAjaxPartialView(FacesServletEx.java:200)
JVM:  at com.ibm.xsp.webapp.FacesServletEx.serviceAjaxPartialViewSync(FacesServletEx.java:169)
JVM:  at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:155)
JVM:  at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
JVM:  at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
JVM:  at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
JVM:  at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
JVM:  at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335)
JVM:  at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:8
JVM:  at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
JVM:  at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
JVM:  at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319)
JVM:  at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)
JVM:  at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
JVM:  at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357)
JVM:  at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:313)
JVM:  at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
JVM: Caused by:
JVM: com.ibm.designer.runtime.resources.ResourceFactoriesException: Error while loading connection db2
JVM:  at com.ibm.xsp.extlib.relational.resources.provider.AbstractFileJdbcProvider.loadJDBCConnection(AbstractFileJd
JVM:  at com.ibm.xsp.extlib.relational.resources.provider.AbstractFileJdbcProvider.loadResourceFactory(AbstractFileJ
JVM:  at com.ibm.xsp.extlib.relational.resources.JdbcDataSourceProvider.loadResource(JdbcDataSourceProvider.java:83)
JVM:  at com.ibm.designer.runtime.resources.ResourceFactoriesPool.findResourceFactory(ResourceFactoriesPool.java:155
JVM:  at com.ibm.designer.runtime.resources.ResourceFactoriesPool.getResourceFactory(ResourceFactoriesPool.java:112)
JVM:  at com.ibm.xsp.extlib.relational.jdbc.jndi.JndiDataSourceProxy.getWrappedDatasource(JndiDataSourceProxy.java:1
JVM:  at com.ibm.xsp.extlib.relational.jdbc.jndi.JndiDataSourceProxy.getConnection(JndiDataSourceProxy.java:131)
JVM:  ... 26 more
JVM: Caused by:
JVM: com.ibm.designer.runtime.util.pool.PoolException: Error loading JDBC driver class com.ibm.db2.jcc.DB2Driver. If
JVM: ckage is available in the WEB-INF/lib directory. If running the studio, check that the corresponding package is
JVM:  at com.ibm.xsp.extlib.relational.jdbc.datasource.xpages.JdbcPool.<init>(JdbcPool.java:69)
JVM:  at com.ibm.xsp.extlib.relational.jdbc.datasource.xpages.JdbcPoolDataSource.<init>(JdbcPoolDataSource.java:38)
JVM:  at com.ibm.xsp.extlib.relational.jdbc.datasource.xpages.NSFFileJdbcXPCPProvider.loadConnection(NSFFileJdbcXPCP
JVM:  at com.ibm.xsp.extlib.relational.resources.provider.AbstractFileJdbcProvider.loadJDBCConnection(AbstractFileJd
JVM:  ... 32 more
JVM: Caused by:
JVM: java.security.PrivilegedActionException: java.sql.SQLException: Cannot create JDBC driver com.ibm.db2.jcc.DB2Dr
JVM:  at java.security.AccessController.doPrivileged(AccessController.java:331)
JVM:  at com.ibm.xsp.extlib.relational.jdbc.datasource.xpages.JdbcPool.<init>(JdbcPool.java:63)
JVM:  ... 35 more
JVM: Caused by:
JVM: java.sql.SQLException: Cannot create JDBC driver com.ibm.db2.jcc.DB2Driver
JVM:  at com.ibm.commons.jdbc.drivers.JDBCDriverLoader.loadDriver(JDBCDriverLoader.java:85)
JVM:  at com.ibm.xsp.extlib.relational.jdbc.datasource.xpages.JdbcPool$1.run(JdbcPool.java:65)
JVM:  at com.ibm.xsp.extlib.relational.jdbc.datasource.xpages.JdbcPool$1.run(JdbcPool.java:1)
JVM:  at java.security.AccessController.doPrivileged(AccessController.java:327)
JVM:  ... 36 more
JVM: Caused by:
JVM: java.security.PrivilegedActionException: java.lang.ClassNotFoundException: Cannot find class com.ibm.db2.jcc.DB
JVM:  at java.security.AccessController.doPrivileged(AccessController.java:331)
JVM:  at com.ibm.commons.jdbc.drivers.JDBCDriverLoader.loadDriver(JDBCDriverLoader.java:73)
JVM:  ... 39 more
JVM: Caused by:
JVM: java.lang.ClassNotFoundException: Cannot find class com.ibm.db2.jcc.DB2Driver in NSF
JVM:  at com.ibm.domino.xsp.module.nsf.ModuleClassLoader$DynamicClassLoader.findClass(ModuleClassLoader.java:499)
JVM:  at java.lang.ClassLoader.loadClass(ClassLoader.java:677)
JVM:  at com.ibm.domino.xsp.module.nsf.ModuleClassLoader$DynamicClassLoader.loadClass(ModuleClassLoader.java:399)
JVM:  at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
JVM:  at com.ibm.domino.xsp.module.nsf.ModuleClassLoader.loadClass(ModuleClassLoader.java:205)
JVM:  at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
JVM:  at com.ibm.domino.xsp.module.nsf.ModuleClassLoader.loadClass(ModuleClassLoader.java:215)
JVM:  at com.ibm.commons.jdbc.drivers.JDBCDriverLoader$1.run(JDBCDriverLoader.java:79)
JVM:  at com.ibm.commons.jdbc.drivers.JDBCDriverLoader$1.run(JDBCDriverLoader.java:1)
JVM:  at java.security.AccessController.doPrivileged(AccessController.java:327)
JVM:  ... 40 more

有没有人知道为什么驱动程序不可用?

编辑:db2.jdbc内容

<jdbc type="simple">
<driver>com.ibm.db2.jcc.DB2Driver</driver>
<url>jdbc:db2://DB2TEST.mycompany.int.com:7700/TEST</url>
<user>testuser</user>
<password>test</password>
</jdbc>

编辑2:如果我提供更多信息,也许会有所帮助。 目前我正在检查扩展点:

这是我为扩展点添加的内容 enter image description here

package com.rsc.lotus.JDBC.drivers.db2;
import java.sql.Driver;
import java.sql.SQLException;
import com.ibm.commons.jdbc.drivers.IJDBCDriverAlias;
import com.ibm.commons.jdbc.drivers.JDBCProvider;
import com.ibm.db2.jcc.DB2Driver;



public class DB2DriverProvider implements JDBCProvider{

    public DB2DriverProvider(){

    }

    public IJDBCDriverAlias[] getDriverAliases() {
        return null;
    }

    public Driver loadDriver(String className) throws SQLException {
        if(className.equals(DB2Driver.class.getName())){
            //return new com.ibm.db2.jcc.DB2Driver();
            return new DB2Driver(); 
        }
        return null;
    }


}

我检查了扩展点 告诉http osgi pt -v com.ibm.commons.Extension

但我无法在那里找到我的插件(寻找com.rsc)

    Extension point: com.ibm.commons.Extension [from com.ibm.commons]
    Extension(s):
    -------------------
    null [from com.ibm.xsp.extlib.relational]
    <service>
    type = com.ibm.xsp.Library
    class = com.ibm.xsp.extlib.relational.library.RelationalLibrary
    </service>
    null [from com.ibm.xsp.extlib.relational]
    <service>
    type = com.ibm.xsp.extlib.controls.DynamicColumnBuilderFactory
    class = com.ibm.xsp.extlib.relational.component.dynamicview.JdbcDynamicColumnBuilderFactory
    </service>
    null [from com.ibm.xsp.extlib.relational]
    <service>
    type = com.ibm.designer.runtime.extensions.JavaScriptProvider
    class = com.ibm.xsp.extlib.relational.javascript.JdbcJSFunctions
    </service>
    null [from com.ibm.xsp.extlib.relational]
    <service>
    type = com.ibm.xsp.runtime.resources
    class = com.ibm.xsp.extlib.relational.resources.JdbcDataSourceProvider
    </service>
    null [from com.ibm.xsp.extlib.relational]
    <service>
    type = com.ibm.xsp.core.events.ApplicationListener
    class = com.ibm.xsp.extlib.relational.resources.ApplicationInitializer
    </service>
    null [from com.ibm.xsp.extlib.relational]
    <service>
    type = com.ibm.xsp.extlib.DumpAccessorFactory
    class = com.ibm.xsp.extlib.relational.debug.JdbcDumpFactory
    </service>
    null [from com.ibm.xsp.extlib.relational]
    <service>
    type = com.ibm.xsp.adapter.servletFactory
    class = com.ibm.xsp.extlib.relational.jdbc.services.servlet.JdbcServletFactory
    </service>
    null [from com.ibm.xsp.extlib.relational]
    <service>
    type = com.ibm.xsp.extlib.relational.jdbc.datasource.IFileJdbcPoolProvider
    class = com.ibm.xsp.extlib.relational.jdbc.datasource.dbcp.NSFFileJdbcDBCPProvider
    </service>
    null [from com.ibm.xsp.extlib.relational]
    <service>
    type = com.ibm.xsp.extlib.relational.jdbc.datasource.IFileJdbcPoolProvider
    class = com.ibm.xsp.extlib.relational.jdbc.datasource.xpages.NSFFileJdbcXPCPProvider
    </service>
    null [from org.openntf.xsp.bootstrap]
    <service>
    type = com.ibm.xsp.Library
    class = org.openntf.xsp.bootstrap.library.BootstrapLibrary
    </service>
    null [from org.openntf.xsp.bootstrap]
    <service>
    type = com.ibm.xsp.stylekit.StyleKitFactory
    class = org.openntf.xsp.bootstrap.themes.BootstrapStyleKitFactory
    </service>
    null [from com.ibm.xsp.theme.bootstrap]
    <service>
    type = com.ibm.xsp.stylekit.StyleKitFactory
    class = com.ibm.xsp.theme.bootstrap.themes.StyleKitFactory
    </service>
    null [from com.ibm.xsp.extlib.controls]
    <service>
    type = com.ibm.xsp.minifier.loader
    class = com.ibm.xsp.extlib.minifier.ExtLibLoader
    </service>
    null [from com.ibm.xsp.extlib.controls]
    <service>
    class = com.ibm.xsp.extlib.device.extensions.XspUserAgentDataProvider
    type = com.ibm.xsp.extlib.device.DeviceDataProvider
    </service>
    null [from com.ibm.xsp.extlib.domino]
    <service>
    type = com.ibm.xsp.extlib.controls.DynamicColumnBuilderFactory
    class = com.ibm.xsp.extlib.component.dynamicview.DominoDynamicColumnBuilderFactory
    </service>
    null [from com.ibm.xsp.extlib.domino]
    <service>
    type = com.ibm.designer.runtime.extensions.JavaScriptProvider
    class = com.ibm.xsp.extlib.javascript.ExtendedDominoJSFunctions
    </service>
    null [from com.ibm.xsp.extlib.domino]
    <service>
    type = com.ibm.xsp.extlib.social.PersonDataProvider
    class = com.ibm.xsp.extlib.beans.DominoUserBeanDataProvider
    </service>
    null [from com.ibm.xsp.extlib.domino]
    <service>
    type = com.ibm.xsp.extlib.social.PersonDataProvider
    class = com.ibm.xsp.extlib.beans.DominoDBUserBeanDataProvider
    </service>
    null [from com.ibm.xsp.extlib.domino]
    <service>
    type = com.ibm.xsp.GlobalResourceProvider
    class = com.ibm.xsp.extlib.resources.domino.DominoResourceProvider
    </service>
    null [from com.ibm.xsp.extlib.domino]
    <service>
    type = com.ibm.xsp.extlib.DumpAccessorFactory
    class = com.ibm.xsp.extlib.debug.DominoDumpFactory
    </service>
    null [from com.ibm.xsp.extlib.domino]
    <service>
    type = com.ibm.xsp.resource.DojoModulePathResource
    class = com.ibm.xsp.extlib.resources.domino.DominoModulePath
    </service>
    null [from com.ibm.xsp.extlib.domino]
    <service>
    type = com.ibm.xsp.minifier.loader
    class = com.ibm.xsp.extlib.minifier.DWALoader
    </service>
    null [from com.ibm.xsp.extlib.mobile]
    <service>
    type = com.ibm.xsp.RequestParameters
    class = com.ibm.xsp.extlib.request.MobileRequestCustomizerFactory
    </service>
    null [from com.ibm.xsp.extlib.mobile]
    <service>
    type = com.ibm.xsp.stylekit.StyleKitFactory
    class = com.ibm.xsp.extlib.mobile.themes.MobileStyleKitFactory
    </service>
    null [from com.ibm.xsp.extlib.oneui]
    <service>
    type = com.ibm.xsp.GlobalResourceProvider
    class = com.ibm.xsp.extlib.resources.ExtlibResourceProvider
    </service>
    null [from com.ibm.xsp.extlib.oneui]
    <service>
    type = com.ibm.xsp.stylekit.StyleKitFactory
    class = com.ibm.xsp.extlib.oneui.themes.OneUIStyleKitFactory
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.GlobalResourceProvider
    class = com.ibm.xsp.extlib.resources.ExtlibResourceProvider
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.Library
    class = com.ibm.xsp.extlib.library.ExtlibLibrary
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.renderkit.ContentTypeRenderer
    class = com.ibm.xsp.extlib.renderkit.contenttype.GoogleSearch
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.RequestParameters
    class = com.ibm.xsp.extlib.library.ExtlibRequestCustomizerFactory
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.extlib.DumpAccessorFactory
    class = com.ibm.xsp.extlib.util.debug.JavaScriptDumpFactory
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.extlib.DumpAccessorFactory
    class = com.ibm.xsp.extlib.util.debug.BasicDumpFactory
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.extlib.DumpAccessorFactory
    class = com.ibm.xsp.extlib.util.debug.XPagesDumpFactory
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.extlib.DumpAccessorFactory
    class = com.ibm.xsp.extlib.util.debug.ExtLibDumpFactory
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.extlib.DumpAccessorFactory
    class = com.ibm.xsp.extlib.social.impl.SocialDumpFactory
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.resource.DojoModulePathResource
    class = com.ibm.xsp.extlib.resources.ExtlibModulePath
    </service>
    null [from com.ibm.xsp.extlib]
    <service>
    type = com.ibm.xsp.adapter.servletFactory
    class = com.ibm.xsp.extlib.proxy.servlet.ProxyServletFactory
    </service>
    null [from com.ibm.xsp.extlibx]
    <service>
    class = com.ibm.xsp.extlibx.library.ExtlibXLibrary
    type = com.ibm.xsp.Library
    </service>
    com.ibm.designer.runtime.directory.ldap.ActiveDirectoryLDAPDirectoryProvider [from com.ibm.designer.runtime.directory]
    <service>
    type = com.ibm.designer.runtime.directory.extensions.DirectoryProvider
    class = com.ibm.designer.runtime.directory.ldap.ActiveDirectoryLDAPDirectoryProvider
    </service>
    com.ibm.designer.runtime.directory.ldap.CustomLDAPDirectoryProvider [from com.ibm.designer.runtime.directory]
    <service>
    type = com.ibm.designer.runtime.directory.extensions.DirectoryProvider
    class = com.ibm.designer.runtime.directory.ldap.CustomLDAPDirectoryProvider
    </service>
    com.ibm.designer.runtime.directory.ldap.DominoLDAPDirectoryProvider [from com.ibm.designer.runtime.directory]
    <service>
    type = com.ibm.designer.runtime.directory.extensions.DirectoryProvider
    class = com.ibm.designer.runtime.directory.ldap.DominoLDAPDirectoryProvider
    </service>
    com.ibm.designer.runtime.directory.ldap.NetscapeLDAPDirectoryProvider [from com.ibm.designer.runtime.directory]
    <service>
    type = com.ibm.designer.runtime.directory.extensions.DirectoryProvider
    class = com.ibm.designer.runtime.directory.ldap.NetscapeLDAPDirectoryProvider
    </service>
    com.ibm.designer.runtime.directory.ldap.OpenldapLDAPDirectoryProvider [from com.ibm.designer.runtime.directory]
    <service>
    type = com.ibm.designer.runtime.directory.extensions.DirectoryProvider
    class = com.ibm.designer.runtime.directory.ldap.OpenldapLDAPDirectoryProvider
    </service>
    com.ibm.designer.runtime.directory.ldap.SecureWayLDAPDirectoryProvider [from com.ibm.designer.runtime.directory]
    <service>
    type = com.ibm.designer.runtime.directory.extensions.DirectoryProvider
    class = com.ibm.designer.runtime.directory.ldap.SecureWayLDAPDirectoryProvider
    </service>
    com.ibm.designer.runtime.directory.notes.NotesDirectoryProvider [from com.ibm.designer.runtime.directory]
    <service>
    type = com.ibm.designer.runtime.directory.extensions.DirectoryProvider
    class = com.ibm.designer.runtime.directory.notes.NotesDirectoryProvider
    </service>
    com.ibm.designer.runtime.directory.password.PasswordDirectoryProvider [from com.ibm.designer.runtime.directory]
    <service>
    type = com.ibm.designer.runtime.directory.extensions.DirectoryProvider
    class = com.ibm.designer.runtime.directory.password.PasswordDirectoryProvider
    </service>
    com.ibm.designer.runtime.directory.xml.XMLDirectoryProvider [from com.ibm.designer.runtime.directory]
    <service>
    type = com.ibm.designer.runtime.directory.extensions.DirectoryProvider
    class = com.ibm.designer.runtime.directory.xml.XMLDirectoryProvider
    </service>
    null [from com.ibm.domino.xsp.adapter.nsf]
    <service>
    type = com.ibm.xsp.adapter.serviceFactory
    class = com.ibm.domino.xsp.adapter.nsf.NSFServiceFactory
    </service>
    null [from com.ibm.domino.xsp.adapter.osgi]
    <service>
    type = com.ibm.xsp.adapter.serviceFactory
    class = com.ibm.domino.xsp.adapter.osgi.OSGIServiceFactory
    </service>
    null [from com.ibm.xsp.core]
    <service>
    type = com.ibm.xsp.Library
    class = com.ibm.xsp.library.CoreLibrary
    </service>
    null [from com.ibm.xsp.core]
    <service>
    type = com.ibm.xsp.acf.HtmlFilteringFactory
    class = com.ibm.xsp.acf.DefaultHtmlFilteringFactory
    </service>
    null [from com.ibm.xsp.core]
    <service>
    class = com.ibm.xsp.stylekit.CoreThemeExtension
    type = com.ibm.xsp.stylekit.ThemeExtension
    </service>
    com.ibm.xsp.script.javascript [from com.ibm.xsp.designer]
    <service>
    type = com.ibm.designer.runtime.extensions.JavaScriptProvider
    class = com.ibm.xsp.script.JavaScriptExtension
    </service>
    null [from com.ibm.xsp.designer]
    <service>
    type = com.ibm.xsp.Library
    class = com.ibm.xsp.library.DesignerLibrary
    </service>
    null [from com.ibm.xsp.dojo]
    <service>
    type = com.ibm.xsp.context.DojoLibraryFactory
    class = com.ibm.xsp.dojo.factory.DojoVersion
    </service>
    null [from com.ibm.xsp.domino]
    <service>
    type = com.ibm.xsp.Library
    class = com.ibm.xsp.domino.DominoLibrary
    </service>
    null [from com.ibm.xsp.domino]
    <service>
    type = com.ibm.designer.runtime.extensions.JavaScriptProvider
    class = com.ibm.xsp.script.DomJavaScriptExtension
    </service>
    null [from com.ibm.xsp.domino]
    <service>
    type = com.ibm.xsp.library.Contributor
    class = com.ibm.xsp.DominoXspContributor
    </service>
    null [from com.ibm.xsp.domino]
    <service>
    type = com.ibm.xsp.LocalResourceProvider
    class = com.ibm.xsp.model.domino.webapp.DominoResourceProvider
    </service>
    null [from com.ibm.xsp.domino]
    <service>
    type = com.ibm.commons.platform.Factory
    class = com.ibm.domino.xsp.module.nsf.platform.Factory
    </service>
    null [from com.ibm.xsp.domino]
    <service>
    type = com.ibm.xsp.SerializableAdapter
    class = com.ibm.xsp.persistence.DominoSerializableAdapter
    </service>
    null [from com.ibm.xsp.domino]
    <service>
    type = com.ibm.xsp.minifier.loader
    class = com.ibm.xsp.minifier.CoreLoader
    </service>
    null [from com.ibm.xsp.domino]
    <service>
    type = com.ibm.xsp.minifier.loader
    class = com.ibm.xsp.minifier.DojoLoader
    </service>
    null [from com.ibm.xsp.domino]
    <service>
    type = com.ibm.xsp.context.DojoLibraryFactory
    class = com.ibm.xsp.domino.context.DominoDojo
    </service>
    null [from com.ibm.xsp.extsn]
    <service>
    type = com.ibm.xsp.Library
    class = com.ibm.xsp.library.ExtsnLibrary
    </service>
    null [from com.ibm.xsp.extsn]
    <service>
    type = com.ibm.xsp.GlobalResourceProvider
    class = com.ibm.xsp.minifier.MinifierResourceProvider
    </service>
    null [from com.ibm.xsp.extsn]
    <service>
    type = com.ibm.xsp.LocalResourceProvider
    class = com.ibm.xsp.minifier.AggregatedResourceProvider
    </service>
    null [from com.ibm.xsp.mum]
    <service>
    type = com.ibm.xsp.adapter.servletFactory
    class = com.ibm.xsp.opensocial.OpenSocialServletFactory
    </service>
    null [from com.ibm.xsp.mum]
    <service>
    type = com.ibm.designer.runtime.extensions.RuntimeInitializationEvent
    class = com.ibm.xsp.extlib.config.GadgetConfig
    </service>
    null [from com.ibm.xsp.mum]
    <service>
    type = com.ibm.xsp.RequestParameters
    class = com.ibm.xsp.opensocial.OSRequestCustomizerFactory
    </service>
    null [from com.ibm.xsp.mum]
    <service>
    type = com.ibm.xsp.adapter.servletFactory
    class = com.ibm.xsp.mum.MumServletFactory
    </service>
    null [from com.ibm.xsp.mum]
    <service>
    type = com.ibm.xsp.RequestParameters
    class = com.ibm.xsp.mum.MumRequestCustomizerFactory
    </service>
    null [from com.ibm.xsp.mum]
    <service>
    type = com.ibm.xsp.GlobalResourceProvider
    class = com.ibm.xsp.mum.resources.MumResourceProvider
    </service>
    null [from com.ibm.xsp.theme.oneui.idx]
    <service>
    type = com.ibm.xsp.GlobalResourceProvider
    class = com.ibm.xsp.theme.oneui_idx.ThemeResourceProvider
    </service>
    null [from com.ibm.xsp.theme.oneui.idx]
    <service>
    type = com.ibm.xsp.stylekit.StyleKitFactory
    class = com.ibm.xsp.theme.oneui_idx.ThemeStyleKitFactory
    </service>
    null [from com.ibm.xsp.theme.oneui.idx]
    <service>
    type = com.ibm.xsp.minifier.loader
    class = com.ibm.xsp.theme.oneui_idx.ThemeLoader
    </service>
    null [from com.ibm.xsp.theme.oneuiv302]
    <service>
    type = com.ibm.xsp.GlobalResourceProvider
    class = com.ibm.xsp.theme.oneuiv302.ThemeResourceProvider
    </service>
    null [from com.ibm.xsp.theme.oneuiv302]
    <service>
    type = com.ibm.xsp.stylekit.StyleKitFactory
    class = com.ibm.xsp.theme.oneuiv302.ThemeStyleKitFactory
    </service>
    null [from com.ibm.xsp.theme.oneuiv302]
    <service>
    type = com.ibm.xsp.minifier.loader
    class = com.ibm.xsp.theme.oneuiv302.ThemeLoader
    </service>

1 个答案:

答案 0 :(得分:3)

史蒂夫提到,请检查您的定义文件。 WEB-INF中的jdbc定义文件必须位于“jdbc”文件夹中,并命名为“db2.jdbc”,因为这是您正在使用的名称。

内容也很重要:查看<driver>部分以获取正确的班级名称。这是PostgreSQL的一个例子,但DB2的结构类似:

<jdbc>
<driver>org.postgresql.Driver</driver>

<!-- replace host/ip and schema (demo) with your database -->
<url>jdbc:postgresql://notesx.net/postgres/xpagesdemo</url>

<!-- replace these with your credentials -->
<user>johndoe</user>
<password>password</password>
<simple>
    <maxPoolSize>50</maxPoolSize>
</simple>