Java Georaster API error - wrong java version
Hi all. I've done some searching about but cannot see this question answered (or indeed asked) anywhere else so perhaps i'm the first person to encounter it.
I've got some georaster data from a customer in an Oracle DMP file which i've imported. It all checks out as being valid (using sdo_geor.validategeoraster) but i cannot view it in the Georaster Viewer tool. I wrote some java to extract a piece to a file but i get this error with the select command ...
DEBUG <10:27:51> [GeoRaster] jGeor.getRasterImage(conn,0,600, 1199, 1801, 2400 )
ERROR <10:27:51> [GeoRaster] Failed to getRasterImage() because of a GeoRasterException : -13464;GeoRaster object has float or double data type.
It can be retrieved only with Java version 1.4.1 or higher.
Java version found: 1.5
ERROR <10:27:51> [GeoRaster] stack trace is ...
DEBUG <10:27:51> [GeoRaster] 0 oracle.spatial.georaster.JGeoRaster.getColorModel(JGeoRaster.java:1276)
DEBUG <10:27:51> [GeoRaster] 1 oracle.spatial.georaster.JGeoRaster.getRasterImage(JGeoRaster.java:2568)
DEBUG <10:27:51> [GeoRaster] 2 com.espatial.ps.georaster.GeoRaster.getRenderedImage(GeoRaster.java:736)
DEBUG <10:27:51> [GeoRaster] 3 com.espatial.ps.utilities.TemplateApplicationHelper.testExport(TemplateApplicationHelper.java:294)
DEBUG <10:27:51> [GeoRaster] 4 com.espatial.ps.utilities.TemplateApplicationHelper.main(TemplateApplicationHelper.java:130)If I query the georaster I get this ...
ORCL10GR:SQL> SELECT georaster FROM intermap_iscsi.CORE_DTM g WHERE g.georaster.RASTERDATATABLE = 'CORE_DTM_RDT_01' AND g.georid = 101;
GEORASTER(RASTERTYPE, SPATIALEXTENT(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES), RASTERDATATABLE, RASTERID, METADATA)
SDO_GEORASTER(20001, SDO_GEOMETRY(2003, 8265, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(-114.87502, 35.0000208, -114.87502, 34.93
75, -114.87502, 34.8749792, -114.8125, 34.8749792, -114.74998, 34.8749792, -114.74998, 34.9375, -114.74998, 35.0000208, -114.8125, 35.0000208, -1
14.87502, 35.0000208)), 'CORE_DTM_RDT_01', 101, XMLTYPE(<georasterMetadata xmlns="http://xmlns.oracle.com/spatial/georaster">
<objectI))I'm running my java program with JDK 1.5.0_11 so that error about needing 1.4.1 or higher is odd. Is it to do with the Oracle instance needing that JDK? Anyone got any ideas?
John.
Looks like the code is explicitly checking for a specific version of Java without doing a greater than check, you'll have to trick the API
Before you call the JGeoRaster Method, call:
String temp = System.getProperty("java.specification.version");
System.setProperty( "java.specification.version", "1.4.1" );
the after call:
System.setProperty("java.specification.version", temp);
Alternatively, the JGeoRaster library that comes with 11g has a fix for this issue.
Similar Messages
-
Performance issue with Business Objects Java JRC API in CRXI R2 version
A report is developed using java JRC API in CR XI release 2. When I generate the report in the designer, it took less than 5 seconds to display the results in crystal report viewer inside the designer. But in the QA environment, when I generate the same report from the application, it takes almost 1 to 1.5 minutes to display the same results in PDF. I also noticed that if the dataset contains bigger volume of data, then the reports are taking even longer almost 15 to 20 minutes.
While generating the report from the application, I noticed that most of time is taken during the execution of the com.crystaldecisions.report.web.viewer.ReportExportControl Object method as shown in following line of code
exportControl.processHttpRequest(request, response, context, null)
We thought the delay in exporting the report to PDF might be the layout of the report and data conversion to PDF for such a bigger volume of data.
Then we investigated the issue and experimented quickly to generate the same report with same result set data from the application using XML, XSL and converted the output XSL-FO to PDF using Apache FOP (Formatting Objects Processor) implementation. The time taken to export the report to PDF is less than 6 seconds. By doing this experiment, it is proved that the issue is not with conversion of data to PDF but it is the performance problem with Business Objects Java JRC API in CR XI R2.
In this regard, I searched for the above issue in the SAP community Network Forums -> Crystal Reports and Xcelsius -> Java Development -> Crystal Reports. But I did not find any answers or solutions for this kind of issue in the forums.
Any suggestion, hint in this matter is very much appreciated.Ted, The setReportAppServer problem is resolved. Now I could able to generate the report with hardcoded values in the SQLs in just 6 seconds where as the same report was generated in CRXI R2 in 1 minute 15 seconds as mentioned in the earlier message.
But, our exisiting application passes the parameter values to the SQLs embedded in the report. For some reason the parameters are not being passed to the report and the report displays only the labels without data.
As per the crj 12 samples codes, the code is written as shown below.
1. Created ReportClient Document
2. SetReportAppServer
3. Open the report
4. Getting DatabaseController and switching the database connection at runtime
5. Then setting the parameters as detailed below
ParameteFields parameterFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
parameterFieldController.setCurrentValue("", "paramname",paramvalue);
parameterFieldController.setCurrentValue("", "paramname",paramavalue);
byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
6. Streaming the report to the browser
Why the parematers are not being passed to the report? Do I need to follow the order of setting these parameters? Did I miss any line of code for setting Params using crj 12?
Any help in this regard would be greatly appreciated. -
Using JCO error Wrong repository version = 0 encountered.
Hi Guru,
We convert our existing Java Jco program to call RFC Sender adapter and XI should forward the request to RFC receiver adapter to our ECC.
We found that when we create client connection using gwhost, gwserv and tpname which is config in RFC sender adapter.
In our Java program throw error in the step of mRepository.getFunctionTemplate.
The error is "Wrong repository version = 0 encountered.".
It seems the program can not access function template from repository.
Anyone have this experience before, please advise
Thanks you.It's working now.
For your knowledge, it seems it was something wrong inside the jrfc.jar.
The problem is not exactly the same but the solution is to apply OSS note 816491. -
How to deal with java.io.EOFException error in Java application?
Recently a java application called Jin stopped working on my iMac under 10.6.8. On startup it gives a java.io.EOFException error. When I boot from a full backup on external hard disk, the program still works fine. It has run without problem for at least two years.
This program logs onto an online chess community called ICC (see chessclub.com) using a non-http protocol.
I have tried everything I can think of to repair the problem, including:
-- Reinstalling both Jin and Java
-- Playing with Java Preferences, in particular trying both 32-bit and 64-bit versions
-- Discarding a couple .plist files associated with Java and Jin
-- Repairing permissions
-- Replacing /usr/share/java/Tools with version from backup disk (I created a Smart Folder to find files recently changes, and these were the only java files that came up
I've run out of ideas. It seems to me that some obscure Java support file has been corrupted, but I have no idea what or where.
Is it a good idea to replace the entire /Library folder from backup, or is that going to cause a problem?
I have a very bad feeling about replacing /System from backup.Please enable the following debug
CA server
/atg/epub/DeploymentServer
loggingDebug=true
/atg/deployment/DeploymentManager
loggingDebug=true
loggingThreadDebug=true
Agent Servers
/atg/epub/DeploymentAgent
loggingDebug=true
recreate and attach the full logs
++++
Thanks
Gareth
Please mark any update as "Correct Answer" or "Helpful Answer" if that update helps/answers your question, so that others can identify the Correct/helpful update between many updates. -
Java mail api error- Please Help
Hi, i have set up an smtp server on my local machine. i have given the smtp host address as 127.0.0.1
I am getting the following error though. please help me out with the problem
C:\trainee>java Emailer
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at Emailer.sendEmail(Emailer.java:151)
at Emailer.main(Emailer.java:194)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
... 5 more
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
... 6 more
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for [email protected]
... 6 moreIt's a configuration error in your smtp server.
See the JavaMail FAQ for more information. -
Complete working code for Gmail POP3 & SMTP with SSL - Java mail API
Finally, your code-hunt has come to an end!!!!
I am presenting you the complete solution (with code) to send and retrieve you mails to & from GMAIL using SMTP and POP3 with SSL & Authenticaion enabled. [Even starters & newbies like me, can easy try, test & understand - But first download & add JAR's of Java Mail API & Java Activation Framework to Netbeans Library Manager]
Download Java Mail API here
http://java.sun.com/products/javamail/
Read Java Mail FAQ's here
http://java.sun.com/products/javamail/FAQ.html
Download Java Activation Framework [JAF]
http://java.sun.com/products/javabeans/jaf/downloads/index.html
Also, The POP program retrieves the mail sent with SMTP program :) [MOST IMPORTANT & LARGELY IN DEMAND]okey.. first things first... all of your thanks goes to the following and not a s@!te to me :)
hail Java !!
hail Java mail API !!
hail Java forums !!
hail Java-tips.org !!
hail Netbeans !!
Thanks to all coders who helped me by getting the code to work in one piece.
special thanks to "bshannon" - The dude who runs this forum from 97!!I am just as happy as you will be when you execute the below code!! [my 13 hours of tweaking & code hunting has paid off!!]
Now here it is...I only present you the complete solution!!
START OF PROGRAM 1
SENDING A MAIL FROM GMAIL ACCOUNT USING SMTP [STARTTLS (SSL)] PROTOCOL OF JAVA MAIL APINote on Program 1:
1. In the code below replace USERNAME & PASSWORD with your respective GMAIL account username and its corresponding password!
2. Use the code to make your Gmail client [jsp/servlets whatever]
//Mail.java - smtp sending starttls (ssl) authentication enabled
//1.Open a new Java class in netbeans (default package of the project) and name it as "Mail.java"
//2.Copy paste the entire code below and save it.
//3.Right click on the file name in the left side panel and click "compile" then click "Run"
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class Main
String d_email = "[email protected]",
d_password = "PASSWORD",
d_host = "smtp.gmail.com",
d_port = "465",
m_to = "[email protected]",
m_subject = "Testing",
m_text = "Hey, this is the testing email.";
public Main()
Properties props = new Properties();
props.put("mail.smtp.user", d_email);
props.put("mail.smtp.host", d_host);
props.put("mail.smtp.port", d_port);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.auth", "true");
//props.put("mail.smtp.debug", "true");
props.put("mail.smtp.socketFactory.port", d_port);
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
SecurityManager security = System.getSecurityManager();
try
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getInstance(props, auth);
//session.setDebug(true);
MimeMessage msg = new MimeMessage(session);
msg.setText(m_text);
msg.setSubject(m_subject);
msg.setFrom(new InternetAddress(d_email));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
Transport.send(msg);
catch (Exception mex)
mex.printStackTrace();
public static void main(String[] args)
Main blah = new Main();
private class SMTPAuthenticator extends javax.mail.Authenticator
public PasswordAuthentication getPasswordAuthentication()
return new PasswordAuthentication(d_email, d_password);
END OF PROGRAM 1-----
START OF PROGRAM 2
RETRIVE ALL THE MAILS FROM GMAIL INBOX USING Post Office Protocol POP3 [SSL] PROTOCOL OF JAVA MAIL APINote:
1.Log into your gmail account via webmail [http://mail.google.com/]
2.Click on "settings" and select "Mail Forwarding & POP3/IMAP"
3.Select "enable POP for all mail" and "save changes"
4.In the code below replace USERNAME & PASSWORD with your respective GMAIL account username and its corresponding password!
PROGRAM 2 - PART 1 - Main.java
//1.Open a new Java class file in the default package
//2.Copy paste the below code and rename it to Mail.java
//3.Compile and execute this code.
public class Main {
/** Creates a new instance of Main */
public Main() {
* @param args the command line arguments
public static void main(String[] args) {
try {
GmailUtilities gmail = new GmailUtilities();
gmail.setUserPass("[email protected]", "PASSWORD");
gmail.connect();
gmail.openFolder("INBOX");
int totalMessages = gmail.getMessageCount();
int newMessages = gmail.getNewMessageCount();
System.out.println("Total messages = " + totalMessages);
System.out.println("New messages = " + newMessages);
System.out.println("-------------------------------");
//Uncomment the below line to print the body of the message. Remember it will eat-up your bandwidth if you have 100's of messages. //gmail.printAllMessageEnvelopes();
gmail.printAllMessages();
} catch(Exception e) {
e.printStackTrace();
System.exit(-1);
END OF PART 1
PROGRAM 2 - PART 2 - GmailUtilities.java
//1.Open a new Java class in the project (default package)
//2.Copy paste the below code
//3.Compile - Don't execute this[Run]
import com.sun.mail.pop3.POP3SSLStore;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.FetchProfile;
import javax.mail.Flags;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.Part;
import javax.mail.Session;
import javax.mail.Store;
import javax.mail.URLName;
import javax.mail.internet.ContentType;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.ParseException;
public class GmailUtilities {
private Session session = null;
private Store store = null;
private String username, password;
private Folder folder;
public GmailUtilities() {
public void setUserPass(String username, String password) {
this.username = username;
this.password = password;
public void connect() throws Exception {
String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
Properties pop3Props = new Properties();
pop3Props.setProperty("mail.pop3.socketFactory.class", SSL_FACTORY);
pop3Props.setProperty("mail.pop3.socketFactory.fallback", "false");
pop3Props.setProperty("mail.pop3.port", "995");
pop3Props.setProperty("mail.pop3.socketFactory.port", "995");
URLName url = new URLName("pop3", "pop.gmail.com", 995, "",
username, password);
session = Session.getInstance(pop3Props, null);
store = new POP3SSLStore(session, url);
store.connect();
public void openFolder(String folderName) throws Exception {
// Open the Folder
folder = store.getDefaultFolder();
folder = folder.getFolder(folderName);
if (folder == null) {
throw new Exception("Invalid folder");
// try to open read/write and if that fails try read-only
try {
folder.open(Folder.READ_WRITE);
} catch (MessagingException ex) {
folder.open(Folder.READ_ONLY);
public void closeFolder() throws Exception {
folder.close(false);
public int getMessageCount() throws Exception {
return folder.getMessageCount();
public int getNewMessageCount() throws Exception {
return folder.getNewMessageCount();
public void disconnect() throws Exception {
store.close();
public void printMessage(int messageNo) throws Exception {
System.out.println("Getting message number: " + messageNo);
Message m = null;
try {
m = folder.getMessage(messageNo);
dumpPart(m);
} catch (IndexOutOfBoundsException iex) {
System.out.println("Message number out of range");
public void printAllMessageEnvelopes() throws Exception {
// Attributes & Flags for all messages ..
Message[] msgs = folder.getMessages();
// Use a suitable FetchProfile
FetchProfile fp = new FetchProfile();
fp.add(FetchProfile.Item.ENVELOPE);
folder.fetch(msgs, fp);
for (int i = 0; i < msgs.length; i++) {
System.out.println("--------------------------");
System.out.println("MESSAGE #" + (i + 1) + ":");
dumpEnvelope(msgs);
public void printAllMessages() throws Exception {
// Attributes & Flags for all messages ..
Message[] msgs = folder.getMessages();
// Use a suitable FetchProfile
FetchProfile fp = new FetchProfile();
fp.add(FetchProfile.Item.ENVELOPE);
folder.fetch(msgs, fp);
for (int i = 0; i < msgs.length; i++) {
System.out.println("--------------------------");
System.out.println("MESSAGE #" + (i + 1) + ":");
dumpPart(msgs[i]);
public static void dumpPart(Part p) throws Exception {
if (p instanceof Message)
dumpEnvelope((Message)p);
String ct = p.getContentType();
try {
pr("CONTENT-TYPE: " + (new ContentType(ct)).toString());
} catch (ParseException pex) {
pr("BAD CONTENT-TYPE: " + ct);
* Using isMimeType to determine the content type avoids
* fetching the actual content data until we need it.
if (p.isMimeType("text/plain")) {
pr("This is plain text");
pr("---------------------------");
System.out.println((String)p.getContent());
} else {
// just a separator
pr("---------------------------");
public static void dumpEnvelope(Message m) throws Exception {
pr(" ");
Address[] a;
// FROM
if ((a = m.getFrom()) != null) {
for (int j = 0; j < a.length; j++)
pr("FROM: " + a[j].toString());
// TO
if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
for (int j = 0; j < a.length; j++) {
pr("TO: " + a[j].toString());
// SUBJECT
pr("SUBJECT: " + m.getSubject());
// DATE
Date d = m.getSentDate();
pr("SendDate: " +
(d != null ? d.toString() : "UNKNOWN"));
static String indentStr = " ";
static int level = 0;
* Print a, possibly indented, string.
public static void pr(String s) {
System.out.print(indentStr.substring(0, level * 2));
System.out.println(s);
}END OF PART 2
END OF PROGRAM 2
P.S: CHECKING !!
STEP 1.
First compile and execute the PROGRAM 1 with your USERNAME & PASSWORD. This will send a mail to your own account.
STEP 2.
Now compile both PART 1 & PART 2 of PROGRAM 2. Then, execute PART 1 - Main.java. This will retrive the mail sent in step 1. njoy! :)
In future, I hope this is added to the demo programs of the Java Mail API download package.
This is for 3 main reasons...
1. To prevent a lot of silly questions being posted on this forum [like the ones I did :(].
2. To give the first time Java Mail user with a real time working example without code modification [code has to use command line args like the demo programs - for instant results].
3. Also, this is what google has to say..
"The Gmail Team is committed to making sure you always can access your mail. That's why we're offering POP access and auto-forwarding. Both features are free for all Gmail users and we have no plans to charge for them in the future."
http://mail.google.com/support/bin/answer.py?answer=13295
I guess bshannon & Java Mail team is hearing this....
Again, Hurray and thanks for helping me make it!! cheers & no more frowned faces!!
(: (: (: (: (: GO JCODERS GO!! :) :) :) :) :)
codeace
-----Thanks for the reply,
I did checked by enabling session debuging and also checked pop settings it's enabled for all
mails, I tried deleting some very old messages and now the message count is changed to 310.
This may be the problem with gmail.
Bellow is the output i got,
DEBUG: setDebug: JavaMail version 1.4ea
DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]
DEBUG POP3: connecting to host "pop.gmail.com", port 995, isSSL false
S: +OK Gpop ready for requests from 121.243.255.240 n22pf5432603pof.2
C: USER [email protected]
S: +OK send PASS
C: PASS my_password
S: +OK Welcome.
C: STAT
S: +OK 310 26900234
Custom output: messageCount : 310
C: QUIT
S: +OK Farewell. -
Using Java mail API from JSPDynPage
Hi Experts,
I am working on a Portal Assignment that requiresto sent work flow mails on the basis of error conditions.
Can u please suggest if at all I can use Java Mail APIs from JSP page within the JSP DYN Page Framework.
If at all Java Mail can be used could u please suugest some help docs on the same.
Thanks for the help.
Manab C Ghosh
EP Consultant
Kolkata INDIA
+919830603327Hi Experts,
Thanks for all the responses to my Mail question(mailing from JSPDynPage).
I have found the solution.
Here is how I have got the things: (pls note there are other solns)
Using Java Mail APIs;
Create a Java file in the scr.core / src.api
MailSender.java
* Created on Jul 21, 2005
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
package com.mailsend.test;
import java.util.Date;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
* Edited on Jul 24, 2005
* @author Manab C Ghosh
public class MailSender {
public String sendMessage(){
String msg ="Hello mail Test";
String smtpServer ="mySMTPServer";
String smtpSender = "senderemailaddress";
String smtpRecipient="receipientemailaddress";
String stBody = msg ;
//String stDate = new Date().toString() ;
String stSubject = "Mail Test ";
Send( smtpServer, //SMTPServer
smtpSender, //Sender
smtpRecipient, //Recipient
stSubject, //Subject
stBody //Body
); //Attachments
return "Mail Success";
public static void Send(String SMTPServer,
String From,
String To,
String Subject,
String msgText1
// Error status;
int ErrorStatus = 0;
// create some properties and get the default Session
Properties props = System.getProperties();
props.put("mail.smtp.host", SMTPServer);
Session session = Session.getDefaultInstance(props, null);
try {
// create a message
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(From));
InternetAddress[] address = {new InternetAddress(To)};
msg.setRecipients(Message.RecipientType.TO, address);
msg.setSubject(Subject);
// create and fill the first message part
MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setText(msgText1);
// create the Multipart and its parts to it
Multipart mp = new MimeMultipart();
mp.addBodyPart(mbp1);
//mp.addBodyPart(mbp2);
// add the Multipart to the message
msg.setContent(mp);
// set the Date: header
msg.setSentDate(new Date());
// send the message
Transport.send(msg);
} catch (MessagingException mex) {
Call this file from the JSP page (which is set at JSPDynPage controller)
one important thing-----
Create a dir under PORTAL-INF and import the following jars-- activation.jar, mail.jar,imap.jar,smtp.jar, mailapi.jar.
This works..
Thanks once again to the Experts.
happy mailing
Manab Ghosh.
INDIA (+919830603327) -
"java.lang.NumberFormatException" error while running custom BIP report
Hi,
When we are running a custom BIP report, it is completing in ERROR at times and running Succesfully at times for the same set of parameters.
Please let us know the solution if any one faced similar kind of an issue.
Below is the log file when the program errors out:
Calling XDO Data Engine...
java.lang.NumberFormatException: For input string: "000</UIN><ACC>726030</ACC><ACC_N>Express Services - Mail and Courier</ACC_N><S_ACC_N>00000</S_ACC_N><S_ACC_NA>Default - Sub Account</S_ACC_NA><I_CO>000</I_CO><PROD>Term Life - GBL - Allocation Ind NQ NP BCLIC Direct</PROD><BAL>1126.47</BAL><A_L>9</A_L><P_ACC>GEN_EXP_POSTAGE_S</P_ACC><S_F>N</S_F><R_ID>3123</R_ID>ACC_N><S_ACC_NA>Default - Sub Account</S_ACC_NA><I_CO>000</I_CO><PROD>Annuities Dep Type - Allocation Ind NQ NP OCB</PROD><BAL>13.5</BAL><A_L>9</A_L><P_ACC>GEN_EXP_POSTAGE_S</P_ACC><S_F>N</S_F><R_ID>3124</R_ID>N><ACC>MGMT_ACCT_HIERARCHY</ACC><ACC_N/><S_ACC_N/><S_ACC_NA/><I_CO/><PROD>FPDA - Other Ind Q NP BCLIC Ind Agt</PROD><BAL>176028.27</BAL><A_L>0</A_L><P_ACC/><S_F>Y</S_F><R_ID>36</R_ID>_T>>726030</ACC><ACC_N>Express Services - Mail and Courier</ACC_N><S_ACC_N>00000</S_ACC_N><S_ACC_NA>Default - Sub Account</S_ACC_NA><I_CO>000</I_CO><PROD>Annuities Other - Allocation Ind NQ NP NON OCB</PROD><BAL>2.58</BAL><A_L>9</A_L><P_ACC>GEN_EXP_POSTAGE_S</P_ACC><S_F>N</S_F><R_ID>3127</R_ID>R_ID>3128</R_ID>S_F><R_ID>41</R_ID>ther - Allocation Ind NQ NP BCLIC Career</PROD><BAL>267.97</BAL><A_L>9</A_L><P_ACC>GEN_EXP_POSTAGE_S</P_ACC><S_F>N</S_F><R_ID>3131</R_ID>areer</PROD><BAL>53.31</BAL><A_L>9</A_L><P_ACC>GEN_EXP_POSTAGE_S</P_ACC><S_F>N</S_F><R_ID>3132</R_ID>o CV Ind NQ NP BCLIC Direct</PROD><BAL>-29963</BAL><A_L>0</A_L><P_ACC/><S_F>Y</S_F><R_ID>46</R_ID>N>Telecommunication/Online Services</ACC_N><S_ACC_N>00000</S_ACC_N><S_ACC_NA>Default - Sub Account</S_ACC_NA><I_CO>000</I_CO><PROD>Term Life - Other - Allocation Grp NQ NP BCLIC Career</PROD><BAL>.06</BAL><A_L>9</A_L><P_ACC>GEN_EXP_POSTAGE_S</P_ACC><S_F>N</S_F><R_ID>3135</R_ID>_ACC_NA><I_CO>000</I_CO><PROD>LTC - Allocation Ind Guar Ren NON OCB</PROD><BAL>22.05</BAL><A_L>9</A_L><P_ACC>GEN_EXP_POSTAGE_S</P_ACC><S_F>N</S_F><R_ID>3136</R_ID>ROD>Term Life - Other - Allocation Grp NQ NP BCLIC Career</PROD><BAL>1118.96</BAL><A_L>0</A_L><P_ACC/><S_F>Y</S_F><R_ID>51</R_ID>S_ACC_N>00000</S_ACC_N><S_ACC_NA>Default - Sub Account</S_ACC_NA><I_CO>000</I_CO><PROD>Annuities Other - Allocat"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:59)
at java.lang.Integer.parseInt(Integer.java:467)
at java.lang.Integer.parseInt(Integer.java:508)
at oracle.apps.xdo.dataengine.ScalableStringList.get(ScalableStringList.java:162)
at oracle.apps.xdo.dataengine.XMLPGEN.writeRowSetListToStream(XMLPGEN.java:1277)
at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:559)
at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:308)
at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:334)
at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:294)
at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
Oracle error 6502: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "APPS.FND_CONCURRENT", line 1331
ORA-06512: at line 1
has been detected in FND_CONCURRENT.SET_INTERIM_STATUS.+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
End of log messages from FND_FILE
Executing request completion options...
Output file size:
9662
------------- 1) PUBLISH -------------
Beginning post-processing of request 970405 on node UXEBSCMP01 at 29-SEP-2012 21:02:30.
Post-processing of request 970405 failed at 29-SEP-2012 21:02:30 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
Finished executing request completion options.
Concurrent request completed
Current system time is 29-SEP-2012 21:02:30
Thanks.If you use parameters you can try playing with them to narrow down the values on which the error occurs. Anyway, need to get the output in XML (without template) and review it. If it's not too huge, post the XML here.
-
Jdeveloper 9i beta : Bc4j : Sequence : java.lang.long error
I am using sequence to genetrate a auto number but it gives an
error of java.lang.long
Error:
path="" :java.lang.Long
javax.servlet.jsp.JspException: java.lang.Long
int oracle.jbo.html.jsp.datatags.RowTag.doStartTag()
void site1.DataEditComponent._jspService
(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void oracle.jsp.runtime.HttpJsp.service
(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void oracle.jsp.app.JspApplication.dispatchRequest
(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void oracle.jsp.JspServlet.doDispatch
(oracle.jsp.app.JspRequestContext)
void oracle.jsp.JspServlet.internalService
(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void oracle.jsp.JspServlet.service
(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service
(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.tomcat.core.ServletWrapper.doService
(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service
(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ServletWrapper.service
(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void
org.apache.tomcat.facade.RequestDispatcherImpl.doInclude
(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void
org.apache.tomcat.facade.RequestDispatcherImpl.access$1
(org.apache.tomcat.facade.RequestDispatcherImpl,
javax.servlet.ServletRequest, javax.servlet.ServletResponse)
java.lang.Object
org.apache.tomcat.facade.RequestDispatcherImpl$2.run()
java.lang.Object
java.security.AccessController.doPrivileged
(java.security.PrivilegedExceptionAction)
void
org.apache.tomcat.facade.RequestDispatcherImpl.include
(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void oracle.jsp.runtime.OraclePageContext.include
(java.lang.String)
int oracle.jbo.html.jsp.datatags.ComponentTag.doStartTag
void site1.DeptView__Edit._jspService
(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void oracle.jsp.runtime.HttpJsp.service
(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void oracle.jsp.app.JspApplication.dispatchRequest
(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void oracle.jsp.JspServlet.doDispatch
(oracle.jsp.app.JspRequestContext)
void oracle.jsp.JspServlet.internalService
(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void oracle.jsp.JspServlet.service
(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service
(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.tomcat.core.ServletWrapper.doService
(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service
(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ServletWrapper.service
(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void
org.apache.tomcat.core.ContextManager.internalService
(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.ContextManager.service
(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
void
org.apache.tomcat.service.http.HttpConnectionHandler.processConne
ction(org.apache.tomcat.service.TcpConnection, java.lang.Object
void org.apache.tomcat.service.TcpWorkerThread.runIt
(java.lang.Object[])
void
org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run()
path="" :java.lang.Long
Code I have used :
SequenceImpl s = new SequenceImpl("deptsequence",getDBTransaction
Integer next = (Integer)s.getData();
int i = next.intValue();
setDeptno(new Number(i));
This error does not happen if i use a hard coded value
eg:
setDeptno(new Number(10));
this code works fineHi Manoj,
In Jdeveloper 9i, sequence.next() is not castable to an Integer.
Try casting it to a Long (Long has an intValue() function as
well).
Hope this helps,
Avrom -
Error via ODBC: wrong dll version (check: SQLTCPx.dll)
Hi,
after system, MAXDB 7.06.03 & database studio installation on new server my application reports error: wrong dll version (check: SQLTCPx.dll)
On previous server connection via ODBC was ok.
I have checked all available ODBC Drivers (MAXDB, SAPDB, SAPDB 7.4) and it does nothing.
Connection via .net driver (without ODBC) works fine.
How can I get correct version of dll ?
Which version is correct?
This dll currently exists in system: v. 7.6.3.0 (C:\Program Files\sdb\DBM) or v. 7.6.2.0 (C:\Program Files\sdb\programs\pgm)
Best regards,
Lukasz
MAXDB 7.06.03.07 Community Edition, WIN 2k3 x32 Ent. ed.
ODBC:
Version 7.6.03 Build 007-123-157-515
Object Mode 32 bit
Test File pgm/sqlod32.dll
Make Id 256246
Installation Date 24.01.2008
Size 3045874 bytes
Checksum 293d54b1f67025353bc9cfdbe1dd84f3Hello Wolfgang,
problem is after Database Studio installation.
My test system is:
OS: Windows XP Sp2
MAXDB Software:
1) MAXDB 7.6.03.07 (install file: maxdb-all-win-32bit.exe, server+client installation)
2) SQL Studio 7.6.03.02 (174235)
3) Database manager 7.6.03.02
If i install MaxdbStudio (install file: maxdb-studio-win-32bit.exe) on that environment I'll get error :wrong dll version (check: SQLTCPx.dll) in all known connections via ODBC.
Connections via odbc means for me connection via ODBC Source witch uses MAXDB (unicode) driver, file: SQLODE32W.DLL
(Control panel => Administrative tools => ODBC Sources => Add source => MAXDB (unicode) ... etc.).
SQL Studio, database manager and maxdb studio starts and works correctly.
Connections via MaxDB ADO.NET Data Provider works correctly (another application).
Error occurs in Windows 2003 as well (the same software).
Best regards,
Lukasz -
I'd like to know if API like Java 2D or Java Security API belongs to Java Core API , or if it still belong to Java Standard Extension .
http://java.sun.com/j2se/1.5.0/docs/api/index.html
-
hi all
ive installed jdk1.4.1 from jdk1.3 .
When i try to compile a java file i get this error.
Error: invalid file 'java/lang/Object.class' (wrong version: 48, expected 45)
anyone has any idea abt this.
im stuck :( pls help.
thanks
JanDid you uninstall 1.3 completely? Completely in the sense both jdk and jre.
You may get this error if you use javac of one version and the rt.jar of another version.
Sudha -
Error while sending mail when using Java Mail API
Hi Experts,
I am trying to execute a webdynpro application which uses the Java Mail API to send emails. The exception that I get on executing the application is :
Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
Can anybody please help me sort out the issue.
Regards
AbdullahHi,
Usually one get this error if the SMTP server is configured not to relay mails (a security measure) or the SMTP server need the mail to be sent from a trusted IP or with proper authentication. Some SMTP servers are configured to block junk mails.
Pls check with your mail server administrator.
Regards -
Java error message - Bad version number in .class file
I get the error noted below in Safari, Firefox, and Chrome when I try to view java containing web pages.
Specifically this page: http://aviationweather.gov/adds/tafs/java/
My Java Preferences are as follows
My OS is 10.5.8
Thanks!
Java Plug-in 1.6.0_26
Using JRE version 1.5.0_30-b03-389-9M3425 Java HotSpot(TM) Client VM
User home directory = /Users/ernest
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Plugin2ClassLoader.java :1014)
at sun.plugin2.applet.Plugin2ClassLoader.access$100(Plugin2ClassLoader.java:69)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Plugin2ClassLoader.java:991)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Plugin2ClassLoader.java:9 55)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:134)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:250)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:180)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:675)
at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3046)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.ja va:1498)
at java.lang.Thread.run(Thread.java:655)
Exception: java.lang.UnsupportedClassVersionError: Bad version number in .class fileHi, thank you for the reply. However, java is definitely enabled on my computer, on all my browsers. In fact, if I go to the SUN website and run the java test, I get that all is OK.
I think it may have something to do with the .class (maybe in .jar-file) compiled with a higher version of java than the virtual machine trying to run it.
The example I found (google search) is .class-file that is compiled with JDK 6 and I am trying to run it with 1.4 JVM.
There is some software error going on somewhere... but I do not know enough to fix it.
Many thanks for all your help -
Error in the latest Java comm api for Linux
installed latest Java comm api for Linux, tried test application for the Sun package:
$ java SimpleRead
Exception in thread "main" java.lang.ExceptionInInitializerError
at SimpleRead.main(SimpleRead.java:67)
Caused by: java.lang.NullPointerException
at javax.comm.CommPortIdentifier.findConfFile(CommPortIdentifier.java:199)
at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:117)
... 1 more
What deis this message mean? How to make you serial port support work?and what does this error message mean??
The package was installed accordingly to "Java(tm) Communications API Linux Installation Instructions":
$ls /usr/lib/libLinuxSerialParallel.so
/usr/lib/libLinuxSerialParallel.so
$env|grep CLASS
CLASSPATH=<..skipped..>:/opt/commapi/jar/comm.jar:/opt/commapi/jar/commtest.jar
$ ls /opt/jdk1.5.0_04/jre/lib/javax.comm.properties
/opt/jdk1.5.0_04/jre/lib/javax.comm.properties
What else does it need?
Maybe you are looking for
-
I'm working on a program that asks for the users name. after that its supposed to pull the current date and time and print that into a file along with the users name. my problem is when i open the .txt file i get several characters i dont recogize an
-
Hi all, I lost all data in my iphone when I was trying delete unwanted contents. my iphone is blank and I cant start it or switch it off. It only starts automatic once I switch it to the power outlet and cant switch it off when it has power. Please h
-
[SOLVED]Gnome: No network icon in the status bar
So fresh install and no networking icon in the status bar. I also opened the network connections program and it didnt show any connections. I am using eth0 to write this. This suggests to me that a daemon hasnt been started (but doesnt necessarily ex
-
Help SQL Query (Not working as it should)
Hello everybody, I'm using JDeveloper 12.1.2.0.0 . I'm doing a bidirectional comunication using 3 tables, with bindings between them (and using HR schema). In my example, i have something like: Departments, Employees and SalaryByJobs (i created this
-
Solaris 10 Support for Gigabyte GA-MA78G-DS3H Motherboard
Dear sirs, I have been trying to get Solaris 10 to run properly on a Gigabyte GA-MA78G-DS3H Motherboard. The Solaris 10 operating system installed ok, but I have no network support. This is due to the standard and update drivers not working for this