java调用chmod报错的问题

代码:
String command = ''chmod 664 c:\test\str.png''
Process process =Runtime.getRuntime().exec(command);

报错:cannot run program "chmod":Createprocess error=2

2个回答

String command = ''chmod 664 c:\test\str.png''

这是因为command写错了

注意:
执行的命令必须是按照你实际操作的一样
比如要执行chmod ,你首先要打开shell吧,然后在进行输入
这个过程是一样的。
因此可以使用数组进行
比如这个windows下
String[] command = { "cmd", " dir C:\Python34" };
其中的cmd表示先打开命令行,然后执行dir
linux也一样。

记住你执行的命令有没有依托 比如 dir ,chmod等都要依靠cmd或shell
但是比如javac他就不用依托了直接存在的第三方程序

fengqingyang0325
fengqingyang0325 你说的这些在后面exec()那个方法里面都有处理了。这是直接调用外部包执行的。
3 年多之前 回复

java中的字符串应该也是有转义字符的吧?!
考虑是不是路径名"c:\test\str.png"中\t和\s被转义了呢?
改成"c:\test\src.png"试试吧。

qq_35280514
riskLoveHe 回复riskLoveHe: "c:\\\\test\\\\src.png"
3 年多之前 回复
qq_35280514
riskLoveHe \\
3 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
关于chmod报错
ie返回一个告警,Warning: chmod() [function.chmod]: Operation not permitted in /usr/local/httpd/htdocs/cbt/aaa/include/global.func.php on line 161。httpd是以daemon用户运行,aaa目录下所有文件和目录的属主属组如果改为daemon:daemon就不会返回这个告警,为什么?请教高人!另外aaa目录下的所有文件和目录的权限是777,觉得很奇怪为什么会出现这种问题。
chmod()的问题
我想把文件属性改成系统该用什么函数呢?rnchmod该文件系统就三个选项rnRemarksrnrnThe _chmod function changes the permission setting of the file specified by filename. The permission setting controls read and write access to the file. The integer expression pmode contains one or both of the following manifest constants, defined in SYS\STAT.H:rnrn_S_IWRITErnrnWriting permittedrnrn_S_IREADrnrnReading permittedrnrn_S_IREAD | _S_IWRITErnrnReading and writing permittedrnrn
java调用存储过程报错
存储过程建成功了,我在用java调用的时候又报错了。rn首先我的存储过程如下:rn[code=SQL]rncreate or replace procedure query_student rnisrnv_name varchar2(20);rnbeginrn select name into v_name from st_t_student where id=3012;rn dbms_output.put_line(v_name);rnend query_student;rn[/code]rn我的java代码如下:rn[code=Java]rnpublic void test()rn conn = JDBCUtils.getConnection("miniWeb", "miniWeb");rn try rn conn.setAutoCommit(false);rn //调用存储过程rn cstmt = conn.prepareCall("call query_student");rn rs = cstmt.executeQuery();rn while(rs.next())rn System.out.println(rs.getString("v_name"));rn rn conn.commit();rn catch (SQLException e) rn e.printStackTrace();rn try rn conn.rollback();rn catch (SQLException e1) rn e1.printStackTrace();rn rn finallyrn JDBCUtils.closeConnection(rs, pstmt, conn);rn rn rn[/code]rn我的错误信息如下:rn[code=Java]rnjava.sql.SQLException: ORA-00900: invalid SQL statementrnrn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)rn at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)rn at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)rn at oracle.jdbc.driver.T4C8Odscrarr.receive(T4C8Odscrarr.java:203)rn at oracle.jdbc.driver.T4CCallableStatement.do_describe(T4CCallableStatement.java:604)rn at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:3037)rn at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1861)rn at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1559)rn at com.sinosoft.javase.ProcedureTest.test(ProcedureTest.java:36)rn at com.sinosoft.javase.ProcedureTest.main(ProcedureTest.java:53)rnrn[/code]
java调用webservice报错
对方webservice接口是.net开发的,在网上找了个例子,测试,但是没有成功。rn下面是代码:rn[code=Java]rnprivate static String wsdlUrl = "http://tempuri.org/WebDBManage/Database/GetDataSetByYearAndMonth"; rn public static void main(String[] args) rn rn try rn Integer iYear = new Integer(2011);rn Integer iMonth = new Integer(1);rn String endPoint = "http://192.168.1.104:80/WebDBManage/Database.asmx?wsdl";rn Service service = new Service();rn rn Call call = (Call) service.createCall();rn call.setTargetEndpointAddress(endPoint);rn call.setReturnClass(java.lang.String[].class);rn call.addParameter("iYear", //设置要传递的参数 rn org.apache.axis.encoding.XMLType.XSD_INT, rn javax.xml.rpc.ParameterMode.IN);//接口的参数rn call.addParameter("iMonth", org.apache.axis.encoding.XMLType.XSD_INT, rn javax.xml.rpc.ParameterMode.IN);rn rn call.setOperationName("GetDataSetByYearAndMonth");rn call.setUseSOAPAction(true);rn call.setSOAPActionURI("http://tempuri.org/WebDBManage/Database/GetDataSetByYearAndMonth");rn Object results = (Object) call.invoke(new Object[]iYear,iMonth);rn rn catch (Exception e) rn e.printStackTrace();rn rn rn[/code]rnIP是用的对方提供的,运行后报错。rn15:59:55,546 ERROR Call:2274 - Exception:rnorg.xml.sax.SAXException: No deserializer for http://www.w3.org/2001/XMLSchemaanyTypern搜索后未找到解决办法,求解。
java调用oracle存储过程报错
try rn conn = (new Connect()).getConnect();rn rn cs = conn.prepareCall(Procedure.logIn);----在这里报错rn //System.out.println("cs");rn cs.setString(1, user);rn cs.registerOutParameter(2, Types.VARCHAR);rn cs.registerOutParameter(3, Types.VARCHAR);rn cs.registerOutParameter(4, Types.VARCHAR);rn cs.execute();rnrn错误:Caught : java.sql.SQLException: ORA-06550: 第 1 行, 第 7 列: rnPLS-00201: 必须声明标识符 'BIT_VERIFICATION_PROCE'rnORA-06550: 第 1 行, 第 7 列: rnPL/SQL: Statement ignoredrnrn存储过程如下:rnCREATE OR REPLACE PROCEDURE BIT_VERIFICATION_PROCErn(rn P_USER_ID IN BIT_USER_TABLE.USER_ID%TYPE , --用户IDrn P_USER_NAME OUT BIT_USER_TABLE.USER_NAME%TYPE,rn P_USER_PASSWORD OUT BIT_USER_TABLE.USER_PASSWORD%TYPE, --用户密码rn P_USER_ROLE OUT BIT_USER_TABLE.USER_ROLE%TYPErn)rnISrnBEGINrnrn SELECT USER_NAME,USER_PASSWORD,USER_ROLE INTO P_USER_NAME,P_USER_PASSWORD,P_USER_ROLErn FROM BIT_USER_TABLErn WHERE USER_ID = P_USER_ID ;rnrn EXCEPTION --抛出异常rn WHEN OTHERS THENrn DBMS_OUTPUT.PUT_LINE(SQLCODE || ',' || SQLERRM) ;rnrnEND ;rnrn存储过程测试可以运行,在程序中调用报错,已经为用户赋予dba权限。求大神指教。
Java调用OCX 报错
Java调用我们公司自己写的OCX中的函数时,老是报出如下错误:rnException in thread "main" com.jacob.com.ComFailException: A COM exception has been encountered:rnAt Invoke of: GetVolumernDescription: 80010105 / 服务器出现意外情况。rnrnOCX直接运行是可以的,就是Java在调用时,报错!rnrn望高人解答
chmod();
int chmod(char *filename, int mode)rn这里的mode指什么?
C#调用java的webservice时报错问题
我是这么调用的:rnUtrustSSO.IAppAccountPwdManager sso = new DocMIS.UtrustSSO.IAppAccountPwdManager(); //实例化接口rnICredentials cre = new NetworkCredential("user1", "pass1", "http://webserviceinterface.chinautrust.com.cn"); //初始化安全凭证rnsso.Credentials = cre; //设置客户端身份验证的安全凭据rnif (!sso.updateAppPassword("cs004", AppConfig.UserInfo.Create().LoginName, txbNewPwd1.Text.Trim()))rnrnrn报错信息:rn捕捉到SoapHeaderExceptionrnGetRelation Service Should be Authenticatedrn截图如下:rn[img=http://images.cnblogs.com/cnblogs_com/wf5360308/106546/r_SoapHeader_err.jpg][/img]rn
chmod -R 777 / 问题
今天用root在服务器上配置权限的时候 手抖 还有路径没按完 就直接回车了,我立马关掉XSHELL 还是没救,现在XSHELL 连不上,FTP 还能连上,大神们,还有的救么,难道只能重装?
chmod 4755的问题
如果我对/etc/passwd做了chmod 4755的操作。是不是每个用户都可以用执行passwd -d root了呢?rn如果是的话,我怎么做才能让非root用户用passwd只能操作自己的密码呢?
关于chmod +s 的问题
我写了一个shell程序a.sh,为他设置了chmod +s a.shrn已知a.sh的属主是usera,当我试图通过userb调用a.sh在usea目录下建立一个文件时,rn提示没有权限,请问,这是为什么呢?我明明设置了+s啊,a.sh应该有usera的权限啊。rn
调用dll报错的问题
1、dll封装部分rnlibrary FrontYanYin;rnusesrn ShareMem,rn SysUtils,rn Classes,rn Forms,rn uAppDcr in 'uAppDcr.pas',rn uMVC_API in 'uMVC_API.pas',rn Unit1 in 'Unit1.pas' Form1,rn Unit_Drv in 'Unit_Drv.pas',rn UnitPublicFun in 'UnitPublicFun.pas',rn UnitYYHX in 'UnitYYHX.pas',rn XmlHelper in 'XmlHelper.pas';rnrn$R *.resrnrnprocedure OpenForm;stdcall;export;rnbeginrn Form1 := TForm1.Create(Application);rn Form1.ShowModal;rnend;rnrnexportsrn OpenForm;rnrnbeginrnend.rnrn2、调用部分rnunit Unit1;rnrninterfacernrnusesrn ShareMem,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,rn Dialogs, StdCtrls;rnrntypern TForm1 = class(TForm)rn Button1: TButton;rn procedure Button1Click(Sender: TObject);rn privatern Private declarations rn publicrn Public declarations rn end;rnrnvarrn Form1: TForm1;rn hint : Cardinal;rn procedure OpenForm();stdcall;rnrnimplementationrnrnprocedure OpenForm();stdcall;External'FrontYanYin.dll';rnrn$R *.dfmrnrnprocedure TForm1.Button1Click(Sender: TObject);rnbeginrn OpenForm();rnend;rnrnend.rnrn3、报错rnrn运行的时候一切正常。rn加上ShareMem,关闭调用函数的时候报错invalid pointer operation;rn不加ShareMem,关闭时候报内存地址错误。rnrn
调用.so文件报错问题
调用.so文件后出现 FATAL EXCEPTION: Thread-6                                                                         Process: shakemoney.com.ocrdemo, PID: 18639                                            
java 调用kettle资源库报错
import org.pentaho.di.core.KettleEnvironment;rnimport org.pentaho.di.core.database.DatabaseMeta;rnimport org.pentaho.di.core.exception.KettleException;rnimport org.pentaho.di.repository.RepositoryDirectoryInterface;rnimport org.pentaho.di.repository.kdr.KettleDatabaseRepository;rnimport org.pentaho.di.repository.kdr.KettleDatabaseRepositoryMeta;rnimport org.pentaho.di.repository.Repository;rnimport org.pentaho.di.trans.Trans;rnimport org.pentaho.di.trans.TransMeta;rnrnrnpublic class test rn rn private static String transName = "test1";rnrn public static void main(String[] args) rnrn try rn //初始化kettle环境rn KettleEnvironment.init();rn //创建资源库对象,此时的对象还是一个空对象rn KettleDatabaseRepository repository = new KettleDatabaseRepository();rn //创建资源库数据库对象,类似我们在spoon里面创建资源库rn DatabaseMeta dataMeta = rn new DatabaseMeta("/","Mysql","Native","192.168.254.49","新闻信息","1521","admin","admin"); rn //资源库元对象,名称参数,id参数,描述等可以随便定义rn KettleDatabaseRepositoryMeta kettleDatabaseMeta = rn new KettleDatabaseRepositoryMeta("enfo_bi", "enfo_bi", "king description",dataMeta);rn //给资源库赋值rn repository.init(kettleDatabaseMeta);rn //连接资源库rn repository.connect("admin","admin");rn //根据变量查找到模型所在的目录对象,此步骤很重要。rn RepositoryDirectoryInterface directory = repository.findDirectory("/enfo_worker/wxj");rn //创建ktr元对象rn TransMeta transformationMeta = ((Repository) repository).loadTransformation(transName, directory, null, true, null ) ;rn //创建ktrrn Trans trans = new Trans(transformationMeta);rn //执行ktrrn trans.execute(null);rn //等待执行完毕rn trans.waitUntilFinished();rn rn if(trans.getErrors()>0)rn rn System.err.println("Transformation run Failure!");rn rn elsern rn System.out.println("Transformation run successfully!");rn rn catch (KettleException e) rn e.printStackTrace(); rn rn rn rnrnrnrnrn下面报错信息 执行到 //连接资源库 报错rnorg.pentaho.di.core.exception.KettleException: rnError connecting to the repository!rnrnError occured while trying to connect to the databasernrnError connecting to database: (using class org.gjt.mm.mysql.Driver)rnCommunications link failurernrnLast packet sent to the server was 0 ms ago.rnrnrnrn at org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryConnectionDelegate.connect(KettleDatabaseRepositoryConnectionDelegate.java:163)rn at org.pentaho.di.repository.kdr.KettleDatabaseRepository.connect(KettleDatabaseRepository.java:174)rn at org.pentaho.di.repository.kdr.KettleDatabaseRepository.connect(KettleDatabaseRepository.java:164)rn at test.main(test.java:32)rnCaused by: org.pentaho.di.core.exception.KettleDatabaseException: rnError occured while trying to connect to the databasernrnError connecting to database: (using class org.gjt.mm.mysql.Driver)rnCommunications link failurernrnLast packet sent to the server was 0 ms ago.rnrnrn at org.pentaho.di.core.database.Database.normalConnect(Database.java:374)rn at org.pentaho.di.core.database.Database.connect(Database.java:323)rn at org.pentaho.di.core.database.Database.connect(Database.java:285)rn at org.pentaho.di.core.database.Database.connect(Database.java:275)rn at org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryConnectionDelegate.connect(KettleDatabaseRepositoryConnectionDelegate.java:140)rn ... 3 morernCaused by: org.pentaho.di.core.exception.KettleDatabaseException: rnError connecting to database: (using class org.gjt.mm.mysql.Driver)rnCommunications link failurernrnLast packet sent to the server was 0 ms ago.rnrn at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:510)rn at org.pentaho.di.core.database.Database.normalConnect(Database.java:358)rn ... 7 morernCaused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnLast packet sent to the server was 0 ms ago.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2120)rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:723)rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)rn at java.sql.DriverManager.getConnection(DriverManager.java:582)rn at java.sql.DriverManager.getConnection(DriverManager.java:185)rn at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:490)rn ... 8 morernCaused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnLast packet sent to the server was 0 ms ago.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:335)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043)rn ... 20 morernCaused by: java.net.ConnectException: Connection timed out: connectrn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rn at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)rn at java.net.Socket.connect(Socket.java:519)rn at java.net.Socket.connect(Socket.java:469)rn at java.net.Socket.(Socket.java:366)rn at java.net.Socket.(Socket.java:209)rn at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)rn ... 21 morern
Jquery 调用JAVA的Webservice报错
$('#car_index').live('pageshow',function()rn var para = "arg0='2012-10-10'&arg1='2012-12-03'";rn $.ajax(rn type: "POST", //访问WebService使用Post方式请求rn contentType: "application/json;utf-8", //WebService 会返回Json类型rn url: "http://172.21.3.17:8080/wstest/TestWsPort?wsdl/getStudent", //调用WebServicern data: para,rn dataType: 'json',rn json : 'callback',rn beforeSend: function(x) x.setRequestHeader("Content-Type", "application/json; charset=utf-8"); ,rn success: function(result) //回调函数,result,返回值rn alert("size==> "+result.size());rn rn );rn);rnrn上面是我的jquery 代码,访问不到信息...rnrn
java 中调用 pdf2swf 报错
文件上传后自动转换成pdf,根据pdf文件调用pdf2swf生成swf文件rn![图片说明](https://img-ask.csdn.net/upload/201903/20/1553068239_368546.jpg)![图片说明](https://img-ask.csdn.net/upload/201903/20/1553068446_344059.jpg)rn
java调用https接口报错
调用第三方https接口,在本地测试没问题,将项目提交到测试环境怎么都掉不通,报如下错误:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilder
java调用SQL2005存储过程报错
我在java 调用SQL2005存储过程报错rnpublic String getSQL(String message_id) rn String result = " "; rn String sql = "call dbo.CRM_Select_Answer(?) "; rn Connection conn = null; rn CallableStatement cstmt = null; rn ConnectionPool pool = ConnectionPool.getInstance();rn try rn conn = conn = pool.getConnection();rn cstmt = conn.prepareCall(sql); rn cstmt.setInt(1,Integer.parseInt(message_id)); rn cstmt.execute(); rn cstmt.close(); rn pool.free(conn);rn catch(Exception e) rn System.out.println( "Exception in getSQL in SqlFunc "); rn pool.free(conn);rn e.printStackTrace(); rn rn return result; rn rnrnrn报com.microsoft.sqlserver.jdbc.SQLServerException: 已生成用于更新的 ResultSet。rn at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)rn at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)rn at com.doss.erm.util.EmployeeLoginServlet.main(EmployeeLoginServlet.java:299)rn问一下这是什么问题呀
求助,调用JAVA WEBSERVICE报错
调用JAVA开发的WEBSERVICE时报一下错误,有朋友知道如何解决?rn知道的麻烦指点一下,谢谢!rn---------------------------rnDebugger Exception Notificationrn---------------------------rnProject Project2.exe raised exception class ESOAPDomConvertError with message 'DocumentElement http://schemas.xmlsoap.org/soap/envelope/:Envelope expected, http://schemas.xmlsoap.org/wsdl/:definitions found'.rn---------------------------rnBreak Continue Help rn---------------------------rn
java调用oracle存储过程报错,求解
pl/sql代码rncreate or replace procedure sp_pr07(spbookid in number,spbookname in varchar2,sppublishhouse in varchar2) isrnbeginrninsert into book values(spbookid,spbookname,sppublishhouse);rnend;rnrnjava代码rnpackage com.sp;rnimport java.sql.*;rnrnpublic class Test2 rnrn rn public static void main(String[] args) rn rn try rn Class.forName("oracle.jdbc.driver.OracleDriver");rn Connection ct = DriverManager.getConnection("jdbc:oracle:thin:@121.197.102.20:1521:BOOKSTORE","scott","oracle");rn CallableStatement cs=ct.prepareCall("call sp_pro7(?,?,?)");rn cs.setInt(1, 10);rn cs.setString(2, "笑傲江湖");rn cs.setString(3, "人民出版社");rn cs.execute();rn cs.close();rn ct.close();rn catch (Exception e) rn e.printStackTrace(); rn rnrnrnrn报错rnjava.sql.SQLException: ORA-06550: 第 1 行, 第 7 列: rnPLS-00201: 必须声明标识符 'SP_PRO7'rnORA-06550: 第 1 行, 第 7 列: rnPL/SQL: Statement ignoredrnrn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)rn at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)rn at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)rn at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)rn at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:211)rn at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)rn at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1159)rn at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)rn at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3389)rn at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4222)rn at com.sp.Test2.main(Test2.java:16)rn
java调用delphi7的webservice报错
[b]使用myeclipse+axis2,导入wsdl文件,生成客户端测试代码:如下所示:[/b]rn java.lang.String url = "http://xxx.xxx.xxx.xxx:xxxx/hansncms/YXTService.exe/wsdl";//http://xxx.xxx.xxx.xxx:xxxx/hansncms/YXTService.exe/wsdl/IHansYXTServicern org.tempuri.IHansYXTServiceserviceStub stub =rn new org.tempuri.IHansYXTServiceserviceStub(url);//the default implementation should point to the right endpointrn rn org.tempuri.IHansYXTServiceserviceStub.ReceiveOverage request=rn (org.tempuri.IHansYXTServiceserviceStub.ReceiveOverage)getTestObject(org.tempuri.IHansYXTServiceserviceStub.ReceiveOverage.class);rn // todo Fill in the param10 herern rn request.setName("xxx"); rn request.setHospitalno("xxx");rn request.setUsername("test");rn request.setPassword("123");rn assertNotNull(stub.receiveOverage(rn request));rnrn[b]附wsdl:[/b]rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrn[b]运行测试代码后,报如下错误:[/b]rnorg.apache.axis2.AxisFault: First Element must contain the local name, Envelope , but found htmlrn at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)rn at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90)rn at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)rn at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)rn at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)rn at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)rn at org.tempuri.IHansYXTServiceserviceStub.receiveOverage(IHansYXTServiceserviceStub.java:262)rn at org.tempuri.IHansYXTServiceserviceTest.testreceiveOverage(IHansYXTServiceserviceTest.java:58)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at junit.framework.TestCase.runTest(TestCase.java:164)rn at junit.framework.TestCase.runBare(TestCase.java:130)rn at junit.framework.TestResult$1.protect(TestResult.java:106)rn at junit.framework.TestResult.runProtected(TestResult.java:124)rn at junit.framework.TestResult.run(TestResult.java:109)rn at junit.framework.TestCase.run(TestCase.java:120)rn at junit.framework.TestSuite.runTest(TestSuite.java:230)rn at junit.framework.TestSuite.run(TestSuite.java:225)rn at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)rnCaused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found htmlrn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:251)rn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:209)rn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:191)rn at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:172)rn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:156)rn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.(StAXSOAPModelBuilder.java:105)rn at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:677)rn at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:182)rn at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112)rn at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:88)rn ... 24 morernrn备注:rnwsdl url地址,输入在浏览器,可以正常访问。rn在网上查相关资料,说在测试代码中加入如下代码即可访问:rnstub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);rn可是加过后,错误仍存在。rnrn请知道的朋友,发帖解决下,不胜感激。
java调用python(jython)的报错
下载和安装可以参考下面两个网址的 网址1:http://jingyan.baidu.com/article/380abd0a76fe071d90192c24.html  网址2:http://www.cnblogs.com/sesamfox/articles/2313040.html 注意: 当我下载安装jython时,到官网下载的是最新版本2.7.0,按照网址2的教程(网上都差不
DB2 调用java自定义方法报错?
db2自定义函数如下:rn```rnCREATE OR REPLACE FUNCTION aes_decrypt(str varchar(640))rnRETURNS varchar(320)rnLANGUAGE javarnPARAMETER STYLE javarnNO SQLrnFENCED THREADSAFErnDETERMINISTICrnRETURNS NULL ON NULL INPUTrnNO EXTERNAL ACTIONrnEXTERNAL NAME 'EncryAES!aes_decrypt'rn```rnjava函数在本地可以执行成功,并且也继承了UDF。编译也是经过db2自带jdk进行编译的。rnrn执行时,错误如下:rnrnSQL4306N Java stored procedure or user-defined function rn"DB2INST1.AES_DECRYPT", specific name "SQL190225175006520" could not call Java rnmethod "aes_decrypt", signature "(Ljava/lang/String". SQLSTATE=42724rnrn感觉是function中出入参的写法有问题,麻烦大神解答一下!
Java 调用 存储 中 报错..
package com.util.jdbc;rnrnimport java.sql.CallableStatement;rnimport java.sql.Connection;rnimport java.sql.Statement;rnimport java.util.Hashtable;rnrnimport javax.naming.InitialContext;rnimport javax.sql.DataSource;rnrnpublic class GetConnectionrnrn private static Connection conn = null;rnrn rn public static void main(String[] args)rn rn Connection conn = GetConnection.getconn();rn rn rn public static Connection getconn()rn rn Connection conn = null; rnrn CallableStatement proc = null; rn rn tryrn rn Hashtable ht = new Hashtable();rnrn InitialContext ctx = new InitialContext();rnrn ht.put(ctx.PROVIDER_URL, "t3://localhost:7001");rnrn ht.put(ctx.INITIAL_CONTEXT_FACTORY,rn "weblogic.jndi.WLInitialContextFactory");rnrn ctx = new InitialContext(ht);rnrn DataSource ds = (DataSource) ctx.lookup("jdbc/local");rnrn conn = ds.getConnection();rnrn String call="call HELLO(?)";rn rn proc = conn.prepareCall(call);rnrn proc.setInt(1, 100);rn rn proc.registerOutParameter(2,java.sql.Types.FLOAT); rnrn proc.execute();rn rn float sum = proc.getFloat(2);rn rn System.out.println("sum = "+sum);rnrn rn catch (Exception e)rn rn e.printStackTrace();rn rn finallyrn rn tryrn rn if(conn != null)rn rn conn.close();rn rn if(proc != null)rn rn proc.close();rn rn rn catch(Exception e)rn rn e.printStackTrace();rn rn rn rn return conn;rn rnrnrn存储过程 rnrncreate or replace procedure hello(ab in int, cd in out int) isrnbeginrn cd := ab * 2;rnend hello;rnrnrn总报异常啊rnrnjava.lang.reflect.InvocationTargetExceptionrn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:812)rn at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)rn at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)rn at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)rn at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)rnrn高手 给 解决一下.....
Delphi调用Java的WebService报错
合作伙伴写了一些处理逻辑在WebService中,wsdl地址为:https://114.255.245.64:8080/Crm/services/clienttrade?wsdlrn 我用delphi新建一个WebService的WSDL Import,生成一个文件后,调用报错,谁能帮忙:rn 调用:rn procedure TForm1.btn2Click(Sender: TObject);rnvarrn x: THTTPRIO;rnrn InterfaceVariable: clienttradePortType;rnbeginrn X :=THTTPRio.Create(Application);rn x.HTTPWebNode.UseUTF8InHeader:=true;rn x.WSDLLocation:= 'https://114.255.245.64:8080/Crm/services/clienttrade?wsdl';rn InterfaceVariable := X as clienttradePortType;rn showmessage(InterfaceVariable.SayHello);rnend;rn报错信息有时是“证书作者不支持。。”、“Empty Document"rn郁闷。rnrn另外,在WSDL Import导入的时候,点击Next有时会出现:rn Unable to load WSDL File/Location: https://114.255.245.64:8080/Crm/services/clienttrade?wsdl. Error [灾难性故障].rn
Linux命令——chmod
http://baike.baidu.com/view/1229012.htm#2 Linux命令——chmod 命令描述 变更文件或目录的权限。在UNIX系统家族里,文件或目录权限的控制分别以读取,写入,执行3种一般权限来区分,另有3种特殊权限可供运用,再搭配拥有者与所属群组管理权限范围。您可以使用chmod指令去变更文件与目录的权限,设置方式采用文字或数字代号皆可。符号连接的...
chmod命令详解
chmod 修改文件权限  -u   文件拥有者 -g  同组成员 -o  其他用户 -x  可执行权限 -w 书写权限 -r   可读权限 + 增加权限  - 取消权限  = 赋予给定权限并取消之前的权限 使用方法   chmod  g+rw  文件名  为同组用户增加可读可写权限 wrx  可用数字代替   w = 2 r =4 x = 1 chmod g+6 文件名  ...
Chmod命令
Linux/Unix 的文件权限分三级:文件拥有者(user)、群组(group)、其他(other)。 Chmod 用来更改文件权限。 语法格式: chmod [-cfvR] [--help] [--version] mode file... 语法格式中,mode 设定权限: [ugoa...][[+-=][rwxX]...][,...] 其中: u 表...
手写chmod
在写chmod之前先补上了之前的一个遗漏知识点,“主函数的参数”,主函数是可以有参数的,之前也知道但是没有去了解过。 主函数的参数 main(int argc,char **argv)   主函数的参数大体来说有两个,也有三个的算是扩展的的吧,第一个是参数的个数(arguments counter)表示的是参数的个数比如./chmod 745 repeat.c argc就是3,分别是./chm...
chmod小记
chmod语法 chmod [选项]... 模式[,模式]... 文件... 选项 -c, --changes 类似 --verbose,但只在有更改时才显示结果 --no-preserve-root 不特殊对待根目录(默认) --preserve-root 禁止对根目录进行递归操作 -f, --silent, --quiet 去除大部份的错误信息 ...
chmod命令
chmod 命令功能:改变文件及文件夹的所属权限,支持字符标记法和数据标记法。 命令语法:chmod  【选项】【参数】 备注:
chmod使用方法
简单介绍linux chmod命令的使用方法
Linux chmod
Linx chmod 命令使用详解 教你如何使用chmod 命令 下载后评价可以免积分哦,还加一个积分,试过的……所以分数要的比较高哦~
chmod 的权限设置
今天执行sudo 的时候突然报错:sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set谷歌一下终于知道以前所忽略的一些文件权限相关的知识点。上述问题的解决方案是:如果能够以root用户登录系统那么就修改/usr/bin/sudo 的权限chmod 4755 /usr/bin/sudo如果不能就比较困难了。下面介...
有关chmod()
请问:在tc中有关于将文件的属性设置为系统或者隐藏属性,但是有没有将系统或者隐藏属性的文件设置为原来的属性的函数呢?如有,请例举一二.
chmod segmentation
大家好rn我写了个程序,编译完后生成的文件myrobot是白色的,于是我rnchmod a+x myrobotrn将myrobot的属性设置为可执行后,文件从白色变为绿色rn然后./myrobot想运行这个程序 ,可是提示segmentation fault。。。。。rn谁能帮帮我
chmod权限分配
Shell脚本编程视频培训课程,该教程涵盖Shell脚本的所有知识点。Shell Script,Shell脚本与Windows/Dos下的批处理相似,也就是用各类命令预先放入到一个文件中,方便一次性执行的一个程序文件,主要是方便管理员进行设置或者管理用的。但是它比Windows下的批处理更强大,比用其他编程程序编辑的程序效率更高,它使用了Linux/Unix下的命令。
chmod权限
1、使用命令"man 2 chmod"学习chmod函数 2、int chmod(const char *path, mode_t mode);       –参数*path:文件路径。       –参数mode:直接使用数字即可。和前面命令中chmod 777 xxx 中的777 这个参数含义类似,也可以使用文档中的         组合值。       –返回值:成功返回0,错误返回
chmod指令
chmod指令修改权限sudo chmod -R 777 ...
chmod命令..
chmod命令
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池