Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MalformedURLException

Posted on 2002-07-18
8
Medium Priority
?
260 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 100 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

783 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