Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MalformedURLException

Posted on 2002-07-18
8
Medium Priority
?
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

704 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