You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by John Langan <la...@homes.com> on 2008/02/22 21:20:51 UTC

Compiling Roller code

I checked out source code with
svn checkout https://svn.apache.org/repos/asf/incubator/roller roller/trunk
roller
Using NetBeans I opened the weblogger project in \roller\apps. The project
named itself "roller_weblogger", which is uneditable. When I run the dist
option of build.xml a war file in \roller\apps\weblogger\dist\webapp called
roller_weblogger.war is created. When this is deployed in Glassfish it
creates a webapp called "roller-weblogger" and when launched a page opens
with the url http://localhost:8080/roller-weblogger/ with a 404 error and
message "The file that you requested could not be found on this server."

Can anyone tell me where I've gone wrong and how I can get a successful
deployment by compiling Roller source code? Why does build.xml contain the
line "jar destfile="${ro.dist}/webapp/roller-weblogger.war" for creating the
war file instead of "roller.war"?
John. 


Re: Compiling Roller code

Posted by Dave <sn...@gmail.com>.
On Tue, Feb 26, 2008 at 5:02 PM, John Langan <la...@homes.com> wrote:
> Dave,
>  I tried Java 5 and deploying a directory with no luck.
>  As the roller war created from the apache-roller-4.0.zip download works and
>  the errors indicated a problem with the RollerPU I swapped the
>  roller-business.jar and openjpa-0.9.7-incubating.jar files from that version
>
> in C:\glassfish\domains\domain1\applications\j2ee-modules\roller\WEB-INF\lib
>  with those from the war compiled from the source code. I now get a 503 error
>  instaed of a 404.
>
>  Now there no errors seen in roller.log and the error in the server log is
>  now:
>  [#|2008-02-26T16:17:34.593-0500|SEVERE|sun-appserver9.1|javax.enterprise.sys
>  tem.container.web|_ThreadID=14;_ThreadName=pool-1-thread-4;_RequestID=af00c1
>  bd-35ae-47c1-af42-3b11116816a3;|WebModule[/roller]PWC1275: Exception sending
>
> context initialized event to listener instance of class
>  org.apache.roller.weblogger.ui.core.RollerContext
>  java.lang.NoSuchMethodError:
>  org.apache.roller.weblogger.business.WeblogManager.getPage(Ljava/lang/String
>  ;)Lorg/apache/roller/weblogger/pojos/WeblogTemplate;
>         at
>  org.apache.roller.weblogger.ui.rendering.velocity.RollerResourceLoader.getRe
>  sourceStream(RollerResourceLoader.java:80)
>         at org.apache.velocity.Template.process(Template.java:93)
>
>  I looked through the code but can't see where the problem might be. Any
>  ideas?

Pretty weird. I haven't seen anything quite like that. Looks like some
weird classpath problem, where perhaps you have different versions of
the Roller jars hanging around... or something.

How are you building Roller? You should be doing something like this:

   $ cd trunk/apps/weblogger
   $ ant dist

Then you should deploy the directory
trunk/apps/webblogger/build/webapp to Glassfish.

Since you are having such strange problems, I'd suggest you install
into a pristine, i.e. completely new installation of Glassfish V2.

- Dave

RE: Compiling Roller code

Posted by John Langan <la...@homes.com>.
Dave,
I tried Java 5 and deploying a directory with no luck. 
As the roller war created from the apache-roller-4.0.zip download works and
the errors indicated a problem with the RollerPU I swapped the
roller-business.jar and openjpa-0.9.7-incubating.jar files from that version
in C:\glassfish\domains\domain1\applications\j2ee-modules\roller\WEB-INF\lib
with those from the war compiled from the source code. I now get a 503 error
instaed of a 404.

Now there no errors seen in roller.log and the error in the server log is
now:
[#|2008-02-26T16:17:34.593-0500|SEVERE|sun-appserver9.1|javax.enterprise.sys
tem.container.web|_ThreadID=14;_ThreadName=pool-1-thread-4;_RequestID=af00c1
bd-35ae-47c1-af42-3b11116816a3;|WebModule[/roller]PWC1275: Exception sending
context initialized event to listener instance of class
org.apache.roller.weblogger.ui.core.RollerContext
java.lang.NoSuchMethodError:
org.apache.roller.weblogger.business.WeblogManager.getPage(Ljava/lang/String
;)Lorg/apache/roller/weblogger/pojos/WeblogTemplate;
	at
org.apache.roller.weblogger.ui.rendering.velocity.RollerResourceLoader.getRe
sourceStream(RollerResourceLoader.java:80)
	at org.apache.velocity.Template.process(Template.java:93)

I looked through the code but can't see where the problem might be. Any
ideas?
John. 


-----Original Message-----
From: Dave [mailto:snoopdave@gmail.com] 
Sent: Monday, February 25, 2008 10:23 PM
To: user@roller.apache.org
Subject: Re: Compiling Roller code

On Mon, Feb 25, 2008 at 4:39 PM, John Langan <la...@homes.com> wrote:
> Dave,
>  Thanks for the help. I've downloaded from the archive you indicated but I
>  still get a 404 message when I try to deploy the war file in Glassfish
with
>  the error messages below. If I deploy a war file created from the Roller
>  apache-roller-4.0.zip download everything works fine and I can see the
blogs
>  I have created. So my I am only getting the errors when I compile the
source
>  code.
>  Version: Roller 4.0
>  Application Server: Glassfish V2
>  Database: Oracle
>  Java: Java 6 update 4
>  OS: Windows XP

Hmm... that's a bit of a mystery to me. I build and run Roller 4.0 and
Roller 4.1 on Glassfish V2 just about everyday. Here are a couple of
things to try:

* try running with Java 5. I'm pretty sure I've never run Roller on Java 6.
* try deploying as a directory instead of a WAR

- Dave



Re: Compiling Roller code

Posted by Dave <sn...@gmail.com>.
On Mon, Feb 25, 2008 at 4:39 PM, John Langan <la...@homes.com> wrote:
> Dave,
>  Thanks for the help. I've downloaded from the archive you indicated but I
>  still get a 404 message when I try to deploy the war file in Glassfish with
>  the error messages below. If I deploy a war file created from the Roller
>  apache-roller-4.0.zip download everything works fine and I can see the blogs
>  I have created. So my I am only getting the errors when I compile the source
>  code.
>  Version: Roller 4.0
>  Application Server: Glassfish V2
>  Database: Oracle
>  Java: Java 6 update 4
>  OS: Windows XP

Hmm... that's a bit of a mystery to me. I build and run Roller 4.0 and
Roller 4.1 on Glassfish V2 just about everyday. Here are a couple of
things to try:

* try running with Java 5. I'm pretty sure I've never run Roller on Java 6.
* try deploying as a directory instead of a WAR

- Dave

RE: Compiling Roller code

Posted by John Langan <la...@homes.com>.
Dave,
Thanks for the help. I've downloaded from the archive you indicated but I
still get a 404 message when I try to deploy the war file in Glassfish with
the error messages below. If I deploy a war file created from the Roller
apache-roller-4.0.zip download everything works fine and I can see the blogs
I have created. So my I am only getting the errors when I compile the source
code.
Version: Roller 4.0 
Application Server: Glassfish V2
Database: Oracle
Java: Java 6 update 4
OS: Windows XP

In the server log I get the message:
[#|2008-02-25T16:11:25.625-0500|SEVERE|sun-appserver9.1|javax.enterprise.sys
tem.container.web|_ThreadID=18;_ThreadName=Thread-27;_RequestID=229eeb5b-aed
f-40b5-8d80-eda2dfcc965a;|WebModule[/roller]PWC1275: Exception sending
context initialized event to listener instance of class
org.apache.roller.weblogger.ui.core.RollerContext
com.google.inject.ProvisionException: Error while locating instance
  bound to org.apache.roller.weblogger.business.jpa.JPAPersistenceStrategy
  for member at
org.apache.roller.weblogger.business.jpa.JPAWebloggerImpl.<init>(JPAWeblogge
rImpl.java:79)
	at
com.google.inject.InjectorImpl$SingleParameterInjector.inject(InjectorImpl.j
ava:646)
	at
com.google.inject.InjectorImpl.getParameters(InjectorImpl.java:666)


And in the roller.log I get:
INFO  2008-02-25 16:11:23,375 DatabaseProvider:successMessage - SUCCESS:
loaded JDBC driver class [oracle.jdbc.driver.OracleDriver]
INFO  2008-02-25 16:11:23,609 JPAPersistenceStrategy:<init> - openjpa.Log:
commons
ERROR 2008-02-25 16:11:25,531 JPAPersistenceStrategy:<init> - ERROR:
creating entity manager
javax.persistence.PersistenceException: No Persistence provider for
EntityManager named RollerPU: Provider named
org.apache.openjpa.persistence.PersistenceProviderImpl threw unexpected
exception at create EntityManagerFactory: 
org.apache.openjpa.util.GeneralException
<0.9.7-incubating nonfatal general error>
org.apache.openjpa.util.GeneralException: JAR entry META-INF/persistence.xml
not found in
C:\glassfish\domains\domain1\applications\j2ee-modules\roller\WEB-INF\lib\ro
ller-business.jar
	at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
	at
sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.ja
va:132)
	at java.net.URL.openStream(URL.java:1009)
	at
org.apache.openjpa.lib.meta.URLMetaDataIterator.getInputStream(URLMetaDataIt
erator.java:62)
	at
org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:3
15)

Any help on where I'm going wrong is appreciated.
John.



-----Original Message-----
From: Dave [mailto:snoopdave@gmail.com] 
Sent: Friday, February 22, 2008 8:41 PM
To: user@roller.apache.org
Subject: Re: Compiling Roller code

On Fri, Feb 22, 2008 at 3:20 PM, John Langan <la...@homes.com> wrote:
>
>  I checked out source code with
>  svn checkout https://svn.apache.org/repos/asf/incubator/roller
roller/trunk
>  roller

That's the wrong archive. Roller is no longer in the Incubator.

Check this page for source code access instructions:
http://cwiki.apache.org/confluence/x/Z4k

- Dave


>  Using NetBeans I opened the weblogger project in \roller\apps. The
project
>  named itself "roller_weblogger", which is uneditable. When I run the dist
>  option of build.xml a war file in \roller\apps\weblogger\dist\webapp
called
>  roller_weblogger.war is created. When this is deployed in Glassfish it
>  creates a webapp called "roller-weblogger" and when launched a page opens
>  with the url http://localhost:8080/roller-weblogger/ with a 404 error and
>  message "The file that you requested could not be found on this server."
>
>  Can anyone tell me where I've gone wrong and how I can get a successful
>  deployment by compiling Roller source code? Why does build.xml contain
the
>  line "jar destfile="${ro.dist}/webapp/roller-weblogger.war" for creating
the
>  war file instead of "roller.war"?
>  John.
>
>



Re: Compiling Roller code

Posted by Dave <sn...@gmail.com>.
On Fri, Feb 22, 2008 at 3:20 PM, John Langan <la...@homes.com> wrote:
>
>  I checked out source code with
>  svn checkout https://svn.apache.org/repos/asf/incubator/roller roller/trunk
>  roller

That's the wrong archive. Roller is no longer in the Incubator.

Check this page for source code access instructions:
http://cwiki.apache.org/confluence/x/Z4k

- Dave


>  Using NetBeans I opened the weblogger project in \roller\apps. The project
>  named itself "roller_weblogger", which is uneditable. When I run the dist
>  option of build.xml a war file in \roller\apps\weblogger\dist\webapp called
>  roller_weblogger.war is created. When this is deployed in Glassfish it
>  creates a webapp called "roller-weblogger" and when launched a page opens
>  with the url http://localhost:8080/roller-weblogger/ with a 404 error and
>  message "The file that you requested could not be found on this server."
>
>  Can anyone tell me where I've gone wrong and how I can get a successful
>  deployment by compiling Roller source code? Why does build.xml contain the
>  line "jar destfile="${ro.dist}/webapp/roller-weblogger.war" for creating the
>  war file instead of "roller.war"?
>  John.
>
>