Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

EJB connecting to SQL Server 7 problem

9 views
Skip to first unread message

Nick Ong

unread,
Feb 25, 2002, 8:57:28 AM2/25/02
to
Hi,

Perhaps someone has come across a similar problem I’m having
getting a test entity bean to connect to SQL Server v7.0. I’m
using WebSphere Studio Application Developer v4.0.2 with the SequeLink
database drivers.

I used the driver class com.merant.sequelink.jdbc.SequeLinkDriver (jar
file is sljc.jar) to successfully connect to the database and use the
Wizard (EJB to RDB Mapping) to create a test entity bean. I’ve
subsequently found a few articles in the newsgroup about creating a
data source using the other SequeLink class driver,
com.merant.sequelink.jdbcx.datasource.SequeLinkDataSource (jar file is
sljcx.jar), to run the bean, i.e. using Run On Server that would
create the EJB Test Client. Such articles recommend creating various
Resource Properties for the data source, e.g. serverName, portNumber,
and disable2Phase.

I set up the bean with a JNDI name as well as the JNDI name to the
data source (using the EJB Extension Editor), save everything, and
generate the deploy code (Generate/Deploy and RMIC Code). Finally, I
do the Run On Server command.

On the console output, an error-looking line is
“java.lang.NoClassDefFoundError: javax/sql/DataSource”

I’ve posted the console output text below.

Many thanks for your help,

Nick.


*** Starting the server ***
IBM WebSphere Application Server, Release 4.0.2
Advanced Single Server Edition for Multiplatforms
Copyright IBM Corp., 1997-2001

************ Start Display Current Environment ************
WebSphere AEs 4.0.2 a0150.05 running with process name
localhost/Default Server and process id 701
Host Operating System is Windows NT, version 4.0
Java version = J2RE 1.3.0 IBM build cn130-20010925was (JIT disabled),
Java Compiler = , Java VM name = Classic VM
server.root = D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.runtime
Java Home = D:\JavaProgs\IBM\WSAD4\plugins\com.ibm.etools.server.jdk\jre
ws.ext.dirs = D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.server.jdk/lib;D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.runtime/classes;D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.runtime/lib;D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.runtime/lib/ext;D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.runtime/web/help;D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.e
ools.websphere.tools/runtime/wasListener.jar;D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.webservice/runtime/worf.jar
Classpath = D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.runtime/properties;D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.runtime/lib/bootstrap.jar;D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.tools/runtime/wteServers.jar;D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.tools/runtime/wasTools.jar;C:\Program
Files\sqllib\java\sljcx.jar;C:\Program
Files\sqllib\java\sljc.jar;D:\JavaProgs\MSSQLdriverJDBC\lib\msutil.jar;D:\JavaProgs\MSSQLdriverJDBC\lib\mssqlserver.jar;D:\JavaProgs\MSSQLdriverJDBC\lib\msbase.jar
Java Library path = D:/JavaProgs/IBM/WSAD4/plugins/com.ibm.etools.websphere.runtime/bin;D:\JavaProgs\IBM\WSAD4\jre\bin;.;C:\WINNT\System32;C:\WINNT;%JAVA_HOME%\bin;D:\JavaProgs\Ant\bin;D:\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\Program
Files\Symantec\pcAnywhere;C:\MSSQL7\BINN;D:\Program
Files\MTS;C:\NTReskit;C:\Program
Files\Mts;C:\PROGRA~1\Distinct;C:\PROGRA~1\COMMON~1\DISTIN~1;C:\PROGRA~1\ULTRAEDT;C:\WINNT\System32\WBEM;;D:\Download\Palm40\RichReader;
Current trace specification = *=all=disabled
************* End Display Current Environment *************
[25/02/02 13:23:33:223 GMT] 5f91c6a Server U Version : 4.0.2
[25/02/02 13:23:33:243 GMT] 5f91c6a Server U Edition: Advanced
Single Server Edition for Multiplatforms
[25/02/02 13:23:33:273 GMT] 5f91c6a Server U Build date: Tue
Dec 18 00:00:00 GMT+00:00 2001
[25/02/02 13:23:33:273 GMT] 5f91c6a Server U Build number:
a0150.05
[25/02/02 13:23:46:011 GMT] 5f91c6a DrAdminServer I WSVR0053I:
DrAdmin available on port 7000
[25/02/02 13:23:46:602 GMT] 5f91c6a ResourceBinde I WSVR0049I:
Binding Session Persistence datasource as jdbc/Session
[25/02/02 13:23:46:702 GMT] 5f91c6a ResourceBinde I WSVR0049I:
Binding DataSourceNicksTest as jdbc/NicksTest
[25/02/02 13:23:58:259 GMT] 5f91c6a EJBEngine I WSVR0037I:
Starting EJB jar: MyAddressBook
[25/02/02 13:23:59:391 GMT] 5f91c6a EJBEngine I WSVR0038I: No
JNDI name found for Addressbook, binding home name as AddressbookHome
[25/02/02 13:24:00:102 GMT] 5f91c6a Helpers W NMSV0605E: A
Reference object looked up from the context
"domainRoots/UnspecifiedDomainName/legacyRoot" with the name
"jdbc/NicksTest" was sent to the JNDI Naming Manager and an exception
resulted.
Reference data follows:
Reference Factory Class Name:
com.ibm.websphere.advanced.cm.factory.DataSourceFactory$ResourceReferenceObjectFactory
Reference Factory Class Location URLs: <null>
Reference Class Name: com.ibm.ejs.cm.portability.PortableDataSource
Type: name
Content: DataSourceNicksTest
Type: minimumPoolSize
Content: 1
Type: maximumPoolSize
Content: 10
Type: connectionTimeout
Content: 180
Type: idleTimeout
Content: 1800
Type: orphanTimeout
Content: 1800
Type: statementCacheSize
Content: 100
Type: disableAutoConnectionCleanup
Content: false
Type: oemId
Content: WebSphereSequeLinkClient
Type: informixLockModeWait
Content: 0
Type: oracleStmtCacheSize
Content: 0
Type: disable2Phase
Content: true
Type: dataSourceClassName
Content: com.merant.sequelink.jdbcx.datasource.SequeLinkDataSource
Type: databasename
Content: NicksTest
Type: user
Content: NickTest
Type: password
Content: {xor}ETY8NAs6LCs=
Type: portNumber
Content: 19996
Type: serverName
Content: elsoxfs11887

Exception data follows:
java.lang.NoClassDefFoundError: javax/sql/DataSource
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:496)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:117)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$300(URLClassLoader.java:69)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:544)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:203)
at java.lang.ClassLoader.loadClass(ClassLoader.java:325)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:296)
at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:296)
at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:66)
at com.ibm.websphere.advanced.cm.factory.DataSourceFactory.isJTAEnabled(DataSourceFactory.java:508)
at com.ibm.ejs.cm.DataSourceFactory.createDataSource(DataSourceFactory.java:156)
at com.ibm.ejs.cm.DataSourceFactory.getDataSource(DataSourceFactory.java:114)
at com.ibm.websphere.advanced.cm.factory.DataSourceFactory.getDataSource(DataSourceFactory.java:386)
at com.ibm.websphere.advanced.cm.factory.DataSourceFactory$ResourceReferenceObjectFactory.getObjectInstance(DataSourceFactory.java:701)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:308)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:737)
at com.ibm.ejs.ns.jndi.CNContextImpl.cacheLookup(CNContextImpl.java:2682)
at com.ibm.ejs.ns.jndi.CNContextImpl.doLookup(CNContextImpl.java:1415)
at com.ibm.ejs.ns.jndi.CNContextImpl.lookup(CNContextImpl.java:1120)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:128)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ibm.ws.cpi.JDBCPersisterFactoryImpl.create(JDBCPersisterFactoryImpl.java:88)
at com.ibm.ejs.container.EJSContainer.loadBeanMetaData(EJSContainer.java:800)
at com.ibm.ejs.container.EJSContainer.getHomeInstance(EJSContainer.java:544)
at com.ibm.ejs.container.EJSContainer.startBean(EJSContainer.java:508)
at com.ibm.ws.runtime.BeanHelper.startBean(BeanHelper.java:154)
at com.ibm.ws.runtime.EJBEngine.addEjbModule(EJBEngine.java:437)
at com.ibm.ws.runtime.Server.startModule(Server.java:607)
at com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:321)
at com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java:349)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:884)
at com.ibm.ws.runtime.StandardServer.main(StandardServer.java:519)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
at com.ibm.etools.websphere.tools.runner.api.ServerRunner$1.run(ServerRunner.java)
-
-
etc.
-
-
[25/02/02 13:24:00:863 GMT] 5f91c6a JDBCPersister W CNTR0031W: Error
starting CMP bean: MyAddressBookEAR#MyAddressBook.jar#Addressbook
[25/02/02 13:24:01:123 GMT] 5f91c6a JDBCPersister W CNTR0032W: Error
creating CMP persister using datasource: jdbc/NicksTest
[25/02/02 13:24:01:183 GMT] 5f91c6a EJBEngine X WSVR0062E: Failed
to start EJB, MyAddressBookEAR#MyAddressBook.jar#Addressbook:
javax/sql/DataSource
[25/02/02 13:24:06:541 GMT] 5f91c6a ServletEngine A SRVE0161I: IBM
WebSphere Application Server - Web Container. Copyright IBM Corp.
1998-2001
[25/02/02 13:24:08:053 GMT] 5f91c6a ServletEngine A SRVE0162I:
Servlet Specification Level: 2.2
[25/02/02 13:24:08:063 GMT] 5f91c6a ServletEngine A SRVE0163I:
Supported JSP Specification Level: 1.1
[25/02/02 13:24:10:236 GMT] 5f91c6a ServletEngine A SRVE0167I:
Session Manager is Configured - Initializing...
[25/02/02 13:24:11:598 GMT] 5f91c6a CacheManager A DYNA0011E:
Servlet cache file dynacache.xml not found; caching is disabled
[25/02/02 13:24:11:869 GMT] 5f91c6a ServletEngine A SRVE0169I:
Loading Web Module: IBM EJB Test Client.
[25/02/02 13:24:14:563 GMT] 5f91c6a WebGroup I SRVE0091I:
[Servlet LOG]: JSP 1.1 Processor: init
[25/02/02 13:24:15:003 GMT] 5f91c6a WebGroup I SRVE0091I:
[Servlet LOG]: SimpleFileServlet: init
[25/02/02 13:24:15:734 GMT] 5f91c6a HttpTransport A SRVE0171I:
Transport http is listening on port 8,080.
[25/02/02 13:24:15:935 GMT] 5f91c6a Server A WSVR0023I: Server
Default Server open for e-business
[25/02/02 13:24:19:369 GMT] 60e5c64 WebGroup I SRVE0091I:
[Servlet LOG]: initializeServlet: init

Nick Ong

unread,
Feb 26, 2002, 6:44:18 AM2/26/02
to
Hi,

Just for anyone's benefit...

I received a prompt solution from IBM that the resource property name
"databaseName" is invalid, instead the setting should be set in the
database name field of the Data Source section of the JDBC driver (in
server configuration).

The resource properties that do require setting are
serverName (java.lang.String)
portNumber (java.lang.Integer)
disable2Phase (java.lang.Boolean), set to true.

Nick.

0 new messages