Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Connecting to DB?

Featured Replies

Hi guys, trying to connect to a DB in a script.  Is this possible?  Using JDBC and SQLite, here's my code.

https://pastebin.com/S8dmaiWz

 

I know the path to the DB is correct, and I know the statement is correct (in fact it's never even hitting the prepared statement because it's throwing the error when it tries to connect to the DB.

 

Ignore my horrible coding practices please

 

 

Post the error. Also I think OSBot security manager prevents you from using the connection driver. Your best bet would be to have a php script that does the database stuff and then in your script use web queries to the php page.

  • Author

Sorry, thanks for the help.

Originally, the error was this,

java.sql.SQLException: No suitable driver found for jdbc:sqlite:/home/john/Desktop/RSDB/rsdb.db

However, after adding a random line of code (new pastebin here = https://pastebin.com/zedjm2qN )

This is the new error.

java.lang.ClassNotFoundException: org.sqlite.JDBC

 

In both cases, I have ensured that the driver is in the build path so.  Is this an osbot thing or am I dumb?t

 

EDIT:

Just tried to execute a python script from inside, and I got this message

Blocked permission: ("java.io.FilePermission" "<<ALL FILES>>" "execute")

 

This leads me to believe that JDBC isn't being blocked by OSbot, which means the alternative.  That I am just dumb.

 

EDIT2:

For any kind soul who is still willing to help, most up to date code https://pastebin.com/Ne4NG3WH

To get rid of the java.lang.ClassNotFound exception, had to change from jdbc 3.16.1 to 3.15.1 or something like that

Still getting the java.sql.SQLException: No suitable driver found for jdbc:sqlite:/home/john/Desktop/RSDB/rsdb.db error though

I guess I'll have to look into the PHP that LoudPacks was suggesting but at the same time plz no

Edited by Smuds

Why is everyone insisting on using PHP?

What stops you from using HTTP requests with any other server-stack that isn't aids-riddled?

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.