Hey Jake,

Thanks for writing this up. Replies inline:

On Thu, Apr 15, 2010 at 1:22 PM, Jake <[email protected]> wrote:

> Hello,
>
> Thanks for the help.  This is quite a long, detailed post, but
> hopefully it will help generate some documentation.
>
> I started by making an exact copy of an existing Maven/GAE project
> that I've been working on.  The pom.xml file for that project has a
> few build commands that run embedded ANT scripts that call the
> executables in the SDK direcotry that either run the instance locally
> or deploy it.  Everything is done within Eclipse.
>
> So, I've taken that copy, Right Clicked in Eclipse, Google->App Engine
> Settings...
>
> I check "Use Google App Engine" and try to set the Application ID, but
> it claims that the appengine-web.xml is missing.  It is currently
> there under src/main/webapp/WEB-INF where the standard Maven would
> place it.  Without the ability at this point to designate where to
> find the file, I'm stuck unless I choose to create a new project
> according to the GPE FAQ.
>

Hm, I think that if you had chosen to set the "This project has a war
directory" setting, and set it to src/main/webapp, this error could have
gone away.


>
> So, I create a new Dynamic Web Project per the FAQ.  I'm not really
> sure what to set for Runtime or Configuration, either because I'm an
> eclipse newb or I'm not entirely certain how this will run in the
> end.  I set that project up, copy over all of my code/resources and
> the pom.xml and enable Maven Dependency Management.  At this point, it
> looks like a clean maven package and I pull out all of my ANT scripts
> from the pom.xml (since I shouldn't need them now).
>

I think for runtime, they are referring to the server on which your
application will run. The best thing was indeed to select <none>, because
App Engine's server is not one of the choices. The default configuration is
a good choice too, unless you want to add other stuff, like Web Services,
JSF, etc..

We should improve the doc in our FAQ.


> I'm using Eclipse for Java EE.  Continuing with the FAQ, it talks
> about enabling GWT, which I do not want to do.  Elsewhere, it was
> suggested that I look at the FAQ for users who are not using Eclipse
> for Java EE.
>

Looks like we need to have some sort of break-out in the FAQ for those users
that are working with App Engine-only projects.


>
> So, I set the "This project has a WAR directory" (and, at this point
> realize I could probably have done that on my original application
> without starting from scratch and copying over the files).  I am able
> to enable Google App Engine for this project, but I get a few build
> path errors.  For example, I accidentally selected a missing SDK at
> first.  Selecting the correct path for the SDK in the Google Screen
> didn't seem to remove the previous "bad" path, so I'm doing that
> manually.  It also complained about the existing GAE files in my
> pom.xml, but did so in a roundabout way.
>

Couldn't you have gone back to "Use Specific SDK", and chosen the one listed
on your build path (instead of having to use one of the SDKs that are
installed with the plugin)?

Can you elaborate on the pom.xml-related problem? Was this GPE reporting an
error, or the Maven plugin?


>
> I tried doing a Maven Package per the FAQ, but it claimed
> javax.persistence did not exist.  I see geronimo_jpa on the "google
> supplied" list of resources in my build path, but it's not working?
> Anyways, put it back in my pom.xml and it packaged into the  /target/
> directory.  (At some point, I also removed all folders from ORM
> enhancement since I use Objectify).
>

How did you end up fixing the problem? Was geronimo_jpa missing from the
pom.xml?


>
> Finally, I ran as a WebApplication.  On the bright side, I'm getting
> completely different problems now :)  I'm getting files not found:
>
> javax.xml.parsers.FactoryConfigurationError: Provider
> org.apache.xerces.jaxp.SAXParserFactoryImpl not found
>        at
> javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:
> 113)
>        at org.mortbay.xml.XmlParser.<init>(XmlParser.java:69)
>
> WARNING: Nested in javax.xml.parsers.FactoryConfigurationError:
> Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found:
> java.lang.ClassNotFoundException: org/apache/xerces/jaxp/
> SAXParserFactoryImpl
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:164)
>
> I'm not an expert on XML parsing - it's a small miracle I got it
> working in the first place under my old deployment methods.  Here are
> my dependencies:
>
> net.sf.saxon - saxon - 9.1.0.8
> net.sf.saxon - saxon-dom - 9.1.0.8
> xml-resolver - 1.2
> xml-apis - 1.3.03
>
> Do I know the difference between Xerces and Saxon?  Nope.  Do I care
> what I use?  Nope.  Do I know if that was even a valid question?
> Nope.  I used Saxon merely because I was getting some errors with
> Xerces back in the day, so I presumed GAE was somehow incompatible.  I
> see this bug report:
> http://code.google.com/p/googleappengine/issues/detail?id=1367
> However, I don't really understand it and/or what I need to do :)
> Regardless, it was working fine *without* GPE, so I presume my issue
> is a GPE bug, not an AppEngine bug.
>

This is interesting (that it was working fine without GPE). It must be some
sort of difference in your classpath in GPE vs. not in GPE. Can you tell me
what:

1) Your build classpath looks like?
2) What files you have in your WEB-INF/lib folder?

What did I do differently this time?  I believe it has something to do
> with Maven Packaging options (WAR vs JAR), and failing to refresh the
> "target" folder in Eclipse.  I don't think that was the actual folder
> I was selecting the first time I ran the Web Application when I tried
> this last.  So, documentation there could be helpful.  I think I was
> diving deep into the WTP temp folder when I couldn't figure it out.
>

The refreshing of the target folder - was this something that you had to do
manually? I guess you're saying that this is something we should doc after
the "mvn package" step?


>
> So, it looks now as if my dependencies are somehow failing with GPE,
> instead of the entire thing failing.  I'm going to leave the entire
> post there so you can see my process (and perhaps update some FAQs to
> help make it simpler.
>
> Thanks for any help in advance!
>
> Jake
>
> Jake
>
>
> On Apr 14, 10:57 am, Rajeev Dayal <[email protected]> wrote:
> > Hey Jake,
> >
> > I just took a look at the thread that you mentioned. Could you describe
> the
> > problems that you were running into (on the original thread)? I can try
> and
> > help you out.
> >
> > Rajeev
> >
> > On Tue, Apr 13, 2010 at 10:21 AM, John Patterson <[email protected]
> >wrote:
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to