Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » jdbc connection bundle SqlServer Jtds Drive(help: jdbc connection bundle SqlServer Jtds Drive)
jdbc connection bundle SqlServer Jtds Drive [message #952567] Sun, 21 October 2012 11:25 Go to next message
Diogo Duarte is currently offline Diogo Duarte
Messages: 5
Registered: October 2012
Junior Member
Hi everyone:

I'm new to Scout and also to OSGI. I tried to folow the tutorial in the wiki: Write_a_jdbc_connection_bundle but using jTDS driver:

Created a plugin project with java src : org.eclipse.scout.rt.jdbc.jtds125 with a generated Activator

created a lib folder and placed the jTDS jar:jtds-1.2.5.jar

Created 2 packages:

org.eclipse.scout.rt.services.common.jdbc
org.eclipse.scout.rt.services.common.jdbc.style

placed the folowing classes respectivly:

package org.eclipse.scout.rt.services.common.jdbc;

import org.eclipse.scout.rt.server.services.common.jdbc.AbstractSqlService;
import org.eclipse.scout.rt.server.services.common.jdbc.style.ISqlStyle;
import org.eclipse.scout.rt.services.common.jdbc.style.JtdsSqlStyle;

public class AbstractJtdsSqlService  extends AbstractSqlService {
	  @Override
	  protected String getConfiguredJdbcDriverName() {
	    return "net.sourceforge.jtds.jdbc.Driver";
	  }
	 
	  @Override
	  protected String getConfiguredJdbcMappingName() {
	    return "jdbc:jtds:<server_type>://<server>[:<port>][/<database>]";
	  }
	  
	  @Override
	  protected Class<? extends ISqlStyle> getConfiguredSqlStyle() {
	    return JtdsSqlStyle.class;
	  }
}


and:

package org.eclipse.scout.rt.services.common.jdbc.style;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import org.eclipse.scout.rt.server.services.common.jdbc.style.AbstractSqlStyle;

public class JtdsSqlStyle extends AbstractSqlStyle {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6139827987362401678L;

	@Override
	public String getConcatOp() {
		return "+";
	}

	@Override
	public String getLikeWildcard() {
		return "%";
	}

	@Override
	protected int getMaxListSize() {
		return 1000;
	}

	@Override
	public boolean isLargeString(String s) {
		return (s.length() > 4000);
	}

	@Override
	public boolean isBlobEnabled() {
		return true;
	}

	@Override
	public boolean isClobEnabled() {
		return true;
	}

	@Override
	public String createDateTimeIsNow(String attribute) {
		return "TRUNC(" + attribute + ", 'MI')=TRUNC(SYSDATE, 'MI')";
	}

	@Override
	public String createDateTimeIsNotNow(String attribute) {
		return "TRUNC(" + attribute + ", 'MI')!=TRUNC(SYSDATE, 'MI')";
	}

	@Override
	public void testConnection(Connection conn) throws SQLException {
		Statement testStatement = null;
		try {
			testStatement = conn.createStatement();
			testStatement.execute("SELECT count(1) FROM dbo.sysobjects");
		} finally {
			if (testStatement != null)
				try {
					testStatement.close();
				} catch (Throwable t) {
				}
		}
	}

}



then exported the 2 packages and added the jar to classpath.
The MANIFEST file is:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Jtds125
Bundle-SymbolicName: org.eclipse.scout.rt.jdbc.jtds125;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Diogo Duarte
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: lib/jtds-1.2.5.jar
Require-Bundle: org.eclipse.scout.rt.server;bundle-version="3.7.0",
 org.eclipse.core.runtime;bundle-version="3.5.0"
Eclipse-RegisterBuddy: org.eclipse.scout.rt.server,pt.diogoduarte.wforce.server
Export-Package: net.sourceforge.jtds.jdbc,
 net.sourceforge.jtds.jdbc.cache,
 net.sourceforge.jtds.jdbcx,
 net.sourceforge.jtds.jdbcx.proxy,
 net.sourceforge.jtds.ssl,
 net.sourceforge.jtds.util,
 org.eclipse.scout.rt.services.common.jdbc,
 org.eclipse.scout.rt.services.common.jdbc.style
Bundle-Activator: org.eclipse.scout.jdbc.jtds125.Activator
Bundle-ActivationPolicy: lazy


Afterwards i opened the server package in my ScoutProject and added my plugin to the dependencies:


Require-Bundle: org.eclipse.core.runtime,
 pt.diogoduarte.wforce.shared,
 org.eclipse.scout.rt.server,
 org.eclipse.scout.http.servletfilter,
 org.eclipse.equinox.http.registry,
 org.eclipse.scout.rt.jdbc.jtds125


I created a

package pt.diogoduarte.wforce.server.services.common.sql;

import java.sql.Connection;

import org.eclipse.scout.commons.annotations.ConfigOperation;
import org.eclipse.scout.commons.annotations.Order;
import org.eclipse.scout.commons.exception.ProcessingException;
import org.eclipse.scout.rt.server.services.common.jdbc.style.ISqlStyle;
import org.eclipse.scout.rt.services.common.jdbc.AbstractJtdsSqlService;
import org.eclipse.scout.rt.services.common.jdbc.style.JtdsSqlStyle;
import org.eclipse.scout.service.IService2;

public class TesteSqlService extends AbstractJtdsSqlService implements IService2 {

  @Override
  protected String getConfiguredJdbcDriverName() {
    return "net.sourceforge.jtds.jdbc.Driver";
  }

  @Override
  protected String getConfiguredJdbcMappingName() {
    return "jdbc:jtds:sqlserver://sqlserver.scoprolumba.pt:1433/erpscopro";
  }

  @Override
  protected String getConfiguredPassword() {
    return "xxxx";
  }

  @Override
  protected Class<? extends ISqlStyle> getConfiguredSqlStyle() {
    return JtdsSqlStyle.class;
  }

  @Override
  protected String getConfiguredUsername() {
    return "sa";
  }

}


Then binded to a PageTable throw a StandardOutlineService

and a getContacts() method:

but when i run the server and client get the folowing message in the server log:


!ENTRY org.eclipse.scout.service 4 0 2012-10-21 16:23:39.045
!MESSAGE org.eclipse.scout.service.internal.ServicesExtensionManager.added(ServicesExtensionManager.java:195) register service: bundle=pt.diogoduarte.wforce.server, service=pt.diogoduarte.wforce.server.services.common.sql.TesteSqlService
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/scout/rt/services/common/jdbc/AbstractJtdsSqlService
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:632)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:607)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:568)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at org.eclipse.scout.service.internal.ServicesExtensionManager.added(ServicesExtensionManager.java:105)
at org.eclipse.scout.commons.runtime.ExtensionPointTracker.open(ExtensionPointTracker.java:112)
at org.eclipse.scout.service.internal.ServicesExtensionPointTracker.open(ServicesExtensionPointTracker.java:32)
at org.eclipse.scout.service.internal.ServicesExtensionManager.start(ServicesExtensionManager.java:82)
at org.eclipse.scout.service.internal.Activator$1$1.run(Activator.java:63)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.ClassNotFoundException: org.eclipse.scout.rt.services.common.jdbc.AbstractJtdsSqlService
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 24 more

!ENTRY org.eclipse.scout.rt.shared 4 0 2012-10-21 16:23:39.453
!MESSAGE org.eclipse.scout.rt.shared.services.common.exceptionhandler.LogExceptionHandlerService.differentiatedLog(LogExceptionHandlerService.java:76) ProcessingStatus[ERROR code=0 invoking pt.diogoduarte.wforce.shared.services.outline.IStandardOutlineService:getContacts / service: class pt.diogoduarte.wforce.server.services.outline.StandardOutlineService, operation: getContacts, args: java.lang.NullPointerException]
!STACK 0
ProcessingException[ProcessingStatus[ERROR code=0 invoking pt.diogoduarte.wforce.shared.services.outline.IStandardOutlineService:getContacts / service: class pt.diogoduarte.wforce.server.services.outline.StandardOutlineService, operation: getContacts, args: java.lang.NullPointerException]]
at org.eclipse.scout.service.ServiceUtility.invoke(ServiceUtility.java:189)
at org.eclipse.scout.rt.server.DefaultTransactionDelegate.invokeImpl(DefaultTransactionDelegate.java:218)
at org.eclipse.scout.rt.server.DefaultTransactionDelegate.invoke(DefaultTransactionDelegate.java:92)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.runServerJobTransactionWithDelegate(ServiceTunnelServlet.java:391)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.runServerJobTransaction(ServiceTunnelServlet.java:387)
at org.eclipse.scout.rt.server.ServiceTunnelServlet$RemoteServiceJob.runTransaction(ServiceTunnelServlet.java:415)
at org.eclipse.scout.rt.server.ServerJob.runTransactionWrapper(ServerJob.java:202)
at org.eclipse.scout.rt.server.ServerJob.access$0(ServerJob.java:190)
at org.eclipse.scout.rt.server.ServerJob$1.run(ServerJob.java:161)
at org.eclipse.scout.rt.server.ServerJob$1.run(ServerJob.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at org.eclipse.scout.rt.server.ServerJob.run(ServerJob.java:156)
at org.eclipse.scout.commons.job.JobEx.runNow(JobEx.java:50)
at org.eclipse.scout.rt.server.ServerJob.runNow(ServerJob.java:148)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.doPost(ServiceTunnelServlet.java:296)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.scout.http.servletfilter.HttpServletEx.access$0(HttpServletEx.java:1)
at org.eclipse.scout.http.servletfilter.HttpServletEx$1.service(HttpServletEx.java:38)
at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:44)
at org.eclipse.scout.http.servletfilter.helper.HttpAuthJaasFilter.doFilter(HttpAuthJaasFilter.java:62)
at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
at org.eclipse.scout.http.servletfilter.helper.DevelopmentAuthFilter.doFilter(DevelopmentAuthFilter.java:61)
at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter.doFilterInternal(AbstractChainableSecurityFilter.java:220)
at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter.access$0(AbstractChainableSecurityFilter.java:219)
at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter$1.run(AbstractChainableSecurityFilter.java:157)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter.doFilter(AbstractChainableSecurityFilter.java:149)
at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter.doFilter(AbstractChainableSecurityFilter.java:103)
at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
at org.eclipse.scout.http.servletfilter.ServletFilterDelegate.delegateServiceMethod(ServletFilterDelegate.java:57)
at org.eclipse.scout.http.servletfilter.HttpServletEx.service(HttpServletEx.java:35)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:384)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:350)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.eclipse.scout.rt.server.services.common.jdbc.SQL.select(SQL.java:101)
at pt.diogoduarte.wforce.server.services.outline.StandardOutlineService.getContacts(StandardOutlineService.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.scout.service.ServiceUtility.invoke(ServiceUtility.java:172)

Please help me i'm getting crazy with this error.
Re: jdbc connection bundle SqlServer Jtds Drive [message #953308 is a reply to message #952567] Mon, 22 October 2012 02:14 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 529
Registered: October 2011
Senior Member
All you have done seems correct to me...

Do you start your application with the Scout SDK?
This use *.product files, to indicates which plugin will be included at runtime.

In the server plugin with "Require-Bundle:" you indicate the bundles that are required. In the product you indicate all plugins that should be loaded at runtime (it is possible to load more).

Try to open /{{your_project}}.server/products/development/{{your_project_name}}-server-dev.product
You can use validate to see if you are loading all required bundles.
I assume you will get an error because "org.eclipse.scout.rt.jdbc.jtds125" is missing.
You can add it with add.

index.php/fa/12003/0/

If you build and export your server (production), you need to do this in your production product:
/{your_project}}.server/products/production/{your_project_name}}-server.product
Re: jdbc connection bundle SqlServer Jtds Drive [message #953466 is a reply to message #953308] Mon, 22 October 2012 05:13 Go to previous messageGo to next message
Diogo Duarte is currently offline Diogo Duarte
Messages: 5
Registered: October 2012
Junior Member
Thanks for you reply J.

I allready have that dependency placed in the dev.product. I validated as you told me and it shows no problem at all:
index.php/fa/12006/0/
Is there any other way of debuging this error?
  • Attachment: im1.png
    (Size: 248.37KB, Downloaded 1997 times)
Re: jdbc connection bundle SqlServer Jtds Drive [message #953603 is a reply to message #953466] Mon, 22 October 2012 07:37 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 529
Registered: October 2011
Senior Member
It was just a guess...

An other idea (for debugging) is to have a look at the console output when the server is started:

Here an example:

!SESSION 2012-10-22 13:32:56.962 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_21
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_CH
Framework arguments:  -product myproject.server.product
Command-line arguments:  -product myproject.server.product -data C:....../../runtime-MyProject-server-dev.product -dev file:C:....../.metadata/.plugins/org.eclipse.pde.core/MyProject-server-dev.product/dev.properties -os win32 -ws win32 -arch x86 -consoleLog

!ENTRY org.eclipse.equinox.http.jetty 4 0 2012-10-22 13:33:00.891
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.http.jetty_3.0.0.v20120522-1841 [3]" could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.jetty.http; version="[8.0.0,9.0.0)"
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.eclipse.osgi 4 0 2012-10-22 13:33:00.915
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.equinox.http.jetty_3.0.0.v20120522-1841.jar was not resolved.


Do you see OSGi BundleException??? (like the one I have reproduced here).

Re: jdbc connection bundle SqlServer Jtds Drive [message #953789 is a reply to message #953603] Mon, 22 October 2012 10:29 Go to previous messageGo to next message
Diogo Duarte is currently offline Diogo Duarte
Messages: 5
Registered: October 2012
Junior Member
I only get this:


!SESSION 2012-10-22 15:27:34.616 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_PT
Framework arguments:  -product pt.diogoduarte.wforce.server.product
Command-line arguments:  -product pt.diogoduarte.wforce.server.product -data C:\eclipse\workspaces\scout/../runtime-wforce-server-dev.product -dev file:C:/eclipse/workspaces/scout/.metadata/.plugins/org.eclipse.pde.core/wforce-server-dev.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog

!ENTRY org.eclipse.scout.service 4 0 2012-10-22 15:27:48.493
!MESSAGE org.eclipse.scout.service.internal.ServicesExtensionManager.added(ServicesExtensionManager.java:195) register service: bundle=pt.diogoduarte.wforce.server, service=pt.diogoduarte.wforce.server.services.common.sql.TesteSqlService
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/scout/rt/services/common/jdbc/AbstractJtdsSqlService
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:632)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:607)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:568)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
	at org.eclipse.scout.service.internal.ServicesExtensionManager.added(ServicesExtensionManager.java:105)
	at org.eclipse.scout.commons.runtime.ExtensionPointTracker.open(ExtensionPointTracker.java:112)
	at org.eclipse.scout.service.internal.ServicesExtensionPointTracker.open(ServicesExtensionPointTracker.java:32)
	at org.eclipse.scout.service.internal.ServicesExtensionManager.start(ServicesExtensionManager.java:82)
	at org.eclipse.scout.service.internal.Activator$1$1.run(Activator.java:63)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.ClassNotFoundException: org.eclipse.scout.rt.services.common.jdbc.AbstractJtdsSqlService
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 24 more

!ENTRY org.eclipse.scout.rt.shared 4 0 2012-10-22 15:27:49.038
!MESSAGE org.eclipse.scout.rt.shared.services.common.exceptionhandler.LogExceptionHandlerService.differentiatedLog(LogExceptionHandlerService.java:76) ProcessingStatus[ERROR code=0 invoking pt.diogoduarte.wforce.shared.services.outline.IStandardOutlineService:getContacts / service: class pt.diogoduarte.wforce.server.services.outline.StandardOutlineService, operation: getContacts, args:  java.lang.NullPointerException]
!STACK 0
ProcessingException[ProcessingStatus[ERROR code=0 invoking pt.diogoduarte.wforce.shared.services.outline.IStandardOutlineService:getContacts / service: class pt.diogoduarte.wforce.server.services.outline.StandardOutlineService, operation: getContacts, args:  java.lang.NullPointerException]]
	at org.eclipse.scout.service.ServiceUtility.invoke(ServiceUtility.java:189)
	at org.eclipse.scout.rt.server.DefaultTransactionDelegate.invokeImpl(DefaultTransactionDelegate.java:218)
	at org.eclipse.scout.rt.server.DefaultTransactionDelegate.invoke(DefaultTransactionDelegate.java:92)
	at org.eclipse.scout.rt.server.ServiceTunnelServlet.runServerJobTransactionWithDelegate(ServiceTunnelServlet.java:391)
	at org.eclipse.scout.rt.server.ServiceTunnelServlet.runServerJobTransaction(ServiceTunnelServlet.java:387)
	at org.eclipse.scout.rt.server.ServiceTunnelServlet$RemoteServiceJob.runTransaction(ServiceTunnelServlet.java:415)
	at org.eclipse.scout.rt.server.ServerJob.runTransactionWrapper(ServerJob.java:202)
	at org.eclipse.scout.rt.server.ServerJob.access$0(ServerJob.java:190)
	at org.eclipse.scout.rt.server.ServerJob$1.run(ServerJob.java:161)
	at org.eclipse.scout.rt.server.ServerJob$1.run(ServerJob.java:1)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Unknown Source)
	at org.eclipse.scout.rt.server.ServerJob.run(ServerJob.java:156)
	at org.eclipse.scout.commons.job.JobEx.runNow(JobEx.java:50)
	at org.eclipse.scout.rt.server.ServerJob.runNow(ServerJob.java:148)
	at org.eclipse.scout.rt.server.ServiceTunnelServlet.doPost(ServiceTunnelServlet.java:296)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.scout.http.servletfilter.HttpServletEx.access$0(HttpServletEx.java:1)
	at org.eclipse.scout.http.servletfilter.HttpServletEx$1.service(HttpServletEx.java:38)
	at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:44)
	at org.eclipse.scout.http.servletfilter.helper.HttpAuthJaasFilter.doFilter(HttpAuthJaasFilter.java:62)
	at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
	at org.eclipse.scout.http.servletfilter.helper.DevelopmentAuthFilter.doFilter(DevelopmentAuthFilter.java:61)
	at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
	at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter.doFilterInternal(AbstractChainableSecurityFilter.java:220)
	at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter.access$0(AbstractChainableSecurityFilter.java:219)
	at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter$1.run(AbstractChainableSecurityFilter.java:157)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Unknown Source)
	at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter.doFilter(AbstractChainableSecurityFilter.java:149)
	at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
	at org.eclipse.scout.http.servletfilter.security.AbstractChainableSecurityFilter.doFilter(AbstractChainableSecurityFilter.java:103)
	at org.eclipse.scout.http.servletfilter.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
	at org.eclipse.scout.http.servletfilter.ServletFilterDelegate.delegateServiceMethod(ServletFilterDelegate.java:57)
	at org.eclipse.scout.http.servletfilter.HttpServletEx.service(HttpServletEx.java:35)
	at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:384)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
	at org.eclipse.jetty.server.Server.handle(Server.java:350)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at org.eclipse.scout.rt.server.services.common.jdbc.SQL.select(SQL.java:101)
	at pt.diogoduarte.wforce.server.services.outline.StandardOutlineService.getContacts(StandardOutlineService.java:13)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.scout.service.ServiceUtility.invoke(ServiceUtility.java:172)
	... 62 more

Re: jdbc connection bundle SqlServer Jtds Drive [message #953794 is a reply to message #953789] Mon, 22 October 2012 10:36 Go to previous messageGo to next message
Diogo Duarte is currently offline Diogo Duarte
Messages: 5
Registered: October 2012
Junior Member
Is it possible that the bundle that i created:

org.eclipse.scout.rt.jdbc.jtds125

isn't ACTIVE when i start the server?

Dont i have to install somehow the bundle in the (ECLIPSE)OSGI container?
Or does the server bundle automaticly requests the jdbc bundle to install in the osgi container?

Re: jdbc connection bundle SqlServer Jtds Drive [message #953834 is a reply to message #953794] Mon, 22 October 2012 11:15 Go to previous messageGo to next message
Diogo Duarte is currently offline Diogo Duarte
Messages: 5
Registered: October 2012
Junior Member
Sorry for wasting your time, but some how, i had the following build.propoerties:

output.. = bin/
bin.includes = META-INF/,\
               lib/jtds-1.2.5.jar,\
               .


Missing the respective source line:

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
               lib/jtds-1.2.5.jar,\
               .


This hapens when i add the lib\jtdsXXX.jar to the classpath and at the same time the editor adds a ".".
Then i deleted the point and this action removes the specified line.

Hope this situation can help someone in the future...

Thank you.
Re: jdbc connection bundle SqlServer Jtds Drive [message #954641 is a reply to message #953834] Tue, 23 October 2012 02:12 Go to previous message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 529
Registered: October 2011
Senior Member
I am glad your plug-in is now working...

It is no problem at all to discuss a problem in the forum. There are no wrong posts in this forum. Thanks for sharing.
Previous Topic:How to set the focus on a specific field?
Next Topic:Scout SDK and Eclipse preferences
Goto Forum:
  


Current Time: Mon Apr 21 03:07:54 EDT 2014

Powered by FUDForum. Page generated in 0.03675 seconds