Hi,
I have code on Weblogic 8 that connects to various servers via SFTP
(configuration stored in a database and using public/private keys). I
migrated it to WebLogic 10 and suddenly its stopped working.
My SFTP code is
public static void PutString(String host, int port, String user, String
destPath, String destName, String data, String privKey) throws
JSchException, SftpException
{
JSch jSch = new JSch();
final byte[] prvkey = privKey.getBytes();
final byte[] emptyPassPhrase = new byte[0]; //
Empty passphrase for now, get real passphrase from MyUserInfo
jSch.addIdentity(user, // String userName
prvkey, // byte[]
privateKey
null, // byte[]
publicKey
emptyPassPhrase // byte[]
passPhrase
);
java.util.Properties config=new
java.util.Properties();
config.put("StrictHostKeyChecking", "no");
Session session = jSch.getSession(user,host,port);
session.setConfig(config);
session.connect();
Channel channel = session.openChannel("sftp");
ChannelSftp sftp = (ChannelSftp) channel;
sftp.connect();
sftp.put(new
ByteArrayInputStream(data.getBytes()), destPath + "/" + destName);
sftp.disconnect();
session.disconnect();
}
Exception being thrown on Weblogic 10 :
java.lang.IllegalArgumentException: No Configuration was registered that
can handle the configuration named com.sun.security.jgss.krb5.initiate
at
com.bea.common.security.jdkutils.JAASConfiguration.getAppConfigurationEntry(JAASConfiguration.java:124)
at
sun.security.jgss.LoginConfigImpl.getAppConfigurationEntry(LoginConfigImpl.java:139)
at
javax.security.auth.login.LoginContext.init(LoginContext.java:243)
at
javax.security.auth.login.LoginContext.<init>(LoginContext.java:499)
at sun.security.jgss.GSSUtil.login(GSSUtil.java:244)
at
sun.security.jgss.krb5.Krb5Util.getTicket(Krb5Util.java:136)
at
sun.security.jgss.krb5.Krb5InitCredential$1.run(Krb5InitCredential.java:328)
at
sun.security.jgss.krb5.Krb5InitCredential.getTgt(Krb5InitCredential.java:325)
at
sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:128)
at
sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:106)
at
sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:172)
at
sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:209)
at
sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:195)
at
sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:162)
at
com.jcraft.jsch.jgss.GSSContextKrb5.init(GSSContextKrb5.java:129)
at
com.jcraft.jsch.UserAuthGSSAPIWithMIC.start(UserAuthGSSAPIWithMIC.java:135)
at com.jcraft.jsch.Session.connect(Session.java:419)
at com.jcraft.jsch.Session.connect(Session.java:150)
at
com.db.dbmole.utils.SFTPUtils.PutString(SFTPUtils.java:47)
I dont know what's causing this error. I don't use WebSSO or Kerberos
explicity anywhere in the code.
Any help will be appreciated. I also tried adding the following line
config.put("PreferredAuthentications", "publickey,password");
But it didnt help.
---
This communication may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this communication
in error) please notify the sender immediately and destroy this
communication. Any unauthorized copying, disclosure or distribution of the
material in this communication is strictly forbidden.
Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users