Problem with HttpsURLConnection - classcastexception

i declared url connection from java.net pakage thru weblogic server
when i am trying to execute following servlet
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.net.URL;
public class SimpleServlet extends HttpServlet
public void doGet (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
java.net.URL url = new java.net.URL("http:\\www.mail.yahoo.com");
System.out.println("url class name is -->"+ url.getClass().getName());
java.net.URLConnection urlc = url.openConnection();
System.out.println("urlc class name is "+urlc.getClass().getName());
// System.out.println("url open connection class name is -->"+ url.openConnection().getClass().getName());
// System.out.println("SimpleServlet 1 ->com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection");
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection urlcon = (com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection) url.openConnection();
System.out.println("class name is .."+urlcon.getClass().getName());
the out put is showling weblogic class. it should not be, how to set property pkgs.handlers in weblogic
thanks in advance
Bala
[email protected]

Why didn't you call ResultSet.getDouble(columnIndex) or Resultset.getFloat(columnIndex) in the first place, rather than whatever you did? Then the database driver would have handled the data translation for you instead of making you do all that nasty casting.

Similar Messages

  • Problems with a ClassCastException

    I've got a quick programming error that I need some help with -
    I've never encountered this problem before...and so its a bit weird. I was attempting to incorporate a JAVA applet in my HTML file. Normally, well, it works. This time however whenever the page loads the applet says "Class File not loaded: java.lang.ClassCastException". I searched the site for information on the exception...but I didn't get any help. AT first I thought it was a file inheritance error - not so. SO - can someone help me out with this? What does it mean? How do I fix it?

    however, can you extend 2 classes? My
    applet already extends JFrame...can I make it extend
    both? No, you can't. But i'm pretty sure you have to extend Applet or JApplet, so you'll probably need to rethink your design.

  • Problem with HttpsURLConnection

    Hello,
    I have a problem when I use HttpsURLConnection. I have this code:
    import java.security.*;
    import com.sun.net.ssl.*;
    import javax.net.ssl.*;
    import javax.net.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.net.ssl.HttpsURLConnection;
    public class ConexionPrueba
         public static void main (String[] args) {
         try {
              URL URL = new URL("https://194.140.2.144:7002/recepcionXML/recepcionLOC");
              System.getProperties().put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
              java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
              javax.net.ssl.HttpsURLConnection HttpCon = (javax.net.ssl.HttpsURLConnection) URL.openConnection();
              System.out.println("me he conectado a: " + HttpCon.toString());
              HttpCon.setDoOutput( true );
              HttpCon.setDoInput( true );
    HttpCon.setRequestMethod( "POST" );
    HttpCon.setRequestProperty("server-protocol", "HTTP/1.1");
    HttpCon.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
    HttpCon.setUseCaches(false);
    FileWriter fd = new FileWriter("resultado_localizacion.xml");
    BufferedReader bufferInput = null;
    bufferInput = new BufferedReader(new InputStreamReader(HttpCon.getInputStream()));
    String str = bufferInput.readLine();
    while (str != null) {
    fd.write(str);      
         if (str.equals("</GPPM_IT>"))
         break;
    str = bufferInput.readLine();
         } catch (SSLHandshakeException e2) {
              e2.printStackTrace();
         }catch (Exception e) {
              e.printStackTrace();
    public ConexionPrueba() {}
    public void conectar() {
    try {
         // System.getProperties().setProperty("java.protocol.handler.pkgs", "HTTPClient");
         //String resultado = (String) System.getProperties().get("java.protocol.handler.pkgs");
         //System.out.println("resultado es: " + resultado);
    //Handler handler = new Handler();
    //System.out.println("creando el handler: " + handler.toString());
         URL httpURL = new URL("https://194.140.2.144:7002/recepcionXML/recepcionLOC?CLIENT=patricia&CLIENT_PASSWD=patricia&USERID=34678625168&USERID_TYPE=MSISDN");
         Conectar conectar = new Conectar(httpURL);
         conectar.connect();
         System.out.println("la url a la que voya a llamar es: " + httpURL.toString());
         // System.out.println("estoy pasando despues de crear la url");
    //URLConnection con = handler.openConnection(httpURL);
    //System.out.println("pasando por detras de URLConnection");
    //HTTPConnection con = new HTTPConnection("https", "https://194.140.2.144:7002/recepcionXML/recepcionLOC?CLIENT=patricia&CLIENT_PASSWD=patricia&USERID=34678625168&USERID_TYPE=MSISDN", -1);
    //      HTTPConnection con = new HTTPConnection(httpURL);
    //System.out.println("pasando despues de abrir una URL Connection");
    //HTTPConnection con = new HTTPConnection(httpURL);
    //Cogemos por post lo que hay en el response
    HTTPResponse rsp = con.Post("c:/jswdk101/jswdk-1.0.1/respuesta_localizacion.xml");
    //URLConnection con = httpURL.openConnection();
    //      System.out.println("intentando conectarme....");
    // con.setDoInput(true);
    // con.setDoOutput(true);
    * Recojo el fichero que me ha enviado Localizacion
    /* FileWriter fd = new FileWriter(fichero_salida);
    // Recojo la respuesta del servlet
    BufferedReader bufferInput = null;
    // bufferInput = new BufferedReader(new InputStreamReader(con.getInputStream()));
    bufferInput = new BufferedReader(new InputStreamReader(rsp.getInputStream()));
    String str = bufferInput.readLine();
    while (str != null) {
    fd.write(str);      
         if (str.equals("</GPPM_IT>"))
         break;
         str = bufferInput.readLine();
    } catch (Exception e){
    e.printStackTrace();
    When i run this class, I have this exception:
    javax.net.ssl.SSLHandshakeException: Couldn't find trusted certificate
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(DashoA6275)
    at com.sun.net.ssl.internal.ssl.Handshaker.process_record(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
    at java.io.OutputStream.write(OutputStream.java:58)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:562)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(DashoA6275)
    at ConexionPrueba.main(ConexionPrueba.java:35)
    I hope that you can help me. Thanks,
    Patricia

    Try reading this documentation: http://developer.java.sun.com/developer/technicalArticles/Security/secureinternet2/

  • Problem with ClassCastException in web application

    Hello,
              I'm trying to deploy a web application in WLS 5.1 and I'm getting the
              "dreaded" ClassCastException every time when JSP tries to read a bean
              from the request or session. Under my architecture (actually it's just
              the regular "model 2" ) bean is populated by a servlet, set on the
              request and then retrieved by JSP (servlet forwards to JSP). Everything
              work fine when I register servlets in weblogic.properties, but
              ClassCastException is thrown on any attempt to read from the request if
              the same JSPs and servlets are deployed as web application.
              Has anybody come across the same problem?
              Thanks in advance for help.
              Alexander
              

    Hello,
              This is all well and good as a temporary bug, but it's totally unrealistic for
              the future. Two points:
              * The ClassLoader doesn't need to be discarded, it just needs to be cleared.
              * Other servlet engines seem to be able to handle this.
              Hope it's on its way to resolution!
              TDoan wrote:
              > Alexander:
              >
              > I had some problem with ClassCastException, and recently I found out what it
              > was that causing it. I'm sure if this is the same problem you are having,
              > but please read the following paragraph.
              >
              > I cutted this from http://www.weblogic.com/docs51/classdocs/API_servlet.html
              > ClassCastException and HTTP Sessions
              >
              > You might encounter a ClassCastException while developing servlets that use
              > HTTP sessions. This could happen as a result of the following set of events:
              >
              > a.. You store a reference to a custom class, myFoo, in an HTTP session.
              >
              > b.. While in mid-session, you change your servlet (or JSP or JHTML),
              > causing it to be reloaded. In fact, it is necessary for it to be reloaded by
              > a completely new class loader, and the old class loader that had previously
              > loaded it must be discarded.
              >
              > c.. Because your custom class myFoo is also located under the servlet
              > classpath, it too is reloaded by the new class loader.
              >
              > d.. Now, when you retrieve myFoo from the HTTP session, you cast it to the
              > expected type, but you recieve a ClassCastException. The exception is thrown
              > even if class myFoo has not changed. Because it has been loaded by a
              > different class loader, it is regarded by the JVM as incompatible.
              > Note: If you are using session persistence, the class contents must be
              > serialized, and you will not encounter this exception.
              >
              > Here are some suggested work-arounds to this problem:
              >
              > a.. Do not place your class myFoo in the servlet classpath. Instead, place
              > it in the system classpath or the weblogic.class.path, which are accessible
              > by WebLogic Server. The class will not be reloaded when the servlet is
              > modified. This drawback to this solution is that you cannot prototype the
              > myFoo class, because you must restart the server in order to reload the
              > class after it is modified.
              >
              > b.. If you need to prototype the class, you can write a wrapper method
              > within it to store and retrieve its contents to and from the session. You do
              > not access the class directly from the session, but instead call it is
              > wrapper methods to store or populate it is contents from the session. As
              > long as you use standard Java class types to store the class contents, they
              > will not be reloaded when the servlet is reloaded. This approach has
              > performance drawbacks because your wrapper methods would need to set or get
              > multiple name=value pairs for each class's attributes.
              >
              > c.. Another work-around is to catch the ClassCastException, and replace
              > the old class that is stored in the session with a newly instantiated class,
              > or remove it from the session. Unfortunately, you lose the session data that
              > was previously stored in the class, so you must write your application to
              > handle this scenario. This is the easiest solution to the problem-remember
              > that you should not be storing critical information in an HTTP session, but
              > rather storing it in a database.
              > Note: The ClassCastException generally occurs while you are developing
              > your servlets, and should not be an issue in a stable production system. If
              > you are upgrading your system online, you might wish to warn your customer
              > base.
              >
              > Hope it helps,
              > Tin
              >
              > "Alexander Ananiev" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hello,
              > >
              > > I'm trying to deploy a web application in WLS 5.1 and I'm getting the
              > > "dreaded" ClassCastException every time when JSP tries to read a bean
              > > from the request or session. Under my architecture (actually it's just
              > > the regular "model 2" ) bean is populated by a servlet, set on the
              > > request and then retrieved by JSP (servlet forwards to JSP). Everything
              > > work fine when I register servlets in weblogic.properties, but
              > > ClassCastException is thrown on any attempt to read from the request if
              > > the same JSPs and servlets are deployed as web application.
              > > Has anybody come across the same problem?
              > >
              > > Thanks in advance for help.
              > > Alexander
              > >
              

  • Problem with java.sql.Clob and oracle.sql.CLOB

    Hi,
    I am using oracle9i and SAP web application server. I am getClob method and storing that in java.sql.Clob and using the getClass().getName() I am getting the class name as oracle.sql.CLOB. But when I am trying to cast this to oracle.sql.CLOB i am getting ClassCastException. The code is given below
    java.sql.Clob lOracleClob = lResultSet.getClob(lColIndex + 1);
    lPrintWriter = new PrintWriter(new BufferedWriter (((oracle.sql.CLOB) lOracleClob).getCharacterOutputStream()));
    lResourceStatus = true;
    can anybody please tell me the what is the problem with this and solution.
    thanks,
    Ashok.

    Hi Ashok
    You can get a "ClassCastException" when the JVM doesn't have access to the specific class (in your case, "oracle.sql.CLOB").
    Just check your classpath and see if you are referring to the correct jar files.
    cheers
    Sameer
    PS: Please award points if you find the answer useful

  • Problem with RMI in ADB T75 receiver

    Hi:
    I have a problem with an xlet that uses the RMI (IXC) API in the ADB T75 development settop box.
    I export an object (of type MyObject) implementing the Remote interface, and, later, I import it with no problem.
    The problem appears after importing the object, when I try to cast the imported object to the type of the exported object (type MyObject) for using it (example on page 371 of the marvelous Morris book).
    If I import the object in the same xlet where I export it (a little bit useless), the process works fine as the class of the imported object (remoteObject.getClass().getName()) is the same of the exported object.
    But, when importing the object from another xlet, doing the cast fails (ClassCastException). This time, remoteObject.getClass().getName() returns the name "stub_MyObject_ca_ba" ( "ca" is the OrgID and "ba" is the AppID of the exporting xlet). That is, the middleware is returning to the importing xlet an object of the stub class.
    The ClassCastException seems to be right, as the the superclass of the "stub_MyObject_ca_ba" is directly java.lang.Object. That is, the types of the exported object (MyObject) and the returned object (stub_MyObject_ca_ba) are not in the same hierarchy.
    Has anyone one explanation or solution?
    May be a bug of the ADB T75 settop box?
    Thanks in advance for your comments
    Liga0068

    Problem solved. This was posted by Pretorius_594 on Feb 27, 2004.
    Sorry for bothering.
    The problem was due to that I was doing a cast to the original object (MyObject). That is:
    remoteObject = lookup(...)
    MyObject importedobject = (MyObject)remoteObject.
    I saw such an example in the Morris and Smith-Chaigneau book, but, definetively, that code seems not to work (at least in the ADB receiver)
    Th right solution is to extend the Remote interface (MyRemote) and to cast the importedobject to that type. That is:
    public interface MyRemote extends Remote ...
    remoteObject = lookup(...)
    MyRemote importedobject = (MyRemote)remoteObject.
    Liga0068

  • Problem with JNDI in WLS 5.1

    Hi all,
    i have a problem with JNDI in WLE 5.1.
    i am accessing an LDAP on another machine running Netscape Directory Server.
    The host URL is ldap://myhost:65535/o=marco, c=fi
    i am always getting back the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
    WLInitialContextFactory. Root exception is java.lang.ClassCastException: weblog
    ic.jndi.WLInitialContextFactory
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    58)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
    at javax.naming.InitialContext.init(InitialContext.java:218)
    at javax.naming.InitialContext.<init>(InitialContext.java:194)
    and my code is this:
    Hashtable _environment = new Hashtable();
    try {
    environment.put(Context.INITIALCONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    environment.put(Context.PROVIDERURL, "ldap://myhost:65535");
    if ((principal!=null) || (credentials!=null)) {
    environment.put(Context.SECURITYAUTHENTICATION, "simple");
    environment.put(Context.SECURITYPRINCIPAL, principal);
    environment.put(Context.SECURITYCREDENTIALS, credentials);
    context = new InitialContext(environment);
    parser = context.getNameParser(initialCtxFactory);
    } catch(Exception e) {
    e.printStackTrace();
    can anyone help me please??
    thanx in advance
    marco

    Take out the "weblogic.jndi.WLInitialContextFactory" and add the respective factory NAME..
    environment.put(Context.INITIALCONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Cheers,
    Naggi
    Senthil Kumar S wrote:
    http://weblogic.com/docs51/classdocs/API_jndi.html#delegate
    Marco wrote:
    Hi all,
    i have a problem with JNDI in WLE 5.1.
    i am accessing an LDAP on another machine running Netscape Directory Server.
    The host URL is ldap://myhost:65535/o=marco, c=fi
    i am always getting back the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
    WLInitialContextFactory. Root exception is java.lang.ClassCastException: weblog
    ic.jndi.WLInitialContextFactory
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    58)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
    at javax.naming.InitialContext.init(InitialContext.java:218)
    at javax.naming.InitialContext.<init>(InitialContext.java:194)
    and my code is this:
    Hashtable _environment = new Hashtable();
    try {
    environment.put(Context.INITIALCONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    environment.put(Context.PROVIDERURL, "ldap://myhost:65535");
    if ((principal!=null) || (credentials!=null)) {
    environment.put(Context.SECURITYAUTHENTICATION, "simple");
    environment.put(Context.SECURITYPRINCIPAL, principal);
    environment.put(Context.SECURITYCREDENTIALS, credentials);
    context = new InitialContext(environment);
    parser = context.getNameParser(initialCtxFactory);
    } catch(Exception e) {
    e.printStackTrace();
    can anyone help me please??
    thanx in advance
    marco--
    http://www.net4tech.com

  • Problem with Javamail in Red Hat

    Good afternoon.
    I have a problem with javamail in Red Hat.
    When i send a email in windows with my application, works well. But in Red Hat no works.
    Gives the following error:
    Java.lang.ClassCastException .... gnu.mail.handler.TextPlain
    Does anyone know that happens?

    You have much to learn. This is the wrong forum for most of it.
    You should be able to use the package manager in Linux to
    uninstall the Gnu version. Then read this:
    [http://java.sun.com/products/javamail/FAQ.html#install|http://java.sun.com/products/javamail/FAQ.html#install]

  • Problems with Java and Business Objects

    <p>Hello everybody,<br /><br />I&#39;m new in BusinessObjects/Crystal Report. Now, I have some problems with Business Objects for Java (Business Objects XI Release 2 Developer).</p><p> </p><p>1)  I create a report in the report designer. This report has a parameterfield. Before I run this report within a jsp web application I want fill the parameterfield with some values from the database. I found the following code snippet for this problem in your forum. But it don&#39;t works right, because it occurs a simple input field instead of a combo box with my database values. Where is my mistake? I need the combo box! (In debug mode I saw that the parameterfield was filled with my data!)</p><p><%@page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer,com.crystaldecisions.sdk.occa.report.application.ReportClientDocument,<br />com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,<br />com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,<br />java.io.IOException,<br />java.sql.Connection,<br />java.sql.DriverManager,<br />java.sql.ResultSet,<br />java.sql.SQLException,<br />java.sql.Statement,<br />java.util.Locale,<br />com.crystaldecisions.sdk.occa.report.application.DataDefController,<br />com.crystaldecisions.sdk.occa.report.data.FieldDisplayNameType,<br />com.crystaldecisions.sdk.occa.report.data.ParameterField,<br />com.crystaldecisions.sdk.occa.report.data.ParameterFieldDiscreteValue,<br />com.crystaldecisions.sdk.occa.report.data.Values,<br />com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%><%<br /><br />    try {<br /><br />        String reportName = "avoParameterfeld.rpt";<br />        ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);<br /><br />        if (clientDoc == null) {<br />            // Report can be opened from the relative location specified in the CRConfig.xml, or the report location<br />            // tag can be removed to open the reports as Java resources or using an absolute path<br />            // (absolute path not recommended for Web applications).<br /><br />            clientDoc = new ReportClientDocument();<br />            clientDoc.setReportAppServer("inproc:jrc");<br />            // Open report<br />            clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);<br /><br />             // Connection Info for fetching the resultSet<br />            String connectStr = "jdbc:oracle:thin:@it1srv19:1521:itoracle";<br />            String driverName = "oracle.jdbc.driver.OracleDriver";<br />            String userName = "user";        <br />            String password = "password";    <br /><br />            // TODO: Ensure this query is valid in your database. An exception will be thrown otherwise.<br />            String query = "SELECT DISTINCT AVONR FROM MBDEADM.AVO ORDER BY AVONR";<br />            ResultSet paramData = null;<br />           <br />            //we will now pass the resultset to the parameter to use as Default Values<br />            String parameterName = "AVONR2";<br />            int colIndex = 1; //this is the column in the ResultSet to use as the values<br />           <br />//            Load JDBC driver for the database that will be queried   <br />            Class.forName(driverName);<br /><br />            Connection connection = DriverManager.getConnection(connectStr, userName, password);<br />            Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE , ResultSet.CONCUR_READ_ONLY);<br />           <br />            paramData = statement.executeQuery(query);<br />           <br />            DataDefController dataDefController = clientDoc.getDataDefController();<br />           <br />            ParameterField origParamField = (ParameterField)dataDefController.getDataDefinition().getParameterFields().findField(parameterName, FieldDisplayNameType.fieldName, Locale.getDefault());<br />            ParameterField newParamField = (ParameterField)origParamField.clone(true);<br />           <br />            Values newVals = (Values)newParamField.getDefaultValues().clone(true);<br />            newVals.clear(); <br />            paramData.first();<br />            while(!paramData.isLast()){<br />                ParameterFieldDiscreteValue value = new ParameterFieldDiscreteValue();<br />                value.setValue(paramData.getObject(colIndex));<br />                newVals.add(value);<br />                paramData.next();<br />            }<br />            <br />            dataDefController.getParameterFieldController().modify(origParamField, newParamField);<br />            // Store the report document in session<br />            session.setAttribute(reportName, clientDoc);<br /><br />        }<br /><br />            // ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET **************** <br />            {<br />                // Create the CrystalReportViewer object<br />                CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();<br /><br />                //    set the reportsource property of the viewer<br />                IReportSource reportSource = clientDoc.getReportSource();               <br />                crystalReportPageViewer.setReportSource(reportSource);<br /><br />                // set viewer attributes<br />                crystalReportPageViewer.setOwnPage(true);<br />                crystalReportPageViewer.setOwnForm(true);<br /><br />                // Apply the viewer preference attributes<br /><br />                // Process the report<br />                crystalReportPageViewer.processHttpRequest(request, response, application, null);<br /><br />            }<br />            // ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************       <br /><br />    } catch (ReportSDKExceptionBase e) {<br />        out.println(e);<br />    }<br />   <br />%><br /><br /><br /><br />2) In a other report I tried to update the data source used by the report at runtime. I used the method &#39;setDataSource(ResultSet rs, String oldTableAlias, String newTableAlias)&#39; of the &#39;DatabaseController&#39;. I got a message like this: &#39;At present in Java reporting Component does not implement&#39;. I use JRC and the docs (http://support.businessobjects.com/global/interactive/xi/om/JRC/default.html) show me this method. Is it not possible to change the data at runtime in JRC? (I tried it with the methods &#39;setDataSource(IXMLDataSet rs, String oldTableAlias, String newTableAlias)&#39;, &#39;setDataSource(Object newds)&#39;, &#39;setDataSource(IDataSet ds, String oldTableAlias, String newTableAlias)&#39;, too. But the result was the same!)<br /><br /><br /><br />3) I tried to use Business Objects in JSF framework (Ver MyFaces 1.1.3) with the same samples above. But in JSF nothing work! I got the following exception. What is my problem? Can you get me a tutorial for jsf/BusinessObjects?<br /><br />08:21:43,165 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception<br />javax.faces.FacesException: com.businessobjects.reports.sdk.JRCCommunicationAdapter<br />    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:435)<br />    at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)<br />    at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)<br />    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)<br />    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at de.itinformatik.mes.web.filter.SynchronizingFilter.doFilter(SynchronizingFilter.java:42)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at de.itinformatik.mes.web.ajax.aa.AAFilter.doFilter(AAFilter.java:54)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)<br />    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)<br />    at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)<br />    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)<br />    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)<br />    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)<br />    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)<br />    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)<br />    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)<br />    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)<br />    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)<br />    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)<br />    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)<br />    at java.lang.Thread.run(Thread.java:595)<br />Caused by: java.lang.ClassCastException: com.businessobjects.reports.sdk.JRCCommunicationAdapter<br />    at com.crystaldecisions.sdk.occa.report.application.ReportClientDocumentState.saveContents(Unknown Source)<br />    at com.crystaldecisions.sdk.occa.report.application.ReportClientDocumentState.save(Unknown Source)<br />    at com.crystaldecisions.xml.serialization.XMLObjectSerializer.save(Unknown Source)<br />    at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.writeExternal(Unknown Source)<br />    at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.writeExternal(Unknown Source)<br />    at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.writeExternal(Unknown Source)<br />    at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)<br />    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)<br />    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)<br />    at java.util.Hashtable.writeObject(Hashtable.java:813)<br />    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />    at java.lang.reflect.Method.invoke(Method.java:585)<br />    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)<br />    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)<br />    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)<br />    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)<br />    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)<br />    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)<br />    at java.util.ArrayList.writeObject(ArrayList.java:569)<br />    at sun.reflect.GeneratedMethodAccessor669.invoke(Unknown Source)<br />    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />    at java.lang.reflect.Method.invoke(Method.java:585)<br />    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)<br />    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)<br />    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)<br />    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)<br />    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)<br />    at java.util.ArrayList.writeObject(ArrayList.java:569)<br />    at sun.reflect.GeneratedMethodAccessor669.invoke(Unknown Source)<br />    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />    at java.lang.reflect.Method.invoke(Method.java:585)<br />    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)<br />    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)<br />    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)<br />    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)<br />    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)<br />    at org.apache.myfaces.application.jsp.JspStateManagerImpl.serializeView(JspStateManagerImpl.java:590)<br />    at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:493)<br />    at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:332)<br />    at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:122)<br />    at org.apache.jsp.testCR_jsp._jspx_meth_f_view_0(org.apache.jsp.testCR_jsp:149)<br />    at org.apache.jsp.testCR_jsp._jspService(org.apache.jsp.testCR_jsp:83)<br />    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)<br />    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)<br />    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)<br />    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)<br />    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)<br />    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)<br />    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)<br />    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)<br />    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)<br />    ... 32 more<br /><br /><br />Thanks for your assistance <br /><br />Tosch</p>

    Which Business Objects are you referring to.
    MS .NET has a thing called Business Objects but they only work in .NET.

  • A problem with ArrayLists

    Hello
    I'm pretty new to Java, and sometimes all those objects, instances, classes, data types etc confuse me. I'm having some kind of a problem with ArrayLists (tried with vectors too, didn't work) . I'm writing a program which takes float numbers from user input and does stuff to them. No syntax error in my code, but I get a java.lang.ClassCastException when I run it.
    I insert stuff to the ArrayList like this:
    luku.add(new Float(syotettyLuku));no problem
    I'm trying to access information from the list like this inside a while loop
    float lukui = new Float((String)luku.get(i)) .floatValue();but the exception comes when the programme hits that line, no matter which value i has.
    Tried this too, said that types are incompatible:
    float lukui = ((float)luku.get(i)) .floatValue();What am I doing wrong? I couldn't find any good tutorials about using lists, so i'm really lost here.
    I'll post the whole code here, if it helps. Sorry about the Finnish variable and method names, but you get the idea :)
    package esa;
    import java.io.*;
    import java.util.*;
    public class Esa {
    static final int maxLukuja = 100;
    static BufferedReader syote = new BufferedReader(new InputStreamReader(System.in));
    static String rivi;
    static String lopetuskasky = "exit";
    static double keskiarvo;
    static ArrayList luku = new ArrayList();
    static int lukuja;
    static float summa = 0;
    // M��ritell��n pari metodia, joiden avulla voidaan tarkastaa onko tarkasteltava muuttuja liukuluku
    static Float formatFloat(String rivi) {
        if (rivi == null) {
            return null;
        try {
            return new Float(rivi);
        catch(NumberFormatException e) {
            return null;
    static boolean isFloat(String rivi) {
        return (formatFloat(rivi) != null);
    // Luetaan luvut k�ytt�j�lt� ja tallnnetaan ne luku-taulukkoon
    static void lueLuvut() throws IOException{
        int i = 0;
        float syotettyLuku;
        while(i < maxLukuja) {
            System.out.println("Anna luku kerrallaan ja paina enter. Kun halaut lopettaa, n�pp�ile exit");
            rivi = syote.readLine();
            boolean onkoLiukuluku = isFloat(rivi);
            if (onkoLiukuluku) {
                syotettyLuku = Float.parseFloat(rivi);
                if (syotettyLuku == 0) {
                    lukuja = luku.size();              
                    break;
                }  // if syotettyluku
                else {
                    luku.add(new Float(syotettyLuku));
                    i++;
                } // else
            } // if onkoLiukuluku
            else {
               System.out.println("Antamasi luku ei ole oikeaa muotoa, yrit� uudelleen.");
               System.out.println("");
            } // else
        } // while i < maxlukuja
    // lueLuvut
    static void laskeKeskiarvo() {
        int i = 0;
        while(i < lukuja) {
            float lukui = ((float)luku.get(i)) .floatValue();
            System.out.println(lukui);
            summa = summa + lukui;
        }   i++;
        keskiarvo = (summa / lukuja);
    } // laskeKeskiarvo
    public static void main(String args[]) throws IOException {
    lueLuvut();
    laskeKeskiarvo();
    } // main
    } // class

    Thanks! Now it's functioning.
    As I mentioned, I tried this:
    float lukui = ((float)luku.get(i))
    .floatValue();And your reply was:
    float lukui =
    ((Float)luku.get(i)).floatValue So the problem really was the spelling, it should
    have been Float with a capital F.
    From what I understand, Float refers to the Float
    class, Correct. And float refers to the float primitive type. Objects and primitives are not interchangeable. You need to take explicit steps to convert between them. Although, in 1.5/5.0, autoboxing/unboxing hide some of this for you.
    so why isn't just a regular float datatype
    doing the job here, like with the variable lukui?Not entirely sure what you're asking.
    Collections take objects, not primitives, and since you put an object in, you get an object out. You then have to take the extra step to get a primitive representation of that object. You can't just cast between objects and primitives.
    Again, autoboxing will relieve some of this drudgery. I haven't used it myself yet, so I can't comment on how good or bad it is.

  • Problems with async callback with the BPEL Java API (Urgent- pls help)

    Hi,
    I have an async BPEL process and I invoke it form a JSP page using BPEL java API.
    I have followed the tutorials and docs at:
    $SOA_HOME/bpel\samples\tutorials\102.InvokingProcesses\rmi\com\otn\samples\async
    I can inititiate successfully the process, but when I try to get the result using getResult() or getField(String fieldName) methods I get the error:
    Oct 2, 2007 2:35:16 PM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    java.lang.ExceptionInInitializerError
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at com.evermind.io.ClassLoaderObjectInputStream.resolveClass(ClassLoaderObjectInputStream.java:33)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:856)
         at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:287)
         at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:242)
         at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:224)
         at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152)
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)
         at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.util.MissingResourceException: Can't find bundle for base name com.collaxa.cube.i18n.exception_cube, locale en_US
         at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
         at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)
         at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)
         at com.collaxa.cube.CubeException.getResourceBundle(CubeException.java:142)
         at com.collaxa.cube.CubeException.<clinit>(CubeException.java:82)
         ... 17 more
    07/10/02 14:35:16 java.lang.ClassCastException: java.util.MissingResourceException
    07/10/02 14:35:16      at com.oracle.bpel.client.delivery.ext.async.thread.AsyncInstanceWatchdog.run(AsyncInstanceWatchdog.java:152)
    I check for the result only after I have checked that the instance is closed (completed or faulted) by using IInstanceHandle:getState() and InstanceHandle.STATE_CLOSED_COMPLETED, or IInstanceHandle.STATE_CLOSED_FAULTED
    I would like to add that so far I had no problems with invocation and geting result of sync BPEL processes. I do not what is missing for async processes.
    Any kind of help is appreciable.
    Thanks and best regards,
    Evanela

    Hi again,
    i managed to solve the problem:) Totally stupid.. the process variable name was not specified correctly..., but more stupid sounds the error message:))))
    Best Regards,
    Evanela

  • Having problem with IUser

    Hi Everyone
    I have made the login() method but i am facing the problem while making the resource context...Because in Resource Context it takes IUser of package
    com.sapportals.portal.security.usermanagement.IUser but I have got IUser of package com.sap.security.api.IUser ...while type Casting it with below code it is giving ClassCAstException.......
    public class NewSimpleServlet extends HttpServlet {
    protected void doGet(
    HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    StringBuffer s = new StringBuffer();
    try {String j_user="epuser";
    String j_password="Abcd1234";
    request.setAttribute("j_user", j_user);
    request.setAttribute("j_password", j_password);
    javax.security.auth.Subject subject;
    Set principals = UMFactory.getLogonAuthenticator().logon(request, response, "uidpwdlogon").getPrincipals();
    i have problem with getting IUser object from set of principals. In javadoc is written: "In order to get an IUser object from this subject, call Subject.getPrincipals() and iterate through the returned Set of principals." so i tried to iterate but i was not able to get that IUser with any casting. Do u know how it should be?
    IUser serviceUser = (IUser)subject.getPrincipals().iterator().next();
    Now in resource Context
    ResourceContext c = new ResourceContext(User);
    Here resource context need IUser type object as parameter...
    I also tried st like this
    loggedUser = UMFactory.getAuthenticator().getLoggedInUser(request, response);
    but loggedUser is not authenticated.
    Can Anyone Help me Out...
    Thanks
    Rupesh Khemka

    posted two times

  • Anyone had problems with BouncyCastle on AIX using IBM's JVM 1.3.0?

    I'm having an issue on AIX with IBM's JVM 1.3.0; the same code and configuration has worked on other OSs and JVMs, including the IBM JVM on Linux and Win2K. The JVM is barfing with a ClassCastException before even the first line of my code is being executed. The rather cryptic (no pun intended) error message is:
    Exception in thread "main" java.lang.ClassCastException: org.bouncycastle.jce.X509Principal
    The only reference I've seen on this is here:
    http://groups.google.com/groups?q=java.lang.ClassCastException:+org.bouncycastle.jce.X509Principal&hl=en&safe=off&rnum=1&selm=8s3l7u%249ks1%40webint.na.informix.com
    Anyone else seen this? Any AIX/IBM JVM 1.3.0/BouncyCastle users out there?
    TIA,
    Matthew
    Matthew T. Adams [[email protected]]
    Software Engineer, Architecture Group
    www.highwire.com

    You have the same problem that I was very annoyed.
    Remove your IBMJCEfw.jar from %JAVA_HOME%/jre/lib/ext directory.
    Anyway , I believe this message and exception is not appropriate ,
    or at least unkind one.
    I hope the ClassCastException will be handled and another message
    and Exception thrown such as "UnverifiedProviderException" in
    future release of JCE.
    # I'll submit a bug-report later.
    UKAI Hiroshi

  • Remote JDBC Problem with Oracle BPM Studio

    Hi all, i am facing the Remote JDBC Problem with Oracle BPM Studio.
    When i configure a Remote JDBC Connection for SQL in BPM Studio, it prompt me an error.
    The SQL Connection is configured as following :
    External Resource:
    Name : MyDS
    Type : SQL Database
    Supported Types : Remote JDBC
    Details:
    Database Type : BPM's Oracle Driver Version:10, 11
    J2EE : WLS
    Lookup Name : MyAppDS
    Configuration for "WLS"
    Name : WLS
    Type : J2EE Application Server
    Supported Types : GENERIC_J2EE
    Details:
    Initial Context Factory : weblogic.jndi.WLInitialContextFactory
    URL : t3://localhost:7001
    But, when i try to connect to the Database by using this configuration, I will get an Exception.
    An exception occurred while getting a resource from a connector.
    Detail:The connector [[ MyDS : SQL : REMOTE_JDBC ]] caused an exception when getting a resource.
    Caused by: An exception occurred while getting a resource from a connector.
    Detail:The connector [[ WLS : J2EE : J2EE ]] caused an exception when getting a resource.
    Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [[ Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory ]]
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at fuego.jndi.FaultTolerantContext.createContext(FaultTolerantContext.java:726)
         at fuego.jndi.FaultTolerantContext.<init>(FaultTolerantContext.java:79)
         at fuego.connector.impl.GenericJ2EEConnector.createInitialContext(GenericJ2EEConnector.java:177)
         at fuego.connector.impl.GenericJ2EEConnector.createStandaloneContext(GenericJ2EEConnector.java:98)
         at fuego.connector.impl.BaseJ2EEConnector.getResource(BaseJ2EEConnector.java:92)
         at fuego.connector.impl.BaseJ2EEConnector.getResource(BaseJ2EEConnector.java:76)
         at fuego.connector.J2EEHelper.getReadOnlyContext(J2EEHelper.java:86)
         ... 12 more
    Edited by: user2262377 on Jun 22, 2009 4:01 PM

    I guess the weblogic.jar is not included in the studio.
    So, i added weblogic.jar (Weblogic 10.3) and wlclient.jar (Weblogic 10.3)
    It is working in my simple java code. But, still not working in BPM Studio.
    The error logs:
    An exception occurred while getting a resource from a connector.
    Detail:The connector [OFT_APP_DS:SQL:REMOTE_JDBC] caused an exception when getting a resource.
    Caused by: java.lang.Object cannot be cast to java.io.Serializable
    fuego.connector.ConnectorException: An exception occurred while getting a resource from a connector.
    Detail:The connector [OFT_APP_DS:SQL:REMOTE_JDBC] caused an exception when getting a resource.
         at fuego.connector.ConnectorException.exceptionOnGetResource(ConnectorException.java:88)
         at fuego.connector.JDBCHelper.getReadOnlyConnection(JDBCHelper.java:93)
         at fuego.sqlintrospector.BrowserPanel.connect(BrowserPanel.java:395)
         at fuego.sqlintrospector.BrowserPanel.populateTree(BrowserPanel.java:200)
         at fuego.ui.wizards.ui.CheckTreeBrowser$1.construct(CheckTreeBrowser.java:63)
         at fuego.ui.SwingWorker$2.run(SwingWorker.java:39)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.ClassCastException: java.lang.Object cannot be cast to java.io.Serializable
         at weblogic.iiop.IIOPOutputStream.writeAny(IIOPOutputStream.java:1588)
         at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2231)
         at weblogic.utils.io.ObjectStreamClass.writeFields(ObjectStreamClass.java:413)
         at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl.java:235)
         at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl.java:225)
         at weblogic.corba.utils.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:182)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1963)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:2001)
         at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2266)
         at weblogic.jdbc.common.internal.RmiDataSource_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

  • Tunneling Problem using HttpsUrlConnection

    Hi,
    I had gone through forums regarding this topic and still i am facing the same problem using the HttpsUrlConnection. We are working behind a proxy so we have to make a proxy authorization if we want to connect to a server in the internet.
    But in case of HttpUrlConnection, everything works
    fine. But if we do the same with a HttpsUrlConnection, the authentication fails. It throws an IOException
    with the message
    Unable to tunnel through 192.9.100.10:80.
    Proxy returns "HTTP/1.1 407 Proxy authentication required"
    Sample code as follows,
    The following code doesn't have any problem becos it works fine with HttpUrlConnection and also it is working without proxyserver for https as well.
    This is running under MSVM.
    I don't want to use SSLSocketFactory and i need to use following layout(i.e only with Httpsurlconnection)
    Is there any way to make work with proxyserver? Or can't we do this at all?
    System.setProperty("proxySet","true");
    System.setProperty("https.proxyHost","proxyIP");
    System.setProperty("https.proxyPort","80");
    OutputStream os = null;
    OutputStreamWriter osw = null;
    InputStream is = null;
    InputStreamReader isr = null;
    BufferedReader br = null;
    URL url;
    String line = null;
    System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    String login = proxyUserName+":"+proxyPassWord;
    String encodedLogin = new sun.misc.BASE64Encoder().encode(login.getBytes());
    url = new URL("https://www.verisign.com");
    HttpsURLConnection con = null;
    con =(HttpsURLConnection) url.openConnection();
    con.setRequestProperty("Proxy-Authorization", encodedLogin);
    con.setRequestMethod("GET");
    con.setDoOutput(true);
    con.setDoInput(true);
    con.setUseCaches(false);
    con.connect();
    os = con.getOutputStream();
    osw = new OutputStreamWriter(os);
    osw.write("SampleMsg");
    osw.flush();
    osw.close();
    is = con.getInputStream();
    isr = new InputStreamReader(is);
    br = new BufferedReader(isr);
    while ( (line = br.readLine()) != null)
         System.out.println("line: " + line);
    Can any one help me regarding this?I need a reply very urgently.
    Thanks,
    Prabhakaran R

    Hope this help.
    Note to change the properties to fit your system, and use the supported package ( JSSE, JRE1.5.......).
    You can use URLConnection for both HTTP or HTTPS protocol.
    import java.io.*;
    import java.net.*;
    import java.security.*;
    import java.util.*;
    import javax.net.ssl.*;
    public class testSSL9 {
    public testSSL9() {
    byte[] data = httpConnection();
    System.out.println(new String(data));
    public static void main(String[] args) {
    Properties sysprops = System.getProperties();
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    // sysprops.put("java.protocol.handler.pkgs",
    // "com.sun.net.ssl.internal.www.protocol");
    sysprops.put("java.protocol.handler.pkgs",
    "javax.net.ssl.internal.www.protocol");
    sysprops.put("javax.net.ssl.trustStore",
    "D:/jdk1.4/jre/lib/security/cacerts");
    sysprops.put("javax.net.debug", "ssl,handshake,data,trustmanager");
    sysprops.put("https.proxyHost", "172.16.0.1");
    sysprops.put("https.proxyPort", "3128");
    sysprops.put("https.proxySet", "true");
    sysprops.put("http.proxyHost", "172.16.0.1");
    sysprops.put("http.proxyPort", "3128");
    sysprops.put("proxySet", "true");
    testSSL9 testSSL91 = new testSSL9();
    private byte[] httpConnection() {
    try {
    URL url = null;
    // String strurl = "https://www.verisign.com";
    String strurl = "https://central.sun.net";
    // String strurl = "http://www.yahoo.com"; --> use: HttpURLConnection
    url = new URL(strurl);
    HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
    HttpsURLConnection.setFollowRedirects(false);
    connection.setDoOutput(true);
    connection.setDoInput(true);
    connection.setUseCaches(false);
    connection.connect();
    InputStream stream = null;
    BufferedInputStream in = null;
    ByteArrayOutputStream bytearr = null;
    BufferedOutputStream out = null;
    try {
    stream = connection.getInputStream();
    in = new BufferedInputStream(stream);
    bytearr = new ByteArrayOutputStream();
    out = new BufferedOutputStream(bytearr);
    catch (Exception ex1) {
    System.out.println(ex1);
    System.out.println("Server reject connection...sory");
    int i = 0;
    while ( (i = in.read()) != -1) {
    out.write(i);
    out.flush();
    stream.close();
    in.close();
    bytearr.close();
    out.close();
    return bytearr.toByteArray();
    catch (Exception ex) {
    ex.printStackTrace();
    return null;
    }

Maybe you are looking for

  • "Fan error" on Thinkpad X201s

    Hello, My X201s surprisingly overheated and soft-shut down. Upon rebooting the BIOS interrupted startup just to say "Fan Error" and shut down again. Has anyone seen this issue before? Up until now the fan has been working! I took the keyboard off, an

  • Problem with p45d3 and sapphire hd4870 1gb

    Hi to all I have a big problem the mother card and video card. Do you know if there is some problem among the p45d3 platinum and the sapphire hd4870 1 gb ram? I have assembled a new pc: -MAIN BOARD: P45D3 platinum bios 1.6 - CPU: core 2 quads q9550 -

  • Music Itunes Mac

    I'm organizing my songs for itunes mac, and I have two albums with the same name but with different songs, how do I put everything in one albu

  • Code explanation sort

    Dear Everyone, I am using some really neat code to listen to a group of JComboBoxes. The four JComboBoxes in question sit on a JFrame and each of the boxes presents the program user with ten numberical choices, namely 0-9. The Listener method for one

  • Adobe Illustrator

    Hi, I have just bought a Craft Robo for crafting. It cuts templates etc. Anyway, I intended to use it on my Mac, but surprise, surprise, the software which comes with it is only for Windows. However, they do say it can be used on a Mac by using Adobe