I'm trying to get the auction sample run and followed the instructions
in "getting started".
No error messages from starting the infrastructure.
Starting the auction-client-test leads to:
<error message="java.sql.SQLSyntaxErrorException: Schema 'QUERYSERVER'
does not exist" type="java.lang.RuntimeException">
java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: Schema
'QUERYSERVER' does not exist
at
org.fuin.auction.client.test.AbstractUseCaseTest.deleteAllDatabaseData(AbstractUseCaseTest.java:
74)
[...]
I checked the derby-database with ij: there is indeed no schema. I
assume that auction-query-server should have built up a schema in th
database, but I could not find the location in the sources, where this
actually happens.
Trying to display the service (displaying "http://localhost:8080/
auction-query-server-0.2.0-SNAPSHOT" in the webbowser) leads to
another error message:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'connectionFactory' defined in class path
resource [jms-context.xml]: Initialization of bean failed; nested
exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor#0'
defined in class path resource [application-context.xml]: Cannot
resolve reference to bean 'txInterceptor' while setting bean property
'transactionInterceptor'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'txInterceptor' defined in class path resource
[application-context.xml]: Cannot resolve reference to bean
'txManager' while setting bean property 'transactionManager'; nested
exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'txManager' defined in class path
resource [application-context.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property
'entityManagerFactory'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'entityManagerFactory' defined in class path
resource [application-context.xml]: Invocation of init method failed;
nested exception is java.lang.NoClassDefFoundError: Could not
initialize class org.fuin.auction.query.server.AuctionUser
[...]
There seems to be an issue with spring-framework-classes not finding
the classes of auction-query-server. Since I'm very new to spring-
framework I appreciate any help or pointer to the right direction.
Looks like the infrastructure has not started correctly.
The database is created as a sub folder of the current directory. If
you started from Eclipse in the "Infrastructure" project it's located
in the project directory. Did everything build correctly using the
Maven builds? Any mesages on the console when starting the
infrastructure?
I'm using the command line to start the infrastructure-project since
trying to use the provided launchfiles in eclipse leaded to the
message: "Referenced classpath provider does not exist:
org.maven.ide.eclipse.launchconfig.classpathprovider". (I tried both
eclipse-maven-plugins from http://maven.apache.org/eclipse-plugin.html)
both directories: activemy-data and derby-data are created in the
project-folder.
the database is present and connectable. should the infrastructure
also create the schema/tables?
should the infrastructure also create the schema/tables?
No, the tables are created when starting the query server.
The console looks good so far.
Do you have any errors starting the command and the query server after
the infrastructure is up and running?
Cheers,
Michael
Tipp: Be sure you execute the shutdown application in the
infrastructure to close all open files. Otherwise next start may show
errors (In this case simply delete the ActiveMQ and Derby directories
and try again).
I set up tomcat and building sources anew, to be sure that everything
is clean.
The tomcat logfile localhost.log told me, that a class in emma.jar was
missing, for the query-service.
I copied it into the "tomcat/lib" directory.
I made a step further: The queryserver-database is beeing created now,
but the commandserver-database is not.
starting the "auction-client-test"-testcase gives me the following
surefire-report:
<error message="java.sql.SQLSyntaxErrorException: Schema
'COMMANDSERVER' does not exist" type="java.lang.RuntimeException">
java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: Schema
'COMMANDSERVER' does not exist at
org.fuin.auction.client.test.AbstractUseCaseTest.deleteAllDatabaseData(AbstractUseCaseTest.java:
74) at
org.fuin.auction.client.test.CategoryUseCaseTest.testCategoryLifeCycle(CategoryUseCaseTest.java:
39) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [...]
I checked derby-db with ij to veryfiy that the commandserver-schema is
not there.
Hope you can find the missing part.
That's it, now everything (testcases/click-ui) works!
Things I had to modify to get the example working:
- skip the testcase "basetest" for building the sources, because Junit
cannot find a class named "package-info"
- remove the suffix "-0.2.0-SNAPSHOT" in the name of the war-files
- copy emma.jar into $tomcat-root/lib
That's it, now everything (testcases/click-ui) works!
Good to hear it finally works
Things I had to modify to get the example working:
- skip the testcase "basetest" for building the sources, because Junit
cannot find a class named "package-info"
- remove the suffix "-0.2.0-SNAPSHOT" in the name of the war-files
- copy emma.jar into $tomcat-root/lib
I'll check that and add things to the "Getting Started" if necessary.
I think I'll also create a VirtualBox VM that contains everything to
start completely without any installation. This would make it much
easier just to start the VM and try things out.