Solved

MalformedURLException

Posted on 2002-07-18
8
216 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java asynchronous logging 4 50
recursion example 16 112
maven project error 5 48
object oriented programming comparison 5 57
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now