@@ -43,7 +43,7 @@ DBChat uses Maven profiles to manage JDBC driver dependencies. This approach kee
43
43
mvn clean package
44
44
```
45
45
46
- ** Resulting JAR:** ` target/dbchat-3 .0.6 .jar ` (~ 15MB)
46
+ ** Resulting JAR:** ` target/dbchat-4 .0.0 .jar ` (~ 15MB)
47
47
48
48
#### Standard Databases Profile (` -P standard-databases ` )
49
49
** Additional drivers:**
@@ -56,7 +56,7 @@ mvn clean package
56
56
mvn clean package -P standard-databases
57
57
```
58
58
59
- ** Resulting JAR:** ` target/dbchat-3 .0.6 .jar ` (~ 25MB)
59
+ ** Resulting JAR:** ` target/dbchat-4 .0.0 .jar ` (~ 25MB)
60
60
61
61
#### Enterprise Databases Profile (` -P enterprise-databases ` )
62
62
** Additional drivers:**
@@ -69,7 +69,7 @@ mvn clean package -P standard-databases
69
69
mvn clean package -P standard-databases,enterprise-databases
70
70
```
71
71
72
- ** Resulting JAR:** ` target/dbchat-3 .0.6 .jar ` (~ 60MB)
72
+ ** Resulting JAR:** ` target/dbchat-4 .0.0 .jar ` (~ 60MB)
73
73
74
74
** Note:** Enterprise drivers require accepting additional licenses. Ensure compliance with vendor licensing terms.
75
75
@@ -85,7 +85,7 @@ mvn clean package -P standard-databases,enterprise-databases
85
85
mvn clean package -P standard-databases,cloud-analytics
86
86
```
87
87
88
- ** Resulting JAR:** ` target/dbchat-3 .0.6 .jar ` (~ 80MB)
88
+ ** Resulting JAR:** ` target/dbchat-4 .0.0 .jar ` (~ 80MB)
89
89
90
90
#### Big Data Profile (` -P big-data ` )
91
91
** Additional drivers:**
@@ -99,14 +99,14 @@ mvn clean package -P standard-databases,cloud-analytics
99
99
mvn clean package -P standard-databases,big-data
100
100
```
101
101
102
- ** Resulting JAR:** ` target/dbchat-3 .0.6 .jar ` (~ 120MB)
102
+ ** Resulting JAR:** ` target/dbchat-4 .0.0 .jar ` (~ 120MB)
103
103
104
104
#### Complete Build (All Profiles)
105
105
``` bash
106
106
mvn clean package -P standard-databases,enterprise-databases,cloud-analytics,big-data
107
107
```
108
108
109
- ** Resulting JAR:** ` target/dbchat-3 .0.6 .jar ` (~ 400MB)
109
+ ** Resulting JAR:** ` target/dbchat-4 .0.0 .jar ` (~ 400MB)
110
110
111
111
### Custom Profile Combinations
112
112
@@ -153,13 +153,13 @@ mvn clean package -P standard-databases,cloud-analytics
153
153
154
154
``` bash
155
155
# Check that the JAR file was created
156
- ls -la target/dbchat-3 .0.6 .jar
156
+ ls -la target/dbchat-4 .0.0 .jar
157
157
158
158
# Check included drivers
159
- jar tf target/dbchat-3 .0.6 .jar | grep -E " \.(jar|class)" | grep -E " (mysql|postgres|oracle)"
159
+ jar tf target/dbchat-4 .0.0 .jar | grep -E " \.(jar|class)" | grep -E " (mysql|postgres|oracle)"
160
160
161
161
# Quick test to see if it starts
162
- java -jar target/dbchat-3 .0.6 .jar
162
+ java -jar target/dbchat-4 .0.0 .jar
163
163
164
164
Ctrl-C to stop it
165
165
```
@@ -429,25 +429,25 @@ DBChat supports two transport modes for different deployment scenarios:
429
429
#### stdio Development Mode
430
430
``` bash
431
431
# Basic stdio mode
432
- java -jar target/dbchat-3 .0.6 .jar
432
+ java -jar target/dbchat-4 .0.0 .jar
433
433
434
434
# Debug mode with detailed logging
435
- java -Dlogging.level.root=DEBUG -jar target/dbchat-3 .0.6 .jar
435
+ java -Dlogging.level.root=DEBUG -jar target/dbchat-4 .0.0 .jar
436
436
437
437
# Test with manual input
438
- echo ' {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | java -jar target/dbchat-3 .0.6 .jar
438
+ echo ' {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | java -jar target/dbchat-4 .0.0 .jar
439
439
```
440
440
441
441
#### HTTP Development Mode
442
442
``` bash
443
443
# Basic HTTP mode
444
- java -jar target/dbchat-3 .0.6 .jar --http_mode=true
444
+ java -jar target/dbchat-4 .0.0 .jar --http_mode=true
445
445
446
446
# Custom port with debug logging
447
- java -Dlogging.level.root=DEBUG -jar target/dbchat-3 .0.6 .jar --http_mode=true --http_port=9090
447
+ java -Dlogging.level.root=DEBUG -jar target/dbchat-4 .0.0 .jar --http_mode=true --http_port=9090
448
448
449
449
# Production-like settings
450
- java -jar target/dbchat-3 .0.6 .jar \
450
+ java -jar target/dbchat-4 .0.0 .jar \
451
451
--http_mode=true \
452
452
--http_port=8080 \
453
453
--max_connections=50 \
@@ -508,13 +508,13 @@ HTTP_PORT=3001
508
508
#### Usage:
509
509
``` bash
510
510
# Use specific config file
511
- java -jar target/dbchat-3 .0.6 .jar --config_file=production.conf
511
+ java -jar target/dbchat-4 .0.0 .jar --config_file=production.conf
512
512
513
513
# Override specific settings
514
- java -jar target/dbchat-3 .0.6 .jar --config_file=production.conf --http_port=9090
514
+ java -jar target/dbchat-4 .0.0 .jar --config_file=production.conf --http_port=9090
515
515
516
516
# Multiple config files for different environments
517
- java -jar target/dbchat-3 .0.6 .jar --config_file=base.conf --config_file=env-specific.conf
517
+ java -jar target/dbchat-4 .0.0 .jar --config_file=base.conf --config_file=env-specific.conf
518
518
```
519
519
520
520
### Advanced Configuration Options
@@ -603,25 +603,25 @@ mvn verify -P integration-tests
603
603
#### stdio Mode Testing
604
604
``` bash
605
605
# Initialize protocol
606
- echo ' {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | java -jar target/dbchat-3 .0.6 .jar
606
+ echo ' {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | java -jar target/dbchat-4 .0.0 .jar
607
607
608
608
# Send initialized notification
609
- echo ' {"jsonrpc":"2.0","method":"notifications/initialized"}' | java -jar target/dbchat-3 .0.6 .jar
609
+ echo ' {"jsonrpc":"2.0","method":"notifications/initialized"}' | java -jar target/dbchat-4 .0.0 .jar
610
610
611
611
# List tools
612
- echo ' {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | java -jar target/dbchat-3 .0.6 .jar
612
+ echo ' {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | java -jar target/dbchat-4 .0.0 .jar
613
613
614
614
# Execute query
615
- echo ' {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"query","arguments":{"sql":"SELECT 1 as test","maxRows":1}}}' | java -jar target/dbchat-3 .0.6 .jar
615
+ echo ' {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"query","arguments":{"sql":"SELECT 1 as test","maxRows":1}}}' | java -jar target/dbchat-4 .0.0 .jar
616
616
617
617
# List resources
618
- echo ' {"jsonrpc":"2.0","id":4,"method":"resources/list","params":{}}' | java -jar target/dbchat-3 .0.6 .jar
618
+ echo ' {"jsonrpc":"2.0","id":4,"method":"resources/list","params":{}}' | java -jar target/dbchat-4 .0.0 .jar
619
619
```
620
620
621
621
#### HTTP Mode Testing
622
622
``` bash
623
623
# Start server
624
- java -jar target/dbchat-3 .0.6 .jar --http_mode=true &
624
+ java -jar target/dbchat-4 .0.0 .jar --http_mode=true &
625
625
SERVER_PID=$!
626
626
627
627
# Wait for startup
@@ -687,7 +687,7 @@ def test_stdio_mode():
687
687
}
688
688
689
689
result = subprocess.run(
690
- [" java" , " -jar" , " target/dbchat-3 .0.6 .jar" ],
690
+ [" java" , " -jar" , " target/dbchat-4 .0.0 .jar" ],
691
691
input = json.dumps(init_request),
692
692
text = True ,
693
693
capture_output = True
@@ -708,7 +708,7 @@ def test_http_mode():
708
708
709
709
# Start server
710
710
process = subprocess.Popen([
711
- " java" , " -jar" , " target/dbchat-3 .0.6 .jar" ,
711
+ " java" , " -jar" , " target/dbchat-4 .0.0 .jar" ,
712
712
" --http_mode=true" , " --http_port=8081"
713
713
])
714
714
@@ -760,13 +760,13 @@ echo "Testing DBChat build and functionality..."
760
760
# Test basic build
761
761
echo " Testing basic build..."
762
762
mvn clean package -q
763
- test -f target/dbchat-3 .0.6 .jar || (echo " Build failed" && exit 1)
763
+ test -f target/dbchat-4 .0.0 .jar || (echo " Build failed" && exit 1)
764
764
echo " ✓ Basic build successful"
765
765
766
766
# Test standard databases build
767
767
echo " Testing standard databases build..."
768
768
mvn clean package -P standard-databases -q
769
- test -f target/dbchat-3 .0.6 .jar || (echo " Standard build failed" && exit 1)
769
+ test -f target/dbchat-4 .0.0 .jar || (echo " Standard build failed" && exit 1)
770
770
echo " ✓ Standard databases build successful"
771
771
772
772
# Test enterprise databases build (if available)
780
780
# Test basic functionality
781
781
echo " Testing basic functionality..."
782
782
echo ' {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
783
- timeout 10s java -jar target/dbchat-3 .0.6 .jar > /dev/null || (echo " Functionality test failed" && exit 1)
783
+ timeout 10s java -jar target/dbchat-4 .0.0 .jar > /dev/null || (echo " Functionality test failed" && exit 1)
784
784
echo " ✓ Basic functionality test passed"
785
785
786
786
echo " All tests completed successfully!"
@@ -797,7 +797,7 @@ FROM openjdk:17-jdk-slim
797
797
WORKDIR /app
798
798
799
799
# Copy built JAR
800
- COPY target/dbchat-3 .0.6 .jar
800
+ COPY target/dbchat-4 .0.0 .jar
801
801
802
802
# Create non-root user
803
803
RUN useradd -m -u 1000 dbchat
@@ -884,7 +884,7 @@ RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
884
884
RUN useradd -m -u 1000 dbchat
885
885
886
886
# Copy JAR from build stage
887
- COPY --from=build /app/target/dbchat-3 .0.6 .jar
887
+ COPY --from=build /app/target/dbchat-4 .0.0 .jar
888
888
889
889
# Change ownership
890
890
RUN chown dbchat:dbchat dbchat.jar
@@ -1016,7 +1016,7 @@ Create separate run configurations for different profiles:
1016
1016
### Local Development Deployment
1017
1017
``` bash
1018
1018
# Quick development setup
1019
- java -jar target/dbchat-3 .0.6 .jar \
1019
+ java -jar target/dbchat-4 .0.0 .jar \
1020
1020
--config_file=dev.conf \
1021
1021
--http_mode=true \
1022
1022
--http_port=3001
@@ -1025,7 +1025,7 @@ java -jar target/dbchat-3.0.6.jar \
1025
1025
### Staging Environment Deployment
1026
1026
``` bash
1027
1027
# Staging with PostgreSQL
1028
- java -jar target/dbchat-3 .0.6 .jar \
1028
+ java -jar target/dbchat-4 .0.0 .jar \
1029
1029
--config_file=staging.conf \
1030
1030
--http_mode=true \
1031
1031
--http_port=8080 \
@@ -1046,7 +1046,7 @@ Type=simple
1046
1046
User =dbchat
1047
1047
Group =dbchat
1048
1048
WorkingDirectory =/opt/dbchat
1049
- ExecStart =/usr/bin/java -jar /opt/dbchat/dbchat-3 .0.6 .jar --config_file =/etc/dbchat/production.conf
1049
+ ExecStart =/usr/bin/java -jar /opt/dbchat/dbchat-4 .0.0 .jar --config_file =/etc/dbchat/production.conf
1050
1050
Restart =always
1051
1051
RestartSec =10
1052
1052
StandardOutput =journal
@@ -1077,7 +1077,7 @@ sudo mkdir -p /etc/dbchat
1077
1077
sudo mkdir -p /var/log/dbchat
1078
1078
1079
1079
# Copy files
1080
- sudo cp target/dbchat-3 .0.6 .jar /opt/dbchat/
1080
+ sudo cp target/dbchat-4 .0.0 .jar /opt/dbchat/
1081
1081
sudo cp production.conf /etc/dbchat/
1082
1082
sudo cp dbchat.service /etc/systemd/system/
1083
1083
@@ -1191,10 +1191,10 @@ mvn clean install -U
1191
1191
#### JDBC Driver Issues
1192
1192
``` bash
1193
1193
# Verify driver in JAR
1194
- jar tf target/dbchat-3 .0.6 .jar | grep -E " (mysql|postgres|oracle)"
1194
+ jar tf target/dbchat-4 .0.0 .jar | grep -E " (mysql|postgres|oracle)"
1195
1195
1196
1196
# Test driver loading
1197
- java -cp target/dbchat-3 .0.6 .jar -e " Class.forName('com.mysql.cj.jdbc.Driver')"
1197
+ java -cp target/dbchat-4 .0.0 .jar -e " Class.forName('com.mysql.cj.jdbc.Driver')"
1198
1198
1199
1199
# Check driver versions
1200
1200
mvn dependency:list | grep -E " (mysql|postgres|oracle)"
@@ -1205,27 +1205,27 @@ mvn dependency:list | grep -E "(mysql|postgres|oracle)"
1205
1205
#### Connection Problems
1206
1206
``` bash
1207
1207
# Test database connectivity
1208
- java -cp target/dbchat-3 .0.6 .jar -e "
1208
+ java -cp target/dbchat-4 .0.0 .jar -e "
1209
1209
import java.sql.*;
1210
1210
Connection conn = DriverManager.getConnection('$DB_URL ', '$DB_USER ', '$DB_PASSWORD ');
1211
1211
System.out.println('Connection successful');
1212
1212
conn.close();
1213
1213
"
1214
1214
1215
1215
# Verify JDBC URL format
1216
- java -jar target/dbchat-3 .0.6 .jar --db_url=" $DB_URL " --help
1216
+ java -jar target/dbchat-4 .0.0 .jar --db_url=" $DB_URL " --help
1217
1217
```
1218
1218
1219
1219
#### Memory Issues
1220
1220
``` bash
1221
1221
# Monitor memory usage
1222
- java -Xmx512m -XX:+PrintGCDetails -jar target/dbchat-3 .0.6 .jar
1222
+ java -Xmx512m -XX:+PrintGCDetails -jar target/dbchat-4 .0.0 .jar
1223
1223
1224
1224
# Profile memory allocation
1225
- java -XX:+UseG1GC -XX:+PrintGCApplicationStoppedTime -jar target/dbchat-3 .0.6 .jar
1225
+ java -XX:+UseG1GC -XX:+PrintGCApplicationStoppedTime -jar target/dbchat-4 .0.0 .jar
1226
1226
1227
1227
# Enable heap dump on OOM
1228
- java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -jar target/dbchat-3 .0.6 .jar
1228
+ java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -jar target/dbchat-4 .0.0 .jar
1229
1229
```
1230
1230
1231
1231
#### Performance Debugging
@@ -1235,10 +1235,10 @@ java -Dcom.sun.management.jmxremote \
1235
1235
-Dcom.sun.management.jmxremote.port=9999 \
1236
1236
-Dcom.sun.management.jmxremote.authenticate=false \
1237
1237
-Dcom.sun.management.jmxremote.ssl=false \
1238
- -jar target/dbchat-3 .0.6 .jar
1238
+ -jar target/dbchat-4 .0.0 .jar
1239
1239
1240
1240
# Profile with async-profiler
1241
- java -jar target/dbchat-3 .0.6 .jar &
1241
+ java -jar target/dbchat-4 .0.0 .jar &
1242
1242
PID=$!
1243
1243
./profiler.sh -d 30 -f profile.html $PID
1244
1244
```
0 commit comments