|
was able to get it to work. i created a cl program as follows:
ADDENVVAR ENVVAR(CLASSPATH) +
VALUE('+
/java/GPG:+
/java/GPG/SecureBlackbox.Base.jar:+
/java/GPG/SecureBlackbox.PGP.jar+
') +
LEVEL(*JOB) +
REPLACE(*YES)
ADDENVVAR ENVVAR(QIBM_RPG_JAVA_PROPERTIES) +
VALUE('-Djava.awt.headless=true;+
-Dos400.awt.native=true;') +
REPLACE(*YES)
ADDENVVAR ENVVAR(JAVA_HOME) +
VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit') +
REPLACE(*YES)
RUNJVA CLASS(Javagpg) +
PARM('/temp/NCD.CPAY')
On 10/9/16 11:58 AM, Jack Woehr wrote:
You might also do a Google for--
java.lang.J9VMInternals.verifyImpl(Native Method)
as there exists a lot of IBM dev works forum webbage related to class load
failures on WAS throwing that exception. Possibly worth reading.
On Sun, Oct 9, 2016 at 9:54 AM, Jack Woehr <jwoehr@absolute-performance.c
om>
wrote:
And then there's "Is the computer plugged in, sir?", e.g., are the read
permissions set correctly on the .jar file?
On Sun, Oct 9, 2016 at 9:52 AM, Jack Woehr <jwoehr@absolute-performance.
com> wrote:
There's a limited number of possibilities. My first response was offhand;
the second, I looked a your message more closely. Your command line
looks
perfectly sane.
It seems to me that the possibilities are limited to:
1. The .jar containing the missing class is damaged
2. The i class loader won't load the class for some weird reason
- Java version?
- Native code?
- Bad class signature?
- Bug in i jre?
etc. Possibly there is some magic here? Have you posted in the vendor's
forums?
On Sun, Oct 9, 2016 at 9:32 AM, tim <iseriesstuff@xxxxxxxxx> wrote:
yes, i tried both ways. same error.
--
On 10/9/16 12:01 AM, Jack Woehr wrote:
Have you tried inverting the classpath order, i.e:
-cp SecureBlackbox.Base.jar:SecureBlackbox.PGP.jarThis is the Java Programming on and around the IBM i (JAVA400-L)
On Sat, Oct 8, 2016 at 9:32 PM, Jack Woehr <
jwoehr@xxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Did you port the whole NetBeans project over and you are running the
NetBeans-generated ant buildfile on the i? Is it all packaged by that--
buildfile into a jar and a lib directory? Is the jar above the lib
directory? Or are you doing this by hand on the i, which means you'll
have
to set CLASSPATH before attempting to run.
On Sat, Oct 8, 2016 at 6:40 PM, tim <iseriesstuff@xxxxxxxxx> wrote:
im using an api from secure black box for GPG work. i wrote a program
toAbsolute Performance, Inc.
decrypt a file. its works fine in my pc netbean environment. when i
port it
over to my iseries, compile and try to run it im getting a class not
found
error. the class its looking for is in one of the 2 jar files that
are in
the same folder on the iseries. "SecureBlackbox.Base.TElStream" is
located in the SecureBlackbox.Base.jar.
"error"
Exception in thread "main" java.lang.NoClassDefFoundError:
SecureBlackbox.Base.TElStream
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:90)
at java.lang.J9VMInternals.initia
lize(J9VMInternals.java:167)
Caused by: java.lang.ClassNotFoundException:
SecureBlackbox.Base.TElStream
at java.net.URLClassLoader.findCl
ass(URLClassLoader.java:599)
at java.lang.ClassLoader.loadClas
sHelper(ClassLoader.java:711)
at java.lang.ClassLoader.loadClass(ClassLoader.java:679)
at sun.misc.Launcher$AppClassLoad
er.loadClass(Launcher.java:325)
at java.lang.ClassLoader.loadClass(ClassLoader.java:658)
... 3 more
"command line" used to run:
java Javagpg -cp SecureBlackbox.PGP.jar:SecureBlackbox.Base.jar
"ls" of the folder:
Javagpg$1.class
Javagpg.class
Javagpg.java
SecureBlackbox.Base.jar
SecureBlackbox.PGP.jar
compile_javagpg.sh
lib
manifest.mf
Java Code:
import SecureBlackbox.Base.SBUtils;
import SecureBlackbox.PGP.TElPGPCreateStreamEventParams;
import SecureBlackbox.PGP.TElPGPKeyring;
import SecureBlackbox.PGP.TElPGPReader;
import SecureBlackbox.PGP.TSBPGPCreateOutputStreamEvent;
import java.util.Date;
import org.freepascal.rtl.TObject;
import SecureBlackbox.Base.TElFileStream;
import SecureBlackbox.Base.TSBString;
public class Javagpg {
static String outfile;
public static void main(String[] args) {
outfile = args[0];
SBUtils.setLicenseKey("30C...6F9");
TElPGPKeyring keyring = new TElPGPKeyring();
TElPGPReader pgpReader;
pgpReader = new TElPGPReader();
pgpReader.setOnCreateOutputStream(new
TSBPGPCreateOutputStreamEvent(outStreamCallback));
keyring.load("/PGPcerts/publickey.asc",
"/PGPcerts/privatekey.asc", true);
pgpReader.setDecryptingKeys(keyring);
pgpReader.setVerifyingKeys(keyring);
TSBString a = new TSBString();
a.value = "14144t!";
pgpReader.setKeyPassphrase(a);
a.value = outfile + ".TXT";
pgpReader.setOutputFile(a);
TElFileStream inF = new TElFileStream(outfile, "rw",
true);
pgpReader.decryptAndVerify(inF, 0);
inF.Free();
System.exit(0);
}
static TSBPGPCreateOutputStreamEvent.Callback
outStreamCallback
=
new TSBPGPCreateOutputStreamEvent.Callback() {
public void tsbpgpCreateOutputStreamEventCallback(TObject
sender,
String fileName,
Date timeStamp,
TElPGPCreateStreamEventParams streamParams) {
String target = outfile + ".txt";
streamParams.Stream = new TElFileStream(target, "rw",
true);
streamParams.FreeOnFinish = true;
}
};
}
--
This is the Java Programming on and around the IBM i (JAVA400-L)
mailing
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
--
12303 Airport Way, Suite 100
Broomfield, CO 80021
NON-DISCLOSURE NOTICE: This communication including any and all
attachments is for the intended recipient(s) only and may contain
confidential and privileged information. If you are not the intended
recipient of this communication, any disclosure, copying further
distribution or use of this communication is prohibited. If you
received
this communication in error, please contact the sender and
delete/destroy
all copies of this communication immediately.
mailing
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
Absolute Performance, Inc.
12303 Airport Way, Suite 100
Broomfield, CO 80021
NON-DISCLOSURE NOTICE: This communication including any and all
attachments is for the intended recipient(s) only and may contain
confidential and privileged information. If you are not the intended
recipient of this communication, any disclosure, copying further
distribution or use of this communication is prohibited. If you
received
this communication in error, please contact the sender and
delete/destroy
all copies of this communication immediately.
--
Absolute Performance, Inc.
12303 Airport Way, Suite 100
Broomfield, CO 80021
NON-DISCLOSURE NOTICE: This communication including any and all
attachments is for the intended recipient(s) only and may contain
confidential and privileged information. If you are not the intended
recipient of this communication, any disclosure, copying further
distribution or use of this communication is prohibited. If you received
this communication in error, please contact the sender and delete/destroy
all copies of this communication immediately.
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.