Errors after creating integration component

6 views
Skip to first unread message

Joacim J

unread,
Sep 25, 2014, 12:07:14 PM9/25/14
to soi-tool...@googlegroups.com
Hi,
I have installed SOI Toolkit 0.6.1 in MuleStudio 3.4.0 32-bit on Win8.1 64-bit (but have also tested the same config on Win7 64-bit with the same result).
After generating an integration component I get 6 errors saying
"Attribute profile is not defined as a valid property of beans" in 
/sample1/flows/sample1-common.mflow
/sample1/src/main/app/sample1-common.xml

Using:

H:\>java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)

H:\>mvn -v
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\JavaDev\tools\apache-maven-3.0.4
Java version: 1.7.0_67, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.7.0_67\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 8.1", version: "6.3", arch: "x86", family: "windows"

Do you have an idea why this happens and what to do?

Regards
Joacim

Magnus Larsson

unread,
Sep 25, 2014, 12:44:29 PM9/25/14
to soi-tool...@googlegroups.com
Hello Joacim!

No, I have not seen that specific error, but I guess that it has to do with the integration with Mule Studio...
Can you try to take Mule Studio out of the equation and try out soi-toolkit on the command line like:

# Create a new IC
mvn org.soitoolkit.tools.generator:soitoolkit-generator-maven-plugin:0.6.1:genIC -Dconnectors=JMS

# Step into the new IC and create a sample service
cd sample1
mvn org.soitoolkit.tools.generator:soitoolkit-generator-maven-plugin:0.6.1:genService -DmessageExchangePattern=One-Way -DinboundTransport=JMS -DoutboundTransport=JMS

# Build and test the service
mvn test

# Optional: Start ActiveMQ and Mule
activemq start
mvn -PmuleServer

# Put a message like "A1" on the queue SAMPLE1.SAMPLE.IN.QUEUE and you should see the following in the terminal

2014-09-25 18:34:41,182 INFO  [ActiveMQ Session Task-2] org.soitoolkit.commons.mule.messageLogger - soi-toolkit.log

** logEvent-info.start ***********************************************************

IntegrationScenarioId=

ContractId=

LogMessage=msg-in

ServiceImpl=sample-service

Host=Magnus-MacBook-Pro.local (192.168.1.100)

ComponentId=sample1

Endpoint=jms://SAMPLE1.SAMPLE.IN.QUEUE

MessageId=d93ee9fd-44d1-11e4-a49c-2761e30a38fd

BusinessCorrelationId=

BusinessContextId=

ExtraInfo=

Payload=

** logEvent-info.end *************************************************************

2014-09-25 18:34:41,238 INFO  [ActiveMQ Session Task-2] org.soitoolkit.commons.mule.messageLogger - soi-toolkit.log

** logEvent-info.start ***********************************************************

IntegrationScenarioId=

ContractId=

LogMessage=msg-out

ServiceImpl=sample-service

Host=Magnus-MacBook-Pro.local (192.168.1.100)

ComponentId=sample1

Endpoint=jms://SAMPLE1.SAMPLE.OUT.QUEUE

MessageId=d93ee9fd-44d1-11e4-a49c-2761e30a38fd

BusinessCorrelationId=

BusinessContextId=

ExtraInfo=

Payload=

** logEvent-info.end *************************************************************

2014-09-25 18:34:41,246 WARN  [ActiveMQ Session Task-2] org.mule.transport.jms.JmsMessageDispatcher - Starting patched JmsMessageReceiver

2014-09-25 18:34:41,279 INFO  [sample-teststub-service.stage1.02] org.sample.sample1.sample.SampleTestReceiver - SampleTestReceiver received the message: 11

# Hit return to stop the Mule server...
 

If this works then the next step is to investigate closer what and when you get the error in Mule Studio :-)

Ok?

Regards,
Magnus.

--
You received this message because you are subscribed to the Google Groups "soi-toolkit-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to soi-toolkit-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joacim J

unread,
Sep 25, 2014, 1:40:35 PM9/25/14
to soi-tool...@googlegroups.com
Hi Magnus,

Thanks for the quick reply :-)

I tried it but not without problems.

Tried:
mvn org.soitoolkit.tools.generator:soitoolkit-generator-maven-plugin:0.6.1:genIC -Dconnectors=JMS
But got:

[ERROR] Failed to execute goal org.soitoolkit.tools.generator:soitoolkit-generator-maven-plugin:0.6.1:genIC (default-cli) on project standalone-pom: Invalid connector: JMS, allowed
 values: JDBC FTP SFTP SERVLET -> [Help 1]
 
As said in https://code.google.com/p/soi-toolkit/wiki/UG_UsingGenerator_genIC it doesn't need to be specified and allowed values: JDBC,FTP,SFTP,SERVLET, so I just left out that parameter. Running:
mvn org.soitoolkit.tools.generator:soitoolkit-generator-maven-plugin:0.6.1:genIC 
But it includes, JDBC, FTP, SFTP as in the output

[INFO] outDir=H:\Documents\Projekt\Mule
[INFO] artifactId=sample1
[INFO] groupId=org.sample
[INFO] version=1.0.0-SNAPSHOT
[INFO] muleVersion=3.4.0
[INFO] deployModel=Standalone
[INFO] connectors=JMS,JDBC,FTP,SFTP
[INFO] groovyModel=null

But successful... creating the service
mvn org.soitoolkit.tools.generator:soitoolkit-generator-maven-plugin:0.6.1:genService -DmessageExchangePattern=One-Way -DinboundTransport=JMS -DoutboundTransport=JMS
It was successful

Running test
mvn test
Successful

Started ActiveMQ
Executed
mvn -PmuleServer

But fails as it seems to connect to DB for some reason.

2014-09-25 19:23:49,639 INFO  [ActiveMQ Task-1] org.apache.activemq.transport.failover.FailoverTransport - Successfully connected to tcp://localhost:61616
2014-09-25 19:23:50,801 ERROR [MuleServer] org.mule.retry.notifiers.ConnectNotifier - Failed to connect/reconnect: JdbcConnector
{
  name=soitoolkit-jdbc-connector
  lifecycle=initialise
  this=15a4dac
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=false
  connected=false
  supportedProtocols=[jdbc]
  serviceOverrides=<none>
}
. Root Exception was: Connection refused: connect. Type: class java.net.ConnectException

Anyway, I executed
mvn eclipse:eclipse
and imported the project into workspace but have the 6 errors + 4 new ones


So unfortunately I have some problems....maybe I need to get a Apple thingie ;-) :-D

Best Regards
Joacim

Magnus Larsson

unread,
Sep 25, 2014, 2:08:58 PM9/25/14
to soi-tool...@googlegroups.com
Hello again Joacim!

If you leave the connectors argument you get the default value as can be seen in the output of the command:

[INFO] =========================================

[INFO] = Creating an new Integration Component =

[INFO] =========================================

[INFO] 

[INFO] ARGUMENTS:

[INFO] (change an arg by suppling: -Darg=value):

[INFO] 

[INFO] outDir=/Users/magnus/Documents/temp/st

[INFO] artifactId=sample1

[INFO] groupId=org.sample

[INFO] version=1.0.0-SNAPSHOT

[INFO] muleVersion=3.4.0

[INFO] deployModel=Standalone

[INFO] connectors=JMS,JDBC,FTP,SFTP

[INFO] groovyModel=null

[INFO] 


So you get a connector of each transport: JMS,JDBC,FTP and SFTP
If you specify the connectors-argument with an empty value ( -Dconnectors= ), you will get the mandatory JMS transport only.

(sorry, the logic in is this it totally my fault :-)

So that's why your IC tried to connect to a database...


Over to the errors in Mule Studio:

Now I recognise them (a lot!) thanks to your screen shot!

They are most probably caused by the fact that Mule Studio only is capable of dealing with a subset of the syntax supported by Mule in the spring config files. MuleSoft is very much aware of this and have added a switch in the Mule Studio Preference tab where this check can be disabled, see "Menu --> Windows (I think it is placed under Window on a PC) --> Preferences --> Mule Studio". Select the check-buttons for "Turn off error reporting in XML editor" and "Turn off xdd validation in XML editor".

Errors should now disappear and the tests should run fine. Unfortunately can you neither use the built in Mule flow launcher in most cases. Instead we supply a ${IC-name}MuleServer.java class (under src/test/java) that can be used to start a MuleServer inside Mule Studio (the same main-class that is started with mvn -PmuleServer.

We are currently developing v2.0 of soi-toolkit and we will look into how we can improve the integration with Anypoint Studio (as Mule Studio is called nowadays). So, please continue to let us know what problems you run into when it comes to the integration between Anypoint/MuleStudio and ski-toolkit! We will try to make priorities based on your feedback.

Any other feedback is of course welcome as well :-)

Regards,
Magnus.

Joacim J

unread,
Sep 25, 2014, 3:55:53 PM9/25/14
to soi-tool...@googlegroups.com
Yes, that worked :-)
Didn't find the "Turn off xsd validation in XML editor" but the other checkbox solved it.

Will continue to play with it to add some transformations in my home automation system ....my company is not yet mature to take the step toward Mule but anyway leave WMB as much as possible.

Time for a lunch sometime soon?

Cheers and thanks for the help Magnus!

Regards
Joacim
Reply all
Reply to author
Forward
0 new messages