Thursday, November 27, 2008

Building jBPM 3.3.0.GA From Source

The reason for this extremely long post is simply to save someone time in the event they are having the same problems. The errors I got are copied here in their entirety in the even that someone is googling them.  The moral of this story is to update after checkout!

jBPM 3.3.0.GA is out!

Sweet.  I'll build it from source.

First, I checked it out from the svn repository.  I used Eclipse and checked it out as a project.

Second, control click (new MacBook Pro!) on the pom.xml in the root directory.  I chose "run as -> Maven package"  That didn't work.

[INFO] [jar:jar]
[INFO] Building jar: [ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/core/target/jbpm-jpdl-3.3.1-SNAPSHOT.jar
[INFO] [assembly:single]
[INFO] Reading assembly descriptor: [ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/core/scripts/assembly-config.xml
Exception in thread "main" java.lang.NullPointerException
at org.apache.maven.plugin.assembly.archive.ManifestCreationFinalizer.getVirtualFiles(ManifestCreationFinalizer.java:99)
at org.codehaus.plexus.archiver.AbstractArchiver.hasVirtualFiles(AbstractArchiver.java:546)
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:258)
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:242)
at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:513)
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:103)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:278)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)


I don't have a lot of experience with Maven.  I like the idea of Maven more than its actuality.  The repository is a great idea.  But I have found it painful to use.

I'm using MyEclipse at the moment.  I've used for years now; although, I had switched to Eclipse with the JBoss Tools for the past few months.   I opened the run dialog () and created a new Maven run profile.

I checked "Debug Output" and ran it again.  This time I got a lot more information.
[INFO] Reading assembly descriptor: [ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/core/scripts/assembly-config.xml
[DEBUG] No dependency sets specified.
[DEBUG] FileSet[/] dir perms: 40755 file perms: 100644
[DEBUG] The archive base directory is 'null'
[DEBUG] disposing managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-antrun-plugin:1.1@48/thread:main
[DEBUG] dissociating all components from managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-antrun-plugin:1.1@48/thread:main
[DEBUG] disposing managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-site-plugin:2.0-beta-6@48/thread:main
[DEBUG] dissociating all components from managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-site-plugin:2.0-beta-6@48/thread:main
[DEBUG] disposing managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-resources-plugin:2.2@48/thread:main
[DEBUG] dissociating all components from managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-resources-plugin:2.2@48/thread:main
[DEBUG] disposing managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-surefire-plugin:2.4.2@48/thread:main
[DEBUG] dissociating all components from managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-surefire-plugin:2.4.2@48/thread:main
[DEBUG] disposing managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-1@48/thread:main
[DEBUG] dissociating all components from managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-1@48/thread:main
[DEBUG] disposing managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-compiler-plugin:2.0.2.SP1@48/thread:main
[DEBUG] dissociating all components from managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-compiler-plugin:2.0.2.SP1@48/thread:main
[DEBUG] disposing managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-source-plugin:2.0.4@48/thread:main
[DEBUG] dissociating all components from managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-source-plugin:2.0.4@48/thread:main
[DEBUG] disposing managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-jar-plugin:2.2@48/thread:main
[DEBUG] dissociating all components from managed ClassRealm with id: /plugins/org.apache.maven.plugins:maven-jar-plugin:2.2@48/thread:main
Exception in thread "main" java.lang.NullPointerException
at org.apache.maven.plugin.assembly.archive.ManifestCreationFinalizer.getVirtualFiles(ManifestCreationFinalizer.java:99)
at org.codehaus.plexus.archiver.AbstractArchiver.hasVirtualFiles(AbstractArchiver.java:546)
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:258)
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:242)
at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:513)
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:103)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:278)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)



The line, "The archive base directory is 'null'" didn't look good.

I decided to try from the command line.  This time there were test failures:
Running org.jbpm.enterprise.jta.JtaDbPersistenceTest
java.lang.RuntimeException: Cannot obtain MBeanServerConnection using jndi props: {java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
at org.jboss.bpm.api.test.IntegrationTestHelper.getServer(IntegrationTestHelper.java:131)
at org.jboss.bpm.api.test.IntegrationTestHelper.getDeployer(IntegrationTestHelper.java:139)
at org.jboss.bpm.api.test.IntegrationTestHelper.deploy(IntegrationTestHelper.java:58)
at org.jboss.bpm.api.test.IntegrationTestHelper.deploy(IntegrationTestHelper.java:53)
at org.jboss.bpm.api.test.IntegrationTestSetup.setUp(IntegrationTestSetup.java:105)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.bpm.api.test.IntegrationTestHelper.getServer(IntegrationTestHelper.java:127)
... 21 more
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
... 25 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
... 26 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.<init>(Socket.java:367)
at java.net.Socket.<init>(Socket.java:267)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
... 26 more
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 11.054 sec <<< FAILURE!
Running org.jbpm.enterprise.config.AppServerConfigurationsTest
java.lang.RuntimeException: Cannot obtain MBeanServerConnection using jndi props: {java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
at org.jboss.bpm.api.test.IntegrationTestHelper.getServer(IntegrationTestHelper.java:131)
at org.jboss.bpm.api.test.IntegrationTestHelper.getDeployer(IntegrationTestHelper.java:139)
at org.jboss.bpm.api.test.IntegrationTestHelper.deploy(IntegrationTestHelper.java:58)
at org.jboss.bpm.api.test.IntegrationTestHelper.deploy(IntegrationTestHelper.java:53)
at org.jboss.bpm.api.test.IntegrationTestSetup.setUp(IntegrationTestSetup.java:105)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.bpm.api.test.IntegrationTestHelper.getServer(IntegrationTestHelper.java:127)
... 21 more
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
... 25 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
... 26 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.<init>(Socket.java:367)
at java.net.Socket.<init>(Socket.java:267)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
... 26 more
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.082 sec <<< FAILURE!
Running org.jbpm.enterprise.config.ContainerProvidedJarsTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.019 sec <<< FAILURE!

Results :

Tests in error:
org.jbpm.enterprise.jta.JtaDbPersistenceTest
org.jbpm.enterprise.config.AppServerConfigurationsTest
testDependencies(org.jbpm.enterprise.config.ContainerProvidedJarsTest)

Tests run: 3, Failures: 0, Errors: 3, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.




I started JBoss and try again.  Same thing.

I tried by skipping the tests.  That didn't work either.  I got a compile error.

I changed into the core directory thinking that maybe I had to compile it in a certain order.  I was able to compile the core.  Finally!

Back to the root directory to try again.  Nope.

I changed into the identity directory.  I thought that building individually in the order listed by Maven's output might help me isolate the problem.  

Unfortunately there was a missing dependency,  jbpm-jpdl-3.3.1-SNAPSHOT.jar.  That's the artifact that I was able to build in core directory.  

I had run "package" not "install."  So I changed back into the core directory and ran "install."  I forgot to add the flag for skipping tests.  This time the tests all passed. Hmm.

So back into the identity directory.  This time no problem.

I changed into the "db" directory.  It installed fine.  

So did the "enterprise" directory.

So did the "simulation" directory.

The "integration" directory failed :
INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/runtime/ExpressionEvaluator.java:[29,32] cannot find symbol
symbol : class Token
location: package org.jboss.bpm.api.client

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/runtime/ExpressionEvaluator.java:[55,35] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.runtime.ExpressionEvaluator

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/runtime/NodeExecuteInterceptor.java:[26,32] cannot find symbol
symbol : class Token
location: package org.jboss.bpm.api.client

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/runtime/RuntimeContext.java:[29,32] cannot find symbol
symbol : class Token
location: package org.jboss.bpm.api.client

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/runtime/RuntimeContext.java:[42,10] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.runtime.RuntimeContext

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/runtime/RuntimeContext.java:[44,9] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.runtime.RuntimeContext

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/runtime/RuntimeContext.java:[49,23] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.runtime.RuntimeContext

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ExclusiveGatewayImpl.java:[26,32] cannot find symbol
symbol : class Token
location: package org.jboss.bpm.api.client

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[33,32] cannot find symbol
symbol : class Token
location: package org.jboss.bpm.api.client

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[34,38] package org.jboss.bpm.api.client.Token does not exist

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[146,9] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[152,9] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[181,9] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[186,13] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[191,34] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[191,14] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[34,32] cannot find symbol
symbol : class Token
location: package org.jboss.bpm.api.client

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[52,34] cannot find symbol
symbol: class Token
public class TokenImpl implements Token

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[96,9] cannot find symbol
symbol : class TokenStatus
location: class org.jbpm.integration.client.TokenImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[107,13] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.client.TokenImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[137,9] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.client.TokenImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[144,9] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.client.TokenImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/runtime/NodeExecuteInterceptor.java:[39,4] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.runtime.NodeExecuteInterceptor

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ExclusiveGatewayImpl.java:[75,6] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ExclusiveGatewayImpl.ExclusiveGatewayDecisionHandler

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[51,7] org.jbpm.integration.model.ProcessImpl is not abstract and does not override abstract method cancel() in org.jboss.bpm.api.model.Process

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[91,4] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[94,40] cannot find symbol
symbol : variable TokenStatus
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[161,4] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[193,8] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[193,36] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/model/ProcessImpl.java:[197,11] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.model.ProcessImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[98,4] cannot find symbol
symbol : class TokenStatus
location: class org.jbpm.integration.client.TokenImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[98,25] cannot find symbol
symbol : variable TokenStatus
location: class org.jbpm.integration.client.TokenImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[101,15] cannot find symbol
symbol : variable TokenStatus
location: class org.jbpm.integration.client.TokenImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[109,8] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.client.TokenImpl

[ECLIPSE WORKSPACE DIRECTORY]/jbpm3/modules/integration/spec/src/main/java/org/jbpm/integration/client/TokenImpl.java:[109,41] cannot find symbol
symbol : class Token
location: class org.jbpm.integration.client.TokenImpl


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 seconds
[INFO] Finished at: Thu Nov 27 20:40:08 EST 2008
[INFO] Final Memory: 24M/44M
[INFO] ------------------------------------------------------------------------




Getting pretty frustrated, I control clicked the project and ran "Team -> Synchronize with Repository." There were a bunch of updates. The classes I was missing were included. I have no idea how that happened.

I updated and re-ran maven. Success. I changed to the root directory and ran "package" again. Success.

How the hell was I missing sources? Oh well.

Wednesday, November 26, 2008

Format My Source Code for Blogging

Here's a really nice utility :
Format My Source Code for Blogging

The results will be all over my blog!

Tuesday, November 25, 2008

OSX and JAVA_HOME

Trying to use seam-gen on my new MacBook Pro I got the following error :

The JAVA_HOME environment variable is not set
Please point it to a valid JDK installation

So I ran :

JAVA_HOME=/Library/Java/Home

This article from Apple's site suggested that the home should always point to that symlink. Unfortunately I got the same error.

Running :

java -version

showed only a JRE :

java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

Running :

$JAVA_HOME/bin/java -version

showed the same thing. So where is this JDK that Apple speaks of?  Its there.  The only thing that I was missing was :

export JAVA_HOME

Oops.

Calendar and date ranges

I hate Java's Calendar and Date apis.  Hopefully JSR 310 will improve things.  

In the meantime, here's a trick for selecting based on a date range :

Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR, (cal.get(Calendar.HOUR) - 1));
beforeDate = cal.getTime();
cal.set(Calendar.DATE, (cal.get(Calendar.DATE) - 1));
cal.set(Calendar.HOUR_OF_DAY, 00);
cal.set(Calendar.MINUTE, 00);
cal.set(Calendar.SECOND, 00);
afterDate = cal.getTime();
The beforeDate member variable is set to the current date minus one hour.  Then the cal Calendar instance is set to 12:00 AM the day before.

Friday, November 21, 2008

Dashboard wouldn't start

I got a new MacBook Pro at work.  I'm completely happy about that!

Dashboard quit working.  It might not have ever worked, but I think it did.  After installing a new widget it wouldn't start.

I typed :   defaults write com.apple.dashboard mcx-disabled -boolean NO
Followed by : killall Dock

Dashboard worked fine after that.

I found the answer here.

Wednesday, November 12, 2008

Seam-gen and Oracle Express

I installed Oracle Express.  I created a user, "local," with the creative password, "local."  I created a project with seam-gen.  I created an entity object and annotated the id column with :
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@Column(name = "id", unique = true, nullable = false)
private Long id;
On deploy I saw in the logs :
09:42:14,281 INFO  [SchemaExport] exporting generated schema to database
09:42:14,609 ERROR [SchemaExport] Unsuccessful: create table TABLE_NAME (id number(19,0) not null unique, name varchar2(30) not null, description varchar2(200) not null, inputChannel varchar2(100) not null, outputChannel varchar2(100) not null, parser varchar2(100), primary key (id))
09:42:14,609 ERROR [SchemaExport] ORA-02261: such unique or primary key already exists in the table
The message, "such unique or primary key already exists in the table," led me to believe that the table existed.  However, I couldn't see it using the Oracle web interface.  Or SQL Developer.  Or MyEclipse. 

So I ran the statement in the web interface.  Same error. 

The problem turned out to be that the statement was creating the id twice.  First with, "id number(19,0) not null unique," and second with, "primary key (id)."

I changed the syntax, and it worked.  As for the annotations, I removed the "Column" annotation :
@Column(name = "id", unique = true, nullable = false)
When I redeployed it worked fine.

The working annotation was :
@Id
@SequenceGenerator(name = "TABLE_NAME_SEQUENCE_GENERATOR", sequenceName = "TABLE_NAME_SEQUENCE")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "TABLE_NAME_SEQUENCE_GENERATOR")
private Long id;