Java.lang.NullPointerException in sun code with latest JRE (1.6.0_02)
We upgraded to the latest JRE and when we go to our website which has an unsigned applet and I answer Yes to trust it, the applet never runs.
I turned on debugging in the java console and see this after the certificate negotiation stuff is sent bck and forth:
security: Certificate has failed the verification with the SSL Root CA certificates
security: Invalid certificate from HTTPS server
java.lang.NullPointerException
at com.sun.deploy.ui.UIFactory.showSecurityDialog(Unknown Source)
at com.sun.deploy.security.TrustDeciderDialog.showDialog(Unknown Source)
at com.sun.deploy.security.X509ExtendedDeployTrustManager.checkServerTrusted(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
security: Adding certificate in Deployment denied certificate store
security: Added certificate in Deployment denied certificate store
For another person at same IE level and JRE level it works fine and debug for that shows:
security: Certificate has failed the verification with the Internet Explorer ROOT certificates
security: Invalid certificate from HTTPS server
security: Adding certificate in Deployment session certificate store
security: Added certificate in Deployment session certificate store
security: Saving certificates in Deployment session certificate store
security: Saved certificates in Deployment session certificate store
Is there something wrong with the "Deployment session certificate store" in the first instance? Treid un/reinstalling the JRE but it didn;t fix things.
Regenerate what certificate? The applet is unsigned.
Plus other people with the same IE level and same JRE level do not have this problem, which leads me to think it is something specific to this user, like maybe the deployment session certificate store. Is that a file someplace we can like delete to start clean?
Edited by: Jim_does_java on Oct 1, 2007 4:56 AM
Similar Messages
-
Hi Everyone:
We are on JDeveloper 11.1.2 & JHeadstart 11.1.2. When testing an application that had previously been written in 10g and migrated to 11g, then migrated again to 11.1.2 because our database has logical composite keys, we have found that if we manually inputted an invalid value into the inputtext box of a primary key that has an LOV on it, the following message came up.
"java.lang.NullPointerException
ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #"
with a random number displayed. We wondered where the java.lang.NullPointerException was coming from and then on a whim, tried to see if it couldn't find the error messages that were previously found in ApplicationResources_en.properties file in 10g. So I manually copied all of the error messages found in the ApplicationResources_en.properties file in 10g, into the end of the ApplicationResources_en.properties file on 11.1.2. There were only about 100+ messages in the 11g version of the ApplicationResources_en.properties file when there were almost 3,000+ messages in the 10g version of the ApplicationResources_en.properties. I then re-ran the job, and the proper error message comes out with no java.lang.NullPointerException message when I input an invalid value into the primary key (+Artransactioncode with this TransCode does not exist).+
Is this a known issue when converting from 10g to 11g?
Mary
UofWHi Everyone:
I have done some further testing. We are using a re-usable Business Components .jar file to access our entities. We import the .jar file into the project and create the ViewObjects and ViewLinks from that .jar file.
It APPEARS that a test case using the HRSchema and using the Entities & Associates generates the constraint error messages, but when I use the .jar file of re-usable business components imported into the project, those constraint error messages are not created in the ApplicationResources_en.properties file. I have created two testcases as well as the re-usable .jar file that I can send to you to show what I mean.
This behaviour seems to have shown up in 11.1.2 as there was no problem before this.
Please let me know where you'd like me to upload the testcases.
Thank you.
Mary
UofW -
About java.lang.NullPointerException in struts code
Hi friends...
I am working on the java struts in my healthcare project.I have used the following IDEs & environments
1) Eclipse
2) Tomcat 5.5
3) Servlet 2.4
I have created all the necessary jsp files & action ,form classes but i can't get my code compiled
Also i obtainned a sample source code of File Upload in struts.But it don't get compiled
The content of my struts-config.xml file is as follows
<form-beans>
<form-bean name="FileUpload" type="India.Beans.StrutsUploadForm"/>
</form-beans>
<global-forwards>
</global-forwards>
<!-- Upload Action Mapping -->
<action-mappings>
<action path="/FileUpload" type="India.Beans.StrutsUploadAction" name="FileUpload" scope="request" validate="true" input="/pages/FileUpload.jsp">
<forward name="success" path="/pages/uploadsuccess.jsp">
</forward>
</action>
</action-mappings>
it shows exception as
java.lang.NullPointerException
So please guide me ..hi,
If you are loading a resource (property) file from a jar file you can use
getResourceAsStream("com/test/test.properties").
if the propery file is in outside of your jar file . you can use
Property portalProps = new Property ();
try {
FileInputStream fileInputStream = new FileInputStream("<FilePath + FileName>");
portalProps.load(fileInputStream);
fileInputStream.close();
} catch (IOException e) {
//Log the error
refer the following link for more details
http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html -
Java.lang.NullPointerException in the code to read a properties file
I have written the following code to read a properties file...........
<b>
public Property(String fileName)
try
InputStream is = MyClassName.class.getClass().getClassLoader().getResourceAsStream(fileName);
prop.load(is);
is.close();
catch (Exception ex)
System.out.println("The Exception is: " + ex.getMessage());
ex.printStackTrace();
</b>
But this code is giving <b> java.lang.NullPointerException </b> at <b> prop.load(is) </b>
please help me....
regards
Brahmachaitanyahi,
If you are loading a resource (property) file from a jar file you can use
getResourceAsStream("com/test/test.properties").
if the propery file is in outside of your jar file . you can use
Property portalProps = new Property ();
try {
FileInputStream fileInputStream = new FileInputStream("<FilePath + FileName>");
portalProps.load(fileInputStream);
fileInputStream.close();
} catch (IOException e) {
//Log the error
refer the following link for more details
http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html -
Java.lang.NullPointerException in 8.1 with soap doc literal binding
hi,
scenario:
1) web service with soap doc literal binding on external server. web service
is expecting a complex input argument
2) generate web service control in weblogic 8.1 (sp1) workshop
3) wrote jws file to use the web service control
4) run test and hit the following call stack
NOTE: this is only encountered when the web service is expecting a complex input
argument. if the web service is expecting a simple input argument, it works fine
java.lang.NullPointerException at com.bea.xml.marshal.AtomicValueMPlan.marshal(AtomicValueMPlan.java:90)
at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:337) at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307) at
com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349) at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307) at
com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349) at com.bea.xml.marshal.MethodMPlan.marshal(MethodMPlan.java:260)
at com.bea.wlw.runtime.core.dispatcher.DispMessage.marshalXml(DispMessage.java:386)
at com.bea.wlw.runtime.jws.call.SoapCall.<init>(SoapCall.java:150) at com.bea.wlw.runtime.jws.call.SoapHttpCall.<init>(SoapHttpCall.java:61)
at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:559)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:359)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420) at
com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393) at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:387)
at $Proxy8.DocLitQueryByExample(Unknown Source) at doc_lit_bs.bs_doc_litControlTest.DocLitQueryByExample(bs_doc_litControlTest.jws:31)
is there a workaround to the problem?http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=4270
Bolei wrote:
>
hi,
scenario:
1) web service with soap doc literal binding on external server. web service
is expecting a complex input argument
2) generate web service control in weblogic 8.1 (sp1) workshop
3) wrote jws file to use the web service control
4) run test and hit the following call stack
NOTE: this is only encountered when the web service is expecting a complex input
argument. if the web service is expecting a simple input argument, it works fine
java.lang.NullPointerException at com.bea.xml.marshal.AtomicValueMPlan.marshal(AtomicValueMPlan.java:90)
at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:337) at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307) at
com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349) at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307) at
com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349) at com.bea.xml.marshal.MethodMPlan.marshal(MethodMPlan.java:260)
at com.bea.wlw.runtime.core.dispatcher.DispMessage.marshalXml(DispMessage.java:386)
at com.bea.wlw.runtime.jws.call.SoapCall.<init>(SoapCall.java:150) at com.bea.wlw.runtime.jws.call.SoapHttpCall.<init>(SoapHttpCall.java:61)
at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:559)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:359)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420) at
com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393) at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:387)
at $Proxy8.DocLitQueryByExample(Unknown Source) at doc_lit_bs.bs_doc_litControlTest.DocLitQueryByExample(bs_doc_litControlTest.jws:31)
is there a workaround to the problem? -
Java.lang.NullPointerException when using readTemplate with WLST offline
I imported WLST offline as a module in to jython script and tried
wlstOffline.readTemplate('../wls.jar')
It gives me a java.lang.NullPointerException.
Here is the entire stack trace
Traceback (innermost last):
File "testOffline.py", line 3, in ?
File "E:\wlst\wlstOffline.py", line 78, in readDomain
java.lang.NullPointerException
at com.bea.plateng.domain.script.jython.WLScriptContext.handleException(
Ljava/lang/Exception;Ljava/lang/String;)V(WLScriptContext.java:897)
at com.bea.plateng.domain.script.jython.WLScriptContext.readDomain(Ljava
/lang/String;)V(WLScriptContext.java:244)
at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava/lang/Object;ILjava/
lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
at jrockit.reflect.NativeMethodInvoker.invoke(Ljava/lang/Object;[Ljava/l
ang/Object;)Ljava/lang/Object;(Unknown Source)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava/lang/Object;[
Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;
I)Ljava/lang/Object;(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(Lorg/python/core/PyObjec
t;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject;(PyRe
flectedFunction.java:???)
at org.python.core.PyMethod.__call__([Lorg/python/core/PyObject;[Ljava/l
ang/String;)Lorg/python/core/PyObject;(PyMethod.java:???)
at org.python.core.PyObject.__call__(Lorg/python/core/PyObject;)Lorg/pyt
hon/core/PyObject;(PyObject.java:???)
at org.python.core.PyInstance.invoke(Ljava/lang/String;Lorg/python/core/
PyObject;)Lorg/python/core/PyObject;(PyInstance.java:???)
at wlstOffline$py.readDomain$16(Lorg/python/core/PyFrame;)Lorg/python/co
re/PyObject;(E:\wlst\wlstOffline.py:78)
at wlstOffline$py.call_function(ILorg/python/core/PyFrame;)Lorg/python/c
ore/PyObject;(E:\wlst\wlstOffline.py:???)
at org.python.core.PyTableCode.call(Lorg/python/core/PyFrame;Lorg/python
/core/PyObject;)Lorg/python/core/PyObject;(PyTableCode.java:???)
at org.python.core.PyTableCode.call(Lorg/python/core/PyObject;Lorg/pytho
n/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/pytho
n/core/PyObject;(PyTableCode.java:???)
at org.python.core.PyFunction.__call__(Lorg/python/core/PyObject;)Lorg/p
ython/core/PyObject;(PyFunction.java:???)
at org.python.core.PyObject.invoke(Ljava/lang/String;Lorg/python/core/Py
Object;)Lorg/python/core/PyObject;(PyObject.java:???)
at org.python.pycode._pyx0.f$0(Lorg/python/core/PyFrame;)Lorg/python/cor
e/PyObject;(testOffline.py:3)
at org.python.pycode._pyx0.call_function(ILorg/python/core/PyFrame;)Lorg
/python/core/PyObject;(testOffline.py:???)
at org.python.core.PyTableCode.call(Lorg/python/core/PyFrame;Lorg/python
/core/PyObject;)Lorg/python/core/PyObject;(PyTableCode.java:???)
at org.python.core.PyCode.call(Lorg/python/core/PyFrame;)Lorg/python/cor
e/PyObject;(PyCode.java:???)
at org.python.core.Py.runCode(Lorg/python/core/PyCode;Lorg/python/core/P
yObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;(Py.java:???)
at org.python.core.__builtin__.execfile_flags(Ljava/lang/String;Lorg/pyt
hon/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/CompilerFlags;)V(__
builtin__.java:???)
at org.python.util.PythonInterpreter.execfile(Ljava/lang/String;)V(Pytho
nInterpreter.java:???)
at org.python.util.jython.main([Ljava/lang/String;)V(jython.java:???)
java.lang.NullPointerException: java.lang.NullPointerException
[/pre]
Can any one tell me what might be the problem.
ThanksThe domain exists.
And the line 78 in wlstOffline.py is as follows
77 def readDomain(domainDir):
78 WLS.readDomain(domainDir)
79 updateCmo()
80 updatePrompt() -
Oracle 8.1.6 Installation fails with java.lang.NullpointerException
HI,
We are installing Oracle 8.1.6 on a D Class machine running HPUX 11.0 OS
While i start the Universal Installer, it fails with the following
error.
Warning: Missing charsets in String to FontSet conversion
Warning: Cannot convert string "-dt-interface
system-medium-r-normal-s*-*-*-*-*-*-*-*-*" to type FontSet
Warning: Missing charsets in String to FontSet conversion
Warning: Cannot convert string "-dt-interface
user-medium-r-normal-s*-*-*-*-*-*-*-*-*" to type FontSet
Exception java.lang.NullPointerException occurred..
java.lang.NullPointerException
at sun.awt.motif.MComponentPeer.setFont(MComponentPeer.java:197)
at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:73)
at sun.awt.motif.MToolkit.createFrame(MToolkit.java:177)
at java.awt.Frame.addNotify(Frame.java:203)
at java.awt.Window.show(Window.java:143)
at java.awt.Component.show(Component.java:511)
at java.awt.Component.setVisible(Component.java:473)
at
oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:419)
My ORACLE_TERM is set to dtterm.
Can anybody give some suggestions what would be the problem..?
Thanks
vinod
nullPretty much the same thing, Tomcat is the web server in CUCM, so that should have been sufficient.
Please rate all useful posts!
Chris -
Java.lang.NullPointerException when working with one rfc
Hi,
java.lang.NullPointerException error when working with one rfc.
Regards,
Gurprit BhatiaHi
Can you elaborate your problem?
Where exactly getting the problem ?
Regards
Akshaya -
Hello every body,
I'm trying to implement EJB 3.0 JPA .
The entities Users ,and Products are created ,
and the client is as shown below:
package com.prapansol.demos;
import java.util.List;
import javax.ejb.EJB;
import com.xyz.demos.ejb30.Users;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.persistence.PersistenceContext;
public class Client {
private EntityManager manager;
public Client() {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("EJB");
EntityManager em=emf.createEntityManager();
this.setEntityManager(em);
/** <code>select o from Users o</code> */
public List<Users> queryUsersFindAll() {
List<Users> users =null;
try{
users= getEntityManager().createNamedQuery("Users.findAll").getResultList();
//@NamedQuery(name = "Users.findAll", query = "select o from Users o") has been defined in Users entity
}catch(Exception e){
System.out.println(e.getClass().getName());
System.out.println(e.getMessage());
e.printStackTrace();
return users;
public void shutDown(){
getEntityManager().close();
public void setEntityManager(EntityManager manager) {
this.manager = manager;
public EntityManager getEntityManager() {
return manager;
public static void main(String[] args) {
Client client = new Client();
List<Users> users=client.queryUsersFindAll();
for(Users user : users ){System.out.println(""+user.getFirstName()+user.getLastName()); }
The persistence.xml file is:
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="EJB">
<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
<class>com.xyz.demos.ejb30.Users</class>
<class>com.xyz.demos.ejb30.Products</class>
<class>com.xyz..demos.ejb30.ServiceRequests</class>
<class>com.xyz.demos.ejb30.ServiceHistories</class>
<class>com.xyz.demos.ejb30.ExpertiseAreas</class>
<properties>
<property name="jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/>
<property name="jdbc.connection.string" value="jdbc:oracle:thin:@localhost:1521:ORCL"/>
<property name="jdbc.user" value="scott"/>
<property name="jdbc.password" value="tiger"/>
<property name="toplink.logging.level" value="INFO"/>
</properties>
</persistence-unit>
</persistence>
Here are the log messages :
[TopLink Finest]: 2007.03.23 01:36:15.095--ServerSession(32012057)--Thread(Thread[main,5,main])--property=toplink.weaving; value=true
[TopLink Config]: 2007.03.23 01:36:15.323--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.Users] is being defaulted to: Users.
[TopLink Config]: 2007.03.23 01:36:15.335--ServerSession(32012057)--Thread(Thread[main,5,main])--The table name for entity [class com.prapansol.demos.technology.Users] is being defaulted to: USERS.
[TopLink Config]: 2007.03.23 01:36:15.360--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Users.city] is being defaulted to: CITY.
[TopLink Config]: 2007.03.23 01:36:15.377--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Users.email] is being defaulted to: EMAIL.
[TopLink Config]: 2007.03.23 01:36:15.431--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.ServiceHistories] is being defaulted to: ServiceHistories.
[TopLink Config]: 2007.03.23 01:36:15.435--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.ServiceHistories.notes] is being defaulted to: NOTES.
[TopLink Config]: 2007.03.23 01:36:15.456--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.ServiceRequests] is being defaulted to: ServiceRequests.
[TopLink Config]: 2007.03.23 01:36:15.460--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.ServiceRequests.status] is being defaulted to: STATUS.
[TopLink Config]: 2007.03.23 01:36:15.461--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.Products] is being defaulted to: Products.
[TopLink Config]: 2007.03.23 01:36:15.464--ServerSession(32012057)--Thread(Thread[main,5,main])--The table name for entity [class com.prapansol.demos.technology.Products] is being defaulted to: PRODUCTS.
[TopLink Config]: 2007.03.23 01:36:15.466--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Products.description] is being defaulted to: DESCRIPTION.
[TopLink Config]: 2007.03.23 01:36:15.466--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Products.image] is being defaulted to: IMAGE.
[TopLink Config]: 2007.03.23 01:36:15.467--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Products.name] is being defaulted to: NAME.
[TopLink Config]: 2007.03.23 01:36:15.468--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.ExpertiseAreas] is being defaulted to: ExpertiseAreas.
[TopLink Config]: 2007.03.23 01:36:15.470--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.ExpertiseAreas.notes] is being defaulted to: NOTES.
[TopLink Config]: 2007.03.23 01:36:15.574--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List com.prapansol.demos.technology.ServiceRequests.serviceHistoriesList] is being defaulted to: class com.prapansol.demos.technology.ServiceHistories.
[TopLink Config]: 2007.03.23 01:36:15.579--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [private com.prapansol.demos.technology.ServiceRequests com.prapansol.demos.technology.ServiceHistories.serviceRequests] is being defaulted to: class com.prapansol.demos.technology.ServiceRequests.
[TopLink Config]: 2007.03.23 01:36:15.592--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List com.prapansol.demos.technology.Users.serviceHistoriesList] is being defaulted to: class com.prapansol.demos.technology.ServiceHistories.
[TopLink Config]: 2007.03.23 01:36:15.593--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [private com.prapansol.demos.technology.Users com.prapansol.demos.technology.ServiceHistories.users] is being defaulted to: class com.prapansol.demos.technology.Users.
[TopLink Config]: 2007.03.23 01:36:15.593--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List com.prapansol.demos.technology.Users.expertiseAreasList] is being defaulted to: class com.prapansol.demos.technology.ExpertiseAreas.
[TopLink Config]: 2007.03.23 01:36:15.594--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [private com.prapansol.demos.technology.Users com.prapansol.demos.technology.ExpertiseAreas.users] is being defaulted to: class com.prapansol.demos.technology.Users.
[TopLink Config]: 2007.03.23 01:36:15.594--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [private com.prapansol.demos.technology.Products com.prapansol.demos.technology.ExpertiseAreas.products] is being defaulted to: class com.prapansol.demos.technology.Products.
[TopLink Config]: 2007.03.23 01:36:15.595--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List com.prapansol.demos.technology.Products.expertiseAreasList] is being defaulted to: class com.prapansol.demos.technology.ExpertiseAreas.
[TopLink Finer]: 2007.03.23 01:36:15.600--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.Users].
[TopLink Finer]: 2007.03.23 01:36:15.601--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.ServiceHistories].
[TopLink Finer]: 2007.03.23 01:36:15.601--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.ServiceRequests].
[TopLink Finer]: 2007.03.23 01:36:15.601--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.ExpertiseAreas].
[TopLink Finer]: 2007.03.23 01:36:15.602--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.Products].
[TopLink Finer]: 2007.03.23 01:36:15.604--Thread(Thread[main,5,main])--cmp_init_globalInstrumentation_is_null
[TopLink Finest]: 2007.03.23 01:36:15.613--ServerSession(32012057)--Thread(Thread[main,5,main])--begin deploying Persistence Unit EJB; state Predeployed; deploymentCount 0
[TopLink Finest]: 2007.03.23 01:36:15.633--ServerSession(32012057)--Thread(Thread[main,5,main])--property=toplink.logging.level; value=FINEST; translated value=FINEST
[TopLink Finest]: 2007.03.23 01:36:15.634--ServerSession(32012057)--Thread(Thread[main,5,main])--property=toplink.logging.level; value=FINEST; translated value=FINEST
[TopLink Info]: 2007.03.23 01:36:15.639--ServerSession(32012057)--Thread(Thread[main,5,main])--TopLink, version: Oracle TopLink Essentials - 2006.8 (Build 060829)
[TopLink Finest]: 2007.03.23 01:36:15.646--ServerSession(32012057)--Thread(Thread[main,5,main])--end deploying
Persistence Unit EJB; state Undeployed; deploymentCount 0
Here is the Stack Trace:
Exception in thread "main" java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:85)
at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:170)
at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:537)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:180)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:230)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:84)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:127)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:121)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:76)
at com.prapansol.demos.Client.<init>(Client.java:29)
at com.prapansol.demos.Client.main(Client.java:83)
where am I doing wrong?
Why does sun.jdbc.odbc.JdbcOdbcDriver.initialize method get called when I'm using Oracle DataBase?
Am I missing any thing ?
I'll be thankful if any one help me find my fault?
Thanking you in Advance,
Regards,
SambaCheck the property names for configuring TopLink's internal connection pool. All of the JDBC property names should be prefixed with toplink.
Refer to the TopLink JPA extensions guide for more information.
http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html
Doug -
Uncaught error fetching image: java.lang.NullPointerException
Hi everybody,
I am developing standalone application using NetBeans,the aplication is running fine in netbeans IDE but not when Jar alone tried to run.I kept all the files related to application with the jar.
when running jar,the app is running fine upto some extent,and throwing exception at the time of fetching images from images folder which is placed inside "src folder"
class files package and images folder are in the src folder. the code is like this:
mLogo = new JLabel();
URL lUrlLogo = getClass().getResource("/images/eaze.gif");
System.out.print(lUrlLogo);
Image lLogoimage = Toolkit.getDefaultToolkit().createImage(lUrlLogo);//.getImage(lUrlLogo);
ImageIcon licon = new ImageIcon(lLogoimage);
mLogo.setIcon(licon);i tried by using Mainclass.class.getResource("/images/eaze.gif");
and also by using thread but dint solved
The exception is like this:
Uncaught error fetching image:
java.lang.NullPointerException
at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:99)
at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:113)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)don't specify an absolute path line "/images/eaze.gif" but use a relative path like "images/eaze.gif" or you might need the complete package path.
-
Client_text_io.fopen causes java.lang.NullPointerException
Hi all
I have the following very simple snippet of code:
declare
f client_text_io.file_type;
begin
f := client_text_io.fopen('C:\test.txt', 'r');
end;
If "C:\Test.txt" does NOT exist on the client, Webutil correctly pops up and complains "Can't open file" etc. But... when the file actually exists and is ready to be opened for read, the following exception is thrown in the console, and nothing happens:
java.lang.NullPointerException: charsetName
at java.io.InputStreamReader.<init>(Unknown Source)
at oracle.forms.webutil.file.FileFunctions.fopen(Unknown Source)
at oracle.forms.webutil.file.FileFunctions.getProperty(Unknown Source)
at oracle.forms.handler.UICommon.onGet(Unknown Source)
at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
at oracle.forms.engine.Runform.processMessage(Unknown Source)
at oracle.forms.engine.Runform.processSet(Unknown Source)
at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
at oracle.forms.engine.Runform.onMessage(Unknown Source)
at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2006-feb-23 10:36:18.653 ERROR>WUC-15 [FileFunctions.fopen()] Uventet fejl, undtagelse: java.lang.NullPointerException: charsetName
I have no idea, what goes wrong here.... can anyone help? I use Sun JPI 1.5 on the client.
Thanks in advance.Hi all
I have forms 9.0.4.6 and Webutil 1.0.6
When I use client_text_io.fopen like this:
declare
f client_text_io.file_type;
begin
f := client_text_io.fopen('C:\test.txt', 'r');
end;
I get an error:
ERROR>WUC-15 [FileFunctions.fopen()] Unexpected error, Exception: java.lang.NullPointerException
java.lang.NullPointerException
at sun.io.Converters.getConverterClass(Unknown Source)
at sun.io.Converters.newConverter(Unknown Source)
at sun.io.ByteToCharConverter.getConverter(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at oracle.forms.webutil.file.FileFunctions.fopen(FileFunctions.java:413)
at oracle.forms.webutil.file.FileFunctions.getProperty(FileFunctions.java:188)
at oracle.forms.handler.UICommon.onGet(Unknown Source)
at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
at oracle.forms.engine.Runform.processMessage(Unknown Source)
at oracle.forms.engine.Runform.processSet(Unknown Source)
at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
at oracle.forms.engine.Runform.onMessage(Unknown Source)
at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Could anybody help me? I really need to use this. -
HELP!!!! java.lang.NullPointerException
HELP!!!!
java.lang.NullPointerException
at csc.util.SQLstatement.prepStatement(SQLstatement.java:24)
at csc.util.dbutil.DBprcslogEnd(dbutil.java:713)
at tr_fets_ck.processMain(tr_fets_ck.java:266)
at tr_fets_ck.main(tr_fets_ck.java:175)
java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at tr_fets_ck.processMain(tr_fets_ck.java:183)
at tr_fets_ck.main(tr_fets_ck.java:175)
I can run my code using jdeveloper 10g using a default file and everything works fine but when I run my code in the production environment I get the error listed above.
Here's portions of the code.
public void processMain(csc.util.SQLstatement sq, String filename) {
try {
// Connect to the database
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("jdbc:odbc:TEST","test","test4xml");
// Open specified file
if (xu.Check_File_Processed(conn, filename)){
xu.WriteXMLProblem("FAILURE", err, "N/A", "FILE " filename " HAS ALREADY BEEN RUN SUCCESSFULLY","https://msis.k12.ms.us/SAP/MSIS_err.html#87");
UpdateFETSDistrict(conn, "N", filename, district, year, sq);
xu.Process_Results_Report(conn,err,filename);
conn.commit();
conn.close();
System.exit(0);
The code that I think is generating the error is:
if (CheckYearInd(conn,district, year, sq)) {
xu.WriteXMLProblem("FAILURE", err, "N/A", "FILE " filename " PREVIOUS YEAR DATA HAS ALREADY BEEN COMPLETED","https://msis.k12.ms.us/SAP/MSIS_err.html#87");
UpdateFETSDistrict(conn, "N", filename, district, year, sq);
xu.Process_Results_Report(conn,err,filename);
conn.commit();
conn.close();
System.exit(0);
public static boolean CheckYearInd (Connection conn,
String district,
String year,
csc.util.SQLstatement sqs)
// check the FETS_DISTRICT_APPROVAL table for a record.
// Return FALSE if previous year data exists = Y.
// Return TRUE if no record exists
throws SQLException
PreparedStatement pstmt1 = null;
String SQLString = "select count(rowid) from FETS_DISTRICT_APPROVAL" +
" where DISTRICT_NUMBER = ? and "+
" YEAR = ? and " +
" BOND_DATA_IND = 'Y' and "+
" STATE_APPROVAL_STATUS = 'COMPLETED' and "+
" REQ_RESUBMISSION = 'N' ";
// System.out.println(SQLString);
pstmt1 = sqs.prepStatement(conn,SQLString);
pstmt1.setString(1,district);
pstmt1.setString(2,year);
ResultSet rset = pstmt1.executeQuery();
rset.next ();
if (rset.getInt(1) > 0) {
rset.close();
return false;
} else {
rset.close();
return true;
} // end CheckYearProcessedpackage csc.util;
import java.io.*;
import java.math.*;
import java.sql.*;
import java.util.Vector;
public class SQLstatement {
Vector vSQL_string = new Vector();
Vector vSQL_stmt = new Vector();
public PreparedStatement prepStatement(Connection conDB, String strSQL)
throws SQLException {
PreparedStatement pstmt = null;
try{
int intSQLIndex = vSQL_string.indexOf(strSQL);
if (intSQLIndex != -1) {
line 24==> pstmt = (PreparedStatement)vSQL_stmt.elementAt(intSQLIndex);
} else {
pstmt = conDB.prepareStatement(strSQL);
vSQL_string.addElement(strSQL);
vSQL_stmt.addElement(pstmt);
return pstmt;
} catch (SQLException e) {
System.err.println (e.getMessage()); // detail message
System.err.println ("* SQL ERROR * strSQL="+strSQL);
throw e;
} // end prepStatement()
} // end class SQLstatement -
Problem Creating Analytical Workspace - java.lang.NullPointerException
I can't seem to create a new analytical workspace using AWM on machine that doesn't allow me admin privileges, so I am really stumped.
Here is the error that I keep on getting:
=========================================
oracle.AWXML.AWException: java.lang.NullPointerException
at oracle.AWXML.AW.readAWDefinitions(AW.java:1339)
at oracle.olap.awm.dataobject.aw.WorkspaceDO.getModelAW(WorkspaceDO.java:739)
at oracle.olap.awm.dataobject.aw.WorkspaceDO.getModelAW(WorkspaceDO.java:701)
at oracle.olap.awm.navigator.node.WorkspaceNode.getModelerViewChildren(WorkspaceNode.java:361)
at oracle.olap.awm.navigator.node.WorkspaceNode.getChildren(WorkspaceNode.java:342)
at oracle.olap.awm.navigator.node.BaseNodeModel.refreshData(BaseNodeModel.java:74)
at oracle.olap.awm.navigator.node.BaseNodeModel.dTreeItemExpanding(BaseNodeModel.java:221)
at oracle.bali.ewt.dTree.DTreeDeferredParent.__fireExpansionChanging(Unknown Source)
at oracle.bali.ewt.dTree.DTreeDeferredParent.setExpanded(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNode.expandHelper(BaseNode.java:1921)
at oracle.olap.awm.navigator.node.BaseNode.access$000(BaseNode.java:93)
at oracle.olap.awm.navigator.node.BaseNode$ExpansionThread.run(BaseNode.java:1871)
Caused by: java.lang.NullPointerException
at oracle.AWXML.AW.readAWDefinitions(AW.java:1313)
... 11 more
=========================================
Importing from a template also produces an error that is different from the above, so importing is not an option. Won't post my error on importing as I want to concentrate on this one.
Just in case, the machine's version details for OLAP are as follows:
OLAP Analytic Workspace - 10.2.0.2.0 VALID
OLAP Catalog - 10.2.0.2.0 VALID
Oracle OLAP API - 10.2.0.2.0 VALID
Please help.Hi,
iam trying to install oracle 8i in fedora 4 with kernel version 2.6.11 and glibc-2.3.6-3
when iam trying to run ./runinstaller it is giving the following error.
And i want to know whether oracle 8i is supported on fedora 4. Plse tell me what all the linux flavours are supported for oracle 8i and also it is compatable for php4 or php5.
as we are trying to use php with oracle 8i database...!
######## error:
[oracle@localhost linux]$ ./runInstaller
Initializing Java Virtual Machine from ../stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/bin/jre. Please wait...
Exception java.lang.NullPointerException occurred..
java.lang.NullPointerException
at sun.awt.motif.MComponentPeer.setFont(MComponentPeer.java:192)
at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:68)
at sun.awt.motif.MToolkit.createFrame(MToolkit.java:137)
at java.awt.Frame.addNotify(Frame.java:196)
at java.awt.Window.show(Window.java:138)
at java.awt.Component.show(Component.java:528)
at java.awt.Component.setVisible(Component.java:490)
at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:419)
Plse help me...!
Thanks in advance.. -
Java.lang.NullPointerException: When Get the PDF File Name
Hi,
i try to follow the blog on <b>Handling FileUpload and FileDownload in NetWeaver Developer Studio(NWDS) 2004S</b> on /people/rekha.malavathu2/blog/2006/12/12/handling-fileupload-and-filedownload-in-netweaver-developer-studionwds-2004s
as i create a fileupload and i wish to get the file name and the pdf, then i to run and deploy it but i get <b>java.lang.NullPointerException</b>
the code are as below when i click on send email button
IPrivateEmail.IFileUploadNodeNode node = wdContext.nodeFileUploadNode();
IPrivateEmail.IFileUploadNodeElement fileUploadEle = node.createFileUploadNodeElement();
try{
IWDResource resource = WDResourceFactory.createResource(wdContext.currentContextElement().getFileUploadUI().read(true), wdContext.currentContextElement().getFileUploadUI().getResourceName(), WDWebResourceType.PDF, true);
fileUploadEle.setFileUploadAttr(resource);
fileUploadEle.setFileUploadName(wdContext.currentContextElement().getFileUploadUI().getResourceName());
node.addElement(fileUploadEle);
}catch(Exception e){
wdComponentAPI.getMessageManager().reportSuccess("ERROR"+e.getMessage());
but i wonder which part of the code i did wrongly.. as i wish to insert into my send email code
Properties props = new Properties();
String host = "SMTP HOST";
props.put("mail.smtp.host", host);
Session session = Session.getInstance(props, null);
MimeMessage message = new MimeMessage(session);
Address toAddress = new InternetAddress();
Address fromAddress = new InternetAddress();
Address ccAddress = new InternetAddress();
Address bccAddress = new InternetAddress();
try
MimeMultipart multipart = new MimeMultipart();
BodyPart messageBodyPart = new MimeBodyPart();
if (! wdContext.currentEmailElement().getFrom().equals(""))
fromAddress = new InternetAddress(wdContext.currentEmailElement().getFrom());
message.setFrom(fromAddress);
if (! wdContext.currentEmailElement().getTo().equals(""))
toAddress = new InternetAddress(wdContext.currentEmailElement().getTo());
message.setRecipient(Message.RecipientType.TO, toAddress);
if (! wdContext.currentEmailElement().getCc().equals(""))
ccAddress = new InternetAddress(wdContext.currentEmailElement().getCc());
message.setRecipient(Message.RecipientType.CC, ccAddress);
if (! wdContext.currentEmailElement().getBcc().equals(""))
bccAddress = new InternetAddress(wdContext.currentEmailElement().getBcc());
message.setRecipient(Message.RecipientType.BCC, bccAddress);
if (! wdContext.currentEmailElement().getSubject().equals(""))
message.setSubject(wdContext.currentEmailElement().getSubject());
if (! wdContext.currentEmailElement().getBody().equals(""))
messageBodyPart.setText(wdContext.currentEmailElement().getBody());
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();
String filename = IWDResource.getResourceName();
DataSource source = new FileDataSource(filename);
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName(source.getName());
messageBodyPart.setHeader("Content-Type","application/pdf");
multipart.addBodyPart(messageBodyPart);
message.setContent(multipart);
Transport.send(message);
catch (AddressException e)
wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
e.printStackTrace();
catch (SendFailedException e)
wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
e.printStackTrace();
catch (MessagingException e)
wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
e.printStackTrace();
so i wonder could anyone help me out.. as i need to get the pdf filename order to put into the variable call <b>filename</b> at the send mail code.
below is the error message
java.lang.NullPointerException
at com.sap.example.uploademail.Email.wdDoInit(Email.java:124)
at com.sap.example.uploademail.wdp.InternalEmail.wdDoInit(InternalEmail.java:146)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:759)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:712)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)facing same issue.
jdev 10.1.3.3.0, on expanding the database connection, I get a null pointer exception.
On the testing the connection it says 'success' though.
any inputs ? -
what can cause this exception ?
it does not point to any of my own source classes ,
i works fine in OC4J 10.1.3.1 developer preview but not in 10.1.3.00 standalone
06/10/16 16:44:55.109 web2: Servlet error
java.lang.NullPointerException
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)Thank you for reply.
I develop this application in 10.1.3.1.0 ,
I could finally run it on OC4J 10.1.3.1 developer preview in the server , so i have no need to work on running the application on 10.1.3.00 .
but now i have a deep problem with sending emails from my application deployed in production server , i found no solution for it .
it is really ODD in my eyes.
if you are intrested to look at the problem ,
here is its post in OC4J forum , in case that you have experiences , please take a look and advice me for it.
odd behaivior of javaMail in OC4J
Thanks
Maybe you are looking for
-
What is the difference between Mac OS in different languages?
I am thinking about buying a Mac with the new Intel processor. Here in Japan Apple only sells Macs with MacOS X in Japanese. However, my Japanese is far from good enough to use it if it is completely in Japanese. I know that in other Apple Online sto
-
Is Windows Live Mail 2012 compatible with Windows 8.1 ?
I'm having ongoing problems with WLM 2012 not responding after I try to attach a file to a new email. As soon as I click 'attach' the program stops responding and I have to close it down. I've used 'Find & Fix Problems' and in 'Programs' it offers di
-
Getting more info about a resource
Hi, could you please let me know what is the endpoint i can use to get detailed information about a resouce, for example if i have a virtual network "foo" then how do get the which address space and subnets are in that network , The api endpoint i ca
-
Combobox removing focus?
Why when I use the combobox component does it remove focus from other movieclips?? For instance...I have a button with onRollOver and onRollOut functions. These work fine, but once I click on a combobox, they break...and won't work. I've looked in ot
-
How to combine Digital Output, a delay and Analog Input in a fast loop
I need to develop a process loop that runs at least at 250 Hz that performs a Digital output, than a delay of 50 microseconds and than an analog input of all the channels. All will be done using ATI MIO 64E3 card. Of course, the acquired data will be