出现commons.mail发送email出现:java.lang.NoClassDefFoundError错误 [问题点数:20分,结帖人pingpingdong]

Bbs1
本版专家分:2
结帖率 98.39%
Bbs3
本版专家分:763
Bbs1
本版专家分:2
Bbs4
本版专家分:1841
Bbs3
本版专家分:763
Bbs1
本版专家分:2
Bbs3
本版专家分:620
Bbs5
本版专家分:3783
Blank
黄花 2011年4月 专题开发/技术/项目大版内专家分月排行榜第二
Bbs5
本版专家分:3783
Blank
黄花 2011年4月 专题开发/技术/项目大版内专家分月排行榜第二
JavaME程序出现java.lang.NoClassDefFoundError错误
这是我写的第一个JavaME程序,编译通过,模拟器运行时<em>出现</em>这个<em>错误</em>。演示程序运行正常。Wireless Toolkit 2.5.2下编译和运行的。rn代码如下:rnrnrnimport javax.microedition.midlet.*;rnimport javax.microedition.lcdui.*;rnrnpublic class SimpleMIDlet extends MIDletrnrn private Display display;rn TextBox box = null;rn public SimpleMIDlet()rn rn rn rn public void startApp()rn rn display = Display.getDisplay(this);rn box = new TextBox("Simple Example","I am a MIDlet",20,0);rn display.setCurrent(box);rn rn public void pauseApp()rn rn rn rn public void destroyApp(boolean unconditional)rn rn rnrn
出现 java.lang.NoClassDefFoundError?
什么原因[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/12.gif][/img]
关于发送邮件提醒的错误:java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
今天才注册163邮箱账号,试着玩玩邮件的<em>发送</em>,可总是提醒java.lang.NoClassDefFoundError:com/sun/mail/util/LineInputStream<em>错误</em>,百度后才知道主要的原因是因为:          我们使用的是javaee5的库,其中javax.mail和javax.activation这两个包已经在javaEE5当中属于基础包了,就是JDK中自带
java.lang.NoClassDefFoundError: javax/mail/MessagingException
spring集成了mail,javax/mail/MessagingException的<em>错误</em>。 解决方法: 依赖于Java类库中的JavaMail,加入jar包,缺少activation.jar、mail.jar.
java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream解决方法
包含3个jar(修改后的javaee.jar可以接覆盖原jar,和mail.jar和activition.jar)和一个文档,测试通过。 JavaMail的java.lang.NoClassDefFo
SpringBoot发送邮件遇到的错误:org.springframework.mail.MailAuthenticationException: Authentication failed;
SpringBoot<em>发送</em>邮件时遇到的异常:org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 550 User has no permission <em>出现</em>这个问题的原因可...
JavaMail异常:java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
网上很多人都说J2EE5兼容性不好,例如典型的javamail1.4中包与J2EE5中包接口包引起冲突,导致单元测试经常报如下<em>错误</em>:     java.lang.NoClassDefFoundError: com/sun/mail/util/BEncoderStream     当然这个<em>错误</em>是没有将javamail的实现者引进工程(没有导包),但导包后,就会<em>出现</em>另外一个<em>错误</em>:     jav
myeclipse在运行hibernate出现错误java.lang.NoClassDefFoundError
<em>错误</em>如下:rnException in thread "main" java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/MetadataProviderrn at StudentTest.main(StudentTest.java:10)rnCaused by: java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.MetadataProviderrn at java.net.URLClassLoader$1.run(URLClassLoader.java:202)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:190)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:306)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:247)rn ... 1 morernrnStudentTest类的代码:rn[code=java]import org.hibernate.Session;rnimport org.hibernate.SessionFactory;rnimport org.hibernate.cfg.Configuration;rnimport com.hibernate.Student;rnpublic class StudentTest rn public static void main(String[] args) rn Student s=new Student();rn s.setName("sa");rn s.setAge(12);rn Configuration cf=new Configuration();rn SessionFactory sf=cf.configure().buildSessionFactory();rn Session session=sf.openSession();rn session.beginTransaction();rn session.save(s);rn session.getTransaction().commit();rn session.close();rn sf.close();rn rn rn[/code]rnrnstudent.hbm.xml代码 (IE打开没有显示<em>错误</em>)rn[code=java]rnrnrn rn rn rn rn rn [/code]rnrnhibernate.cfg.xml代码(IE打开没有显示<em>错误</em>)rn[code=java] rn rn rn rn com.mysql.jdbc.Driver rn jdbc:mysql://localhost:3306/hibernate rn root rn 12345678 rn rn true rn rn UTF-8 rn rn org.hibernate.dialect.MySQLDialect rn rn rn [/code]rnrnstudent.java代码如下rn[code=java]package com.hibernate;rnpublic class Student rn private int age;rn private String name;rn private int id;rn rn public String getName() rn return name;rn rn rn public void setName(String name) rn this.name = name;rn rn rn public int getAge() rn return age;rn rn rn public void setAge(int age) rn this.age = age;rn rnrn rn public int getId() rn return id;rn rn rn public void setId(int id) rn this.id = id;rn rnrnrn[/code]rn导入的hibernate的jar包如下rnrnrn
出现错误:Exception in thread "main" java.lang.NoClassDefFoundError: Hello?
我在rnD:\Program Files\tomcat-4.1.24\webapps\ROOT\test目录下新建了一个Hello.javarnrnpublic class Hellornrn public static void main(String[] args) rn rn System.out.println("Hello World!");rn rn;rnrn编译javac Hello.java也通过了,但执行java Hello时就报错:rnException in thread "main" java.lang.NoClassDefFoundError: Hellornrnrn我的dos命令窗口如下:rnD:\Program Files\tomcat-4.1.24\webapps\ROOT\classes>javac Hello.javarnrnD:\Program Files\tomcat-4.1.24\webapps\ROOT\classes>java HellornException in thread "main" java.lang.NoClassDefFoundError: Hellornrn但是如果我把hello.java放到D:\Program Files\j2sdk1.4.2\bin这个目录下,编译执行就都是好的。我在系统环境变量里面也添加了path和classpath路径啊rnclasspath :rnD:\Program Files\j2sdk1.4.2\bin;D:\Program Files\j2sdk1.4.2\jre;D:\Program Files\j2sdk1.4.2rnpath :rnD:\Program Files\j2sdk1.4.2;D:\Program Files\j2sdk1.4.2\bin;D:\Program Files\j2sdk1.4.2\jrernrn是我其他什么地方配置有问题吗?rn
救命!!!!!!使用hibernate3时出现java.lang.NoClassDefFoundError错误
我的环境是eclipse+Tomcat4.1+jdk1.5,在运行程序时<em>出现</em><em>错误</em>rnjava.lang.NoClassDefFoundErrorrn at persistence.DAOImp.createStu(DAOImp.java:27)rn at BusinessManager.BM.test(BM.java:17)rn但我检查的时候包persistence的DAOImp.classes和包BusinessManager的BM.classes都在WEB-INF下的classes中,不晓得怎么会报缺少类的<em>错误</em>,是什么问题呢?????????
java.lang.noclassdeffounderror 提示出现错误!">Exception in thread "main" java.lang.noclassdeffounderror 提示出现错误
环境变量我是这样设置的(我的jdk 1.4.1版 装在E:\J2SDK)rnpath=E:\J2SDK\bin;E:\J2SDK\jre\binrnclasspath=.;E:\J2SDK\lib;E:\J2SDK\lib\tools.jarrnrn但是运行下面这个程序的时候,却提示<em>错误</em>rnclass ArithmeticOprnrn public static void main(String args[])rn rn int p=5,q=12,r=20,s;rn s=p+q;rn System.out.println(p+" + "+q+" 得 "+s);rn s=p%q;rn System.out.print(s+" *= "+r+" 得 ");rn s *= r;rn System.out.println(s);rn System.out.println("运算前 p 值为 "+p);rn p++;rn System.out.println("p++ 运算已执行");rn System.out.println(" 运算后 p 滴?"+p);rn double x=25.75,y=14.25,z;rn z=x-y;rn System.out.println(x+" - "+y+" 得 "+z);rn System.out.print(z+" -= 2.50 得 ");rn z -= 2.50;rn System.out.println(z);rn System.out.println("运算前 z 值为 "+z);rn z--;rn System.out.println("z-- 运算已执行");rn System.out.println("运算后 z 值为 "+z);rn z=x/y;rn System.out.println("x+" / "+y+" 得 "+z);rn rnrnrnrnrnrn_____________________________________________rn但是却可以运行下面这个程序rn//在屏幕上输入1~10的程序rnclass LoopExrnrn public static void main (String args[])rn rn System.out.println("输出1........10");rn for (int cnt=1;cnt<=10;cnt++)rn System.out.println(cnt);rn rnrnrn==================================rnrn万分感谢
错误!">出现Exception in thread "main" java.lang.NoClassDefFoundError:hello的错误
用的系统是XPrn不知道是怎么回事,我用户环境变量:rnJAVA_HOME:D:\jdk1.4rnCLASSPATH:.;D:\jdk1.4\librnrnrn不管我怎么样,都会<em>出现</em>上面的<em>错误</em>!
启动报错java.lang.NoClassDefFoundError: org/springframework/core/io/Resource
大腿们 好 自从我把web项目转成maven项目 服务都起不来 改这个错报那个错 其中就有这个错 怎么回事 什么包都有 配置也没问题
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
这是在<em>发送</em>激活邮件的时候<em>出现</em>的<em>错误</em>: Exception in thread"main" java.lang.NoClassDefFoundError:com/sun/mail/util/LineInputStream       <em>出现</em>问题的原因是:在上一篇<em>发送</em>激活邮件(http://blog.csdn.net/u010924878/article/details/49685669)
关于报错“java.lang.NoClassDefFoundError: javax/mail/Address”的解决办法
今天在做后台自动<em>发送</em>邮件的功能时,遇到“java.lang.NoClassDefFoundError: javax/mail/Address”报错信息。我在工程里新建一个类,用main函数测试时,没有问题,但用到项目中跑起来,在action中就不好使了,很奇怪。后来网上查询,多数人的建议是看能否找到javax.mail.Address这个类,我在工程的J2EE 1.4 Liberary C
关于java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream解决办法
在编写邮件<em>发送</em>相关程序时,会报错!主要原因是 javax.mail和javax.activation这两个包已经在javaEE5当中属于基础包了,就是JDK中自带了已经,但是里面的方法与现在外面的mail.jar和activation.jar有一些出入,所以初学者在直接copy别人代码的时候往往会<em>出现</em>上面的<em>错误</em>。 废话不多说下面是解决方法 进到X:/Program Files/MyEclipse 6.5/myeclipse/eclipse/plugins/com.genuitec.eclipse.j2eed
求大神告诉我怎么解决java.lang.NoClassDefFoundError: com/sun/mail/util/QEncoderStream报错
报错如图 求大神告知怎么去解决 谢谢 MyEclipse用的是8.5的版本
运行myeclipse时出现java.lang.NoClassDefFoundError的错误
我想获得网页的编码,在网上找了可以用chardet.jar中的方法实现,于是下载了它,导入我的工程中,然后用如下代码进行测试:rnimport info.monitorenter.cpdetector.io.CodepageDetectorProxy; rnimport info.monitorenter.cpdetector.io.HTMLCodepageDetector; rnimport info.monitorenter.cpdetector.io.JChardetFacade; rn rnimport java.io.BufferedReader; rnimport java.io.IOException; rnimport java.io.InputStreamReader; rnimport java.net.HttpURLConnection; rnimport java.net.URL; rnimport java.util.Iterator; rnimport java.util.List; rnimport java.util.Map; rnimport java.util.Set; rnpublic class WebEncoding rn private static CodepageDetectorProxy detector = CodepageDetectorProxy rn .getInstance(); rnstatic rnrndetector.add(new HTMLCodepageDetector(false)); rnrndetector.add(JChardetFacade.getInstance()); rnrn rn/** 测试用例 rn* @param args rn*/ rnpublic static void main(String[] args) rnWebEncoding web=new WebEncoding(); rnrntry rn System.out.println("*******************");rn System.out.println(web.getCharset("http://www.baidu.com/")); rn catch (IOException e) rn // TODO Auto-generated catch block rn e.printStackTrace(); rn rn rn/** rn* @param strurl rn* 页面url地址,需要以 http://开始,例:http://www.pujia.com rn* @return rn* @throws IOException rn*/ rnpublic String getCharset(String strurl) throws IOException rn// 定义URL对象 rnURL url = new URL(strurl); rn// 获取http连接对象 rnHttpURLConnection urlConnection = (HttpURLConnection) url rn .openConnection(); rn; rnurlConnection.connect(); rn// 网页编码 rnString strencoding = null; rnrn/** rn * 首先根据header信息,判断页面编码 rn */ rn// map存放的是header信息(url页面的头信息) rnMap> map = urlConnection.getHeaderFields(); rnSet keys = map.keySet(); rnIterator iterator = keys.iterator(); rnrn// 遍历,查找字符编码 rnString key = null; rnString tmp = null; rnwhile (iterator.hasNext()) rn key = iterator.next(); rn tmp = map.get(key).toString().toLowerCase(); rn // 获取content-type charset rn if (key != null && key.equals("Content-Type")) rn int m = tmp.indexOf("charset="); rn if (m != -1) rn strencoding = tmp.substring(m + 8).replace("]", ""); rn return strencoding; rn rn rn rnrn/** rn * 通过解析meta得到网页编码 rn */ rn// 获取网页源码(英文字符和数字不会乱码,所以可以得到正确 区域) rnStringBuffer sb = new StringBuffer(); rnString line; rntry rn BufferedReader in = new BufferedReader(new InputStreamReader(url rn .openStream())); rn while ((line = in.readLine()) != null) rn sb.append(line); rn rn in.close(); rn catch (Exception e) // Report any errors that arise rn System.err.println(e); rn System.err rn .println("Usage: java HttpClient []"); rn rnString htmlcode = sb.toString(); rn// 解析html源码,取出 区域,并取出charset rnString strbegin = " -1) rn end = htmlcode.substring(begin).indexOf(strend); rn if (begin > -1 && end > -1) rn strtmp = htmlcode.substring(begin, begin + end).toLowerCase(); rn inttmp = strtmp.indexOf("charset"); rn if (inttmp > -1) rn strencoding = strtmp.substring(inttmp + 7, end).replace( rn "=", "").replace("/", "").replace("\"", "") rn .replace("\'", "").replace(" ", ""); rn return strencoding; rn rn rn htmlcode = htmlcode.substring(begin); rn begin = htmlcode.indexOf(strbegin); rn rnrn/** rn * 分析字节得到网页编码 rn */ rnstrencoding = getFileEncoding(url); rnrn// 设置默认网页字符编码 rnif (strencoding == null) rn strencoding = "GBK"; rn rnrnreturn strencoding; rn rnrn/** rn* rn* rn* 方法说明:通过网页内容识别网页编码 rn* rn* rn* 输入参数:strUrl 网页链接; timeout 超时设置 rn* rn* rn* 返回类型:网页编码 rn*/ rnpublic static String getFileEncoding(URL url) rnrnjava.nio.charset.Charset charset = null; rntry rnrn charset = detector.detectCodepage(url); rnrn catch (Exception e) rnrn System.out.println(e.getClass() + "分析" + "编码失败"); rnrn rnrnif (charset != null) rnrn return charset.name(); rnrnreturn null; rnrn rnrn可运行时总是<em>出现</em>java.lang.NoClassDefFoundError: org/mozilla/intl/chardet/nsICharsetDetectionObserver的<em>错误</em> !!!!
【转】出现java.lang.NoClassDefFoundError的错误的一种原因和解决办法
今天在跑某java程序时,遇到了java.lang.NoClassDefFoundError的<em>错误</em>。第一眼看感觉是classpath设置的问题。事后证明,解决方法也很简单,有两个办法: 运行的时候,加上-cp参数,值是一个”.”,表示当前目录。比如: java -cp . VolcanoRobot 在环境变量里写CLASSPATH = .\;%JAVA_HOME%\lib\tools...
j2me出现java.lang.NoClassDefFoundError
我在学习j2mepolish。我导入了包,而且下面有那个类的class文件,但是老是<em>出现</em>java.lang.NoClassDefFoundError: de/enough/polish/util/Locale
编译是出现java.lang.NoClassDefFoundError
我用的是eclipse工具,写了一个java程序,第一次编译通过,说明程序没有错。该java调用了几个类,编译时产生了几个class文件,但是当我删掉了其中一个class文件后再编译该java程序发现<em>出现</em>了<em>错误</em>java.lang.NoClassDefFoundError。rn 是怎么回事,请教了。
使用javamail:报出 java.lang.NoClassDefFoundError: 。。。错误
解决方法:原因不明,但是,从外部引用进入这三个包就没有再报过这个<em>错误</em>,而且本身我在studio中也没能顺利引用additionnal.jar这个包,我感觉Android毕竟只是封装了JAVA的一些东西,但是真正实现,还要找其根本。javamail需要的三个jar包必竟是java包,而不应该是android的。
java发送邮件失败:报错org.apache.commons.mail.EmailException: Sending the email to the following server faile
Disconnected from the target VM, address: '127.0.0.1:49693', transport: 'socket' org.apache.<em>commons.mail</em>.EmailException: Sending the <em>email</em> to the following server failed : smtp.163.com:25 org.apache.c...
javax.mail发送邮件时收件人地址报错 求高手指教
求高手指教 这个<em>错误</em>怎么改啊? 代码如下: String content = code ; java.util.Properties props = System.getProperties(); p
项目添加Maven支持后,单元测试报异常 javax/mail/internet/AddressException 解决
项目添加Maven支持后,运行JUnit单元测试,<em>出现</em>一下<em>错误</em>:   ERROR in ch.qos.logback.core.joran.action.AppenderAction - Could not create an Appender of type [com.travelsky.tdp.pkgStock.integration.logback.appender.mail.SMT
使用javax.mail发送邮件时,报错java.lang.ClassNotFoundException: com.sun.mail.util.MessageRemovedIOException
原因: 所引入的javax.mail的jar包,不包含com.sun.mail.util.MessageRemovedIOException类 解决: 可以更换齐全的javax.mail的jar包,或者额外导入com.sun.mail 的jar包 &lt;dependency&gt; &lt;groupId&gt;javax.mail&lt;/groupId&gt; &lt;...
出现java.lang.NoClassDefFoundError异常
eclipse+tomcat;rn程序编译没有错,运行的时候<em>出现</em>“java.lang.NoClassDefFoundError”,rn我的CLASSPATH和TOMCAT设置和其他人一样。rnrn找不出原因; 请各位帮忙!!rn
发送Email是出现错误!帮忙看看啊!
<em>错误</em>信息是:rn不允许使用邮箱名称。 服务器响应为: Requested action not taken: Local user only,smtp10,DsCowLC7+m9OWsdISxP_WA==.42636S2 1221024336 rn说明: 执行当前 Web 请求期间,<em>出现</em>未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Net.Mail.SmtpException: 不允许使用邮箱名称。 服务器响应为: Requested action not taken: Local user only,smtp10,DsCowLC7+m9OWsdISxP_WA==.42636S2 1221024336rnrn源<em>错误</em>: rnrnrn行 61: System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("smtp.163.com", 25);rn行 62: client.Credentials = new System.Net.NetworkCredential("yang2008163", "yangbaolin2008");rn行 63: client.Send(myMail);rn行 64: rn行 65: rn rnrnrnrn代码如下: rnrnrn string file = Server.MapPath("testXML.xml");rn MailMessage myMail = new System.Net.Mail.MailMessage(); ;rn myMail = new System.Net.Mail.MailMessage(txtSender.Text.Trim(), txtReceiver.Text.Trim(), txtSubject.Text.Trim(), txtContent.Text.Trim());rn if (ddlAccessories.Items.Count > 0)rn rn for (int i = 0; i < ddlAccessories.Items.Count; i++)rn rn System.Net.Mail.Attachment myAttachment = new System.Net.Mail.Attachment(Server.MapPath(ddlAccessories.Items[i].Value), System.Net.Mime.MediaTypeNames.Application.Octet);rn System.Net.Mime.ContentDisposition disposition = myAttachment.ContentDisposition;rn disposition.CreationDate = System.IO.File.GetCreationTime(file);rn disposition.ModificationDate = System.IO.File.GetLastWriteTime(file);rn disposition.ReadDate = System.IO.File.GetLastAccessTime(file);rn myMail.Attachments.Add(myAttachment);rn rn rn System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("smtp.126.com", 25);rn client.Credentials = new System.Net.NetworkCredential("yang2008163", "邮箱密码");rn client.Send(myMail);rnrnrn我第一次写<em>发送</em>邮件啊 直接点击邮箱的超链接 就到了发邮箱的页面 就可以<em>发送</em>邮件了啊 不用登录的
错误?">C#发送EMAIL怎么出现"'SendUsing'配置值无效。"的错误
程序是这样的:rn引用类:using System.Web.Mail;rn程序片断:rnMailMessage em = new MailMessage();rnem.To = "yys_tt@163.com";rnem.From = "e_dyx@sina.com";rnem.Subject = "dfgdfgdf";rnem.Body = "fghfghfg";rnSmtpMail.SmtpServer = "";rnSmtpMail.Send(em);rn
请教在发送email出现的问题,多谢
<em>发送</em><em>email</em>过程中,前面的ehlo,auth login,"usename","password",data 这些命令都以<em>发送</em>成功,且服务器回应正确,但总在<em>发送</em>邮件头和邮件内容以后,总是收到服务器如下的响应:(我已经试过好几个服务器,都是这样)rn+ response_buf 0x00346f08 "550 System is busy.rn>.rn0-SIZE 10240000rn250-ETRNrn250-AUTH=LOGIN PLAINrn250-AUTH LOGIN PLAINrn250 8BITMIMErnrn我不知道这是我的程序出的问题,还是服务器那边出的问题,请教大家,多谢指教!!
发送email错误
用vs 2005 在xp 系统下,<em>发送</em><em>email</em> rn Dim AddrFrm As MailAddressrn Dim AddrTo As MailAddressrn Dim Mail As MailMessagern Dim Smtp As SmtpClientrn AddrFrm = New MailAddress(frmEmail)rn AddrTo = New MailAddress(toEmail)rn Mail = New MailMessage(AddrFrm, AddrTo)rn Mail.Subject = Topicrn Mail.Body = mailBodyrn Mail.Priority = MailPriority.Normalrn Smtp = New SmtpClient("smtp.21cn.com")rn Smtp.DeliveryMethod = SmtpDeliveryMethod.Networkrn Smtp.Credentials = New System.Net.NetworkCredential("master", "123")rn Smtp.Send(Mail)rn rn在21cn.com 申请了<em>email</em>: master@21cn.com password:123rn运行时Smtp.Send(Mail)<em>出现</em><em>错误</em>:authentication fail,decode user password errorrn估计是Smtp.Credentials = New System.Net.NetworkCredential("master", "123") rn不正确.请问 Smtp.Credentials 怎么用?rnrnrnrn
Java发送Email—使用org.apache.commons.mail
apache的commons项目下有个<em>email</em>子项目,它对JavaMail API进行了封装,用起来特变方便。下面就简单介绍。 1.    首先配置需要的jar包   需要将mail.jar和commons-<em>email</em>.jar添加到我们的CLASS
转载邮件失败!javax.mail.AuthenticationFailedException: 535 Error: authentication
导入mail。jar和commons-<em>email</em>-1.2.jar后需要用解压工具删除javaee.jar中的mail文件夹。  邮件失败!javax.mail.AuthenticationFailedException: 535 Error: authentication     java实现发邮件,   <em>错误</em>一:   Exception in thread "main" ja
java.lang.ClassNotFoundException: org.apache.commons.collections.FastHashMap的解决方法
NoClassDefFoundError
用 commons-email 组件 发邮件 报错 java.lang.ClassNotFoundException: javax.mail.internet.
求救, 学习 java EE , 想实现 <em>发送</em>邮件 验证的功能, 出了问题, 百度试过的方法: 设置 字符集,我有过滤器,统一设置为:utf-8 还有 在 jre/ 下面 加入 jar 包, 也不行,
java.lang.ClassNotFoundException: org.apache.commons.collections.FastHashMap
参考文章:http://zhidao.baidu.com/link?url=ubYbPI8FJp3mNrxDCLApx5IBRqJnkmMsrw6xBNeCrzr0qq95p4UgGVAs2mCYAD-V5a0gJUHUObRxU_9UlZyslK --------------------------------------------------------------------------
发送同一个Message出现错误
按书上写了一个 根据模拟时钟设置数字时钟的代码rn现在我想一秒钟更新一次,部分代码如下:rnrnrn mHandler = new Handler()rn rn public void handleMessage(Message msg )rn rn switch(msg.what)rn rn case MainActivity.CLOCK_FLASH:rn mTextView.setText(mHour + ":" + mMin + ":" + mSec );rn break;rn rn default:rn break;rn rn rn super.handleMessage(msg);rn rn rn ;rnrnrnrn class MyThread extends Threadrn rn public void run()rn rn super.run();rn rn tryrn rn Message msg = new Message();rn msg.what = MainActivity.CLOCK_FLASH;rnrn while(true)rn rn long time = System.currentTimeMillis();rn Calendar mCalendar = Calendar.getInstance();rn mHour = mCalendar.get(Calendar.HOUR);rn mMin = mCalendar.get(Calendar.MINUTE);rn mSec = mCalendar.get(Calendar.SECOND);rn rn Thread.sleep(1000);rn rn MainActivity.this.mHandler.sendMessage(msg);rn rn rn rn rn catch(Exception e)rn rn e.printStackTrace();rn rn rn rnrn以上的代码运行会挂掉,<em>错误</em>信息是 This message is already in usern如果我将 rnMessage msg = new Message();rnmsg.what = MainActivity.CLOCK_FLASH;rn这两句代码放在while(true)内的话是没有问题,但是是否因为一直在new而导致内存被迅速“吃掉”(虽然我知道系统自己会回收的)rnrn如果我想把以上的两句代码放在原处,那我应该加一些什么代码去确保执行正确呢?rnrn
Socket通信发送和解析出现错误
客户端<em>发送</em>关键代码: rn struct Protocal_1 protocal_1;rn Word type=163;rn int send_length=sizeof(type)+4+sizeof(protocal_1);//=4026rn char *pcreate=(char *)malloc(send_length);rn memset((char *)pcreate,0,send_length);rn memcpy((char *)pcreate,(Word *)&type,sizeof(type));//前两个字节放type=163rn memcpy((char *)(pcreate+sizeof(type)),(char *)&send_length,sizeof(send_length));//中间四个字节放<em>发送</em>长度4026 rn memcpy((char *)(pcreate+sizeof(type)+sizeof(send_length)),(char *)&protocal_1);//后面放结构体rn Sendbuf(pcreate,4026);//省写,<em>发送</em>rnrn服务端解析: Word type;rn int s_length=4026;rn char *buff=(char *)malloc(s_length);rn memset(buff,0,s_length);rn ReceiveBuf(buff,s_length);//接收rn rn memcpy((char *)&type,buff,sizeof(type));rnrn ShowMessage(type);rn free(buff);rn rn<em>错误</em>,为什么服务端输出的type值是65072rn希望高手能指出<em>错误</em>,并给出不足,立马会结贴,谢谢了!rnrnrnrn
ajax发送XML出现错误
请教各位大侠:rnrn代码如下:rnfunction savedraft()rnrn var msg = document.getElementById("msg");rn var postStr = window.frames["content___Frame"].window.frames[0].document.body.innerHTML;rn rn var xmlDom=new ActiveXObject("MSXML2.DOMDocument");rn xmlDom.loadXML("");rn var domRoot= xmlDom.createElement("NewDataSet");rn xmlDom.appendChild(domRoot);rn var node= xmlDom.createElement("guid");rn node.text = postStrrn domRoot.appendChild(node); rn rn var xmlhttp = getXMLRequester();rn tryrn xmlhttp.Open("POST","AutoSaver.aspx?content="+escape(postStr),true);rn xmlhttp.setRequestHeader("Content-Length",postStr.length);rn xmlhttp.setRequestHeader("Content-Type","text/xml"); rn xmlhttp.send(xmlDom.xml);rn rn catch(err) rn msg.innerHTML = "<em>出现</em>未知<em>错误</em>:" + err.message + " " + xmlDom.xml;rn msg.style.visibility = 'visible';rn Cancel = true;rn rnrnrnti=AutoSaveTime;rntimer();rnrnrn目前的问题是:xmlDom.xml已经确认有值,但是如果我一次粘贴比较多的内容进去,就会<em>出现</em><em>错误</em>。rn可是这个内容其实也没多少。我统计一下字节在1849个,应该来说不是很大。rnrn如果只有几行,是不会出错的。rnrn请问究竟什么地方不对,是否需要规定XML的大小?
javamail发送问题,出现错误
我的原代码如下:rnindex.jsprnrnrnrn rn 撰写邮件rnrnrnrn rn rn rn 收信人地址:rn rnrnrn rn 主题:rn rnrnrn rn rnrnrn rn rnrnrnrnrnrnrnrnrnrnrnrntest.jsprnrnrnrnrnrnrnrnrnrnrn rn <em>发送</em>成功rnrnrnrnrn rn <em>发送</em>成功!rn 去看看我的信箱 rn rn再发一封 rnrnrnrnrnrnrn我在jb9下运行<em>出现</em><em>错误</em>,说是:rnrnG:\java-project\javamail\Tomcat\work\test$jsp.java:4: Package javax.mail not found in import.rnimport javax.mail.*;rn ^rnrnG:\java-project\javamail\Tomcat\work\test$jsp.java:5: Package javax.mail.internet not found in import.rnimport javax.mail.internet.*;rn ^rn2 errors, 1 warningrnrnrn我已经配置了mail.jar啊rnrn为什么还是会<em>出现</em>这种<em>错误</em>啊rnrn各位大哥大姐能否说下具体的配置啊rn我好知道错哪儿了
发送email 发送email 发送email
<em>发送</em><em>email</em><em>发送</em><em>email</em><em>发送</em><em>email</em><em>发送</em><em>email</em><em>发送</em><em>email</em><em>发送</em><em>email</em><em>发送</em><em>email</em><em>发送</em><em>email</em><em>发送</em><em>email</em>
发Email出现错误!!!(在线等)
rn注册rnrn检验没问题后rnrn录入数据库;rntryrnSM.AdminEmail="000@000.net.cn";rn SM.UserName="000@000.net.cn";rnSM.Password="000000"; SM.SmtpServer="22.16.120.103";rnSM.EMailFormat="Html";rnstring mailContent=RealName.Text+"你好\r\n你的帐号 :"+UserName.Text+"\r\n你的密码:"+tem.ToString()+"\r\n \r\n\r\n恭喜你成为超 SM.Send(Email.Text.ToString().Trim().Replace(" ",""),"lsb@lsb.net.cn","注册超脑力会员成功!",mailContent);rnResponse.Write(" ");rnResponse.End();rnrnrncatchrn结果很多时候EMAIL收不到信rn------------------------------rnpublic class SystemMailrnrn rnrn private string _adminEmail;rnrn private string _smtpServer = "localhost";rnrn private string _password;rnrn private string _userName;rnrn private string _mailFormat;rnrnrn public SystemMail()rnrn rnrn rnrn public string AdminEmailrnrn rnrn getreturn _adminEmail;rnrn set_adminEmail = value;rnrn rnrn public string SmtpServerrnrn rnrn getreturn _smtpServer;rnrn set_smtpServer = value;rnrn rnrn public string Passwordrnrn rnrn getreturn _password;rnrn set_password = value;rnrn rnrn public string UserNamernrn rnrn getreturn _userName;rnrn set_userName = value;rnrn rnrn public string EMailFormatrnrn rnrn getreturn _mailFormat;rnrn set_mailFormat = value;rnrn rnrn public bool Send(string to, string from, string subject, string message)rnrn rnrn tryrnrn rnrn MailMessage em = new MailMessage();rnrn em.To = to;rnrn em.From = from;rnrn em.Subject = subject;rnrn em.Body = message;rnrn if (this.EMailFormat=="Html")rn rn em.BodyFormat=MailFormat.Html;rn rnrnrnrn //Found out how to send authenticated <em>email</em> via System.Web.Mail at http://SystemWebMail.com (fact 3.8)rnrn if(this.UserName != null && this.Password != null)rnrn rnrn em.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authenticationrnrn em.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", this.UserName); //set your username herernrn em.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", this.Password); //set your password herernrn rnrn SmtpMail.SmtpServer = this.SmtpServer;rnrn SmtpMail.Send(em);rnrn return true;rnrn rnrn catchrnrn rn return false;rnrn rn rn
在调用系统默认email程序时出现错误。。
在调用系统默认<em>email</em>程序时rn System.Diagnostics.Process.Start("mailto:me@eyou.com")rnrn<em>错误</em>提示:试图引用不存在的令牌。rn原来一直很正常,现在不知道什么原因就不能用了rn请高手提示!
求救!!:Applet中出现java.lang.NoClassDefFoundError
在我的Applet中引用了一个包rnimport com.esri.*rnrn编译的时候通不过,但是我已经在Classpath中加入了相关的Jar,于是使用rnjavac -classpath %CLASS_PATH% myapplet.javarnrn编译通过,但是在页面中显示java.lang.NoClassDefFoundError:com/esri/*rnrn请问应该怎么办,很急,先谢谢各位
RCP发布出现 java.lang.NoClassDefFoundError 异常
我将自己写的一个项目打包成jar文件后在Eclipse中选择添加jar,将这个项目的jar包引入,然后使用这个jar包中的类,比如rnSwapDepositInfo zw = new SwapDepositInfo();rn此时Eclipse不会报任何<em>错误</em>,在我本地运行也通过,但是RCP发布后,在我的机器上可以显示正常,但是在其它部分的机器上,点发布后的程序后,就<em>出现</em>以上异常是怎么回事?(注:SWT工程)rnrnjava.lang.NoClassDefFoundError: cn/bestwiz/swt/xtable/beans/SwapDepositInforn at cn.bestwiz.fes.front.comp.SwapDepositCompsite.initCompsite(SwapDepositCompsite.java:154)rn at cn.bestwiz.fes.front.comp.BaseCompsite.(BaseCompsite.java:24)rn at cn.bestwiz.fes.front.comp.SwapDepositCompsite.(SwapDepositCompsite.java:57)rn at cn.bestwiz.fes.front.view.SwapDepositView.createPartControl(SwapDepositView.java:17)rn at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:332)rn at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197)rn at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)rn at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)rn at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:525)rn at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140)rn at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)rn at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)rn at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394)rn at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144)rn at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1097)rn at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:795)rn at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:781)rn at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:123)rn at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:126)rn at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:267)rn at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:276)rn at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)rn at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:84)rn at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)rn at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)rn at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)rn at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)rn at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:709)rn at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171)rn at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953)rn at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)rn at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)rn at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)rn at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)rn at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)rn at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)rn at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)rn at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)rn at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)rn at cn.bestwiz.fes.front.Application.run(Application.java:34)rn at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)rn at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)rn at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)rn at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)rn at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)rn at org.eclipse.core.launcher.Main.basicRun(Main.java:280)rn at org.eclipse.core.launcher.WebStartMain.basicRun(WebStartMain.java:63)rn at org.eclipse.core.launcher.Main.run(Main.java:977)rn at org.eclipse.core.launcher.WebStartMain.main(WebStartMain.java:42)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at com.sun.javaws.Launcher.executeApplication(Unknown Source)rn at com.sun.javaws.Launcher.executeMainClass(Unknown Source)rn at com.sun.javaws.Launcher.continueLaunch(Unknown Source)rn at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)rn at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)rn at com.sun.javaws.Launcher.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnrn有知道的请告诉我。在线等。。。。谢谢~~
加载配置文件时出现java.lang.NoClassDefFoundError
我在配置hibernate.cfg.xml时,双击打开这个文件,其中内容为rnrnrn时,弹出<em>错误</em>对话框rnAn internal error occurred during: "loading file:/D:/Program Files/MyEclipse 6.5/myeclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_6.5.0.zmyeclipse650200806/catalog-dtd/hibernate-configuration-3.0.dtd".rnjava.lang.NoClassDefFoundErrorrn,请问高手这是什么问题,怎么解决啊?rn我看像加载<em>错误</em>,可是那个文件也有,原来没<em>出现</em>过这样的问题,今天一早晨就有了
在cmd下运行出现java.lang.NoClassDefFoundError错误问题
在eclipse下新建了一个java项目:first,其后新建一个包:doudou;在新建一个类:hello。rn在eclipse下运行成功,我想在cmd下运行,却一直提示<em>错误</em>:java.lang.NoClassDefFoundError。。。rn 然后我就同样在新建一个java项目:gfh,其后没有新建包,默认为缺省包;在新建一个类:hello,就能在cmd下运行,rn 难道就是因为包的原因吗?请高手指点啊。。。。在线等。。。。。。。
出现这样的运行错误:java.lang.NoClassDefFoundError: JDemo
文件名:JDemo.javarnrn文件内容:rnimport java.lang.*;rnrnpublic class JDemo extends Objectrnrn private static int InstanceCount = 0;rn private boolean isStudent;rn private String name;rn private int[] number;rnrn public JDemo()rn rn //初始化对象rn System.out.println("Construct instance "+JDemo.InstanceCount+" of class JDemo...");rn this.InstanceCount++;rn number = new int[4];rn for(int i=0;i
部分手机出现java.lang.NoClassDefFoundError的解决办法
谷歌规定单个dex文件中的方法不能超过65535的限制。 Android应用程序(APK)在Dalvik可执行文件的形式包含可执行的字节码文件(DEX)文件,其中包含已编译的代码来运行你的应用程序。Dalvik可执行规格限制一个Dex文件包含65535个方法:包括Android框架方法、Library方法的总数、和你自己的代码方法总数。因为65535等于64×1024,这一限制被称为“64k引用
关于一个EMAIL发送错误
rn用php编写了一个<em>发送</em>Email程序,执行一下,邮件是<em>发送</em>出去了,但是<em>发送</em>后errorinfo返回有<em>错误</em>,说error:Connection reset by peerrnrn用linux的cron命令想每天下午5点自动执行这个程序,也不执行,命令如下: 0 17 * * * /data/cms/test/mailsend.php 有<em>错误</em>吗?rnrn好郁闷啊~!请问这是怎么回事???
Win10打开vfp6出现程序发送命令时出现错误
Win10系统下,运行vfp6程序<em>出现</em>“向程序<em>发送</em>命令时<em>出现</em><em>错误</em>“提示,双击dbf文件时,也<em>出现</em>这种提示,请老师们帮帮忙解答一下![img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/83.gif][/img]
jsoup发送http请求出现404的错误
ssm的一个接口,使用jsoup单元测试一直<em>出现</em>404<em>错误</em>,但是后台的数据是可以传输到的,经过排查是由于删除掉了@@ResponseBody
DeviceIoControl发送IOCTL_SCSI_PASS_THROUGH出现121错误
我使用DeviceIoControl先USB 设备<em>发送</em>IOCTL_SCSI_PASS_THROUGH指令,结果<em>出现</em>121<em>错误</em>,121<em>错误</em>在说明是信号灯超时,问问大家如何解决?rn[code=C/C++]rn BOOL status = DeviceIoControl(hMassDevice, rn IOCTL_SCSI_PASS_THROUGH, rn (LPVOID)&m_sptwb, rn (DWORD)inbuffersize, rn (LPVOID)&m_sptwb, rn (DWORD)length, rn (LPDWORD)&returned, rn NULL);rn[/code]
iE 下发送Ajax请求, 出现XMLHttpRequest错误?
XMLHttpRequest: 网络<em>错误</em> 0x2f76, 由于<em>出现</em><em>错误</em> 00002f76 而导致此项操作无法完成。就是普通的get请求, 也没有携带任何参数.
出现错误
rnrnrn rn rn rn rn rn 返回登录页rn
出现错误
You have an error in your SQL syntax  check the manual that corresponds to your MySQL server version for the right syntax to use near '?' <em>出现</em>这种<em>错误</em>的原因是在执行sql的时候使用了pstmt.executeQuery(sql)这个实际上是statement的...
出现错误
your hard drive has less than 1MB free space.rnIf you encounter problems please refer to the reference card.rnrn我在打“极品飞车”应用程序时,<em>出现</em>了这个提示框!如果继续的话,也可以玩这个游戏,但每次运行的时候老出这个对话框,why?
出现错误????
我进入mysql提示界面后输入use mysql<em>出现</em>以下<em>错误</em>:rnaccess denied for user:''@'localhost' to daabase 'myicq'rn怎么回事,谢谢各位!!!!
java.lang.NoClassDefFoundError错误
在一台机器上运行jsp程序时,报java.lang.NoClassDefFoundError<em>错误</em>,而在另一台服务器运行很正常。这是什么原因?rn服务器:resinrn操作系统:linux8.0
错误,是什么原因?">出现"Exception in thread "main" java.lang.NoClassDefFoundError: Student"错误,是什么原因?
代码是这样写的:rnimport java.util.*;rnimport java.io.*;rnpublic class Studentrnrn public static void main(String [] args)rn rn System.out.println("Helloworld!"); rn rnrn用命令行下用"javac Student.java"编译通过,然后在命令行下输入"java Student"就<em>出现</em>上面的<em>错误</em>了,我听张孝详的课上,<em>出现</em>这个问题主要有三个原因:1、类名(大小写问题);2、包名(是否在包里面)和3、Classpath的设置问题;我的程序我相信不是类名的问题,而且也没有使用包,我也设置了"D:\jdk1.4\lib\tools.jar"为类路径(我的JDK安装在d:\jdk1.4目录下面),请问问题出在那里,怎么解决?rn注:我的程序写在d:\jdk1.4\whua路径下面,以前在该目录下面也写过一些简单的java程序,比如Helloworld程序,而且运行正常,但是现在那些以前运行正常程序现在运行业<em>出现</em>同样的<em>错误</em>,真是搞糊涂了,我重装了JDK1.4也不行rn
错误?">初级问题:为什么出现Exception in thread "main" java.lang.NoClassDefFoundError错误
源代码如下:rn//Hello.javarnpublic class Hello rnrn public static void main(String[] args) rn rn System.out.println("Hello World!"); rn rnrnrn编译没有<em>错误</em>信息,用java Hello运行是出错。rn请指点。
出现错误:java.lang.NoClassDefFoundError: com/inprise/ejb/Container;和Exception in thread "main"
我编了一个javabean实现从xml文件中读内容:rn源码如下:rnpackage xmlwriter;rnrnimport javax.xml.parsers.*;rnimport org.w3c.dom.*;rnrnpublic class xmldisplay rnpublic static void main(String args[])rn tryrn DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();rn DocumentBuilder builder=factory.newDocumentBuilder();rn Document doc=builder.parse("links.xml");rn //doc.normalize();rn NodeList links =doc.getElementsByTagName("link");rn for (int i=0;i
Spring2.5.6整合hibernate3.3.2出现错误java.lang.NoClassDefFoundError: org/jboss/logging
详细<em>错误</em>:rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'u2': Injection of resource methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [beans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.hibernate.cfg.AnnotationConfiguration]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/jboss/logging/BasicLoggerrn rnrnrnbeans.xml配置如下rnrnrnrn rn rn rnrn rn rn rn rn classpath:jdbc.propertiesrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn com.bjsxt.model.Userrn rn rn rn rn rn rn org.hibernate.dialect.MySQLDialectrn rn truern rn rn rn rn不知道错在哪,请高手指教,谢谢rnrn
高手请赐教,出现java.lang.NoClassDefFoundError: javax/servlet/jsp/PageContext的错误
我在用SmartUpload类上传文件时,rnSmartUpload mySmartUpload = new SmartUpload();rnmySmartUpload.initialize(pageContext);rnrn总报Error 500: javax/servlet/jsp/PageContext的<em>错误</em>,或者其它地方使用到rnjavax/servlet/jsp/PageContext类时都会报此类<em>错误</em>,请问这是为什么!?rnrn<em>错误</em>如下rn[07-10-29 14:56:16:969 CST] 772e3da1 WebGroup E SRVE0026E: [Servlet <em>错误</em>]-[javax/servlet/jsp/PageContext]:java.lang.NoClassDefFoundError: javax/servlet/jsp/PageContextrn at java.lang.Class.getDeclaredMethods0(Native Method)rn at java.lang.Class.privateGetDeclaredMethods(Class.java:1753)rn at java.lang.Class.getDeclaredMethods(Class.java:1219)rn at java.beans.Introspector$1.run(Introspector.java:1120)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1118)rn at java.beans.Introspector.getTargetMethodInfo(Introspector.java:983)rn at java.beans.Introspector.getBeanInfo(Introspector.java(Inlined Compiled Code))rn at java.beans.Introspector.getBeanInfo(Introspector.java(Compiled Code))rn at org.apache.jasper.runtime.JspRuntimeLibrary.getWriteMethod(JspRuntimeLibrary.java:789)rn at org.apache.jasper.runtime.JspRuntimeLibrary$2.run(JspRuntimeLibrary.java:551)rn at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))rn at org.apache.jasper.runtime.JspRuntimeLibrary.handleSetProperty(JspRuntimeLibrary.java:548)rn at org.apache.jsp._errorpage._jspService(_errorpage.java:133)rn at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))rn at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))rn at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))rn at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))rn at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))rn at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))rn at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))rn at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:498)rn at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:542)rn at org.apache.jsp._sal_5F_impexl_5F_result._jspService(_sal_5F_impexl_5F_result.java:344)rn at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))rn at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))rn at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))rn at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))rn at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))rn at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))rn at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))rn at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))rn at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))rn at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))rn at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))rn at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))rn at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))rn at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))rn at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))rn at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))rn at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))rn at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))rnrn
jar运行时出现错误:Exception in thread "main" java.lang.NoClassDefFoundError
<em>错误</em>信息如下:rnException in thread "main" java.lang.NoClassDefFoundError: HelloWorld/HelloWorldrn (wrong name: HelloWorld)rn at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:620)rn at java.security.SecureClassLoader.defineClassSecureClassLoader.java:124)rn at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)rn at java.net.URLClassLoader.access$100(URLClassLoader.java:56)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:195)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:188)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:306)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:251)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)rnrn文件结构为:HelloWorld文件夹下HelloWorld.java、HelloWorld.class;并且命令行方式java HelloWorld能够正确执行。与HelloWorld文件夹同级生成helloworld.jar文件。rnrnMENIFEST.mf内容为:HelloWorld.HelloWorldrnrn环境变量classpath中设置为:.;C:\jdk150_04\lib;
错误呢">为什么会出现Exception in thread "main" java.lang.NoClassDefFoundError:错误
如题,我写了一段名为a.java的程序如下:rnpublic class arnrn public static void main(String[] args)rn System.out.println("Hello");rn rnrn通过cmd进入到当前路径,输入javac a.java命令,编译成功rn在输入java a命令,就<em>出现</em>rnException in thread "main" java.lang.NoClassDefFoundError:arn<em>错误</em>提示,我检查了程序完全没有问题啊,请大侠们救命啊!!!
一个java发送EMAIL的问问题:在main种正常,在servlet发就出现错误错误如下
java.lang.SecurityException: class "javax.mail.Session"'s signer information does not match signer information of other classes in the same package
Email 发送
rnrn asp.net 里的Email<em>发送</em>100封邮件会很慢,rnrn 有没有好的方案啊
发送EMAIL
我今天下午准备写一个<em>发送</em>EMAIL的小程序,rn用到了System.web.mailrn但是我的IDE(VS2003)一直报错,<em>错误</em>如下:rnrnC:\Documents and Settings\Sniper.MY-TOMATO\My Documents\Visual Studio Projects\Teddy Bear\Form1.cs(7): 类型或命名空间名称“Mail”在类或命名空间“System.Web”中不存在(是否缺少程序集引用?)rn这个是怎么回事,我的NET是1.1版的,已经安装了SMTPrn知道的麻烦说一下
发送 email
java技术 实现邮件接受、<em>发送</em>,详细讲解各种配置
发送email
我的程序如下:rnString strFrom = "CyberAlbum.com";rnString strTo = "<em>email</em> address";rnString strSubject = "test";rnString content = "test";rnSmtpMail.Send(strFrom,strTo,strSubject,content);rn<em>出现</em><em>错误</em>提示:rn“SendUsing”配置值无效。 rnDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. rnrnException Details: System.Runtime.InteropServices.COMException: “SendUsing”配置值无效。 rnrnSource Error: rn rnLine 47: SmtpMail.Send(strFrom,strTo,strSubject,content);rnLine 48: rnLine 49: rn rn
发送Email
Private Sub btnSendEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSendEmail.Clickrn Dim objSmtpMail As New SmtpMail()rn objSmtpMail.Send(txtTo.Text, txtFrom.Text, txtSubject.Text, txtMessage.Text)rn objSmtpMail = Nothingrn End Subrn出错提示:rnc:\inetpub\wwwroot\study\chapter11\WebForm1.aspx.vb(36): “System.Web.Mail.SmtpMail.Private Overloads Sub New()”是“Private”,因此它在此上下文中无法访问。rnrn该如何修改?
发送电子邮件出现的问题
我用一下代码<em>发送</em>一个电子邮件rn Dim mailMessage As System.Web.Mail.MailMessagern mailMessage = New System.Web.Mail.MailMessagern mailMessage.From = "fff@163.com"rn mailMessage.To = "ttt@163.com"rn mailMessage.Subject = "测试"rn mailMessage.BodyFormat = System.Web.Mail.MailFormat.Textrn mailMessage.Body = "内容"rn System.Web.Mail.SmtpMail.SmtpServer = "127.0.0.1"rn Tryrn System.Web.Mail.SmtpMail.Send(mailMessage)rn Label1.Text = "<em>发送</em>成功!"rn Catch ex As Exceptionrn Label1.Text = ex.Messagern End Tryrnrn当我点击<em>发送</em>,返回结果正常:<em>发送</em>成功rnrn但是不久邮箱里会有一个退信:rnThis is an automatically generated Delivery Status Notification.rnrnDelivery to the following recipients failed.rnrn ttt@163.comrnrn请问各位高手,这个是怎么个原因,如何解决呢rn
发送邮件附件出现乱码!!!!!
我用的是Jmail4.3版本,我发外部邮件时,其他的主题,内容都能正确<em>发送</em>,可是在外部油箱里显示的附件却是都是以文本形式显示的,而且都是乱码.我本想让他在外部邮箱中以超连接形式供下载的,朋友们,这是怎么回事啊?这个问题困饶我好多天了
加载applet时出现java.lang.NoClassDefFoundError,如何解决
java.lang.NoClassDefFoundError: Chart (wrong name: Chart/Chart)rn at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(Unknown Source)rn at java.security.SecureClassLoader.defineClass(Unknown Source)rn at sun.applet.AppletClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.applet.AppletClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.applet.AppletClassLoader.loadCode(Unknown Source)rn at sun.applet.AppletPanel.createApplet(Unknown Source)rn at sun.plugin.AppletViewer.createApplet(Unknown Source)rn at sun.applet.AppletPanel.runLoader(Unknown Source)rn at sun.applet.AppletPanel.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnjava.lang.NoClassDefFoundError: Chart (wrong name: Chart/Chart)rn at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(Unknown Source)rn at java.security.SecureClassLoader.defineClass(Unknown Source)rn at sun.applet.AppletClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.applet.AppletClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.applet.AppletClassLoader.loadCode(Unknown Source)rn at sun.applet.AppletPanel.createApplet(Unknown Source)rn at sun.plugin.AppletViewer.createApplet(Unknown Source)rn at sun.applet.AppletPanel.runLoader(Unknown Source)rn at sun.applet.AppletPanel.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rn
java -jar 执行jar包出现 java.lang.NoClassDefFoundError
我用idea打包的jar,运行<em>出现</em>java.lang.NoClassDefFoundError,报错缺少的包在打包时已经包含进去,MANIFEST.MF文件也没写错,百度许久还是没有解决,特来求助!rn浏览器出问题不能上传,就只能大概描述rn一个java项目,三方库在根目录lib文件夹里。rnMANIFEST.MF文件内容:rnManifest-Version: 1.0rnClass-Path: lib/log4j.jar lib/sqljdbc4-2.0.jarrnMain-Class: com.company.CatchDataUtilrnrn
在java文件中启动tomcat6出现java.lang.NoClassDefFoundError
运行时异常信息大致如下:rnorg/apache/tomcat/util/log/systemLogHandlerrn......某文件x行 new Embedded()rn......某文件x行 getEmbedded().addlifecyclelistenerrn程序中语法无<em>错误</em>提示,而改用tomcat5.5嵌入版不再<em>出现</em>这<em>错误</em>,请问是什么缘故?如何解决?rn
编译运行出现exception in thread "main" java.lang.NoClassDefFoundError:
编译运行<em>出现</em>exception in thread "main" java.lang.NoClassDefFoundError:rn试了好几个程序都是rn但是在myeclipse下可以运行的rn本人菜鸟
jcreator运行错误出现 Exception in thread "main" java.lang.noclassDefFoundError
public class crnrn public static void main(String args[])rn rn system.out.println("dd");rn rnrnrnrn文件名也叫crnrn系统环境变量配置成功了。
引用第三方库出现的java java.lang.NoClassDefFoundError问题
新建一个工程1,将第三方jar包添加到该工程的构建路径下,然后新建另一个工程2,rn将工程1添加到工程2的依赖中,rn写写代码,都正常~~~~~~~~运行时,rn抛出了java.lang.NoClassDefFoundError 找不到Jface的Dialog,找不到SWT的SelectionListener~~~~rnrn之前没有遇到这种问题,问题大概是因为使用到第三方jar包时,没有加载到SWT和JFacern所以在工程1的依赖中添加 SWT和JFace是可以的,但是其中的原理还不是很理解。rnrn求讲解,O(∩_∩)O谢谢rn
使用jdbc的程序出现java.lang.NoClassDefFoundError的异常
很简单的代码,在JCreator的集成环境中可以执行,但在命令行下不能运行,要做哪些设置?代码如下:rnimport java.io.*;rnimport java.sql.*;rnrnclass SimpleJDBCrn public static void main(String[] args) throws SQLException,IOException,ClassNotFoundExceptionrn Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");rn String dsURL="jdbc:odbc:JavaDb";rn Connection connection=DriverManager.getConnection(dsURL);rn rn if (connection==null)rn System.out.println("Could not establish connection.");rn elsern System.out.println("Connection successfully established.");rn Statement statement=connection.createStatement();rn rn int rc=0;rn rc=statement.executeUpdate("DROP TABLE EMPLOYEE");rn rc=statement.executeUpdate("CREATE TABLE EMPLOYEE(EmpId integer,LastName char(30),FirstName char(30))");rn rn statement.close();rn connection.close();rn rn rn
J2ME程序移到真机时出现java.lang.NoClassDefFoundError
初学J2ME,想写个蓝牙通讯类,碰到了问题,希望大家来帮帮忙,谢谢了.rn以下代码在手机模拟器中可以正常运行,但当把它放到真机下运行时报java.lang.NoClassDefFoundError<em>错误</em>.rnrnpublic class btMidlet extends MIDlet rn public void startApp() rn Form f = new Form("aaaa");rn f.append("kkkkk");rn Display dis = Display.getDisplay(this);rn test t = new test();rn dis.setCurrent(t);rn rn rn ......rnrnclass test extends TextBox implements DiscoveryListenerrnrn Command com_pub = new Command("开启", Command.OK, 0);rn Command com_back = new Command("返回", Command.BACK, 1);rn test()rn rn super(null, "", 500, TextField.ANY);rn this.addCommand(com_pub);rn this.addCommand(com_back);rn this.setString("test");rn rn ......rnrnrn但当把test类的DiscoveryListener接口删除时,程序便可以在真机下运行.rn即把test类改成:rnclass test extends TextBoxrnrn Command com_pub = new Command("开启", Command.OK, 0);rn Command com_back = new Command("返回", Command.BACK, 1);rn test()rn rn super(null, "", 500, TextField.ANY);rn this.addCommand(com_pub);rn this.addCommand(com_back);rn this.setString("test");rn rn ......rn
出现的原因??">Exception in thread "main" java.lang.NoClassDefFoundError出现的原因??
大家看看,前几天我的JAVA还运行的好好的,不知是不是因为昨天安装TOMCAT,然后配置JSP环境的问题,今天运行JAVA程序,用JAVAC还好,可用JAVA时,就<em>出现</em>了下面的提示;rnException in thread "main" java.lang.NoClassDefFoundErrorrnrn我的环境变量 CLASSPATH:%JAVA_HOME%\lib;%TOMCAT_HOME%\binrn JAVA_HOME:C:\安装的软件\j2sdk-1_4_0-winrn TOMCAT_HOME:C:\安装的软件\jakarta-Tomcat 5.0rn我的JAVA程序都放在D:\java练习rn本人在CMD下使用 D:\java练习>JAVAC a.javarn 这句运行还好rn但下面一句 D:\java练习>java arn就<em>出现</em> Exception in thread "main" java.lang.NoClassDefFoundError: arnrn顺便:有没有人给我解释一下classpath是什么意思,在实际的cmd操作中有什么用处?rn谢谢
JBuilder2006编译出现"java.lang.NoClassDefFoundError"怎么解决?
<em>错误</em>代码如下:rnjava.lang.NoClassDefFoundError: Files\Borland\JBuilder2006\j2mewtk2/2rnException in thread "main"
出现Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
我已经安装了JDK1.4.2.在C:\JDK目录下,rn并且已经在系统的path目录下面添加了C:\JDK\bin;.;C:\JDK\librn注:查过以前的贴子,其中的"."已经放进去了.rnrn现在编辑了一个最简单的HelloWorld.java,编译通过,但是运行时rn还是<em>出现</em>"Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld"这样的<em>错误</em>!!rnrn各位弟兄帮帮忙,rn
为什么会出现java.lang.NoClassDefFoundError: org/ksoap2/SoapFault
这个类的包我在工程属性下面通过添加external jars导入了,rn编译时通过了,但运行MIDlet时就<em>出现</em>这个<em>错误</em>了
运行java * ,出现Exception in thread "main" java.lang.NoClassDefFoundError:
用javac * 可以编译过去,但rn运行java hello ,<em>出现</em>Exception in thread "main" java.lang.NoClassDefFoundError: hellorn如果是设置问题 应该如何设置
汇编语言程序设计之条件指令和宏指令下载
汇编语言中的宏指令会让人感到汇编语言也是很强大的,是可以和高级语言相提并论的~ 相关下载链接:[url=//download.csdn.net/download/fuji116116/2417580?utm_source=bbsseo]//download.csdn.net/download/fuji116116/2417580?utm_source=bbsseo[/url]
hibernate 配置 C3P0 连接池下载
hibernate 配置 C3P0 连接池 相关下载链接:[url=//download.csdn.net/download/iamagril/4358285?utm_source=bbsseo]//download.csdn.net/download/iamagril/4358285?utm_source=bbsseo[/url]
黑马—毕向东java基础PPT+java高薪技术PPT+代码下载
包括:毕向东25天java 黑马程序员 毕向东 Html css JavaScript视频教程 张张孝祥 Java基础加强 01 等全部课程PPT及全部代码 相关下载链接:[url=//download.csdn.net/download/zj3911507/7533571?utm_source=bbsseo]//download.csdn.net/download/zj3911507/7533571?utm_source=bbsseo[/url]
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件
我们是很有底线的