My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
GettingStarted  
Getting Started with YouTube Direct (YTD)
Featured
Updated Dec 14, 2011 by api.je...@gmail.com

Introduction

The YouTube Direct platform is designed to run on Google App Engine. App Engine allows you to run applications on top of Google's infrastructure. Follow this guide to deploy your own instance of YTD. But before you do that, you need to set up your environment for YTD:

If you are upgrading from a previous release, please familiarize yourself with the latest release notes.

Getting Started Video

In addition to the material below, you might find the following video tutorial useful when getting started:

Details

YouTube Direct Getting Started Guide

Please complete the setup steps listed in the Introduction above before proceeding.

Sync your Eclipse project to the YTD codebase

In your Eclipse window, select the File menu > New

  • In the sub menu, choose Other ...
  • With the popup menu, choose SVN > "Checkout projects from SVN". Click the Next button.
  • Click on "Create a new repository location". Click the Next button.
  • Enter "http://youtube-direct.googlecode.com/svn/trunk/" as the URL.
  • Click on the URL to highlight it. Click the Finish button.

Eclipse should now be downloading all the files from YTD repository in a project named "ytd".

Build the YTD project in Eclipse

Once the download is completed, Eclipse should automatically begin to build the deploy binary. While it is building the status bar on the bottom right should say "Building workspace". If you do not have automatic build enabled for Eclipse, you can go to Project > Build All.

Deploy YTD on your local machine

Before deploying your YTD instance to App Engine, it's always a good idea to run it locally and test. The App Engine development server was automatically installed when you installed the Google Eclipse plugin in the previous step.

  • Make a copy of war/WEB-INF/appengine-web_DEFAULT.xml and name it war/WEB-INF/appengine-web.xml. Edit your local copy of the file to:
    • Replace
      <application>
      with your registered App Engine application ID.
    • Replace
      <version>
      with 1, and increment it as you see fit.
    • Replace com.google.ytd.YTDeveloperKey property with your registered YT Developer Key
    • Replace com.google.ytd.YTClientID the unique identifier string of your choice.
    • Deploy YTD using the local development webserver environment that comes with the App Engine SDK. If using Eclipse with the GAE plugin, the default "Run" Eclipse action will do this. The webserver runs at http://localhost:8080/ .
    • You can test the YTD instance by going to http://localhost:8080/admin. The data you entered in the local instance will not be deployed to production. Once you're satisfied with your testing, you can proceed to deploy your YTD instance to Google App Engine.

Deploy YTD to Google App Engine

If local deployment is successful, you can procede to deploy to Google App Engine.

  • Right click on the project "ytd". See the dropdown menu and select Google > Deploy to App Engine
  • Enter the email and password for your Google App Engine account. Click on the Deploy button.
  • Once deployment is done, you can access your production instance of YTD at http://APP_ID.appspot.com/admin.

Configuration of YTD Admin

After deployment is completed. You must perform a few configuration before you can start creating assignment.

  • Go to the admin panel for YTD by visiting http://APP_ID.appspot.com/admin, where APP_ID is your registered App Engine instance name. You'll need to log in with a Google Account that is set up as an administrator for your App Engine instance.
  • Go to the "Configuration" tab and make the desired configuration changes. Mouse over the ? icons for descriptions of each option.
  • Make sure that the YouTube account you authenticate as is linked to the Google Account that owns your YouTube Developer Key.

Registering your website for AuthSub

Register your new YTD instance with Google's AuthSub. This will get rid of the red warning text box that appears when unregistered web sites us AuthSub. There is more information on AuthSub in this document. You can initiate the registration process at https://www.google.com/accounts/ManageDomains. Note: Be sure that you initiate the domain registration with your new YTD APP_ID.appspot.com domain. You do not need to go through the domain registration process with your host website's domain. Only your YTD App Engine domain needs to be registered.

  • When asked for the Target URL path prefix: you should use http://APP_ID.appspot.com/ (where APP_ID is the name of your App Engine instance). Be sure that you use http:// and not https://
  • If you enter an incorrect value for Target URL path prefix: then the AuthSub web interface will reject your requests for AuthSub tokens and will display an error message warning that a malicious web site might be requesting tokens on your behalf.
OPTIONAL You can now use "secure" AuthSub with YTD 2.0. If you choose to implement secure AuthSub, the login message that users see will explicitly state that their requests are being sent securely.
  • First, follow the previous steps and ensure that your basic AuthSub setup is functional.
  • Follow the instructions to generate both a certificate .pem file (the openssl req -x509... command) and a .pk8 private key file for Java (the openssl pkcs8... command).
  • Log in at https://www.google.com/accounts/ManageDomains and click on "Manage APP_ID.appspot.com" to bring up the domain management interface.
  • In the "Upload new X.509 cert:" section, select the .pem file that you generated in the previous step and submit it to Google.
  • Visit your YTD 2.0 Configuration tab at http://APP_ID.appspot.com/admin. In the "YouTube API Settings" section there's a text field labeled "Private Key Certificate". Paste in the contents of the .pk8 private key file you previously generated and save your changes. The .pk8 file should start with -----BEGIN PRIVATE KEY-----. Include all lines in the file when you paste in the contents.
When users go through the AuthSub authentication flow they should now see the message APP_ID.appspot.com: Registered, secure. This website is registered with Google to make authorization requests

Creating new assignments & Embedding YTD Uploader to your page

  • In your YTD Admin panel, go to the "Assignments" tab and create a new assignment.
  • Set the Assignment to the appropriate category (e.g "Entertainment"), set the status to "Active" to enable video submission and put a description to the assignment.
  • Select the new assignment by highlighting it in the list and click the "Embed Code" button to show the JavaScript code to embed the YTD uploader on your page.
    • Make sure that you modify the ytd-embed.js URL to point to the actual path to the file. By default, ytd-embed.js is hosted on your App Engine instance at http://APP_ID.appspot.com/ytd-embed.js.
    • If your page has an existing window.onload handler, add the ytd.embed() JavaScript code to that instead of creating a new window.onload.
  • Copy the embed code and paste it onto the page where you want the uploader to appear. Save and deploy your updated page. Now your site visitors can start submitting their videos. They have 2 options to do this, they can upload a new video, or submit an existing video that they already own.

Moderating submissions

Once videos have been submitted through the uploader, you can go back the YouTube Direct admin panel to moderate the videos.

  • Visit the "Submissions" tab to view submitted videos and approve/reject them as desired. All newly submitted videos will have the UNREVIEWED statys. As an admin, you can preview the video and details, and once you're satisfied, you can change the status as "APPROVED".
  • Approved videos will be automatically added to a playlist associated with each assignment (owned by your YouTube account), and depending on your configuration settings, will have their descriptions and tags updated to reflect your approval.
  • Note that in the "Configuration" tab, you can specify an address to receive an email whenever a new video is submitted.

Embedding playlists

Once you have approved videos to display, you can go back to Assignment tab to get the code to display the playlist.

  • Select the Assignment, and click on the "Playlist" button.
  • Copy the code and paste it onto the page where you want to display the approved videos. Approved videos are automatically added to the playlist.

Optional: Setting Up Multiple Instances

This is an advanced feature aimed at organizations who want to maintain a single App Engine deployment that hosts multiple logical instance of YouTube Direct. The MultipleInstances guide has more details on setting things up.

Getting Help

If you have any questions about setting up YouTube Direct and have already read through the online guides, please let us know in the YouTube API Developer Forum.

Comment by stevebe...@gmail.com, Nov 19, 2009

Is there a way to create a channel like this by just copying and pasting some code into a webpage??

Steve

Comment by Jim.Mon...@gmail.com, Nov 20, 2009

Mmm. I'm actually really surprised that so far, Youtube does not have an embedded html code option, with submission management via an administration panel within a Youtube account. Watching the demo, it looks exactly like it should work that way. My only guess is that at this stage, Google wants to see where developers take this option, and how much server-crunching this might take before leaping into it.

Comment by videogam...@gmail.com, Nov 24, 2009

This is so hard for my simple mind! Please make a Widget!

Comment by Celebrat...@gmail.com, Nov 24, 2009

Sync your Eclipse project to the YTD codebase:

(Mac OSX 10.4.11)

When its time to hit finished I get a message:

"You appear to be checking out the root of your repository. Are you sure that this is what you want to do? If your repository contains any branches or tags all of them will be check out." Yes No??

1) If I chose yes and get a small popup box with a red exclamation mark and and "OK" to hit, which when I hit sends me back to the finish button choice (endless loop).

2) If I chose no, it closes the the whole window leaving just Eclipse up.

Long story short, "Eclipse should now be downloading all the files from YTD repository in a project named "ytd" ISN'T HAPPENING AND THERE IS NO YTD PROJECT. WHAT TO DO?

Comment by gardin...@gmail.com, Nov 25, 2009

I get stuck at: "Deploy YTD on your local machine" How do you do that??

Comment by tracnghi...@gmail.com, Nov 27, 2009

Platform YTD in java is so great. But I don't know how to make it in Python. Please help us to make a platform YTD in Python ...

Comment by phil.str...@gmail.com, Dec 2, 2009

Trunk would not work for me both locally it had runtime errors and during appengine upload. I picked up the releases/2.0 and all was well

Comment by rickxja...@gmail.com, Dec 4, 2009

I can not sync the project to my codebase.. I get errors that say "Unable to load default SVN Client" "Cannot map the project with svn provider" and "An exception stack trace is not available." I have the same problem as CelebrateGreece? and when I run the app engine launcher, I am not authorized to access the application. ugh, lol..

Comment by nnbad...@gmail.com, Dec 5, 2009

Two things:

- When you are installing the subclipse plugin, also select the (required) Subversion Client Adapter and the JavaHLNative Library Adapter components. This will fix the "Unable to load default SVN Client" error message.

- When you sync your Eclipse project to the YTD codebase use http://youtube-direct.googlecode.com/svn/trunk/ytd/ note the extra /ytd/ in the URL.

Comment by moorerac...@gmail.com, Dec 5, 2009

This is the most confusing and difficult process. Please make it more simple for us less advanced users!!

Comment by tiss...@gmail.com, Dec 6, 2009

Damn!

Comment by robst...@gmail.com, Dec 7, 2009

I am getting a lot of errors in the markers section I am sure I should not be. First I get the following errors:

after right clicking the missing appengine-web.xml and quickfixing to create a new one I get the following errors added on:

I installed the java_ee_sdk from sun's website. I thought that might fix the JDK error.

Please help. Thank you for anything you can provide me with.

Comment by robst...@gmail.com, Dec 7, 2009

Sorry I did not mean to post the large pictures like that. did not know they would be embedded.

Comment by goo...@colorectal-cancer.ca, Dec 7, 2009

I have figured out the problems I was having. I am now having a problem authenticating with youtube. Or any google app for that matter. I registered and verified (http://APP_ID.appspot.com/) at https://www.google.com/accounts/ManageDomains

however when I click authenticate under the youtube api settings then click accept on the youtube site I get the following error:

{{{Uncaught exception from servlet java.lang.ExceptionInInitializerError?

at com.google.gdata.client.http.GoogleGDataRequest$Factory.createRequest(GoogleGDataRequest.java:73) at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest(HttpGDataRequest.java:162) at com.google.gdata.client.Service.createRequest(Service.java:697) at com.google.gdata.client.GoogleService?.createRequest(GoogleService?.java:525) at com.google.gdata.client.Service.createEntryRequest(Service.java:1293) at com.google.gdata.client.Service.getEntry(Service.java:1266) at com.google.gdata.client.GoogleService?.getEntry(GoogleService?.java:567) at com.google.gdata.client.Service.getEntry(Service.java:1196) at com.google.ytd.YouTubeApiManager?.getCurrentUsername(YouTubeApiManager?.java:142) at com.google.ytd.admin.PersistAuthSubToken?.doGet(PersistAuthSubToken?.java:61) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:693) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:806) at org.mortbay.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:487) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1093) at com.google.apphosting.runtime.jetty.SaveSessionFilter?.doFilter(SaveSessionFilter?.java:35) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter?.doFilter(TransactionCleanupFilter?.java:43) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1084) at org.mortbay.jetty.servlet.ServletHandler?.handle(ServletHandler?.java:360) at org.mortbay.jetty.security.SecurityHandler?.handle(SecurityHandler?.java:216) at org.mortbay.jetty.servlet.SessionHandler?.handle(SessionHandler?.java:181) at org.mortbay.jetty.handler.ContextHandler?.handle(ContextHandler?.java:712) at org.mortbay.jetty.webapp.WebAppContext?.handle(WebAppContext?.java:405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap?.handle(AppVersionHandlerMap?.java:238) at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection?.handleRequest(HttpConnection?.java:506) at org.mortbay.jetty.HttpConnection?$RequestHandler?.headerComplete(HttpConnection?.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser?.parseAvailable(RpcRequestParser?.java:76) at org.mortbay.jetty.HttpConnection?.handle(HttpConnection?.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter?.serviceRequest(JettyServletEngineAdapter?.java:139) at com.google.apphosting.runtime.JavaRuntime?.handleRequest(JavaRuntime?.java:239) at com.google.apphosting.base.RuntimePb?$EvaluationRuntime?$6.handleBlockingRequest(RuntimePb?.java:5235) at com.google.apphosting.base.RuntimePb?$EvaluationRuntime?$6.handleBlockingRequest(RuntimePb?.java:5233) at com.google.net.rpc.impl.BlockingApplicationHandler?.handleRequest(BlockingApplicationHandler?.java:24) at com.google.net.rpc.impl.RpcUtil?.runRpcInApplication(RpcUtil?.java:363) at com.google.net.rpc.impl.Server$2.run(Server.java:838) at com.google.tracing.LocalTraceSpanRunnable?.run(LocalTraceSpanRunnable?.java:56) at com.google.tracing.LocalTraceSpanBuilder?.internalContinueSpan(LocalTraceSpanBuilder?.java:536) at com.google.net.rpc.impl.Server.startRpc(Server.java:793) at com.google.net.rpc.impl.Server.processRequest(Server.java:368) at com.google.net.rpc.impl.ServerConnection?.messageReceived(ServerConnection?.java:448) at com.google.net.rpc.impl.RpcConnection?.parseMessages(RpcConnection?.java:319) at com.google.net.rpc.impl.RpcConnection?.dataReceived(RpcConnection?.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java:466) at com.google.net.async.EventDispatcher?.processNetworkEvents(EventDispatcher?.java:759) at com.google.net.async.EventDispatcher?.internalLoop(EventDispatcher?.java:205) at com.google.net.async.EventDispatcher?.loop(EventDispatcher?.java:101) at com.google.net.rpc.RpcService?.runUntilServerShutdown(RpcService?.java:251) at com.google.apphosting.runtime.JavaRuntime?$RpcRunnable?.run(JavaRuntime?.java:396) at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException?: access denied (java.net.NetPermission? getCookieHandler)
at java.security.AccessControlContext?.checkPermission(AccessControlContext?.java:355) at java.security.AccessController?.checkPermission(AccessController?.java:567) at java.lang.SecurityManager?.checkPermission(Unknown Source) at com.google.apphosting.runtime.security.CustomSecurityManager?.checkPermission(CustomSecurityManager?.java:45) at java.net.CookieHandler?.getDefault(Unknown Source) at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler?.<init>(GoogleGDataRequest.java:316) at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler?.<init>(GoogleGDataRequest.java:305) at com.google.gdata.client.http.GoogleGDataRequest.<clinit>(GoogleGDataRequest.java:408) ... 51 more

Unexpected exception from servlet: java.lang.ExceptionInInitializerError?}}}

I am stuck again and could use some help if anyone has a chance please.

Comment by robst...@gmail.com, Dec 8, 2009

Really trudging through this..

I was finally able to get youtube to authenticate. The problem I was having was that the quickfix in eclipse on the appengine-web.xml file was missing tons of values in the original file.

Anyways the next problem I am having is that after embedding the code on my site and clicking login I am receiving this error:

"The page you have requested cannot be displayed. Another site was requesting access to your Google Account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error."

This apparently means that I assigned the wrong domain name to googles api. I think? but where? Where can I change the domain? or is it something different entirely?

Comment by timmygob...@gmail.com, Dec 10, 2009

I have no idea why they've made such a pigs ear over this. Surely a iframe with a developer id would do the job!

Comment by thuy...@gmail.com, Dec 11, 2009

I'm stuck at this step "Registering your website for AuthSub?". Try to register my web site, even try to upload RSA certificate but still youtube users still get the alert message after they log in youtube to use my YouTube? Direct uploader. Anyone has this problem and find solution for it?

Comment by MRChrist...@gmail.com, Dec 11, 2009

Hum this looks way to complicated for me buy I would like to pay some one to assist me info@goldnotes.com

Comment by contatoremind, Dec 12, 2009

very nice work. after a lot of work hours, we can implement this step by step we can. thank u google

Comment by educatub...@gmail.com, Dec 12, 2009

Hum this looks way to complicated for me buy I would like to pay some one to assist me educatube.br@gmail.com

Comment by robst...@gmail.com, Dec 14, 2009

Got everything working. I think this will really work well for a video contest site we are running. Is there any way to delete a video from the submissions instead of just rejecting it?

Comment by thuy...@gmail.com, Dec 15, 2009

I finally got the site registered for AuthSub?. I find out need to register http://my_APP_ID.appspot.com site, not the site where I put youtube direct script on.

Now uses will get this message after they log in youtube:

This website is registered with Google to make authorization requests, but has not been configured to send requests securely

So my next step is to figure out how to set up secured request.

Comment by robst...@gmail.com, Dec 15, 2009

I'm at the exact same spot I think. After the user clicks agree they are able to upload correct?

I believe it has to do with the x.508 certificate but the tutorial on how to generate one is not very user friendly at first glace..

Comment by AlexInCh...@gmail.com, Dec 15, 2009

I'm at SYNCING ECLIPSE PROJECT TO YTD CODEBASE.

I put "http://youtube-direct.googlecode.com/svn/trunk/" in and click Finish, but it says "error validating location..."

help?

Comment by mcknight...@gmail.com, Dec 16, 2009

Does anyone have a YTD up and running yet? Thanks

Comment by robst...@gmail.com, Dec 16, 2009

I have one up and running you can see it here:

www.colorectal-cancer.ca/psa/

It is for a video contest site. Click submit.

There is still an warning when logging into youtube about security but it all works.

Comment by thebgn...@gmail.com, Dec 17, 2009

When I go to Versions I do not get the option to bind it to a domain. And I have a Google Apps domain. Do I need to do this entire process with my Google Apps email and not with my GMail account (that is associated with my YouTube? account)?

Comment by thebgn...@gmail.com, Dec 17, 2009

Also how am I supposed to verify the domain to get rid of the AuthSub? red box if I cannot upload a HTML file or change a META tag?

Comment by thebgn...@gmail.com, Dec 17, 2009

Got the domain CNAME to work. Not in the same spot as the screencast. Still not sure how to verify the domain though.

Comment by thebgn...@gmail.com, Dec 17, 2009

Nevermind I fixed it.

Comment by giovanni...@gmail.com, Dec 19, 2009

Like someone else (Celebrate Greece and AlexInChinatown?) i had this problem:

Sync your Eclipse project to the YTD codebase:

(Mac OSX 10.6.2)

When its time to hit finished I get a message:

"You appear to be checking out the root of your repository. Are you sure that this is what you want to do? If your repository contains any branches or tags all of them will be check out." Yes No??

1) If I chose yes and get a small popup box with a red exclamation mark and and "OK" to hit, which when I hit sends me back to the finish button choice (endless loop).

2) If I chose no, it closes the the whole window leaving just Eclipse up.

Long story short, "Eclipse should now be downloading all the files from YTD repository in a project named "ytd" ISN'T HAPPENING AND THERE IS NO YTD PROJECT. WHAT TO DO? Please can someone help me?

Comment by rouge-re...@techweek.co.cc, Dec 19, 2009

When I go to my admin page I get the following error: "Error: Forbidden Your client does not have permission to get URL /admin from this server."

What do you think is wrong?

The message above appears after I login to the account that I have authenticated for use with YTD.

Comment by rowntree...@gmail.com, Dec 21, 2009

i checked out 'Trunk' and it has a bad .CP ( missing entry for datanucleus-appengine-1.0.4.1.final.jar )

at runtime , im getting errors below but the class is in the web-inf/lib jar mentioned above . What happened to containers' just using ALL the jars in web-inf/lib?

--- ERROR: WARNING: Error for /admin/GetAllSubmissions? java.lang.NoClassDefFoundError?: Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?

... WARNING: Error for /admin/GetAdminConfig? java.lang.NoClassDefFoundError?: Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?

--- examine jar contents ....

\ytd\war\WEB-INF\lib\datanucleus-appengine-1.0.4.1.final.jar\\org\datanucleus\store\appengine\query\DatastoreQuery?.class

jar is there and jar is in proper place. However the CP needs to be modified.

Comment by ave.nich...@gmail.com, Dec 23, 2009

I have set up the google app engine, and have come across a couple of problems:

1. My google app engine account is registered against my email address, which also happens to be the account for our main youtube channel. I validated the ytd instance on app engine against this, but I assume this means that uploaded video (when approved) will go into that account. It would be better to have a separate youtube account for the uploads; can you let me know how to set this up?

2. I tried setting up authsub as per the instructions on this page. This requires authentication of the site URL (the appspot one), which means either adding an HTML file, or adding a meta tag. Not sure how to do this through app engine (I assume it is simple)!

Very grateful for any pointers on this!

Ave.

Comment by ave.nich...@gmail.com, Dec 23, 2009

OK - as is the way with these things, I have answered my own question!

  1. go to https://www.google.com/accounts/ManageDomains, and "Add domain" for your appspot URL (YOUR_ID.appspot.com)
  2. click on the "Manage YOUR_ID.appspot.com" link
  3. copy the meta tag verification code (something like <meta name="google-site-verification" content="[ your site verification id ]" />
  4. In Eclipse, edit war/index.html, pasting this code in the <head> section of the HTML
  5. right-click on the ytd project in the Project Explorer, and select "Google -> Deploy to App Engine"
  6. test the URL http://YOUR_ID.appspot.com/, and check that the meta tag is there (using "View Source")
  7. in the webmaster central page from which you copied the meta tag code, click on "verify"
  8. asuming this works, click on "Save"

you should now be able to log into the embedded uploader without seeing the annoying red banner!

Comment by ave.nich...@gmail.com, Dec 23, 2009

Hi,

another problem! I have got the uploader working OK, but am having problems with the admin interface; specifically with the mp4 doownload link for the submitted videos. This links through to a URL something like https://itndirect.appspot.com/admin/VideoDownloadRedirect?id=GjIJaqP-2Lo&username=itn which says "Error: This functionality is not implemented". Any ideas?

Comment by dav...@gmail.com, Dec 23, 2009

I resolved an issue that droves me insane.. I'll share if you guys have a same problem...

The issue was that when running the application in http://localhost:8080/admin it displays an error --Cannot run program "javac.exe"--, so if you experiment the same error you probably should set the PATH variable.

1- Click Start > Control Panel > System on Windows XP or Start > Settings > Control Panel > System 2- Click Advanced > Environment Variables. 3- Add the location of bin folder of JDK installation for PATH in User Variables and System Variables. A typical value for PATH is: C:\Program Files\Java\jdk1.6.0<version>\bin

Comment by robst...@gmail.com, Dec 23, 2009
ave.nicholas.wrigley,

For step #3 where do you see that verification code? I dont see it anywhere. I don't think I am getting the red banner you are talking about anyhow just the allow access warning..

Comment by rowntree...@gmail.com, Jan 5, 2010

The new branch ( #265 ) from 1/4/10 works for me where the older 2.0 release would not ..

From the SVN repository view, i went to "branches 265" and then under that to the folder "2.0 265" and checked that out to a project.

From there , i followed the video instructions and was able to run the app on localhost and to create a new assignment in the admin/config . Then, after the assignment was created, i got the embed JS from the admin/assignment tab and copied that JS into ./index.html.

I visited index.html and cliked on the submit, then logged into my Youtube account to satisfy the OAuth 'access' dialog. From there , i got the URL to the Youtube video from the links in the native , youtube, 'myvideos' list. Using the Url to the video, i imported an existing youtube video to the assignment. When i went back to the 'submissions' tab in YTD, the new video appearred in the adming panel.

Comment by trera...@gmail.com, Jan 5, 2010

Frustrator.. after switching back to the Java EE tab and fixing the appengine-web.xml file... The entire admin folder is broken and the embed.jsp file... restarted the setup and had the same errors.. under my markers, it shows "Your web application must be configured to use jdk to use jsp" ... anyone? lagunatre@gmail.com

Comment by ajbal...@gmail.com, Jan 6, 2010

Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?

Does anyone know how to resolve this? I see a previous comment, but it is quite cryptic and doesn't give an answer.

Comment by lissy9...@gmail.com, Jan 6, 2010

Need help with the error message below. After I select the allow access for authentication from the localhost configuration tab.. I get

HTTP ERROR: 500

Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?

RequestURI=/admin/PersistAuthSubToken? Caused by:

java.lang.NoClassDefFoundError?: Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?

at org.datanucleus.store.appengine.query.JDOQLQuery.(JDOQLQuery.java:55) at org.datanucleus.store.appengine.query.JDOQLQuery.(JDOQLQuery.java:44) 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 com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:112) at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:120) at org.datanucleus.plugin.NonManagedPluginRegistry?.createExecutableExtension(NonManagedPluginRegistry?.java:572) at org.datanucleus.store.appengine.DatastorePluginRegistry?.createExecutableExtension(DatastorePluginRegistry?.java:124) at org.datanucleus.plugin.PluginManager?.createExecutableExtension(PluginManager?.java:324) at org.datanucleus.store.query.QueryManager?.newQuery(QueryManager?.java:184) at org.datanucleus.jdo.JDOPersistenceManager.newQuery(JDOPersistenceManager.java:1291) at org.datanucleus.jdo.JDOPersistenceManager.newQuery(JDOPersistenceManager.java:1198) at org.datanucleus.jdo.JDOPersistenceManager.newQuery(JDOPersistenceManager.java:1310) at com.google.ytd.Util.getAdminConfig(Util.java:274) at com.google.ytd.YouTubeApiManager?.(YouTubeApiManager?.java:88) at com.google.ytd.admin.PersistAuthSubToken?.doGet(PersistAuthSubToken?.java:54) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:693) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:806) at org.mortbay.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:487) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1093) at com.google.appengine.api.blobstore.dev.ServeBlobFilter?.doFilter(ServeBlobFilter?.java:51) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter?.doFilter(TransactionCleanupFilter?.java:43) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1084) at com.google.appengine.tools.development.StaticFileFilter?.doFilter(StaticFileFilter?.java:121) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1084) at org.mortbay.jetty.servlet.ServletHandler?.handle(ServletHandler?.java:360) at org.mortbay.jetty.security.SecurityHandler?.handle(SecurityHandler?.java:216) at org.mortbay.jetty.servlet.SessionHandler?.handle(SessionHandler?.java:181) at org.mortbay.jetty.handler.ContextHandler?.handle(ContextHandler?.java:712) at org.mortbay.jetty.webapp.WebAppContext?.handle(WebAppContext?.java:405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext?.handle(DevAppEngineWebAppContext?.java:70) at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:139) at com.google.appengine.tools.development.JettyContainerService?$ApiProxyHandler?.handle(JettyContainerService?.java:352) at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection?.handleRequest(HttpConnection?.java:506) at org.mortbay.jetty.HttpConnection?$RequestHandler?.headerComplete(HttpConnection?.java:830) at org.mortbay.jetty.HttpParser?.parseNext(HttpParser?.java:514) at org.mortbay.jetty.HttpParser?.parseAvailable(HttpParser?.java:211) at org.mortbay.jetty.HttpConnection?.handle(HttpConnection?.java:381) at org.mortbay.io.nio.SelectChannelEndPoint?.run(SelectChannelEndPoint?.java:396) at org.mortbay.thread.BoundedThreadPool?$PoolThread?.run(BoundedThreadPool?.java:442)

Powered by Jetty://

Comment by Youf...@gmail.com, Jan 7, 2010

robstein

How do you fix this problem? "The page you have requested cannot be displayed. Another site was requesting access to your Google Account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error."

If you have problems with datanucleus try an older version http://youtube-direct.googlecode.com/svn/tags/20091113/ or another version in (http://youtube-direct.googlecode.com/svn/tags) instead of http://youtube-direct.googlecode.com/svn/trunk/

Comment by rowntree...@gmail.com, Jan 7, 2010

i can recreate the NoClassdeffound? error by checking out the TRUNK "ytd 250" and running it on localhost...

Jan 7, 2010 6:18:44 PM com.google.apphosting.utils.jetty.JettyLogger? warn WARNING: Error for /admin/GetAllAssignments? java.lang.NoClassDefFoundError?: Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?

try checking out the following:

branches 269

2.0 269 <--- check out your project from here . that is what i got to work

Comment by project member api.je...@gmail.com, Jan 7, 2010

A head's-up to folks: we're going to be disabling comments on Wiki pages, as we never intended it as a means for providing YouTube? Direct support.

What we'd ask is that if you have any general questions or comments about YouTube? Direct, you post them in the YouTube? API Google Group: http://groups.google.com/group/youtube-api-gdata

If you have a specific bug report or feature request, feel free to add it to the project's Issue Tracker at http://code.google.com/p/youtube-direct/issues/list

Comment by lealfran...@gmail.com, Apr 12, 2011

This really is complete? I Completed all the steps but the client folder does not install. I have to create it manually?

Comment by nisreddy...@gmail.com, Apr 22, 2011

I got this problem when I click on ALLOW ACCESS BUTTON after login as admin from the local host. Please suggest.

HTTP ERROR 500

Problem accessing /admin/PersistAuthSubToken?. Reason:

Could not fetch URL: http://gdata.youtube.com/feeds/api/users/default

Caused by: java.io.IOException: Could not fetch URL: http://gdata.youtube.com/feeds/api/users/default

at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:110) at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:41) at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:418) at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:297) at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getResponseCode(URLFetchServiceStreamHandler.java:150) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:549) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535) at com.google.gdata.client.Service.getEntry(Service.java:1352) at com.google.gdata.client.GoogleService?.getEntry(GoogleService?.java:567) at com.google.gdata.client.Service.getEntry(Service.java:1278) at com.google.ytd.youtube.YouTubeApiHelper?.getCurrentUsername(YouTubeApiHelper?.java:173) at com.google.ytd.youtube.PersistAuthSubToken?.doGet(PersistAuthSubToken?.java:74) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:617) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:717) at com.google.inject.servlet.ServletDefinition?.doService(ServletDefinition?.java:216) at com.google.inject.servlet.ServletDefinition?.service(ServletDefinition?.java:141) at com.google.inject.servlet.ManagedServletPipeline?.service(ManagedServletPipeline?.java:93) at com.google.inject.servlet.FilterChainInvocation?.doFilter(FilterChainInvocation?.java:63) at com.google.inject.servlet.ManagedFilterPipeline?.dispatch(ManagedFilterPipeline?.java:122) at com.google.inject.servlet.GuiceFilter?.doFilter(GuiceFilter?.java:110) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1157) at com.google.appengine.api.blobstore.dev.ServeBlobFilter?.doFilter(ServeBlobFilter?.java:58) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter?.doFilter(TransactionCleanupFilter?.java:43) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1157) at com.google.appengine.tools.development.StaticFileFilter?.doFilter(StaticFileFilter?.java:122) at org.mortbay.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1157) at org.mortbay.jetty.servlet.ServletHandler?.handle(ServletHandler?.java:388) at org.mortbay.jetty.security.SecurityHandler?.handle(SecurityHandler?.java:216) at org.mortbay.jetty.servlet.SessionHandler?.handle(SessionHandler?.java:182) at org.mortbay.jetty.handler.ContextHandler?.handle(ContextHandler?.java:765) at org.mortbay.jetty.webapp.WebAppContext?.handle(WebAppContext?.java:418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext?.handle(DevAppEngineWebAppContext?.java:70) at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:152) at com.google.appengine.tools.development.JettyContainerService?$ApiProxyHandler?.handle(JettyContainerService?.java:351) at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection?.handleRequest(HttpConnection?.java:542) at org.mortbay.jetty.HttpConnection?$RequestHandler?.headerComplete(HttpConnection?.java:923) at org.mortbay.jetty.HttpParser?.parseNext(HttpParser?.java:547) at org.mortbay.jetty.HttpParser?.parseAvailable(HttpParser?.java:212) at org.mortbay.jetty.HttpConnection?.handle(HttpConnection?.java:404) at org.mortbay.io.nio.SelectChannelEndPoint?.run(SelectChannelEndPoint?.java:409) at org.mortbay.thread.QueuedThreadPool?$PoolThread?.run(QueuedThreadPool?.java:582)

Comment by sce...@comcast.net, May 9, 2011

When attempting to deploy appengine I got:

Unable to update: com.google.appengine.tools.admin.JspCompilationException?: Failed to compile jsp files.

at com.google.appengine.tools.admin.Application.compileJsps(Application.java:426) at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:304) at com.google.appengine.tools.admin.AppAdminImpl?.doUpdate(AppAdminImpl?.java:257) at com.google.appengine.tools.admin.AppAdminImpl?.update(AppAdminImpl?.java:47) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl?.deploy(AppEngineBridgeImpl?.java:265) at com.google.appengine.eclipse.core.deploy.DeployProjectJob?.runInWorkspace(DeployProjectJob?.java:144) at org.eclipse.core.internal.resources.InternalWorkspaceJob?.run(InternalWorkspaceJob?.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Comment by sce...@comcast.net, May 9, 2011

updated Java Build Path.... now getting:

Unable to update: com.google.appengine.tools.admin.JspCompilationException?: Failed to compile jsp files.

at com.google.appengine.tools.admin.Application.compileJsps(Application.java:426) at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:304) at com.google.appengine.tools.admin.AppAdminImpl?.doUpdate(AppAdminImpl?.java:257) at com.google.appengine.tools.admin.AppAdminImpl?.update(AppAdminImpl?.java:47) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl?.deploy(AppEngineBridgeImpl?.java:265) at com.google.appengine.eclipse.core.deploy.DeployProjectJob?.runInWorkspace(DeployProjectJob?.java:144) at org.eclipse.core.internal.resources.InternalWorkspaceJob?.run(InternalWorkspaceJob?.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Comment by hironme...@gmail.com, May 25, 2011

wow, that was terrible documentation i finally have this up and running .. so i thought i would contribute some tips that helped me

watch the whole video first, that really helped. i had to follow both the video and the written steps in parallel. yep, they are not exactly same. eclipse .. go with Eclipse 3.6 (Helios) (even though they dont recommend it) google plugin for eclipse - get from here - http://code.google.com/eclipse/docs/install-eclipse-3.6.html the checkout i did from here http://youtube-direct.googlecode.com/svn/trunk/ did not work. so i got the latest code from here http://youtube-direct.googlecode.com/svn/branches/2.0/ The local webserver runs at http://localhost:8888/

Good Luck

~ Hiron

Comment by AnwarHad...@gmail.com, May 26, 2011

hey... is anybody else having troubles to uthenticate their accounts from localhost?

I can't get it authenticated... (the deployed version -I mean the one that is on the cloud- actually seems to do it). So I'm wondering if I really need the one in localhost working at 100%? do i really need the app version in my localhost to authenticate or can I simply start working with the one deployed to Google Servers?

Thanks!

- K

Comment by toilette...@gmail.com, May 27, 2011

I couldn't aunthenticate my localhost version either. But after deployment, the version on line seems to be working just fine. Good luck everyone!

Comment by hironme...@gmail.com, May 27, 2011

I am using these instructions http://code.google.com/apis/gdata/docs/auth/authsub.html to generate the keys so that I can get rid of the attached message screen The first commands:

keytool -genkey -v -alias examplexxx -keystore examplexxx.jks -keyalg RSA -sigalg SHA1withRSA -dname "CN=examplexxx.appspot.com, OU=Engineering, O=Seso, L=LA, ST=CA, C=US" -storepass examplexxx -keypass examplexxx

keytool -export -rfc -keystore examplexxx.jks -storepass examplexxx -alias examplexxx -file examplexxx.pem

are successful and generates the myrsakey.pem file which i uploaded in the Manage domains section

The second command: openssl pkcs8 -in ./examplexxx.pem -topk8 -nocrypt -out examplexxx.pk8 fails with "unable to load key" Any idea why? or what i am missing? thanks for your help

Comment by toilette...@gmail.com, May 30, 2011

I keep getting the message {"error":"400: This functionality is not available."} when I try to download a video (any video) from the admin panel on YTDirect.

Anyone can help me here? How can I "switch on" / "enable" that option?

Comment by natsu...@yahoo.com, Jun 1, 2011

i want do some video pleeeeeaaaaassss

Comment by sc...@verbinteractive.com, Jun 9, 2011

I have follow the steps and video very close and this just doesn't work, constant errors compiling JSP files. All files in the Admin folder and embed.jps have errors. Very disappointing to experience this level of performance from Google.

Powered by Google Project Hosting