Solved

MalformedURLException

Posted on 2002-07-18
8
234 Views
Last Modified: 2008-02-01
Hello,

I am taking a RemoteException --> UnmarshalException --> MalformedURLException: no protocol: Files/apa/webapps/ROOT/WEB-INF/classes

and this occured at the time the object tried to bind itself to the registry.

The thing that I noticed is that it stucks somewhere:

"Files/"

It should be

"Program Files/" etc

The program is a bean that is inside a JSP page located at
C:\2k\Program Files\apa\webapps\ROOT\jsp\game\welcome.jsp

any ideas why I take this ???

0
Comment
Question by:pouli
8 Comments
 
LVL 1

Expert Comment

by:klf
ID: 7163592
pouli

URLs are not allowed to contain spaces.  Try encoding the URL before using it. use java.net.URIEncoder
0
 
LVL 92

Expert Comment

by:objects
ID: 7163593
Looks like the space in the directory name is screwing it up.
Easiest thing would be to move you webapp to a spot where there are no spaces in directory names.
0
 

Author Comment

by:pouli
ID: 7163608
Well I do not set anywhere this address.

     private void bindMe()
     {
          try
          {
               if (System.getSecurityManager() == null)
               {
                   System.setSecurityManager(new RMISecurityManager());
               }    
     
               String name = "RoomCoordinator";
               try
               {              
                   Naming.rebind(name, me);
                   System.out.println("RoomCoordinator bound");
                    //Thread roomThread = new Thread( me );
                    //roomThread.start();
                    //System.out.println("Room Thread Started");
               }
               catch( AccessControlException ace )
               {
                    ace.printStackTrace();
               }
          }
          catch( Exception e )
          {
               e.printStackTrace();
          }    
     }
     
I do not set anywhere this address.

I use the ClassFileServer form Sun to send the Stubs.I set the address where it can find the classes there. But instead of program files I set progra~1.

I used to run a previous RMI example successfully under that folder.

I do not know what is wrong now.

0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:pouli
ID: 7163720
When I run the class that used to raise the exception like a normal application everything worked fine.


Probably the JVM that is being loaded from the Tomcat server gives different parameters to the one I give when i load the application.

Anybody has any idea about this?
0
 
LVL 92

Accepted Solution

by:
objects earned 25 total points
ID: 7163723
>  the Tomcat server gives different parameters

It certainly does. It's probably related to it using a different classpath.
0
 

Author Comment

by:pouli
ID: 7166572
I changed the bean to a normal application and it is working fine.

I will ask from the moderator to split the points between
objects & klf
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7166659
Points reduced for a split.  You can now accept one experts comment as an answer.  After that, make another question in this topic area for the other expert.  Make the question for the amount of points intended.  Label the question, "Question for (Expert Name) and post this question number in the base of the question, i.e. For your assistance in question # --------


Computer101
E-E Moderator
0
 
LVL 92

Expert Comment

by:objects
ID: 7179379
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
java jdbc batch example 8 41
eclipse apache tomcat admin console 52 123
eclipse buid path vs tomcat lib path 10 34
What's wrong with this code? 4 28
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question