我试图通过使用从BLOB数据类型获取字符串
Blob blob = rs.getBlob(cloumnName[i]);
byte[] bdata = blob.getBytes(1, (int) blob.length());
String s = new String(bdata);
Run Code Online (Sandbox Code Playgroud)
它工作正常,但是当我要转换String到Blob并试图插入到数据库,然后什么都不插入到数据库中.我使用下面的代码将String转换为Blob:
String value = (s);
byte[] buff = value.getBytes();
Blob blob = new SerialBlob(buff);
Run Code Online (Sandbox Code Playgroud)
谁能帮我要的转换Blob,以String和String对BlobJava中?
突然发现我的Grails应用程序因导致某些插件而出错.我认为存储库已被删除或移动到某处.
BuildConfig.groovy上的代码:
log "warn"
checksums true
legacyResolve false
.....
compile ":db-reverse-engineer:0.5"
compile ":cache:1.0.1"
compile ":jaxrs:0.10"
compile ":jasper:1.8.0"
.....
Run Code Online (Sandbox Code Playgroud)
从今天起我的Grails应用程序出现错误:
Error |
Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:db-reverse-engineer:0.5
- org.grails.plugins:jaxrs:0.10
- org.grails.plugins:jasper:1.8.0
org.codehaus.groovy.grails.resolve.ResolveException: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:db-reverse-engineer:0.5
- org.grails.plugins:jaxrs:0.10
- org.grails.plugins:jasper:1.8.0
Run Code Online (Sandbox Code Playgroud)
注意:grails存储库已从maven中删除http://maven.restlet.org/org/
谁能建议我解决这些错误?提前致谢!!