xGSN - error while buliding - JiBX error java.lang.CharSequence

1,287 views
Skip to first unread message

Ravi Kumar Polampelli

unread,
Jun 19, 2014, 8:46:33 PM6/19/14
to ope...@googlegroups.com
Hi,

I tried to use x-GSN as per , https://github.com/OpenIotOrg/openiot/wiki/X-GSN-Use

I was getting class not find exception.

C:\Users\ravi\Documents\GitHub\openiot\modules\x-gsn>gsn-start.bat

C:\Users\ravi\Documents\GitHub\openiot\modules\x-gsn>java -classpath "./target/*
;./target/dependencies/*" -splash:lib/logo.png -Dorg.apache.commons.logging.Log=
org.apache.commons.logging.impl.Log4JLogger -Dorg.mortbay.log.LogFactory.noDisco
very=false org.openiot.gsn.Main 22232
Error: Could not find or load main class org.openiot.gsn.Main


Then I tried to build the x-gsn module, but I am getting below error. please help.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.752 s
[INFO] Finished at: 2014-06-20T01:30:15+00:00
[INFO] Final Memory: 14M/189M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jibx:maven-jibx-plugin:1.2.5:bind (default) o
n project xgsn: Error loading class java.lang.CharSequence: Error reading path j
ava/lang/CharSequence.class for class java.lang.CharSequence
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.jibx:maven-jibx-plugin:1.2.5:bind (default) on project xgsn: Error loading cl
ass java.lang.CharSequence: Error reading path java/lang/CharSequence.class for
class java.lang.CharSequence


Caused by: java.lang.IllegalStateException: Error loading class java.lang.CharSe
quence: Error reading path java/lang/CharSequence.class for class java.lang.Char
Sequence
        at org.jibx.binding.classes.ClassCache$ClassCacheLocator.getClassInfo(Cl
assCache.java:291)
        at org.jibx.binding.model.ClassHierarchyContext.accumulateInterfaces(Cla
ssHierarchyContext.java:95)
        at org.jibx.binding.model.ClassHierarchyContext.addTypedComponent(ClassH
ierarchyContext.java:121)
        at org.jibx.binding.model.DefinitionContext.addFormat(DefinitionContext.
java:527)
        at org.jibx.binding.model.BindingElement.defineBaseFormat(BindingElement
.java:843)
        at org.jibx.binding.model.BindingElement.runValidation(BindingElement.ja
va:865)
        at org.jibx.binding.model.BindingElement.runValidation(BindingElement.ja
va:899)
        at org.jibx.binding.model.BindingElement.validateBinding(BindingElement.
java:969)
        at org.jibx.binding.Utility.validateBinding(Utility.java:226)
        at org.jibx.binding.Utility.loadBinding(Utility.java:269)
        at org.jibx.binding.Utility.loadFileBinding(Utility.java:420)
        at org.jibx.binding.Compile.compile(Compile.java:217)
        at org.jibx.maven.AbstractBaseBindingMojo.compile(AbstractBaseBindingMoj
o.java:163)

Ben McCann

unread,
Mar 6, 2015, 2:31:48 PM3/6/15
to ope...@googlegroups.com
The problem is the one described here:

Thiago Moreira

unread,
Nov 6, 2016, 10:11:07 AM11/6/16
to OpenIoT
More specifically, the error I was getting in the xgsn part was the JiBX error java.lang.CharSequence, which has a solution described in
http://stackoverflow.com/questions/30461802/org-jibx-maven-jibx-plugin1-2-1-error-reading-path/40450781#40450781
The only trick it was the bcel version (6.0-SNAPSHOT) which is official released now and can be retrieved directly by the version 6.0

In the xgsn pom.xml, I added dependencies for the maven-jibx-plugin (line 81), as bellow:

<plugin>
               
<groupId>org.jibx</groupId>
               
<artifactId>maven-jibx-plugin</artifactId>
               
<version>1.2.5</version>
               
<!--<version>1.1.6a</version> -->
               
<dependencies>
                   
<dependency>
                     
<groupId>org.apache.bcel</groupId>
                     
<artifactId>bcel</artifactId>
                     
<version>6.0</version>
                       
</dependency>
                   
</dependencies>
               
<configuration>
                   
<directory>conf/bind</directory>
                   
<includes>
                       
<include>containerJIBX.xml</include>
                       
<include>VirtualSensorDescription.xml</include>
                   
</includes>
                   
<verbose>true</verbose>
               
</configuration>
               
<executions>
                   
<execution>
                       
<goals>
                           
<goal>bind</goal>
                       
</goals>
                   
</execution>
               
</executions>
           
</plugin>




On Friday, March 6, 2015 at 8:31:48 PM UTC+1, Ben McCann wrote:
The problem is the one described here:


On Thursday, June 19, 2014 at 5:46:33 PM UTC-7, Ravi Kumar Polampelli wrote:
Reply all
Reply to author
Forward
0 new messages