Problem Connecting OpenESB to MSSQL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem Connecting OpenESB to MSSQL

omidhdn
This post has NOT been accepted by the mailing list yet.
hi
i have problem connecting to MSSQL. this is my config:
1- i have copied the driver sqljdbc42 to lib and lib/ext
2- config context.xml as below:

<?xml version="1.0" encoding="UTF-8"?>
<context xmlns="http://www.open-esb.net/standalone/jndi/">
<dataSource-pool-properties>
<dbConnector-name>MSSQLPoll</dbConnector-name>
<datasource-classname>com.microsoft.sqlserver.jdbc.SQLServerDataSource</datasource-classname>
<resource-type>Datasource</resource-type>
<database-vendor>Microsoft</database-vendor>
<database-version>12.0.2</database-version>
<dbconnector-description>DBConnector for mssql</dbconnector-description>
<dataSource-properties>
<property>
<name>dataSourceURL</name>
<value>jdbc:sqlserver://192.*.*.*:1433;databaseName=*;user=*;password=***</value>
<description>URL value for MSSLQ Connection</description>
</property>
</dataSource-properties>
<pool-properties>
<property>
<name>initialSize</name>
<value>11</value>
<description></description>
</property>
<property>
<name>maxActive</name>
<value>20</value>
<description></description>
</property>
<property>
<name>maxIdle</name>
<value>10</value>
<description></description>
</property>
<property>
<name>minIdle</name>
<value>10</value>
<description></description>
</property>
</pool-properties>
</dataSource-pool-properties>
<jdbc-resources>
<dbConnector-name>MSSQLPoll</dbConnector-name>
<jndi-name>jndiMSSQL</jndi-name>
<description>Datasource connection to MSSQL</description>
</jdbc-resources>
</context>



here is the error log:
--------------------------------------------------------------------------------

2015-11-23T16:11:05.971+0330 INFO [net.openesb.standalone.node.internal.InstanceNode] (main) OESE-1001: Initializing a new instance...
2015-11-23T16:11:06.550+0330 INFO [net.openesb.standalone.node.internal] (main) OESE-1300: Trying to load configuration from D:\OpenESB\OE-Instance\config/openesb.yaml
2015-11-23T16:11:06.717+0330 INFO [net.openesb.standalone.node.internal] (main) OESE-1301: Configuration loaded from D:\OpenESB\OE-Instance\config/openesb.yaml
2015-11-23T16:11:07.296+0330 INFO [net.openesb.standalone.security.SecurityProviderImpl] (main) OESE-1200: Loading security realms from configuration.
2015-11-23T16:11:07.305+0330 INFO [net.openesb.standalone.security.realm.impl.PropertiesRealmHandler] (main) OESE-1206: Creating properties realm using file: D:\OpenESB\OE-Instance/config/mgmt-users.properties.
2015-11-23T16:11:07.404+0330 INFO [net.openesb.standalone.security.SecurityProviderImpl] (main) OESE-1202: Management Realm <management> has been correctly configured.
2015-11-23T16:11:07.411+0330 INFO [net.openesb.standalone.naming.ContextProvider] (main) OESE-1400: Preparing JNDI Naming Context from D:\OpenESB\OE-Instance/config/context.xml.
2015-11-23T16:11:07.716+0330 INFO [net.openesb.standalone.naming.jndi.AbstractContextFactory] (main) OESE-1406: Loading context from D:\OpenESB\OE-Instance\config\context.xml.
2015-11-23T16:11:07.759+0330 SEVERE [net.openesb.standalone.naming.jndi.AbstractContextFactory] (main) OESE-1403: Context URL <D:\OpenESB\OE-Instance\config\context.xml> is malformed.
javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; systemId: file:/D:/OpenESB/OE-Instance/config/context.xml; lineNumber: 7; columnNumber: 18; cvc-complex-type.2.4.a: Invalid content was found starting with element 'database-vendor'. One of '{"http://www.open-esb.net/standalone/jndi/":database-name}' is expected.]
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:563)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:214)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:162)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:171)
        at net.openesb.standalone.naming.jndi.JAXBContextReader.getContext(JAXBContextReader.java:67)
        at net.openesb.standalone.naming.jndi.AbstractContextFactory.loadContexts(AbstractContextFactory.java:72)
        at net.openesb.standalone.naming.jndi.AbstractContextFactory.loadContexts(AbstractContextFactory.java:47)
        at net.openesb.standalone.naming.jndi.InitialContexFactoryImpl.getInitialContext(InitialContexFactoryImpl.java:48)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
        at javax.naming.InitialContext.init(InitialContext.java:244)
        at javax.naming.InitialContext.<init>(InitialContext.java:216)
        at net.openesb.standalone.naming.ContextProvider.get(ContextProvider.java:61)
        at net.openesb.standalone.naming.ContextProvider.get(ContextProvider.java:23)
        at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:55)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
        at com.google.inject.Scopes$1$1.get(Scopes.java:65)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
        at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53)
        at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:94)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
        at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
        at com.google.inject.Scopes$1$1.get(Scopes.java:65)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
        at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53)
        at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
        at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:75)
        at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:73)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
        at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:73)
        at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:147)
        at com.google.inject.internal.Initializer.injectAll(Initializer.java:92)
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:173)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
        at com.google.inject.Guice.createInjector(Guice.java:95)
        at com.google.inject.Guice.createInjector(Guice.java:72)
        at net.openesb.standalone.inject.ModulesBuilder.createInjector(ModulesBuilder.java:42)
        at net.openesb.standalone.node.internal.InstanceNode.<init>(InstanceNode.java:75)
        at net.openesb.standalone.node.NodeBuilder.build(NodeBuilder.java:24)
        at net.openesb.standalone.startup.Container.<init>(Container.java:21)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at java.lang.Class.newInstance(Class.java:442)
        at net.openesb.standalone.startup.Bootstrap.init(Bootstrap.java:76)
        at net.openesb.standalone.startup.Bootstrap.start(Bootstrap.java:122)
        at net.openesb.standalone.startup.Bootstrap.main(Bootstrap.java:201)
Caused by: org.xml.sax.SAXParseException; systemId: file:/D:/OpenESB/OE-Instance/config/context.xml; lineNumber: 7; columnNumber: 18; cvc-complex-type.2.4.a: Invalid content was found starting with element 'database-vendor'. One of '{"http://www.open-esb.net/standalone/jndi/":database-name}' is expected.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:452)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3230)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1790)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:740)
        at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:570)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:86)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:153)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:380)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2787)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243)
        ... 54 more


2015-11-23T16:11:07.880+0330 INFO [net.openesb.standalone.node.internal.InstanceNode] (main) OESE-1002: Instance server initialized.
2015-11-23T16:11:07.884+0330 INFO [net.openesb.standalone.node.internal.InstanceNode] (main) OESE-1003: Instance server is now starting...
2015-11-23T16:11:08.255+0330 INFO [net.openesb.standalone.jmx.JMXService] (main) OESE-1102: JMX connector server started at: service:jmx:rmi:///jndi/rmi://localhost:8699/jmxrmi
2015-11-23T16:11:08.278+0330 WARNING [com.atomikos.icatch.config.UserTransactionServiceImp] (main) Using init file: /D:/OpenESB/OE-Instance/tm/jta.properties
2015-11-23T16:11:08.811+0330 INFO [com.sun.jbi.framework] (main) JBIFW0010: JBI framework ready to accept requests.
2015-11-23T16:11:10.346+0330 INFO [sun-database-binding.org.glassfish.openesb.databasebc.JDBCBindingLifeCycle] (sun-database-binding) Registered Status Provider MBean for sun-database-binding.
2015-11-23T16:11:10.382+0330 INFO [sun-database-binding.org.glassfish.openesb.databasebc.JDBCBindingLifeCycle] (sun-database-binding) Registered runtime configuration MBean for sun-database-binding.
2015-11-23T16:11:10.460+0330 INFO [sun-database-binding.org.glassfish.openesb.databasebc.JDBCBindingLifeCycle] (sun-database-binding) DB BC is enabled in cluster: false.
2015-11-23T16:11:10.488+0330 INFO [sun-database-binding.org.glassfish.openesb.databasebc.JDBCBindingLifeCycle] (sun-database-binding) Started outbound receiver.
2015-11-23T16:11:10.489+0330 INFO [sun-database-binding.org.glassfish.openesb.databasebc.OutboundReceiver] (Thread-7) Receiver started.
2015-11-23T16:11:10.499+0330 INFO [sun-database-binding.org.glassfish.openesb.databasebc.JDBCBindingLifeCycle] (sun-database-binding) Started inbound receiver.
2015-11-23T16:11:10.707+0330 INFO [com.sun.jbi.engine.bpel.BPELSELifeCycle] (sun-bpel-engine) BPJBI-5001: BPEL service engine initialized
2015-11-23T16:11:10.745+0330 INFO [com.sun.jbi.engine.bpel.BPELSELifeCycle] (sun-bpel-engine) BPJBI-5002: Starting BPEL service engine
2015-11-23T16:11:10.745+0330 INFO [com.sun.jbi.httpsoapbc.HttpSoapBindingLifeCycle] (sun-http-binding) HTTPBC-R00100: sun-http-binding starting
2015-11-23T16:11:10.745+0330 INFO [sun-database-binding.org.glassfish.openesb.databasebc.JDBCBindingLifeCycle] (sun-database-binding) DBBC Binding component started.
2015-11-23T16:11:10.777+0330 INFO [com.sun.jbi.framework] (sun-database-binding) JBIFW1146: Binding sun-database-binding has been started.
2015-11-23T16:11:11.038+0330 INFO [com.sun.jbi.engine.bpel.BPELSELifeCycle] (sun-bpel-engine) BPJBI-5003:
BPEL service engine started with following configurations:
Persistence Enabled : false
Monitor Enabled : false
Persistence Database NonXA JNDI ResourceName : jdbc/bpelseNonXA
Persistence Database XA JNDI Resource Name : jdbc/bpelseXA
Engine Expiry Interval (failover setting) : 60 seconds
Debug Enabled : false
Debug Port : 3,343
Thread Count : 10
Engine Installed on Application Server Cluster : false
Engine Configured to run in Cluster Profile : false
Scalability Related : Engine Running in Non-Persistence Mode, Passivation Solution for BPELSE Scalability Not Available.
Waiting Request Life Span : 0
Validation Enabled : true
2015-11-23T16:11:11.127+0330 INFO [com.sun.jbi.framework] (sun-bpel-engine) JBIFW1146: Engine sun-bpel-engine has been started.
2015-11-23T16:11:11.271+0330 INFO [org.apache.coyote.tomcat5.CoyoteConnector] (sun-http-binding) PWC3982: Cannot register MBean for the Protocol
2015-11-23T16:11:11.275+0330 INFO [GRIZZLY] (sun-http-binding) grizzlyHttpProtocol.selectorRegisterProtocol
2015-11-23T16:11:11.278+0330 INFO [GRIZZLY] (sun-http-binding) grizzlyHttpProtocol.start
2015-11-23T16:11:11.449+0330 INFO [com.sun.jbi.httpsoapbc.HttpSoapBindingLifeCycle] (sun-http-binding) HTTPBC-R00101: sun-http-binding started with the following configuration:
component-version: 2.3.4
build-number: 1009
OutboundThreads (max outbound threads): 100
InboundThreads (max inbound threads): 100
InboundReplyThreads (max inboundReply threads): 100
HttpDefaultPort: 9080
HttpsDefaultPort: 9081
ClientAuthEnabled: false
AMConfigDirectory:
AMClasspath:
ProxyType: SOCKS
ProxyHost:
ProxyPort: -1
NonProxyHosts:
ProxyUserName:
UseJVMProxySettings: true
ValidHostnames:
ApplicationVariables: {  }
ApplicationConfigurations: {  }
2015-11-23T16:11:11.491+0330 INFO [com.sun.jbi.framework] (sun-http-binding) JBIFW1146: Binding sun-http-binding has been started.
2015-11-23T16:11:11.497+0330 INFO [com.sun.jbi.framework] (main) JBIFW0012: JBI framework startup complete.
2015-11-23T16:11:11.500+0330 INFO [net.openesb.standalone.http] (main) OESE-1500: Using HTTP Port: 4,848
2015-11-23T16:11:13.245+0330 INFO [net.openesb.standalone.http] (main) OESE-1505: Register a JAX-RS Application [net.openesb.standalone.rest.ExtendedManagementApplication] on path /openesb/api
2015-11-23T16:11:13.359+0330 INFO [net.openesb.standalone.http] (main) OESE-1505: Register a JAX-RS Application [net.openesb.standalone.plugins.rest.PluginsApplication] on path /plugins
2015-11-23T16:11:13.361+0330 INFO [net.openesb.standalone.http] (main) OESE-1502: Starting HTTP Server
2015-11-23T16:11:13.513+0330 INFO [org.glassfish.grizzly.http.server.NetworkListener] (main) Started listener bound to [0.0.0.0:4848]
2015-11-23T16:11:13.521+0330 INFO [org.glassfish.grizzly.http.server.HttpServer] (main) [HttpServer] Started.
2015-11-23T16:11:13.524+0330 INFO [net.openesb.standalone.node.internal.InstanceNode] (main) OESE-1004: Instance server [3.0.5] started in 5,636 ms.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

please help me on this.
thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem Connecting OpenESB to MSSQL

Paul Perez
Administrator
Hello

Please have a look on OpenESB documentation document 770-005 connection with database. At the end of the document, you will find an example of MSSQL context

regards

Paul
www.pymma.com The best services on OpenESB
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem Connecting OpenESB to MSSQL

BaoChuang
This post has NOT been accepted by the mailing list yet.
This post was updated on .
In reply to this post by omidhdn
About SQLServer's connecting ,document 770-005's [Appendix B. Microsoft SQL Server Configuration] was described a problem。Missing node is <database-name>SQLServer</database-name>。Right after the additional。

Loading...