Re: Error trying to start fresh trunk build (10/27/2006)

2006-10-30 Thread Kevan Miller


On Oct 27, 2006, at 2:50 PM, Jay D. McHugh wrote:


Hello all.

I just finished rebuilding a fresh checkout of trunk and built it  
starting with a blank m2 repo.


When I try to start the server, I get the following error (both on  
tomcat and jetty):

Using GERONIMO_BASE:   /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT
Using GERONIMO_HOME:   /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT
Using GERONIMO_TMPDIR: /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/var/temp
Using JRE_HOME:/opt/jdk1.5.0_06
Using GERONIMO_OUT:/opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/var/ 
log/geronimo.out

...

Jay,
My problem is caused by my setting of JAVA_HOME/JRE_HOME. In my case,  
$JRE_HOME/lib/ext was not a valid directory. Once I set JAVA_HOME/ 
JRE_HOME correctly, Geronimo starts fine.


Either 1) your JAVA_HOME/JRE_HOME is incorrect, or 2) the layout of  
your JRE is not matching the expectations of geronimo.sh. Can you let  
us know if you're setting JAVA_HOME or JRE_HOME and the contents of  
either $JRE_HOME/lib/ext or $JAVA_HOME/jre/iib/ext or $JAVA_HOME/lib/ 
ext (I think those are the possible permutations).


The reason why the exception is occurring is that an implementation  
of HmacSHA1 can not be loaded. The failure to load HmacSHA1 is the  
root cause of the problem. You aren't seeing this because an  
exception is being caught. The exception processing is calling  
assert. However, assertions are not enabled. We should consider  
adding -enableassertions to geronimo.sh. If you export JAVA_OPTS=- 
enableassertions before running geronimo.sh, you should see the  
actual problem...


--kevan


Re: Error trying to start fresh trunk build (10/27/2006)

2006-10-30 Thread Jacek Laskowski

On 10/29/06, Kevan Miller [EMAIL PROTECTED] wrote:


The reason why the exception is occurring is that an implementation
of HmacSHA1 can not be loaded. The failure to load HmacSHA1 is the
root cause of the problem. You aren't seeing this because an
exception is being caught. The exception processing is calling
assert. However, assertions are not enabled. We should consider
adding -enableassertions to geronimo.sh. If you export JAVA_OPTS=-
enableassertions before running geronimo.sh, you should see the
actual problem...


That's interesting...I have never considered 'enableassertions' as a
way to get more detailed error messages. Thanks Kevan!

Jacek

--
Jacek Laskowski
http://www.jaceklaskowski.pl


Error trying to start fresh trunk build (10/27/2006)

2006-10-27 Thread Jay D. McHugh

Hello all.

I just finished rebuilding a fresh checkout of trunk and built it 
starting with a blank m2 repo.


When I try to start the server, I get the following error (both on 
tomcat and jetty):

Using GERONIMO_BASE:   /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT
Using GERONIMO_HOME:   /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT
Using GERONIMO_TMPDIR: /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/var/temp
Using JRE_HOME:/opt/jdk1.5.0_06
Using GERONIMO_OUT:
/opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/var/log/geronimo.out


Geronimo started in background. PID: 10929
Booting Geronimo Kernel (in Java 1.5.0_06)...
Module  1/22 
org.apache.geronimo.configs/rmi-naming/1.2-SNAPSHOT/car  
started in  1.480s
Module  2/22 
org.apache.geronimo.configs/j2ee-server/1.2-SNAPSHOT/car 
started in   .687s
Module  3/22 
org.apache.geronimo.configs/transaction/1.2-SNAPSHOT/car 
started in  1.056s
Module  4/22 
org.apache.geronimo.configs/j2ee-security/1.2-SNAPSHOT/car   
started in  1.993s
Module  5/22 
org.apache.geronimo.configs/axis/1.2-SNAPSHOT/car
started in   .244s
Module  6/22 
org.apache.geronimo.configs/openejb/1.2-SNAPSHOT/car 
started in 13.185s
Module  7/22 
org.apache.geronimo.configs/system-database/1.2-SNAPSHOT/car 
started in   .000s
Module  8/22 
org.apache.geronimo.configs/activemq-broker/1.2-SNAPSHOT/car
13:36:13,998 INFO  [BrokerService] ActiveMQ 4.1-incubator-SNAPSHOT JMS 
Message Broker (possibly-unique-broker) is starting
13:36:13,999 INFO  [BrokerService] For help or more information please 
see: http://incubator.apache.org/activemq/
13:36:14,140 INFO  [ManagementContext] JMX consoles can connect to 
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
13:36:14,363 INFO  [JDBCPersistenceAdapter] Database driver recognized: 
[apache_derby_embedded_jdbc_driver]
13:36:17,833 INFO  [DefaultDatabaseLocker] Attempting to acquire the 
exclusive lock to become the Master broker
13:36:17,835 INFO  [DefaultDatabaseLocker] Becoming the master on 
dataSource: [EMAIL PROTECTED]
13:36:18,244 INFO  [JournalPersistenceAdapter] Journal Recovery Started 
from: Active Journal: using 2 x 20.0 Megs at: 
/opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/bin/activemq-data/possibly-unique-broker/journal
13:36:18,439 INFO  [JournalPersistenceAdapter] Journal Recovered: 0 
message(s) in transactions recovered.
13:36:18,936 INFO  [BrokerService] ActiveMQ JMS Message Broker 
(possibly-unique-broker, ID:jdm-56049-1161974173564-1:0) started
13:36:19,110 INFO  [TransportServerThreadSupport] Listening for 
connections at: stomp://jdm:61613

13:36:19,120 INFO  [TransportConnector] Connector stomp://jdm:61613 Started
13:36:19,127 INFO  [TransportServerThreadSupport] Listening for 
connections at: tcp://0.0.0.0:61616
13:36:19,128 INFO  [TransportConnector] Connector tcp://0.0.0.0:61616 
Started

13:36:19,161 INFO  [TransportConnector] Connector vm://localhost Started
started in  6.126s
Module  9/22 
org.apache.geronimo.configs/activemq/1.2-SNAPSHOT/car
started in  1.062s
Module 10/22 
org.apache.geronimo.configs/jetty/1.2-SNAPSHOT/car   
started in  1.576s
Module 11/22 
org.apache.geronimo.configs/geronimo-gbean-deployer/1.2-SNAPSHOT/car 
started in   .758s
Module 12/22 
org.apache.geronimo.configs/j2ee-deployer/1.2-SNAPSHOT/car   
started in   .802s
Module 13/22 
org.apache.geronimo.configs/connector-deployer/1.2-SNAPSHOT/car  
started in   .764s
Module 14/22 
org.apache.geronimo.configs/openejb-deployer/1.2-SNAPSHOT/car
started in  1.234s
Module 15/22 
org.apache.geronimo.configs/client-deployer/1.2-SNAPSHOT/car 
started in   .209s
Module 16/22 
org.apache.geronimo.configs/axis-deployer/1.2-SNAPSHOT/car   
started in  2.002s
Module 17/22 
org.apache.geronimo.configs/sharedlib/1.2-SNAPSHOT/car   
started in   .023s
Module 18/22 
org.apache.geronimo.configs/jetty-deployer/1.2-SNAPSHOT/car  
started in  1.093s
Module 19/22 
org.apache.geronimo.configs/welcome-jetty/1.2-SNAPSHOT/car   
started in  2.323s
Module 20/22 
org.apache.geronimo.configs/webconsole-jetty/1.2-SNAPSHOT/car   
13:36:35,162 ERROR [GBeanInstanceState] Error while starting; GBean is 
now in the FAILED state: 
abstractName=org.apache.geronimo.configs/webconsole-jetty/1.2-SNAPSHOT/car?J2EEApplication=org.apache.geronimo.configs/webconsole-jetty/1.2-SNAPSHOT/car,j2eeType=JACCManager,name=JACCManager

java.lang.NullPointerException
   at 
org.apache.geronimo.security.SubjectId.hashCode(SubjectId.java:79)

   at java.util.Hashtable.put(Hashtable.java:401)
   at 
org.apache.geronimo.security.ContextManager.registerSubject(ContextManager.java:269)
   at 
org.apache.geronimo.security.jacc.ApplicationPolicyConfigurationManager.init(ApplicationPolicyConfigurationManager.java:109)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
   at 

Re: Error trying to start fresh trunk build (10/27/2006)

2006-10-27 Thread Jacek Laskowski

On 10/27/06, Jay D. McHugh [EMAIL PROTECTED] wrote:


Is anyone else experiencing this?  Is there a fix or workaround that
anyone knows about?


Oh man, how can we get to Java EE 1.5 if we keep having troubles with
our own build spec ;-)

Seriously, I haven't seen it before so call yourself lucky! ;-)
Another point for you when/if you get it sorted out before others beat
you to it.

Thanks for having caught it! (I wonder how many people left after
having experienced such issues).

Jacek

--
Jacek Laskowski
http://www.jaceklaskowski.pl


Re: Error trying to start fresh trunk build (10/27/2006)

2006-10-27 Thread Jay D. McHugh

Jacek Laskowski wrote:

On 10/27/06, Jay D. McHugh [EMAIL PROTECTED] wrote:


Is anyone else experiencing this?  Is there a fix or workaround that
anyone knows about?


Oh man, how can we get to Java EE 1.5 if we keep having troubles with
our own build spec ;-)

Seriously, I haven't seen it before so call yourself lucky! ;-)
Another point for you when/if you get it sorted out before others beat
you to it.

Thanks for having caught it! (I wonder how many people left after
having experienced such issues).

Jacek



Jacek,

Thanks for responding.

Reading your email I realized that what I originally sent could possibly 
be misinterpreted.


So, to try to make sure I am clear...

I was able to build successfully, but I could not start the server 
because of an error starting the webconsole.


I have gotten this error regardless of which java version (1.4 or 1.5) I 
have built with and regardless of which java version I tried to start 
the server with.  And I get the error whether I try to start the tomcat 
or jetty assembly (I have tried all six combinations).


I have already exhausted my meager skills trying to fix the code 
myself.  It appears to be getting an NPE trying to calculate the hash of 
a brand new variable that -should- have just been declared and assigned 
about two lines earlier in the code.


Here is most of what I think is relevant in the ContextManager code:
(subjectIds is declared at the top of the class -   private static Map 
subjectIds = new Hashtable();)


  public static synchronized SubjectId registerSubject(Subject subject) {
   SecurityManager sm = System.getSecurityManager();
   if (sm != null) sm.checkPermission(SET_CONTEXT);

   if (subject == null) throw new IllegalArgumentException(Subject 
must not be null);


   AccessControlContext acc = (AccessControlContext) 
Subject.doAsPrivileged(subject, new PrivilegedAction() {

   public Object run() {
   return AccessController.getContext();
   }
   }, null);

   Context context = new Context();
   context.subject = subject;
   context.context = acc;
   Set principals = 
subject.getPrincipals(GeronimoCallerPrincipal.class);

   if (!principals.isEmpty()) {
   context.principal = (Principal) principals.iterator().next();
   } else if (!(principals = 
subject.getPrincipals(PrimaryRealmPrincipal.class)).isEmpty()) {
   context.principal = (PrimaryRealmPrincipal) 
principals.iterator().next();
   } else if (!(principals = 
subject.getPrincipals(RealmPrincipal.class)).isEmpty()) {
   context.principal = (RealmPrincipal) 
principals.iterator().next();

   } else if (!(principals = subject.getPrincipals()).isEmpty()) {
   context.principal = (Principal) principals.iterator().next();
   }
   Long id = new Long(nextSubjectId++);
   context.id = new SubjectId(id, hash(id));

   subjectIds.put(context.id, subject);   // this is line 269
   subjectContexts.put(subject, context);

   return context.id;
   }

So, as best as I can tell either:
   - subjectIds is null (shouldn't be since it is global to the class)
   - context.id is null (shouldn't be, it was just assigned on line 267)
   - context is null (if it was null, then context.id would be null as 
well and line 267 should have gotten the error)


Anyway, I am at a loss.  If no one else is getting this error, then I 
will need to take a look at my linux system to see if I can find 
something out of the ordinary with the way it is configured.  I am 
doubtful that I will be able to find something because I am getting the 
same error on three different systems that have all been running 
Geronimo for several months - but I'll look.


Thanks for your help.

Jay



Re: Error trying to start fresh trunk build (10/27/2006)

2006-10-27 Thread Joe Bohn

Jay,

I picked up a new image today (468502) with a clean repo and I was able 
to build and run without this error.  I'm not quite sure what to make of 
your error (esp. if you are seeing it on multiple systems).  I built and 
ran on Win XP with Sun JDK 1.4.2_12.


One thing I did have a problem with was that I first used an existing 
image I had from a few days ago and did an svn update.  For some reason, 
the build was failing because not everything was really getting rebuilt 
(I was picking up some older classes/jars from someplace under the 
source tree).   This was true even though I was using a clean repo and 
had run a complete bootstrap.  I finally ditched that image and grabbed 
a completely new image.  After that I was able to build and run 
successfully.


Joe



Jay D. McHugh wrote:

Hello all.

I just finished rebuilding a fresh checkout of trunk and built it 
starting with a blank m2 repo.


When I try to start the server, I get the following error (both on 
tomcat and jetty):

Using GERONIMO_BASE:   /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT
Using GERONIMO_HOME:   /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT
Using GERONIMO_TMPDIR: /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/var/temp
Using JRE_HOME:/opt/jdk1.5.0_06
Using GERONIMO_OUT:
/opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/var/log/geronimo.out


Geronimo started in background. PID: 10929
Booting Geronimo Kernel (in Java 1.5.0_06)...
Module  1/22 
org.apache.geronimo.configs/rmi-naming/1.2-SNAPSHOT/car  
started in  1.480s
Module  2/22 
org.apache.geronimo.configs/j2ee-server/1.2-SNAPSHOT/car 
started in   .687s
Module  3/22 
org.apache.geronimo.configs/transaction/1.2-SNAPSHOT/car 
started in  1.056s
Module  4/22 
org.apache.geronimo.configs/j2ee-security/1.2-SNAPSHOT/car   
started in  1.993s
Module  5/22 
org.apache.geronimo.configs/axis/1.2-SNAPSHOT/car
started in   .244s
Module  6/22 
org.apache.geronimo.configs/openejb/1.2-SNAPSHOT/car 
started in 13.185s
Module  7/22 
org.apache.geronimo.configs/system-database/1.2-SNAPSHOT/car 
started in   .000s
Module  8/22 
org.apache.geronimo.configs/activemq-broker/1.2-SNAPSHOT/car
13:36:13,998 INFO  [BrokerService] ActiveMQ 4.1-incubator-SNAPSHOT JMS 
Message Broker (possibly-unique-broker) is starting
13:36:13,999 INFO  [BrokerService] For help or more information please 
see: http://incubator.apache.org/activemq/
13:36:14,140 INFO  [ManagementContext] JMX consoles can connect to 
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
13:36:14,363 INFO  [JDBCPersistenceAdapter] Database driver recognized: 
[apache_derby_embedded_jdbc_driver]
13:36:17,833 INFO  [DefaultDatabaseLocker] Attempting to acquire the 
exclusive lock to become the Master broker
13:36:17,835 INFO  [DefaultDatabaseLocker] Becoming the master on 
dataSource: [EMAIL PROTECTED]
13:36:18,244 INFO  [JournalPersistenceAdapter] Journal Recovery Started 
from: Active Journal: using 2 x 20.0 Megs at: 
/opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/bin/activemq-data/possibly-unique-broker/journal 

13:36:18,439 INFO  [JournalPersistenceAdapter] Journal Recovered: 0 
message(s) in transactions recovered.
13:36:18,936 INFO  [BrokerService] ActiveMQ JMS Message Broker 
(possibly-unique-broker, ID:jdm-56049-1161974173564-1:0) started
13:36:19,110 INFO  [TransportServerThreadSupport] Listening for 
connections at: stomp://jdm:61613

13:36:19,120 INFO  [TransportConnector] Connector stomp://jdm:61613 Started
13:36:19,127 INFO  [TransportServerThreadSupport] Listening for 
connections at: tcp://0.0.0.0:61616
13:36:19,128 INFO  [TransportConnector] Connector tcp://0.0.0.0:61616 
Started

13:36:19,161 INFO  [TransportConnector] Connector vm://localhost Started
started in  6.126s
Module  9/22 
org.apache.geronimo.configs/activemq/1.2-SNAPSHOT/car
started in  1.062s
Module 10/22 
org.apache.geronimo.configs/jetty/1.2-SNAPSHOT/car   
started in  1.576s
Module 11/22 
org.apache.geronimo.configs/geronimo-gbean-deployer/1.2-SNAPSHOT/car 
started in   .758s
Module 12/22 
org.apache.geronimo.configs/j2ee-deployer/1.2-SNAPSHOT/car   
started in   .802s
Module 13/22 
org.apache.geronimo.configs/connector-deployer/1.2-SNAPSHOT/car  
started in   .764s
Module 14/22 
org.apache.geronimo.configs/openejb-deployer/1.2-SNAPSHOT/car
started in  1.234s
Module 15/22 
org.apache.geronimo.configs/client-deployer/1.2-SNAPSHOT/car 
started in   .209s
Module 16/22 
org.apache.geronimo.configs/axis-deployer/1.2-SNAPSHOT/car   
started in  2.002s
Module 17/22 
org.apache.geronimo.configs/sharedlib/1.2-SNAPSHOT/car   
started in   .023s
Module 18/22 
org.apache.geronimo.configs/jetty-deployer/1.2-SNAPSHOT/car  
started in  1.093s
Module 19/22 
org.apache.geronimo.configs/welcome-jetty/1.2-SNAPSHOT/car   
started in  2.323s
Module 20/22 
org.apache.geronimo.configs/webconsole-jetty/1.2-SNAPSHOT/car 

Re: Error trying to start fresh trunk build (10/27/2006)

2006-10-27 Thread Kevan Miller


On Oct 27, 2006, at 5:55 PM, Joe Bohn wrote:


Jay,

I picked up a new image today (468502) with a clean repo and I was  
able to build and run without this error.  I'm not quite sure what  
to make of your error (esp. if you are seeing it on multiple  
systems).  I built and ran on Win XP with Sun JDK 1.4.2_12.


One thing I did have a problem with was that I first used an  
existing image I had from a few days ago and did an svn update.   
For some reason, the build was failing because not everything was  
really getting rebuilt (I was picking up some older classes/jars  
from someplace under the source tree).   This was true even though  
I was using a clean repo and had run a complete bootstrap.  I  
finally ditched that image and grabbed a completely new image.   
After that I was able to build and run successfully.


Joe

Jay D. McHugh wrote:

Hello all.
I just finished rebuilding a fresh checkout of trunk and built it  
starting with a blank m2 repo.
When I try to start the server, I get the following error (both on  
tomcat and jetty):

Using GERONIMO_BASE:   /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT
Using GERONIMO_HOME:   /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT
Using GERONIMO_TMPDIR: /opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/var/temp
Using JRE_HOME:/opt/jdk1.5.0_06
Using GERONIMO_OUT:/opt/geronimo-jetty-j2ee-1.2-SNAPSHOT/var/ 
log/geronimo.out

Geronimo started in background. PID: 10929
Booting Geronimo Kernel (in Java 1.5.0_06)...

snip


Server Startup failed
Is anyone else experiencing this?  Is there a fix or workaround  
that anyone knows about?

Thanks in advance,
Jay


Yes, I had the same problem (Mac OS) on the weekly builds.

It seems to be related to starting Geronimo using (geronimo.sh). If I  
started the server using java -jar server.jar, it ran fine. I think I  
remember if working if I reset my jre to 1.5, also.


I'll have a plane ride this weekend. I can look into the problem,  
then (maybe sooner...).


Jay,
Have you tried to start using java -jar server.jar? Also, if you  
could create a Jira, that would be great...


--kevan