Java-oracle-java encryption-decryption error.
Hi
We have a program which encrypts strings using DES and writes the encrypted to an oracle data. The code is similar to the following:
private static String encrypt(String property) throws GeneralSecurityException {
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(PASSWORD));
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
pbeCipher.init(Cipher.ENCRYPT_MODE, key, new PBEParameterSpec(SALT, 20));
return base64Encode(pbeCipher.doFinal(property.getBytes()));
This works consistently across jvms / os / hw / etc.
Unfortunately, the original version was writing it to the db as strings and now, these can't be de-crypted as oracle returns different values from the column.
I was wondering whether there was any way of retrieving these values now.
Regards
V
Edited by: user10510492 on Sep 28, 2011 1:59 PM
You need to try to find out what characterset was originally used to create the strings, this was either specified explicitly in the code, or done with the default Java encoding for your platform. Unfortunately there still is potential for loss of information which might prevent you from correctly decrypting the string (eg, bytes not in the characterset might have been converted to a questionmark, ASCII controlcodes might have been converted to something safer by your database, etc).
Similar Messages
-
Packet Encryption/Decryption error
This error message is from a site-to-site VPN router. The whole error message is like:
Aug 11 00:37:22.725 Japan: %HW_VPN-1-HPRXERR: Virtual Private Network (VPN) Module0/13: Packet Encryption/Decryption error, status=4610
Aug 11 00:39:05.192 Japan: %HW_VPN-1-HPRXERR: Virtual Private Network (VPN) Module0/13: Packet Encryption/Decryption error, status=4610
Aug 11 00:39:53.961 Japan: %HW_VPN-1-HPRXERR: Virtual Private Network (VPN) Module0/13: Packet Encryption/Decryption error, status=4610
Aug 11 00:40:55.447 Japan: %HW_VPN-1-HPRXERR: Virtual Private Network (VPN) Module0/13: Packet Encryption/Decryption error, status=4610
Does anybody see/handle this type of error before ? The explaination in the CCO for this error message does not help much. What is the 'status=4610' ? I also see the status number can be 4612 and 4613.
I also noticed the "ah_auth_failure:" in "sh cry eng accelerator statistic " increase by one each time I got this error in the syslog
Thanks in advanceXuam,
what was the fix to your problem. I am getting exact same problem.
Alphonse -
OIM encryption/decryption error
I am building a new environment by importing resources, lookup definitions, etc from an existing environment via deployment manager. Both the environments are same in s/w and h/w config:
OIM: 9.1.0.2 BP18
Weblogic: 10.3.2
Windows Server 2008 R2 64 bit
After the installation of new environment:
I have copied the .xlkeystore and .xldatabasekey from old environment to new.
Changed the password in xlconfig.xml file on new environment as plain text from old environment.
Updated the xelsysadm password in the USR table from the value old environment.
Restarted the system
Now I am able to login to OIM using the xelsysadm password from old environment.
xlconfig.xml has the new password in the encrypted format.But, now when I import a resource from old environment to new environment, I see all the values in the encrypted format both at OIM GUI as well as design Console.
In the .out logs I get the exception:
INFO,11 Apr 2012 18:11:11,790,[XELLERATE.PERFORMANCE],Query: DB: 16, LOAD: 0, TOTAL: 16
ERROR,11 Apr 2012 18:11:11,790,[XELLERATE.ACCOUNTMANAGEMENT],Class/Method: tcDefaultDBEncryptionImpl/decrypt encounter some problems: Given final block not properly padded
javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.AESCipher.engineDoFinal(DashoA13*..)
at javax.crypto.Cipher.doFinal(DashoA13*..)
at com.thortech.xl.crypto.tcDefaultDBEncryptionImpl.decrypt(Unknown Source)
at com.thortech.xl.crypto.tcCryptoUtil.decrypt(Unknown Source)
at com.thortech.xl.crypto.tcCryptoUtil.decrypt(Unknown Source)
at com.thortech.xl.dataobj.tcDataSet.decryptDataSet(Unknown Source)
at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
at com.thortech.xl.ejb.beansimpl.tcITResourceInstanceOperationsBean.getITResourceInstanceParametersData(Unknown Source)
at com.thortech.xl.ejb.beansimpl.tcITResourceInstanceOperationsBean.getITResourceInstanceParameters(Unknown Source)
at com.thortech.xl.ejb.beans.tcITResourceInstanceOperationsSession.getITResourceInstanceParameters(Unknown Source)
at com.thortech.xl.ejb.beans.tcITResourceInstanceOperationsSession_7uvp44_EOImpl.getITResourceInstanceParameters(tcITResourceInstanceOperationsSession_7uvp44_EOImpl.java:77)
at Thor.API.Operations.tcITResourceInstanceOperationsClient.getITResourceInstanceParameters(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjeWhy you copied these things from OLD environment - .xlkeystore and .xldatabasekey ?
Take backup of these files and restore your original files in new environment and restart the server. -
What is Oracle Java Class Type?
Hi,
I read a oaf coding stand document.it said that "Can not use database Java(Oracle Java Class Type)".do anyone know what is Oracle Java Class Type?
Thanks & Regards
binghaoAre you using the internal converer?
<af:inputText value="#{bindings.MyClobContent.inputValue}"
label="#{bindings.MyClobContent.hints.label}"
converter="oracle.genericDomain"
required="#{bindings.MyClobContent.hints.mandatory}"
columns="#{bindings.MyClobContent.hints.displayWidth}"
maximumLength="#{bindings.MyClobContent.hints.precision}"
shortDesc="#{bindings.MyClobContent.hints.tooltip}"
id="it2" rows="10">
<f:validator binding="#{bindings.MyClobContent.validator}"/>
</af:inputText>
If it does not work, create & use custom converters as mentioned in the above thread.
Thanks,
Navaneeth -
Encrypt/decrypt in c++ and java
Hi,
I have a problem in encryt a file using RC2 in java and decrypt in c++.
I am using the bouncycastle.org as my RC2 provider in JCE.
Here is the code in c++
void CEScoreDlg::encrypt(BYTE *pData, unsigned long dwDataSize, unsigned long *dwOutSize)
HCRYPTPROV hProv =0;
HCRYPTKEY hKey = 0;
HCRYPTHASH hHash = 0;
char *pword = "pass";
try
if(!CryptAcquireContext(&hProv, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
throw CryptError("Error during CryptAcquireContext!\n");
if(!CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash))
throw CryptError("Error during CryptCreateHash!\n");
DWORD dwPwdLength = strlen(pword);
if(!CryptHashData(hHash, (BYTE*)pword, dwPwdLength, 0))
throw CryptError("Error during CryptHashData!\n");
if(!CryptDeriveKey(hProv, CALG_RC2, hHash, 0, &hKey))
throw CryptError("Error during CryptDeriveKey!\n");
if(!CryptEncrypt(hKey, 0, TRUE, 0, pData, &dwDataSize, dwDataSize + 2 + dwPwdLength))
throw CryptError("Error during CryptEncrypt!\n");
*dwOutSize = dwDataSize;
catch(CryptError& e)
CString errmsg;
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
// Free the buffer.
errmsg.Format("%s%s", e.msg, (LPCTSTR)lpMsgBuf);
LocalFree( lpMsgBuf );
MessageBox(errmsg, "Encryption error!", MB_OK|MB_ICONSTOP);
if(hHash != 0)
CryptDestroyHash(hHash);
if(hKey != 0)
CryptDestroyKey(hKey);
if(hProv != 0)
CryptReleaseContext(hProv, 0);
}and here is my java code try to decrypt the file generated by the c++ code.
public static void decrypt (String passphrase, byte [] data) throws Exception
byte iv[] = {1,2,3,4,5,6,7,8};
byte [] dataTemp;
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(passphrase.getBytes());
SecretKeySpec RC2Key = new SecretKeySpec (md.digest(), "RC2");
Cipher cipher = Cipher.getInstance("RC2/CBC/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, RC2Key, new RC2ParameterSpec(128,iv));
CipherInputStream cis = new CipherInputStream (new FileInputStream("/test.ctm"), cipher);
StringBuffer read=new StringBuffer();
byte[] bytes=new byte[1];
while(cis.read(bytes)!=-1){
read.append(new String(bytes));
cis.close();
System.out.println("Got message From reading the file:");
System.out.println(read.toString());And it does not seems to understand each other. I am a newbie in JCE and not familiar with c++ either.
Please help, thanks
FredAnd it does not seems to understand each other.
I am
a newbie in JCE and not familiar with c++ either. Based on this you did not write the code you have presented so you should get the author of the code to debug it and you should start reading! To help the guy you could asking where the C code gets it's IV from, why RSA is involved in the C code and where CBC and PKCS5Padding are specified in the C code!
You have a long road to drive but it will be worth it in the end! -
Java encryption/decryption coding for database records
i need some help in developing a source code in java that can encrypt and decrypt database records in Oracle 9i and MYsQL.
urgent help needed!its a grade report system, where i put in the college id and a course id as the password. to retreve the grade from the database. The user IDs and grades have to be encrypted before requesting for the grades.This database stores for each student the user ID, the course ID, name and grades.The grades from the database are encrypted before being sent to the user.
-
Searching the internet for solutions to this and some discussion with Adobe.
Adobe say Photoshop does not use java so it should not be asking for a java runtime.
The question is how can I stop Photoshop asking to install java since Photoshop does not need or use Java to run?
Found various links that might be helpful:
http://apple.stackexchange.com/questions/58203/mountain-lion-with-java -7-only/58841#58841,
Work around for app that asks fo SE 6 when SE 7 is installed
Running Java Apps on OS X with Only JRE 7
How OS X determines an app needs Java,
Installing & Deinstalling Java SE 6 & SE 7, http://helpx.adobe.com/x-productkb/global/install-java-jre-mac-os.html
Adobe's Installing Java SE 6
Java Mac Security and Background to SE 6 to SE 7 Changes
Java 7 & OS X
Known Issues with Adobe Software on OS X Lion
Adobe's Installing Java SE 6However as I have Oracle Java SE 7 installed and SE 6 is deprecated and no longer supported for security reasons.
Apple is actually responsible for Java 6's security. They take Oracle's code and do whatever is needed to make it compatible with Apple's OS. Java 6 is still getting security updates from Apple. Versions 6 and 7 can also exist on the same drive. They won't interfere with each other.
Also I am assured in no uncertain terms by Chris Cox over at Adobe that Photoshop CS 5 does not use java at all and that the java error message and so called dependency is just an error on the part of Apple.
I did find a topic where Chris stated that for CS6, which I know is true. I've installed CS6 (and CC) on a newly formatted drive in Mountain Lion, and neither made any mention of requiring Java. Could have sworn CS5.5 and earlier did you Java for a few functions. Though I likely only assumed that since that version and earlier always causes a prompt to install Java if it isn't already on the drive.
So is there any way to run Photoshop with SE 7 only installed or even better with no java installed?
It doesn't really matter much if Java is installed. Java 6 should put an app in the Utilities folder by the name of Java Preferences. Open that, and you can completely disable it by undoing the check boxes.
Perhaps there is a way to make OS X stop thinking it needs java SE 6 to run Photoshop CS 5.
Apple would have to make a change to the OS itself. It's a not a user accessible setting. -
JD3-Error deploying Oracle Java Libraries
I get the following error when trying to deploy Oracle 8.1.5
JDBC, Connection Manager, and JBO Runtime libraries:
initialization complete
loading : oracle/sql/converter/CharacterConverter
creating : oracle/sql/converter/CharacterConverter
loading : oracle/jdbc/oracore/OracleTypeREF
creating : oracle/jdbc/oracore/OracleTypeREF
Error while creating class oracle/jdbc/oracore/OracleTypeREF
ORA-01031: insufficient privileges
loading : oracle/jdbc/ttc7/TTCDataSet
creating : oracle/jdbc/ttc7/TTCDataSet
Error while creating class oracle/jdbc/ttc7/TTCDataSet
ORA-01031: insufficient privileges
loading : oracle/jpub/runtime/MutableArray
creating : oracle/jpub/runtime/MutableArray
loading : oracle/sql/converter/CharacterConverterSJIS
creating : oracle/sql/converter/CharacterConverterSJIS
loading : oracle/jdbc/ttc7/TTCAdapter
creating : oracle/jdbc/ttc7/TTCAdapter
Error while creating class oracle/jdbc/ttc7/TTCAdapter
ORA-01031: insufficient privileges
nullThank you very much for your quick response.
So, then I tried to deploy my classes without including the
Oracle libraries in the advanced deploy options, and this is
what I got (I try to deploy a Java Stored Procedure which calls
Oracle Business Components for Java. It's working all fine
locally in a Java VM, but now I want to access that remotely
through a Java Stored Procedure):
*** Executing deployment profile C:\Program
Files\Oracle\JDeveloper 3.0\myprojects\SPProfile1.prf ***
*** Generating archive file C:\Program Files\Oracle\JDeveloper
3.0\myclasses\SPProfile4_Untitled.jar ***
Compiling the project...done
Validating the profile...done
Initializing deployment...done
Scanning project files...done
Generating classpath dependencies...done
Generating archive entries table...done
*** Archive generation completed ***
*** Loading archive C:\Program Files\Oracle\JDeveloper 3.0
\myclasses\SPProfile4_Untitled.jar into JServer using JDBC ***
Load Java argument list:
"C:\Program Files\Oracle\JDeveloper 3.0\java\bin\javaw"
"-DPATH=C:\Program Files\Oracle\JDeveloper 3.0\bin;C:\Program
Files\Oracle\JDeveloper 3.0\java\bin"
-classpath
"C:\Program Files\Oracle\JDeveloper 3.0
\java\lib\classes.zip;C:\Program Files\Oracle\JDeveloper 3.0
\lib\jdeveloper.zip;C:\Program Files\Oracle\JDeveloper 3.0
\myclasses;C:\Program Files\Oracle\JDeveloper 3.0\lib\jdev-
rt.zip;C:\Program Files\Oracle\JDeveloper 3.0
\jdbc\lib\oracle8.1.5\classes111.zip;C:\Program
Files\Oracle\JDeveloper 3.0\lib\connectionmanager.zip;C:\Program
Files\Oracle\JDeveloper 3.0\lib\jbodatum.zip;C:\Program
Files\Oracle\JDeveloper 3.0\lib\jbomt.zip;C:\Program
Files\Oracle\JDeveloper 3.0\lib\jboremote.zip;C:\Program
Files\Oracle\JDeveloper 3.0\lib\jndi.jar;C:\Program
Files\Oracle\JDeveloper 3.0\lib\xmlparserv2.jar;C:\Program
Files\Oracle\JDeveloper 3.0\aurora\lib\aurora.zip;C:\Program
Files\Oracle\JDeveloper 3.0\lib\jboejb.jar;C:\Program
Files\Oracle\JDeveloper 3.0
\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper
3.0\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.0
\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.0
\lib\javax_ejb.zip;C:\Program Files\Oracl
\JDeveloper 3.0\java\lib\classes.zip;C:\Program
Files\Oracle\JDeveloper 3.0
\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper
3.0\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.0
\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.0
\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.0
\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.0
\jdbc\lib\oracle8.1.5\classes111.zip"
oracle.aurora.server.tools.LoadJavaMain
-user
devp/[email protected]:1521:MWAY
-thin
-verbose
-resolve
"C:\Program Files\Oracle\JDeveloper 3.0
\myclasses\SPProfile4_Untitled.jar"
AppAccelerator(tm) 1.1.8 for Java (JDK 1.1), x86 version.
Copyright (c) 1997-1998 Borland International. All Rights
Reserved.
Copyright (c) 1997-1999 Oracle Corporation. All Rights Reserved.
initialization complete
identical: package1/CommuterRegionSubscriptionViewImpl is
unchanged from previously loaded file
identical: package1/ErikProc2Lib is unchanged from previously
loaded file
identical: package1/TestReadTable2 is unchanged from previously
loaded file
identical: package1/CommuterEtakRegionImpl is unchanged from
previously loaded file
identical: package1/CommuterRegionSubscriptionImpl is unchanged
from previously loaded file
identical: package1/CommuterEtakRegionViewImpl is unchanged from
previously loaded file
identical: package1/Package1ModuleImpl is unchanged from
previously loaded file
identical: package1/ErikProc is unchanged from previously loaded
file
identical: package1/ErikProc2 is unchanged from previously
loaded file
identical: package1/CommuterRegionSubscription.xml is unchanged
from previously loaded file
identical: package1/FkCommuterEtakRegionSubAssoc.xml is
unchanged from previously loaded file
identical: package1/FkCommuterEtakRegionSubLink.xml is unchanged
from previously loaded file
identical: package1/CommuterRegionSubscriptionView.xml is
unchanged from previously loaded file
identical: META-INF/MANIFEST.MF is unchanged from previously
loaded file
identical: package1/package1.xml is unchanged from previously
loaded file
loading : connections.properties
creating : connections.properties
identical: package1/Package1Module.xml is unchanged from
previously loaded file
resolver :
resolving: package1/CommuterRegionSubscriptionViewImpl
Error while resolving class
package1/CommuterRegionSubscriptionViewImpl
ORA-29554: unhandled Java out of memory condition
package1/ErikProc2Lib is already resolved
resolving: package1/TestReadTable2
Error while resolving class package1/TestReadTable2
ORA-29554: unhandled Java out of memory condition
resolving: package1/CommuterEtakRegionImpl
Error while resolving class package1/CommuterEtakRegionImpl
ORA-29554: unhandled Java out of memory condition
resolving: package1/CommuterRegionSubscriptionImpl
Error while resolving class
package1/CommuterRegionSubscriptionImpl
ORA-29554: unhandled Java out of memory condition
resolving: package1/CommuterEtakRegionViewImpl
Error while resolving class package1/CommuterEtakRegionViewImpl
Exception java.sql.SQLException: No more data to read from
socket
initialization complete
resolving: package1/Package1ModuleImpl
Error while resolving class package1/Package1ModuleImpl
ORA-29554: unhandled Java out of memory condition
package1/ErikProc is already resolved
package1/ErikProc2 is already resolved
loadjava: 6 errors
*** Errors occurred while loading the archive into JServer ***
*** Deployment completed ***
Thank you very much for your cooperation,
Erik :-)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
JDev Team (guest) wrote:
: Erik,
: A lot of the oracle. packages already exist in the server in
the
: SYS namespace because they are used by the JDK in the server.
If
: you try to deploy them, the server thinks you
: are trying to overwrite and it won't let you. The oracle.jdbc
: and oracle.sql stuff is definitely already there. I suspect
the
: oracle.jpub stuff is there as well.
: In JDeveloper, you can see what's in the SYS namespace by
using
: the database browser. Double-click the connection you're
using
: to deploy to the database under the Connections folder. This
: will display the Database Browser. Expand the 'Database
Schemas'
: folder, SYS, then Deployed Java Classes. Under there, you'll
see
: packages such as 'com','sun', 'javax', etc. You can expand
each
: of those to see if the one you're trying to deploy already
: exists.
: In JDeveloper 2.0, you control which dependency
packages/classes
: are deployed with the 'Dependencies' page of the deployment
: profile wizard. In JDev 3.0, this information is available
from
: the 'Advanced' button on the Projects page. Make sure to
remove
: any packages from your deployment profile that already exist
in
: the SYS schema.
: Use the Preview button to make sure your deployment archive
: contains only those files you want to deploy, and not any
: additional dependencies which are already in the server.
: Laura
: Erik Mailhiot (guest) wrote:
: : I get the following error when trying to deploy Oracle 8.1.5
: : JDBC, Connection Manager, and JBO Runtime libraries:
: : initialization complete
: : loading : oracle/sql/converter/CharacterConverter
: : creating : oracle/sql/converter/CharacterConverter
: : loading : oracle/jdbc/oracore/OracleTypeREF
: : creating : oracle/jdbc/oracore/OracleTypeREF
: : Error while creating class oracle/jdbc/oracore/OracleTypeREF
: : ORA-01031: insufficient privileges
: : loading : oracle/jdbc/ttc7/TTCDataSet
: : creating : oracle/jdbc/ttc7/TTCDataSet
: : Error while creating class oracle/jdbc/ttc7/TTCDataSet
: : ORA-01031: insufficient privileges
: : loading : oracle/jpub/runtime/MutableArray
: : creating : oracle/jpub/runtime/MutableArray
: : loading : oracle/sql/converter/CharacterConverterSJIS
: : creating : oracle/sql/converter/CharacterConverterSJIS
: : loading : oracle/jdbc/ttc7/TTCAdapter
: : creating : oracle/jdbc/ttc7/TTCAdapter
: : Error while creating class oracle/jdbc/ttc7/TTCAdapter
: : ORA-01031: insufficient privileges
null -
Generic oracle eway code generation error in Java caps 5.1.3
Hi,
I'm using an oracle eway for adding records to a table. I have a prepared statement in the otd. When I try to build the project I'm getting the following error. Could any one let me know how this problem can be fixed?
com.stc.codegen.framework.model.CodeGenException: Generic Oracle eway code generation error(ERROR_CODEGEN_GENERIC_CODELET_GENERAL)
at com.stc.oracle.codegen.OracleEWayCodeletFactory$OracleEWayCodelet.generateFiles(OracleEWayCodeletFactory.java:1860)
at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.processCodelets(CodeGenFrameworkImpl.java:640)
at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.process(CodeGenFrameworkImpl.java:1544)
at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:405)
at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:308)
at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.traverseDeployment(DeploymentVisitorImpl.java:268)
at com.stc.codegen.driver.module.DeploymentBuildAction.loadCodeGen(DeploymentBuildAction.java:923)
at com.stc.codegen.driver.module.DeploymentBuildAction.access$1000(DeploymentBuildAction.java:174)
at com.stc.codegen.driver.module.DeploymentBuildAction$1.run(DeploymentBuildAction.java:599)
at org.openide.util.Task.run(Task.java:136)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
Caused by: com.stc.codegen.framework.model.CodeGenException: Exception when generating OTD code ...Exception: javaClass: Oracle_std_otdOTD: Exception when invoke DB Codegen Task...Exception: Invalid parameter type: Class : [Std_insert_PreapredStat] Object: [Param1] Param Type : [DECIMAL].(ERROR_CODEGEN_DB)(ERROR_CREATE_OTD)
at com.stc.oracle.codegen.OracleEWayCodeletFactory$OracleEWayCodelet.generateOtdJarFile(OracleEWayCodeletFactory.java:2045)
at com.stc.oracle.codegen.OracleEWayCodeletFactory$OracleEWayCodelet.generateFiles(OracleEWayCodeletFactory.java:1756)
... 10 more
Regards,
Abdulhi...
i too getting same problem..how did u reslove this...
please help me out...
thanks in advance
KK -
Oracle Java Compiler 11g - JVM ERROR
Hi Jdev Team,
I have an issue to report,
Sometimes when run a project and navigate through the pages, i get the following error message:
Oracle Java Compiler 11g
Unable to create an instance of the Java Virtual Machine
Located at path:
H:\jdevstudio1111\jdk\jre\bin\client\jvm.dll
The only way to solve this is delete the settings of the Jdev and the Jdev from the PC, and install again, with the associated waste of time as consecuence. Please you can give a light to resolve this issue? Thanks
Well i correct what i just said.
The problem doesn´t fix, with the erase of the jdev program folder or settings folder in windows user docs and settings. What else i can do!?, out of ideas in here.
Regards,
Leo
Message was edited by:
LCJSolution (workaround):
Re: ADF table and filtering
Pedja -
Java Mail throws Connect failed error in Oracle 11g Enterprise Edition
Hi,
I am using Oracle 11g Enterprise edition.I have a java class which is used for reading outlook 2010 inbox and download attachments from mails .For Connecting to OutLook from oracle i am using "POP3S" protocol in my java class. Which is working fine until my database is oracle-11g standard edition. Last week we are upgraded our database from oracle 11g standard edition to oracle 11g enterprise edition after that i can't connect to mail server through my java class which throws an error as follows.
DEBUG: setDebug: JavaMail version 1.4.4
DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc]
DEBUG POP3: mail.pop3s.rsetbeforequit: false
DEBUG POP3: mail.pop3s.disabletop: false
DEBUG POP3: mail.pop3s.forgettopheaders: false
DEBUG POP3: mail.pop3s.cachewriteto: false
DEBUG POP3: mail.pop3s.filecache.enable: false
DEBUG POP3: mail.pop3s.keepmessagecontent: false
DEBUG POP3: mail.pop3s.starttls.enable: true
DEBUG POP3: mail.pop3s.starttls.required: false
DEBUG POP3: mail.pop3s.apop.enable: false
DEBUG POP3: mail.pop3s.disablecapa: false
DEBUG POP3: connecting to host "194.42.133.180", port 110, isSSL true
javax.mail.MessagingException: Connect failed;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:210)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at GetNoonReport.Connect2Mailserver(GetNoonReport:338)
at GetNoonReport.ReadMail(GetNoonReport:103)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:501)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:507)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
at com.sun.mail.pop3.Protocol.<init>(Protocol.java:107)
at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:261)
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:206)
... 4 more
Is Oracle Enterprise Edition supports "POP3S" protocol?, Or Enterprise edition needs any additional configuration for establishing outlook connection with "pop3s" ?.
Any help is appreciated
Regards ,
Nisanth907833 wrote:
Hi,
I am using Oracle 11g Enterprise edition.I have a java class which is used for reading outlook 2010 inbox and download attachments from mails .For Connecting to OutLook from oracle i am using "POP3S" protocol in my java class. Which is working fine until my database is oracle-11g standard edition. Last week we are upgraded our database from oracle 11g standard edition to oracle 11g enterprise edition after that i can't connect to mail server through my java class which throws an error as follows.
I suspect root cause is with Java not Oracle.
Oracle RDBMS does NOT speak any "protocol" except SQL natively. -
Oracle Java Environment Error - Not enough java classes defined ?
I'm using 11gR1, and recently ran into a problem with Java Stored Procedures.
It was working fine last week, and then this week at runtime I started getting an error:
Error in Oracle java environment: ops1 - java.lang.Exception: Not enough java classes defined in the database. Java Stored Procedures are not installed properly.
I checked both the SYS schema and my user schema's Java classes. Neither had any invalid classes. For my user schema, the number of java classes seems right. For the SYS schema, I haven't figured out how to get past the 2000 rows fetch limit, so it will max out at 2000 - none of which are invalid.
I cleared out my user schema and re-loaded its classes, and they all compiled/validated fine.
A google search found no help...
TIA
Update (results of class count query):
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select count (*) from dba_objects where object_type like '%JAVA%';
COUNT(*)
28895
Edited by: GDub on Aug 18, 2010 2:37 PMI'm using 11gR1, and recently ran into a problem with Java Stored Procedures.
It was working fine last week, and then this week at runtime I started getting an error:
Error in Oracle java environment: ops1 - java.lang.Exception: Not enough java classes defined in the database. Java Stored Procedures are not installed properly.
I checked both the SYS schema and my user schema's Java classes. Neither had any invalid classes. For my user schema, the number of java classes seems right. For the SYS schema, I haven't figured out how to get past the 2000 rows fetch limit, so it will max out at 2000 - none of which are invalid.
I cleared out my user schema and re-loaded its classes, and they all compiled/validated fine.
A google search found no help...
TIA
Update (results of class count query):
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select count (*) from dba_objects where object_type like '%JAVA%';
COUNT(*)
28895
Edited by: GDub on Aug 18, 2010 2:37 PM -
Oracle Java proc ORA-04045: errors during recompilation/revalidation
hi,
I have Oracle Java stored proc called MERGE_ENTITY_AND_EVENT invoked by a trigger. It was working fine for a couple of weeks. Today it throws this generic exception. I'm not sure what changed.
Caused by: java.sql.SQLSyntaxErrorException: ORA-04045: errors during recompilation/revalidation of TLMDEV./3ba8073b_Log4JLogger
ORA-06512: at "MERGE_ENTITY_AND_EVENT", line 1
ORA-06512: at "QUOTE_TRIGGER", line 49
1. What is the root cause of this exception ?
2. Whats the solution ?
If you dont know 1 or 2, how would you go about debugging this problem ?
Thanks in advance.The most likely cause is that something has caused the class TLMDEV./3ba8073b_Log4JLogger to become invalid and implicit invalidation does not succeed in making it valid. In general a class must be valid in order to be run and an attempt to run an invalid class (such as because your trigger calls it) will cause an attempt to validate it and if that attempt fails an ORA-04045 can be the result. Validation of a class amounts to iterating over the set of names referenced by the class and looking for a valid class by that name, perhaps recursively attempting to validate if an invalid class by that name is found. So validation of a class may amount to an attempt to validate several classes at once. If any of them fail to be validatable, which occurs if there is no class for a given referenced name then most if not all of the classes in the set being validated and certainly the top level one will fail to validate. So if things are working correctly, the ultimate reason for the ORA-04045 will prove to be that some name referenced by TLMDEV./3ba8073b_Log4JLogger or recursived by something it references will be a name for which there is no class in the database (or more precisely in the search path used which is typically the current schema followed by PUBLIC, but could be different if some of the classes involved have had explicit resolver specifications given for them). The thing to do to try to start determining what class is missing is to do the query
select owner||'.'||name||' : '||text from all_errors where type like 'JAVA%';
The first thing to look at are lines for TLMDEV./3ba8073b_Log4JLogger. These will probably show text which contains either ORA-29534 identifying a referenced class that exists but could not be recursively valid, or ORA-29521 identifying names for which there is no class. The latter are the ultimately interesting ones since the former will end up being recursively caused by them. So look at the ORA-29521s and then try to determine either why the class is missing and how to restore it or which it is now referenced when it wasn't before (which would happen if some class was changed to reference it or something that references it, recursively). -
Encrypt/decrypt AES 256, vorsalt error
Hiyas.
So I'm trying to get encrypt/decrypt to work for AES 256, with both 32byte key and 32byte IVorSalt. (Yup-new java security files v6 installed)
'IF' I 32byte key but dont use a IV at all, I get a nice looking AES 256 result. (I can tell it's AES 256 by looking the length of the encrypted string)
'IF' I use a 32byte key and 16bit salt, I get a AES 128 result (I know- as per docs theyre both s'posed to the same size, but the docs are wrong).
But when i switch to using both a 32byte key AND a 32byte salt I get the error below.
An error occurred while trying to encrypt or decrypt your input string: Bad parameters: invalid IvParameterSpec: com.rsa.jsafe.crypto.JSAFE_IVException: Invalid IV length. Should be 16.
Has anyone 'EVER' gotten encrypt to work for them using AES 256 32byte key and 32byte salt? Is this a bug in CF? Or Java? Or I am doing something wrong?
<!--- ////////////////////////////////////////////////////////////////////////// Here's the Code ///////////////////////////////////////////////////////////////////////// --->
<cfset theAlgorithm = "Rijndael/CBC/PKCS5Padding" />
<cfset gKey = "hzj+1o52d9N04JRsj3vTu09Q8jcX+fNmeyQZSDlZA5w="><!--- these 2 are the same --->
<!---<cfset gKey = ToBase64(BinaryDecode("8738fed68e7677d374e0946c8f7bd3bb4f50f23717f9f3667b2419483959039c", "Hex"))>--->
<cfset theIV = BinaryDecode("7fe8585328e9ac7b7fe8585328e9ac7b7fe8585328e9ac7b7fe8585328e9ac7b","hex")>
<!---<cfset theIV128 = BinaryDecode("7fe8585328e9ac7b7fe8585328e9ac7b","hex")>--->
<cffunction name="DoEncrypt" access="public" returntype="string" hint="Fires when the application is first created.">
<cfargument name="szToEncrypt" type="string" required="true"/>
<cfset secretkey = gKey>
<cfset szReturn=encrypt(szToEncrypt, secretkey, theAlgorithm, "Base64", theIV)>
<cfreturn szReturn>
</cffunction>
<cffunction name="DoDecrypt" access="public" returntype="string" hint="Fires when the application is first created.">
<cfargument name="szToDecrypt" type="string" required="true"/>
<cfset secretkey = gKey>
<cfset szReturn=decrypt(szToDecrypt, secretkey, theAlgorithm, "Base64",theIV)>
<cfreturn szReturn>
</cffunction>
<cfset szStart = form["toencrypt"]>
<cfset szStart = "Test me!">
<cfset szEnc = DoEncrypt(szStart)>
<cfset szDec = DoDecrypt(szEnc)>
<cfoutput>#szEnc# #szDec#</cfoutput>Hi edevmachine,
This Bouncy Castle Encryption CFC supports Rijndael w/ 256-bit block size. (big thanks to Jason here and all who helped w/ that, btw!)
Example:
<cfscript>
BouncyCastleCFC = new path.to.BouncyCastle();
string = "ColdFusion Rocks!";
key = binaryEncode(binaryDecode(generateSecretKey("Rijndael", 256), "base64"), "hex");//the CFC takes hex'd key
ivSalt = binaryEncode(binaryDecode(generateSecretKey("Rijndael", 256), "base64"), "hex");//the CFC takes hex'd ivSalt
encrypted = BouncyCastleCFC.doEncrypt(string, key, ivSalt);
writeOutput(BouncyCastleCFC.doDecrypt(encrypted, key, ivSalt));
</cfscript>
Related links for anyone interested in adding 256-bit block size Rijndael support into ColdFusion:
- An explanation of how to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files into ColdFusion
- An explanation of how to install the Bouncy Castle Crypto package into ColdFusion (near bottom, under the "Installing additional security providers" heading)
- An explanation of how to connect the Bouncy Castle classes together
- Bouncy Castle's doc for the Rijndael Engine
And here is the full CFC as posted in the StackOverflow discussion:
<cfcomponent displayname="Bounce Castle Encryption Component" hint="This provides bouncy castle encryption services" output="false">
<cffunction name="createRijndaelBlockCipher" access="private">
<cfargument name="key" type="string" required="true" >
<cfargument name="ivSalt" type="string" required="true" >
<cfargument name="bEncrypt" type="boolean" required="false" default="1">
<cfargument name="blocksize" type="numeric" required="false" default=256>
<cfscript>
// Create a block cipher for Rijndael
var cryptEngine = createObject("java", "org.bouncycastle.crypto.engines.RijndaelEngine").init(arguments.blocksize);
// Create a Block Cipher in CBC mode
var blockCipher = createObject("java", "org.bouncycastle.crypto.modes.CBCBlockCipher").init(cryptEngine);
// Create Padding - Zero Byte Padding is apparently PHP compatible.
var zbPadding = CreateObject('java', 'org.bouncycastle.crypto.paddings.ZeroBytePadding').init();
// Create a JCE Cipher from the Block Cipher
var cipher = createObject("java", "org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher").init(blockCipher,zbPadding);
// Create the key params for the cipher
var binkey = binarydecode(arguments.key,"hex");
var keyParams = createObject("java", "org.bouncycastle.crypto.params.KeyParameter").init(BinKey);
var binIVSalt = Binarydecode(ivSalt,"hex");
var ivParams = createObject("java", "org.bouncycastle.crypto.params.ParametersWithIV").init(keyParams, binIVSalt);
cipher.init(javaCast("boolean",arguments.bEncrypt),ivParams);
return cipher;
</cfscript>
</cffunction>
<cffunction name="doEncrypt" access="public" returntype="string">
<cfargument name="message" type="string" required="true">
<cfargument name="key" type="string" required="true">
<cfargument name="ivSalt" type="string" required="true">
<cfscript>
var cipher = createRijndaelBlockCipher(key=arguments.key,ivSalt=arguments.ivSalt);
var byteMessage = arguments.message.getBytes();
var outArray = getByteArray(cipher.getOutputSize(arrayLen(byteMessage)));
var bufferLength = cipher.processBytes(byteMessage, 0, arrayLen(byteMessage), outArray, 0);
var cipherText = cipher.doFinal(outArray,bufferLength);
return toBase64(outArray);
</cfscript>
</cffunction>
<cffunction name="doDecrypt" access="public" returntype="string">
<cfargument name="message" type="string" required="true">
<cfargument name="key" type="string" required="true">
<cfargument name="ivSalt" type="string" required="true">
<cfscript>
var cipher = createRijndaelBlockCipher(key=arguments.key,ivSalt=arguments.ivSalt,bEncrypt=false);
var byteMessage = toBinary(arguments.message);
var outArray = getByteArray(cipher.getOutputSize(arrayLen(byteMessage)));
var bufferLength = cipher.processBytes(byteMessage, 0, arrayLen(byteMessage), outArray, 0);
var originalText = cipher.doFinal(outArray,bufferLength);
return createObject("java", "java.lang.String").init(outArray);
</cfscript>
</cffunction>
<cfscript>
function getByteArray(someLength)
byteClass = createObject("java", "java.lang.Byte").TYPE;
return createObject("java","java.lang.reflect.Array").newInstance(byteClass, someLength);
</cfscript>
</cfcomponent>
Thanks!,
-Aaron -
TRIPLEDES Encrypt/Decrypt in Oracle
We are having issues in oracle encryption/decryption.
In our web application,We receive a number as input from the user which is encrypted & encoded using DES3 in .NET.
This encrypted value is stored in the oracle database. We need to decrypt it in oracle8.1.7 to get
the original number entered by the user.
We are using the following code and facing issues.
declare
decrypted_string VARCHAR2(2048);
input_string VARCHAR2(2048);
begin
DBMS_OBFUSCATION_TOOLKIT.DES3Decrypt (input_string=> hextoraw('a403de8264ec0b60a09c6d115768aff0'),
key_string=>hextoraw('6d6f68616d6d6164616c6c616d6261647368616831323334'),
Decrypted_string=>decrypted_string);
dbms_output.PUT_LINE('vr_decrypted is:' || decrypted_string);
end;
We have taken the string 'hello ho'.
This text is encrypted and encode ni .NET in DES3 which is the input string 'a403de8264ec0b60a09c6d115768aff0'.
and the key is the encoded format of the key used to encrypt the input string.
we are not getting the decrypted value as expected. thats 'hello ho'If I understand what you are trying to accomplish correctly, a better approach might be to protect your data by encrypting the network traffic between the middle tier and the db. This would ensure the entire sqlnet exchange has been protected and not just any one piece of data. Once the data has been safely moved to the db tier, you can then use the DB Crypto package to encrypt any individual data you want stored in tables protected. Doing it this way will prevent you from having extra Forms application code and prevent you from writing your own risky security routine in Java.
Refer to the Oracle Net Services documentation for information on how to encrypt the net traffic between client and db. Remember that the "client" in this case is the middle tier Forms environment and not the end-user. Here are some helpful references:
http://docs.oracle.com/cd/B28359_01/network.111/b28530/toc.htm
http://docs.oracle.com/cd/B28359_01/network.111/b28316/toc.htm
Maybe you are looking for
-
Hi experts, I have a very strange problem. I have a query to which I am binding a value. The datatype of the value is number. Whenever I am executing the VO for the second time it is throwing ORA-01722: invalid number exception. The value that is bei
-
Reports9i Builder does not create Graph for Web Source
Hi I installed the new 9iDS and I'm trying to create a jsp page with a graph. If I create a graph in the paper layout it will run in paper layout only. After checking the web source code there is no <rw:graph ... > tag. If I try to insert the graph i
-
Intune: No licenses, user name not recognized and more errors
I've just activated our IUR from our Action Pack subscription. So, I go an Intune product key for 5 users for 1 year and set it up in the Intune Portal. So far, so good. My domain and users from Office365 have automatically transferred to Intune as w
-
My Safary 5.1.10 (os x 10.6.8) doesn't work properly
for the last 5 months its getting slower and slower, if i watch a video it will stop after a few seconds and if I open a second page it freezes. what should i do?
-
Merge datagrid cells in flex.........
Is it possible to merge Cells in datagrid..... how can i merge a row into a single cell which has 5 columns....... please help me.... thanks...............