+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Building Unity Web Player/Standalone

  1. #1
    Senior Member
    Join Date
    Mar 2011
    Posts
    445
    Thanks
    403
    Thanked 2 Times in 2 Posts

    Building Unity Web Player/Standalone

    After a build, if the simple chat is not visable what could most likely be the problem?

    This is strange because before I built the game as a Web player or as a Standalone it was perfectly visable and functioning properly.

    Any tips, tricks and/or techniques is appreciated by many.

  2. #2
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    For standalone, you have to comment out the PreFetch line, or else use the type of IF statement that I used in AvatarChat.
    Code:
    #if UNITY_WEBPLAYER
        // Only set this for the webplayer, it breaks pc standalone
        // See http://answers.unity3d.com/questions/25122/ for details
        Security.PrefetchSocketPolicy(serverURL, serverPort);
    #endif
    You might also need to check that your ES5 is still running.
    Last edited by tcarr; 03-27-2011 at 12:03 PM.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  3. The Following User Says Thank You to tcarr For This Useful Post:

    joseph (03-27-2011)

  4. #3
    Senior Member
    Join Date
    Mar 2011
    Posts
    445
    Thanks
    403
    Thanked 2 Times in 2 Posts
    I can't read what it is displayed because the console window goes away too quickly. I think it is something along the lines of "Exeception in thread" ...

  5. #4
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    Is "exception in thread" showing in the ES5 console window or in Unity? And are you running from inside the Unity editor or from a build? (and Windows or Mac for that matter) Exception in thread means that there's an error in the code somewhere. We just need to pinpoint where.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  6. The Following User Says Thank You to tcarr For This Useful Post:

    joseph (03-27-2011)

  7. #5
    Senior Member
    Join Date
    Mar 2011
    Posts
    445
    Thanks
    403
    Thanked 2 Times in 2 Posts
    the "exception in thread" is showing in the ES5 console window when I choose to run either the Standalone or the SafeMode ES5 Application. There is before I run the Unity Editor.
    Last edited by joseph; 03-27-2011 at 08:58 PM.

  8. #6
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    If you can connect to the ES5 using ES Admin, you can look at ElectroServer5.log using that. If not, look in the server's installation folder, in server/logs/ElectroServer5.log. Either copy that file before you open it, or shut ES5 down before you open it. Go to near the bottom of the file where you see the exception. Post the entire exception here, including the "caused by" part. I should be able to tell what the problem is from that.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  9. The Following User Says Thank You to tcarr For This Useful Post:

    joseph (03-27-2011)

  10. #7
    Senior Member
    Join Date
    Mar 2011
    Posts
    445
    Thanks
    403
    Thanked 2 Times in 2 Posts
    I don't know if I can connect. I try to run the safemode or the standalone version of the ES5 application as the administrator, and it goes away after two or three seconds. I can't see the application running in processes or even under applications.

    Code:
    2011-Mar-27 14:27:57:405 [main] INFO  DisplayLogger  - 
     _____ _           _                                            ____ 
    | ____| | ___  ___| |_ _ __ ___  ___  ___ _ ____   _____ _ __  | ___| 
    |  _| | |/ _ \/ __| __| '__/ _ \/ __|/ _ \ '__\ \ / / _ \ '__| |___ \
    | |___| |  __/ (__| |_| | | (_) \__ \  __/ |   \ V /  __/ |     ___) |
    |_____|_|\___|\___|\__|_|  \___/|___/\___|_|    \_/ \___|_|    |____/
    
    Starting ElectroServer 5.1.0
    Go to http://www.electrotank.com/ for the latest version.
    ###########################################################
    Computer Information
    	Operating System: Windows 7
    	Operating System Architecture: amd64
    	Processors Available: 8
    	Memory Available: 908Mb
    ###########################################################
    Virtual Machine Information
    	Virtual Machine Vendor: Sun Microsystems Inc.
    	Virtual Machine Version: 1.6.0_21
    
    
    2011-Mar-27 14:28:01:755 [main] ERROR DisplayLogger  - 
    There was an error attempting to start the server!
    ###########################################################
    Unable to establish connection to database.  Please ensure another instance of the server is not running.
    com.electrotank.electroserver5.entities.exceptions.StartUpException: Unable to establish connection to database.  Please ensure another instance of the server is not running.
    	at com.electrotank.electroserver5.servers.registry.config.RegistryConfigurationService.getConfiguration(RegistryConfigurationService.java:71)
    	at com.electrotank.electroserver5.servers.registry.RegistryServer.<init>(RegistryServer.java:79)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    	at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
    	at com.electrotank.electroserver5.servers.adapters.ServerComponentAdapter.newInstance(ServerComponentAdapter.java:28)
    	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
    	at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
    	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
    	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
    	at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
    	at org.picocontainer.defaults.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:393)
    	at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:374)
    	at org.picocontainer.defaults.BasicComponentParameter.resolveInstance(BasicComponentParameter.java:77)
    	at org.picocontainer.defaults.ComponentParameter.resolveInstance(ComponentParameter.java:114)
    	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:257)
    	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:217)
    	at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
    	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
    	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
    	at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
    	at org.picocontainer.defaults.DefaultPicoContainer$OrderedComponentAdapterLifecycleManager.start(DefaultPicoContainer.java:644)
    	at org.picocontainer.defaults.DefaultPicoContainer.start(DefaultPicoContainer.java:456)
    	at org.picocontainer.defaults.DefaultPicoContainer.start(DefaultPicoContainer.java:461)
    	at com.electrotank.electroserver5.servers.standalone.StandaloneContainerFactory.start(StandaloneContainerFactory.java:55)
    	at com.electrotank.electroserver5.Main.startUp(Main.java:95)
    	at com.electrotank.electroserver5.Main.processCommandLineResults(Main.java:276)
    	at com.electrotank.electroserver5.Main.invoke(Main.java:211)
    	at com.electrotank.electroserver5.bootstrap.Main.start(Main.java:70)
    	at com.electrotank.electroserver5.bootstrap.Main.main(Main.java:41)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    	at com.exe4j.runtime.WinLauncher.main(Unknown Source)
    	at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
    Caused by: java.lang.RuntimeException: java.sql.SQLException: Failed to start database 'db', see the next exception for details.
    	at com.electrotank.electroserver5.servers.db.dao.RegistrySettingsDaoImpl.load(RegistrySettingsDaoImpl.java:20)
    	at com.electrotank.electroserver5.servers.registry.config.RegistryConfigurationService.getConfiguration(RegistryConfigurationService.java:69)
    	... 38 more
    Caused by: java.sql.SQLException: Failed to start database 'db', see the next exception for details.
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
    	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
    	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
    	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
    	at java.sql.DriverManager.getConnection(Unknown Source)
    	at java.sql.DriverManager.getConnection(Unknown Source)
    	at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
    	at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
    	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
    	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
    	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
    	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:566)
    	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:541)
    	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
    	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:110)
    	at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:87)
    	at com.electrotank.electroserver5.servers.db.dao.RegistrySettingsDaoImpl.load(RegistrySettingsDaoImpl.java:18)
    	... 39 more
    Caused by: java.sql.SQLException: Failed to start database 'db', see the next exception for details.
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
    	... 64 more
    ###########################################################
    The server will now exit.
    I am unsure if the above is what you were asking for.
    Last edited by joseph; 03-27-2011 at 09:36 PM.

  11. #8
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    Yes this is what I asked for. ES5 thinks that another ES5 process is still running - it can't access the database. If you are on Windows, open Task Manager and look at the processes tab, for the Java processes. Check for any that have a command line that includes "electroserver". Or if you aren't running other Java processes you can just kill all of the Java processes. If you don't want to fool with Task Manager, you can restart Windows.

    When you run ES5 and do not use safemode, the console is supposed to disappear, so it's very easy to forget that you have it running. Then you try to start it up again and get exactly the error message that you are seeing.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  12. The Following User Says Thank You to tcarr For This Useful Post:

    joseph (03-27-2011)

  13. #9
    Senior Member
    Join Date
    Mar 2011
    Posts
    445
    Thanks
    403
    Thanked 2 Times in 2 Posts
    OK, I killed the Java process under the windows task manager, ran the ES5 again and noticed that it runs in the background -- which is fine. However, I still experience the same problem, I can't see the simple chat window when running the my project as a web player..

  14. #10
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    Check that the code example AS3 Simple Chat works. Also check the log and verify that it says "started successfully". If AS3 Simple Chat works and your web player doesn't, then you forgot to include the PreFetchline. Web player needs to prefetch.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  15. The Following User Says Thank You to tcarr For This Useful Post:

    joseph (03-27-2011)

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts