How to Fix this java code?
I have this code:

    package org.DX_57.osgi.SH_27.impl;
    
    import javax.sql.DataSource;
    import java.sql.SQLException;
    
    import java.util.Properties;
    import org.DX_57.osgi.SH_27.api.SessionHandle;
    import org.osgi.framework.BundleActivator;
    import org.osgi.framework.BundleContext;
    import org.osgi.framework.Constants;
    import org.osgi.framework.Filter;
    import org.osgi.framework.ServiceReference;
    import org.osgi.util.tracker.ServiceTracker;
    
    
    public class SessionHandleApp implements BundleActivator {
        
        public static final String DSNAME = "jdbc/Oracle";
        public ServiceTracker st;
        
        @Override
        public void start(final BundleContext bc) throws Exception {
            debug("Activator started");
           
            
            Filter filter = bc.createFilter("(&" + "(" + Constants.OBJECTCLASS
    				+ "=" + DataSource.class.getName() + ")" + "(jndi-name="
    				+ DSNAME + ")" + ")");
    		st = new ServiceTracker(bc, filter, null) {
    
    			@Override
    			public Object addingService(ServiceReference reference) {
    				DataSource ds = (DataSource) bc.getService(reference);
    				try {
    				    debug(ds.getConnection().toString());
    
    				SessionHandle sh = new SessionHandleImpl();
                                    sh.ds = ds;
                                    bc.registerService(SessionHandle.class.getName(), sh, new Properties());
    
    				} catch (SQLException e) {
    				}
    
    				return super.addingService(reference);
    			}
    
    			@Override
    			public void removedService(ServiceReference reference,
    					Object service) {
    				super.removedService(reference, service);
    			}
    
    		};
    		st.open();        
            
        }
    
        public void stop(BundleContext bc) throws Exception {
            bc.ungetService(bc.getServiceReference(SessionHandle.class.getName()));
            st.close();
        }
        
        private void debug(String msg) {
    		System.out.println("JDBCTestBundleActivator: " + msg);
    	}
    }

When I try to compile the code with Netbeans this is the error that I get:

http://i39.tinypic.com/14xdw5c.png

How I can Fix this?

This is the complete source code:
http://www.2shared.com/file/bziA4e-n/SH_27.html

Best Wishes

How to Fix this java code?
===

I have this code:

    package org.DX_57.osgi.SH_27.impl;
    
    import javax.sql.DataSource;
    import java.sql.SQLException;
    
    import java.util.Properties;
    import org.DX_57.osgi.SH_27.api.SessionHandle;
    import org.osgi.framework.BundleActivator;
    import org.osgi.framework.BundleContext;
    import org.osgi.framework.Constants;
    import org.osgi.framework.Filter;
    import org.osgi.framework.ServiceReference;
    import org.osgi.util.tracker.ServiceTracker;
    
    
    public class SessionHandleApp implements BundleActivator {
        
        public static final String DSNAME = "jdbc/Oracle";
        public ServiceTracker st;
        
        @Override
        public void start(final BundleContext bc) throws Exception {
            debug("Activator started");
           
            
            Filter filter = bc.createFilter("(&" + "(" + Constants.OBJECTCLASS
    				+ "=" + DataSource.class.getName() + ")" + "(jndi-name="
    				+ DSNAME + ")" + ")");
    		st = new ServiceTracker(bc, filter, null) {
    
    			@Override
    			public Object addingService(ServiceReference reference) {
    				DataSource ds = (DataSource) bc.getService(reference);
    				try {
    				    debug(ds.getConnection().toString());
    
    				SessionHandle sh = new SessionHandleImpl();
                                    sh.ds = ds;
                                    bc.registerService(SessionHandle.class.getName(), sh, new Properties());
    
    				} catch (SQLException e) {
    				}
    
    				return super.addingService(reference);
    			}
    
    			@Override
    			public void removedService(ServiceReference reference,
    					Object service) {
    				super.removedService(reference, service);
    			}
    
    		};
    		st.open();        
            
        }
    
        public void stop(BundleContext bc) throws Exception {
            bc.ungetService(bc.getServiceReference(SessionHandle.class.getName()));
            st.close();
        }
        
        private void debug(String msg) {
    		System.out.println("JDBCTestBundleActivator: " + msg);
    	}
    }

When I try to compile the code with Netbeans this is the error that I get:

http://i39.tinypic.com/14xdw5c.png

How I can Fix this?

This is the complete source code:
http://www.2shared.com/file/bziA4e-n/SH_27.html

Best Wishes
