开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育
LibreOffice SDK 3
Does anyone use the LibreOffice SDK in their Java applications? The problem I find is bringing up the Application Context. I have an application that uses it and I have been using the Bootstrapconnector to bring it up (application context). I switched to Wildfly and it now gives me a reflection exception. In Glassfish/Payara, I dropped the libre office into the domain1/lib folder and it works. anyone use LibreOffice SDK to produce form letters? Bootstrap connector https://github.com/jeremysolarz/bootstrap-connector LibreOffice SDK https://api.libreoffice.org/ Brian -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
Sacjug site? 5
What happened to the sacjug site? -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
JavaOne this week 3
I have never been to JavaOne, yet I see that it is this week. https://www.oracle.com/javaone/ Any thoughts on JavaOne? Brian -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
SOAP over SMTP
I hope to do it someday! https://www.w3.org/2003/06/soap11-soap12.html That way when someone sends me the message, I will know if I got the message. The maven plugin for parsing the wsdl works pretty nice and simplified things for this project that I have been working on. Brian -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @
Clojure meeting this month! 2
We will have a Clojure meeting at the next SacLUG. https://www.saclug.org/articles/2025/march-2025.html Wednesday, March 19 6-8pm Raley's Extra Gather Room in Natomas. Diego will present! Brian -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
Sacramento Java User Group Domain sacjug.org 6
If you're interested in maintaining the sacjug.org domain please let me know. The domain expires this month. I don't see a need to continue the domain. Thanks - Chris.
Started by Chris Scheuble @ · Most recent @
converted DateTime sample from Netbeans to Maven 6
I guess not a lot of people are using xmlbean today, yet it is still maintained. The xmlbean examples still use Ant. I converted one of the projects to Maven and put it on Github. It uses the `generate-sources` plugin. https://github.com/brieweb/xmlbean02 Perhaps I should have called it DateTime rather than xmlbean02? Brian -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
Java vulnerability CVE-2025-21502
I just saw a medium vulnerability for Java https://www.cve.org/CVERecord?id=CVE-2025-21502 Fedora and Debian both released fixes in their OpenJDK releases. Brian -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @
Strange Character in String from DateFormat.format
I see now that this was actually intentional starting in version 20 to accommodate CLDR 42. ? https://stackoverflow.com/questions/77225936/java-21-problem-with-dateformat-getdatetimeinstance-formatnew-date https://bugs.openjdk.org/browse/JDK-8284840 https://unicode-org.atlassian.net/browse/CLDR-14032 Mystery solved. I need to start using the modern java.time classes defined in JSR 310. https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/time/package-summary.html
Started by consman2004 @
Strange Character in String from DateFromat.format 9
Does anyone know what this strange character is that Java generates between the 32 and the PM ? It looks like a space, but that is not it. This started happening in Java 20 or 21 ( not a problem in Java 19). Problem happens on at least Linux(Ubuntu) and Mac. Now is: Monday, September 16, 2024, 4:32:32 PM Pacific Daylight Time Here is the code that generates the output: efconsman@vpsv8wphwq:~/temp$ cat Dfhelp.java import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; class Dfhelp { public static void main(String args[]){ Date now = new Date(); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL, Locale.US); df.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles")); System.out.println("Now is: " + df.format(now)); } } efconsman@vpsv8wphwq:~/temp$ Thanks. Bob
Started by consman2004 @ · Most recent @
how to get code generation to put code in specific package? 2
Hello Everyone! I hope everyone is having a great New Year and lots of Java is planned! I have a Maven project using xmlbean. How is it that I can get it to put the generated sources into a specific package? By default, the generated sources go into `org.apache.xmlbeans.samples.xquery`. I would like them to go into a base package `com.example`. ``` $ mvn clean generate-sources compile ``` and if you want to run it. ``` $ mvn exec:java ``` I attached the sample project. ``` <plugins> <plugin> <groupId>org.apache.xmlbeans</groupId> <artifactId>xmlbeans</artifactId> <version>5.3.0</version> <executions> <execution> <goals> <goal>compile</goal> </goals> </execution> </executions> <configuration> <partialMethods>ALL,-GET_LIST,-XGET_LIST,-XGET_ARRAY</partialMethods> <extensions> </extensions> </configuration> <dependencies> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>2.23.1</version> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> <version>2.23.1</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.4.0</version> <configuration> <mainClass>xmlbean01.LoadXml</mainClass> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.9</version> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source> ${project.build.directory}/generated-sources </source> </sources> </configuration> </execution> </executions> </plugin> ``` -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
Strange Character in String from DateFormat.format 2
Thanks, Kevin! Sorry I did not see this earlier. Why in the world would they use NNBSPs here? Seems weird! And It makes it impossible to go the other direction and use the formatter to parse in a string like: Monday, September 16, 2024, 4:32:32 PM Pacific Daylight Time into a Date object ?? On September 16, 2024 5:36:26 PM "kevinb via groups.io" <kbrisso@...> wrote:
Started by consman2004 @ · Most recent @
Jakarta EE maven archetype 3
I hope everyone's Java EE / Jakarta EE endevours are going well! I found a good Maven archetype that works these days for getting a Jakarta EE project going! https://eclipse-ee4j.github.io/starter/ It seems like the old Java EE Maven archetypes I have don't work anymore. Ugh. I am running Netbeans 18 and it can't seem to generate a Netbeans Java EE project without error. Now that I think about it, there might be a different problem... Second, I like the Wildfly quickstarts. https://github.com/wildfly/quickstart/ Brian -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
Spring Boot react development on Fedora 40!
Come and see Spring Boot / React development on Fedora at SacLUG. https://www.saclug.org/articles/2024/july-2024.html Title: July General Meeting Event: 2024-07-16 6:00 pm to 8:00 pm Speaker: Brian E. Lavender Location: Bel Air #502 S.E.G.R. We will be at the Bel Aire *Something Extra Gather Room* again on Arden. ## Full Stack Development with React Just when you thought you had everything going with the older way of doing things, there is the 4th Edition! We will walk through various aspects of the [Full Stack Development with Spring Boot 3 and React: Build modern web applications using the power of Java, React, and TypeScript, Fourth Edition](https://www.packtpub.com/en-us/product/full-stack-development-with-spring-boot-3-and-react-9781805122463) using [Fedora 40](https://fedoraproject.org/workstation/download). [Examples](https://github.com/PacktPublishing/Full-Stack-Development-with-Spring-Boot-3-and-React-Fourth-Edition) The 4th editon uses Gradle, React/Vue, and Typescript! Brian -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @
How to do a merge on a REST update? 7
So, I was checking out the Java EE tutorial examples. https://github.com/javaee/tutorial-examples/blob/master/jaxrs/customer/src/main/java/javaeetutorial/customer/resource/CustomerService.java This is the tutorial link. https://docs.oracle.com/javaee/7/tutorial/jaxrs-advanced008.htm The customer example seems pretty good because it does the CRUD operation. Yet, it has an issue. The `updateCustomer` doesn't actually do an update! It creates a whole new object in the database! Plus, the findById method doesn't actually work because it uses a string instead of an int to search for the object. I updated the `updateCustomer` method for the example using reflection. It feels a like a hack though. Any thoughts? How do you guys do an update to the object from a REST type call like this? These are my code updates. ``` /** * Update a resource * * @param customer * @return Response URI for the Customer added * @see Customer.java */ @PUT @Path("{id}") @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response updateCustomer(@PathParam("id") String customerId, Customer customer) { try { Customer oldCustomer = findById(customerId); if (oldCustomer == null) { // return a not found in http/web format throw new WebApplicationException(Response.Status.NOT_FOUND); } else { mergeCustomer(oldCustomer,customer); persist(oldCustomer); return Response.ok().status(303).build(); //return a seeOther code } } catch (WebApplicationException e) { throw new WebApplicationException(e, Response.Status.INTERNAL_SERVER_ERROR); } } private void mergeCustomer(Customer oldCustomer, Customer customer) { Address oldAddress = oldCustomer.getAddress(); Address address = customer.getAddress(); merge(oldAddress,address); merge(oldCustomer,customer); } private long persist(Customer customer) { try { Address address = customer.getAddress(); em.persist(address); em.persist(customer); } catch (Exception ex) { logger.warning("Something went wrong when persisting the customer"); } return customer.getId(); } private Customer findById(String customerId) { Customer customer = null; Integer cusId = Integer.valueOf(customerId); try { customer = em.find(Customer.class, cusId); return customer; } catch (Exception ex) { logger.log(Level.WARNING, "Couldn't fine customer with ID of {0}", customerId); } return customer; } public void merge(Object obj, Object update){ if(!obj.getClass().isAssignableFrom(update.getClass())){ return; } Method[] methods = obj.getClass().getMethods(); for(Method fromMethod: methods){ logger.log(Level.INFO, "Method " + fromMethod.getName()); } for(Method fromMethod: methods){ if (fromMethod.getName().equals("getId")) continue; if (fromMethod.getName().equals("getAddress")) continue; if(fromMethod.getDeclaringClass().equals(obj.getClass()) && fromMethod.getName().startsWith("get")){ String fromName = fromMethod.getName(); String toName = fromName.replace("get", "set"); try { Method toMetod = obj.getClass().getMethod(toName, fromMethod.getReturnType()); Object value = fromMethod.invoke(update, (Object[])null); if(value != null){ toMetod.invoke(obj, value); } } catch (Exception e) { logger.log(Level.SEVERE, "Unable to Merge"); } } } } ``` -- Brian Lavender https://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
How to manage your NodeJS 2
How do you guys manage Node? I see nvm for Windows https://github.com/coreybutler/nvm-windows And for Fedora. https://github.com/nvm-sh/nvm#installing-and-updating Any tips on this? Brian -- Brian Lavender http://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
which java reference book 2
What Java reference book do you guys use/prefer? I generally think of two choices. Core Java by Cay Horstmann https://horstmann.com/corejava/ or Java How to Program by Deitel https://deitel.com/java-how-to-program-11-e-early-objects-version/ Brian -- Brian Lavender http://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
What is the status of this group? 8
I got a notification from groups.io that I will be dropped from this group unless I take some action. What is the status of this group? Are there any plans? -Gary
Started by Gary @ · Most recent @
npm debacle
When I look at npm, I worry about the coordination of the dependency process. https://www.theverge.com/2016/3/24/11300840/how-an-irate-developer-briefly-broke-javascript The build process for something like Fedora or Debian GNU/Linux distributions seems more robust. Brian -- Brian Lavender http://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @
not sure where the implementation is for Jakarta EE tags 4
I cloned the tags library and I built it, yet I only seem to find an API jar. Jakarta Standard Tag Library 3.0 https://jakarta.ee/specifications/tags/3.0/ GitHub repo https://github.com/jakartaee/tags For the old school jstl, you can drop in the jar and run with it. https://mvnrepository.com/artifact/javax.servlet/jstl/1.2 Any tips outside of switching to a different architecture? Brian -- Brian Lavender http://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture
Started by Brian E. Lavender @ · Most recent @
Current Image
Image Name
Sat 8:39am