Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Weird XJ3D exception on VRML file loaded by URL  (Read 1097 times)
0 Members and 1 Guest are viewing this topic.
Offline sharpClaw

Junior Newbie




Java games rock!


« Posted 2005-05-09 18:46:15 »

I have the following problem:
- I have an applet that loads and shows (actually it used to show, back when it was written as an application, not an applet Sad ) a VRML scene, using a XJ3D VRML Loader.
- The VRML files are on the server, in a subdirectory of the directory where the applet is stored.
- I use the following code for obtaining the Scene from the VRML Loader:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
VRML97Loader loader = new VRML97Loader(VRML97Loader.LOAD_LIGHT_NODES | VRML97Loader.LOAD_VIEW_GROUPS);
URL url = null;
Scene scene = null;

try { url = new URL("http://[ Tomcat ServerIP ]:8080/project/obj/something.wrl"); }
catch (MalformedURLException badUrl) { System.out.println("Malformed URL for object loading"); }

try {
      if (url != null)
            scene = loader.load(url);
} catch(Exception e) {
      System.out.println(e);
      e.printStackTrace();
}


- When I load the applet, I receive the following Exception:

org.ietf.uri.UnsupportedServiceException: http is not supported
org.ietf.uri.UnsupportedServiceException: http is not supported
     at org.ietf.uri.URL.getResource(URL.java:475)
     at org.web3d.vrml.sav.InputSource.getCharacterStream(InputSource.java:169)
     at org.web3d.parser.GeneralisedReader.parse(GeneralisedReader.java:142)
     at org.web3d.j3d.loaders.SequentialContentLoader.loadContent(SequentialContentLoader.java:128 )
     at org.web3d.j3d.loaders.BaseLoader.load(BaseLoader.java:534)
     at org.web3d.j3d.loaders.BaseLoader.load(BaseLoader.java:274)
     at FileManager.LoadScene(Proiect_applet.java:312)

 Does anybody know why this happens? Does the XJ3D VRML97Loader not support loading a file through Internet connection? Why does its constructor take a URL parameter then?

 I took care of applet permissions on the Tomcat web server, it has AllPermission set, so this should not be a problem.

 If anybody can help me solve this problem, or knows of an alternative method to achieve the same goal, I would greatly appreciate the help!

(the reason I turned my application into an applet is to "simplify" the way I get hold of my VRML files over Internet, as this is my first project involving network programming, and I am completely "unaware" of how to get the files from server to client computer)
Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2005-05-09 21:05:04 »

Where did you get the laoder from?

If there is any kind of support communtyi for it I would start there.

Oterhwise you may have to dig into the code (assumign you have source) and figure it otu yourself as the chances that someoen here has experience with the exact laoder you are using are slim...

Be aware that in genreal an unsigned applet may NOT conatct any server other then the server it  was served from./

But since yo uarent showing a security exception, unelss the laoder code is hiding it (whioch woudl be possible but bad) I'd geuss thats not your aprticualr problem.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Jeff

JGO Coder




Got any cats?


« Reply #2 - Posted 2005-05-09 21:07:10 »

One more comment...

Yo M IGHT have more luck finding someone with experiecne with your particular loadaer over  in the J3D desktop forums

No sane and rational person uses VRML for game content.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #3 - Posted 2005-05-09 21:12:04 »

Google is your friend  Grin

http://archives.java.sun.com/cgi-bin/wa?A2=ind0308&L=java3d-interest&D=0&P=18857

Time flies like a bird. Fruit flies like a banana.
Offline sharpClaw

Junior Newbie




Java games rock!


« Reply #4 - Posted 2005-05-10 00:20:24 »

To Alan_W:
- Thank you for your help. Unfortunately I found that link on Google too :-/ , before deciding to post this topic, and it didn't help me at all - it's a very bogus phrase, that doesn't point to any solution in my case: I already have the XJ3D installed properly, in the /lib/ext directory. And also, this time around, Google is not a very good friend I'm afraid, as it finds only 2 similar posts on JavaInterest Archives. Thanx again, though, even just for the intention of helping me!

To Jeff:
- Thanx at least for trying to point me in the right direction about the kind of forums I should be posting my message in.
  As I stated in my original message, the loader is the one supplied by XJ3D.org. I didn't have any luck posting on a forum of theirs, as it seems to be kind of deserted  Huh . That's why I decided to post it on other forums as well, sorry if I have offended you in any way by doing that!
  I tried the Sun version of the loader tonight, but even though this one can connect to my Tomcat server, it has problems of compatibility with some nodes in my VRML files... I understand that Sun did not implement a full-spec VRML97 compatible loader... kind of unprofessional of them.
  By the way, I use a VRML loader only as a tool to to load my geometries (which I export in a VRML format from 3DMax)... why that would be insane and irrational I leave it to others to decide...
  Thank you anyway.
Offline Jeff

JGO Coder




Got any cats?


« Reply #5 - Posted 2005-05-10 20:54:38 »

Quote

  By the way, I use a VRML loader only as a tool to to load my geometries (which I export in a VRML format from 3DMax)... why that would be insane and irrational I leave it to others to decide...
  Thank you anyway.


Its not insane, its just not necc optimal.

VRML is verbose, carries a lot of info game developers don't need, and, unless its imrpoved a lot sicne last I saw it, is missing some thing ga,e developers might need.

The biggest issue IMO though is probably load time for any significantly complex scheme.  You really don't want the ascii-parsing time associated with any text model format adding to your level load.

And ofcouree if your data isnt local its only compounded  by the time to transmit that bloated data from the server to the client.



Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (18 views)
2014-04-15 18:08:23

BurntPizza (15 views)
2014-04-15 03:46:01

UprightPath (28 views)
2014-04-14 17:39:50

UprightPath (13 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (54 views)
2014-04-10 04:04:31

BurntPizza (111 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!