Using the Sample Aware applications

We are testing AdhereWeatherForecast and configured the config.cfg and input.txt file to have a test message send to my personal phone

However when executing the command java -jar AdhereWeatherForecast.jar config.cfg input.txt

We get the result

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
16 Dec13:31

JRE Version

By BlacKDiamonD

What is your current JRE version? This was tested on JRE 1.6, and we've faced the same error before when trying to run it on JRE 1.5

16 Dec16:05

We have installed java

By dalekurt

We have installed java version "1.5.0_14" I'll upgrade and try once more. Thank you.

16 Dec22:15

We upgraded to java

By dalekurt

We upgraded to java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode)

The command java -jar AdhereFXRates.jar config.cfg input.txt was executed, just awaiting the SMS.

Thanks for the assistance.

16 Dec22:46

After executing the command

By dalekurt

After executing the command it seems it has gone through ok, a debug.log was generated

Debug.log
Tue 16 Dec 2008 14:10:53 : SMPP class created

However no message has been sent to me.

I double checked the config.cfg and input.txt which are correct

config.cfg
# User Profiles DB Configuration:
upserver_url = http://localhost/upserver/userprofilerequest.php?

# AdServer Configuration:
adserver_url = http://localhost/adserver/www/delivery/requestad.php?
adserver_accountid = 1
adserver_password = admin
adserver_adseparator = \n--End of Ad--\n
adserver_multipart = 10

# Clickatel Configuration:
clickatel_api_id = MY_API_ID
clickatel_username = MY_USERNAME
clickatel_password = MY_PASSWORD

input.txt
+1876XXXXXX Dale-Kurt Murray Kingston

Within the adhere server there is also a localhost.conf.php setup for localhost host access.

Help :)

17 Dec00:35

Is there an Ad in the adserver?

By BlacKDiamonD

Hello Dalekurt,
Please make sure that there is an ad of type "Picture SMS" in the adserver. The Currency Exchange Rates sample app is used to demonstrate the capability of tagging Picture SMS. The Weather Forecast demonstrates the normal text messages.

The Currency Exchange Rates sample app does not send a message if no ads were retrieved from the adserver. So please make sure to have any ad of type "Picture SMS"

There is a certain format for the allowed picture sms messages which is to be a BMP file, Monochrome, sizes (72x14 OR 72x28).

We are happy to provide you with sample pictures that we use if you find difficulty making or finding one.

I hope this helps :)

17 Dec03:11

I believe I understand, I

By dalekurt

I believe I understand, I currently have no ads on the adserver, so what I will do is to test the weather forecast.

I just tested and it was successful, thanks BlackDiamonD. I would really appreciate the sample pictures, in fact I would love to know if there is a structure in the design and development of the .jar file