"Cannot launch Java Application"

Need help? Post your questions here.

Moderator: moderators

"Cannot launch Java Application"

Postby jaredmtucker » Tue Jun 21, 2011 12:14 am

I recently donated and upgraded to Subsonic 4.4. I was running version 4.0.1.

I am running OS X 10.5.8 (9L31a) with Kernel 9.8 and I get this error when I use any other version of subsonic (including 4.5.1 b) than 4.0.1

Uncaught exception in main method: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controller' defined in class path resource [applicationContext-mac.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [net.sourceforge.subsonic.booter.mac.SubsonicController]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: java/awt/TrayIcon

Looks as though it is missing/cannot access some class. Perhaps a permissions issue?

Help?
jaredmtucker
 
Posts: 1
Joined: Tue Jun 21, 2011 12:09 am

Re: "Cannot launch Java Application"

Postby tannerellen » Tue Jun 21, 2011 11:50 pm

jaredmtucker wrote:I recently donated and upgraded to Subsonic 4.4. I was running version 4.0.1.

I am running OS X 10.5.8 (9L31a) with Kernel 9.8 and I get this error when I use any other version of subsonic (including 4.5.1 b) than 4.0.1

Uncaught exception in main method: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controller' defined in class path resource [applicationContext-mac.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [net.sourceforge.subsonic.booter.mac.SubsonicController]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: java/awt/TrayIcon

Looks as though it is missing/cannot access some class. Perhaps a permissions issue?

Help?


I also was trying to run subsonic on 10.5.8 on an old ppc iMac that I had and got the same error. I solved the problem by downloading the manual install and running from the terminal. I created an applescript that launches subsonic using the command line. It works great now. I don't get the nifty subsonic app to double click but with the applescript it is just as easy. I think when they created the mac app they did not compile it properly to work with the older computers/OS's
tannerellen
 
Posts: 5
Joined: Thu May 19, 2011 5:02 pm

Re: "Cannot launch Java Application"

Postby onigami » Mon Jul 25, 2011 4:06 am

tannerellen wrote:I also was trying to run subsonic on 10.5.8 on an old ppc iMac that I had and got the same error. I solved the problem by downloading the manual install and running from the terminal. I created an applescript that launches subsonic using the command line. It works great now. I don't get the nifty subsonic app to double click but with the applescript it is just as easy. I think when they created the mac app they did not compile it properly to work with the older computers/OS's


A. By manual install, are you referring to Subsonic or Java? If the former, where is this manual install?
B. Could you post this script for people who are less apt at script coding, perhaps with instructions?

Also, posted this bug on SF, see if they pick it up.
onigami
 
Posts: 4
Joined: Thu Apr 21, 2011 5:45 am

Re: "Cannot launch Java Application"

Postby keebs » Tue Nov 22, 2011 12:44 am

I've ran into this same problem and tried the manual install technique and got it to work. Here are the steps I took:

**warning, I'm not too knowledgeable about OSX's file system, so this may be a bit of a kludge, but it did work**
-Download the "Stand-alone version (all platforms)" from the download section of subsonic.org

-Extract the tar.gz. This will create a folder with the subsonic install files, including subsonic.sh: a script that does the manual installation.

-By default subsonic.sh installs the files to /var/subsonic My computer wouldn't let me install anything there, so I opened subsonic.sh with text edit and changed the first line from "SUBSONIC_HOME=/var/subsonic" to "SUBSONIC_HOME=/Applications/subsonic" so it would live in my applications folder. It might be better to put this somewhere else... but this worked for me.

-Change subsonic.sh to subsonic.command.

-Open terminal and navigate to the directory where subsonic.sh is located. You can do this by running terminal and typing "cd " and then the location listed in the "Where" section when you choose "Get Info" on subsonic.sh

-Type "chmod +x subsonic.command" to make the file executable.

-Double click subsonic.command and it will open a terminal window which will run the script, copy the files to the directory mentioned above... and I think run subsonic.

-Open a web browser and go to http://localhost:4040 and change your configurations.

That's it! I suspect that you'll need to run that subsonic.command everytime you reboot your computer so that it load subsonic up in the background, but I'm not entirely sure how that works or if it will save your settings you've changed.... or what. I literally just got it working, so just wanted to post this up before I forgot how I did it. I'll update this if I run into more problems or once I figure it out a bit better.

Keebs
keebs
 
Posts: 1
Joined: Tue Nov 22, 2011 12:25 am

Re: "Cannot launch Java Application"

Postby BKKKPewsey » Tue Nov 22, 2011 1:20 am

Thanks Keebs
If you or any other apple peeps want to contribute to this, rather old, but still relevant thread please do so.
When it is at a more "final" state we can include it in the wiki.
:mrgreen:
ps I will edit the original post to remove the poll.
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: "Cannot launch Java Application"

Postby warreng » Wed Dec 21, 2011 6:23 am

I had the same error, so I followed the above instructions for manually installing the subsonic standalone 4.6 on my OSX 10.5.8 computer. After editing renaming and changing the permissions for the .sh file, and running it from terminal, voila: it worked!

The next challenge was to get the "subsonic.command" file to launch automatically at startup. This was accomplished by:

1) opening "System Preferences" from the Apple menu, 2) then going to the "Accounts" control panel, selecting my username, 3)clicking the "LoginItems" tab, and 4) adding the script to the list of Startup items.

Yay! Subsonic now runs automatically at Startup on my ancient PowerPC G4 Emac.


-warreng
warreng
 
Posts: 1
Joined: Wed Dec 21, 2011 5:33 am


Return to Help

Who is online

Users browsing this forum: No registered users and 18 guests